API Reference
Database Access
YamDB.get_from_metals — Function
get_from_metals(substance) -> PropertiesLoad a liquid metal from the bundled metals.yml database (36 substances).
YamDB.get_from_salts — Function
get_from_salts(substance) -> Properties or MixturePropertiesLoad a molten salt from the bundled salts.yml database (151 substances).
YamDB.get_from_alloys — Function
get_from_alloys(substance) -> MixturePropertiesLoad an alloy system from the bundled alloys.yml database (6 systems).
YamDB.get_from_Janz1992 — Function
get_from_Janz1992(substance) -> Properties or MixturePropertiesLoad a substance from the bundled Janz 1992 NIST database (Janz1992_ed.yml, 1,022 substances).
YamDB.get_properties_from_db — Function
get_properties_from_db(db_file, substance) -> Properties or MixturePropertiesLoad a substance from a YAML database file. Returns MixtureProperties if the substance name contains -, otherwise Properties.
Types
YamDB.Properties — Type
PropertiesThermophysical properties object for a single substance or composition. Created by get_from_metals, get_from_salts, etc.
Fields
Tm::Union{Float64,Nothing}: Melting temperature (K)Tb::Union{Float64,Nothing}: Boiling temperature (K)M::Union{Float64,Nothing}: Molar mass (kg/mol)
YamDB.MixtureProperties — Type
MixturePropertiesProperties object for a multi-component mixture (e.g., salt mixtures, alloys). Contains a composition dictionary mapping composition keys (e.g., "0-100", "range") to Properties objects.
YamDB.SubstanceDB — Type
SubstanceDBA loaded YAML database containing substance data. Created from a YAML file path or a pre-loaded dictionary.
Property Functions
YamDB.density — Function
density(p::Properties, T::Real, args...; source=nothing)Compute the density at temperature T (K). Returns value in kg/m³. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.dynamic_viscosity — Function
dynamic_viscosity(p::Properties, T::Real, args...; source=nothing)Compute the dynamic viscosity at temperature T (K). Returns value in Pa·s. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.expansion_coefficient — Function
expansion_coefficient(p::Properties, T::Real, args...; source=nothing)Compute the volumetric expansion coefficient at temperature T (K). Returns value in 1/K. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.heat_capacity — Function
heat_capacity(p::Properties, T::Real, args...; source=nothing)Compute the heat capacity at temperature T (K). Returns value in J/(kg·K). If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.resistivity — Function
resistivity(p::Properties, T::Real, args...; source=nothing)Compute the electrical resistivity at temperature T (K). Returns value in Ω·m. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.sound_velocity — Function
sound_velocity(p::Properties, T::Real, args...; source=nothing)Compute the sound velocity at temperature T (K). Returns value in m/s. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.surface_tension — Function
surface_tension(p::Properties, T::Real, args...; source=nothing)Compute the surface tension at temperature T (K). Returns value in N/m. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.thermal_conductivity — Function
thermal_conductivity(p::Properties, T::Real, args...; source=nothing)Compute the thermal conductivity at temperature T (K). Returns value in W/(m·K). If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.vapour_pressure — Function
vapour_pressure(p::Properties, T::Real, args...; source=nothing)Compute the vapour pressure at temperature T (K). Returns value in Pa. If source is not specified, the default source is used. For concentration-dependent properties, pass concentration as additional argument.
YamDB.volume_change_fusion — Function
volume_change_fusion(p::Properties; source=nothing)Return the volume change on fusion as a percentage value. If source is not specified, the default source is used.
Query Functions
YamDB.source_list — Function
source_list(p::Properties, prop::String) -> Vector{String}Return a list of available sources for the given property.
YamDB.default_source — Function
default_source(p::Properties, prop::String) -> Union{String, Nothing}Return the default source for a property, or nothing if none is defined.
YamDB.property_list — Function
property_list(p::Properties) -> Vector{String}Return a list of all available properties for the substance.
YamDB.equation_limits — Function
equation_limits(p::Properties, prop, source; variable="T") -> TupleReturn the valid range for a property equation. By default returns (Tmin, Tmax). Set variable="x" to get concentration limits (xmin, xmax). Values are nothing if not specified in the database.
YamDB.get_comment — Function
get_comment(p::Properties, prop, source) -> Union{String, Nothing}Return the comment for a property source, or nothing if none exists.
YamDB.get_reference — Function
get_reference(p::Properties, prop, source) -> StringReturn the reference key for a property source. Falls back to source if no explicit reference is defined.
Mixture Queries
YamDB.get_compositions_with_property — Function
get_compositions_with_property(mp::MixtureProperties, prop; keep_range=false)Return a sorted list of compositions that have data for the given property. The "range" composition is excluded by default; set keep_range=true to include it.
YamDB.get_compositions_with_property_source — Function
get_compositions_with_property_source(mp::MixtureProperties, prop, source; keep_range=false)Return a sorted list of compositions that have the given property from the given source.
Substance Database
YamDB.get_substance — Function
get_substance(db::SubstanceDB, name) -> Dict or NothingReturn the substance dictionary for name, or nothing if not found.
YamDB.has_substance — Function
has_substance(db::SubstanceDB, name) -> BoolCheck if a substance exists in the database.
YamDB.has_component — Function
has_component(db::SubstanceDB, name) -> Vector{String} or NothingFind mixtures containing name as a component (e.g., "CaCl2" in "CaCl2-NaCl"). Returns a list of matching substance names, or nothing if none found.
YamDB.list_substances — Function
list_substances(db::SubstanceDB) -> Vector{String}Return a list of all substance names in the database.
References
YamDB.get_from_references — Function
get_from_references(key) -> String or NothingLook up a citation key in the bundled references.yml file. Returns the reference string, or nothing if the key is not found.
YamDB.get_references_from_db — Function
get_references_from_db(db_file, key) -> String or NothingLook up a citation key in a YAML references file. Returns nothing if not found. The file is cached by SHA1 hash.
YamDB.load_yaml_references — Function
load_yaml_references(db_file) -> Dict{String, Any}Load a YAML references file and return it as a dictionary.