API Reference

Database Access

YamDB.get_from_metalsFunction
get_from_metals(substance) -> Properties

Load a liquid metal from the bundled metals.yml database (36 substances).

YamDB.get_from_saltsFunction
get_from_salts(substance) -> Properties or MixtureProperties

Load a molten salt from the bundled salts.yml database (151 substances).

YamDB.get_from_alloysFunction
get_from_alloys(substance) -> MixtureProperties

Load an alloy system from the bundled alloys.yml database (6 systems).

YamDB.get_from_Janz1992Function
get_from_Janz1992(substance) -> Properties or MixtureProperties

Load a substance from the bundled Janz 1992 NIST database (Janz1992_ed.yml, 1,022 substances).

Types

YamDB.PropertiesType
Properties

Thermophysical 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.MixturePropertiesType
MixtureProperties

Properties 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.SubstanceDBType
SubstanceDB

A loaded YAML database containing substance data. Created from a YAML file path or a pre-loaded dictionary.

Property Functions

YamDB.densityFunction
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_viscosityFunction
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_coefficientFunction
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_capacityFunction
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.resistivityFunction
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_velocityFunction
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_tensionFunction
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_conductivityFunction
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_pressureFunction
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_fusionFunction
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_listFunction
source_list(p::Properties, prop::String) -> Vector{String}

Return a list of available sources for the given property.

YamDB.default_sourceFunction
default_source(p::Properties, prop::String) -> Union{String, Nothing}

Return the default source for a property, or nothing if none is defined.

YamDB.property_listFunction
property_list(p::Properties) -> Vector{String}

Return a list of all available properties for the substance.

YamDB.equation_limitsFunction
equation_limits(p::Properties, prop, source; variable="T") -> Tuple

Return 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_commentFunction
get_comment(p::Properties, prop, source) -> Union{String, Nothing}

Return the comment for a property source, or nothing if none exists.

YamDB.get_referenceFunction
get_reference(p::Properties, prop, source) -> String

Return the reference key for a property source. Falls back to source if no explicit reference is defined.

Mixture Queries

YamDB.get_compositions_with_propertyFunction
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_sourceFunction
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_substanceFunction
get_substance(db::SubstanceDB, name) -> Dict or Nothing

Return the substance dictionary for name, or nothing if not found.

YamDB.has_substanceFunction
has_substance(db::SubstanceDB, name) -> Bool

Check if a substance exists in the database.

YamDB.has_componentFunction
has_component(db::SubstanceDB, name) -> Vector{String} or Nothing

Find 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_substancesFunction
list_substances(db::SubstanceDB) -> Vector{String}

Return a list of all substance names in the database.

References

YamDB.get_from_referencesFunction
get_from_references(key) -> String or Nothing

Look 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_dbFunction
get_references_from_db(db_file, key) -> String or Nothing

Look up a citation key in a YAML references file. Returns nothing if not found. The file is cached by SHA1 hash.

YamDB.load_yaml_referencesFunction
load_yaml_references(db_file) -> Dict{String, Any}

Load a YAML references file and return it as a dictionary.