Exposed Functionality
The exposed methods do not apply to all EOS models. The assumption here, until the transition to Clapeyron.jl is made, is that only what is needed in downstream membrane packages is exposed / implemented. If you need some extra functionality for a project, please submit an issue (pull requests also welcome).
MembraneBase.pressure
— Methodpressure(model, v, t, [mole_fractions])
Get the pressure of the state in MPa given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.VT_chemical_potential
— MethodVT_chemical_potential(model, v, t, [mole_fractions])
Get the chemical potential of the state in J/mol given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.VT_compressibility_factor
— Methodcompressibility_factor(model, v, t, [mole_fractions])
Get the compressibility factor (z) of the state given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.VT_mass_density
— MethodVT_mass_density(model, v, t, [mole_fractions])
Get the density of the state in g/cm3 given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.activity
— Methodactivity(model, p, t, [mole_fractions])
Get the chemical activity of the state given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.chemical_potential
— Methodchemical_potential(model, p, t, [mole_fractions])
Get the chemical potential of the state in J/mol given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.chemical_potential_res
— Methodchemical_potential_res(model, p, t, [mole_fractions])
Get the residual chemical potential of the state in J/mol given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.compressibility_factor
— Methodcompressibility_factor(model, p, t, [mole_fractions])
Get the compressibility factor (z) of the state given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.density_upper_bound
— Methoddensity_upper_bound(model, [mass_fractions])
Get the maximum possible mass density that the system can exhibit (e.g., for Sanchez Lacombe, this is its mixed characteristic density, for cubic EOSs, it is infinite), given its composition (omitted if system is pure).
MembraneEOS.fugacity
— Methodfugacity(model, p, t, [mole_fractions])
Get a vector of fugacities for each component in the state in MPa given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.get_kij
— Methodget_kij(modeltype, component_1::String, component_2::String; [default_value=0.0])
Attempt to look up the kij value between two components for a given EOS model type.
- Returns
missing
if the value is not in the database. - Equal pairings (i.e., "CO2" and "CO2" will return the
default_value
).
MembraneEOS.get_kij_matrix
— Functionget_kij_matrix(modeltype, components::AbstractVector{<:String})
Attempt to look up all pairings in a list of components and arrange them into a corresponding KIJ matrix.
- When constructing an entire matrix at once, it is assumed you want to ignore missing values, so component pairings not in the database are assumed to interact ideally instead of being listed as
missing
.
e.g.,
get_kij_matrix(PR(), ["CO2", "CH4"])
> 2×2 Matrix{Union{Missing, Float64}}:
> 0.0 0.09
> 0.09 0.0
get_kij_matrix(PR(), ["CO2", "Something not in the database"])
> 2×2 Matrix{Union{Missing, Float64}}:
> 0.0 0.0
> 0.0 0.0
MembraneEOS.mass_density
— Methodmass_density(model, p, t, [mole_fractions])
Get the mass density of the state in g/cm3 given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.molecular_weight
— MethodGet a vector of molecular weights for the system in g/cm3.
MembraneEOS.volume
— Methodvolume(model, p, t, [mole_fractions])
Get the volume of the state in MPa given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).
MembraneEOS.ρTω_activity
— MethodρTω_activity(model, ρ, t, [mass_fractions])
Get the chemical activity of the state given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).
MembraneEOS.ρTω_chemical_potential
— MethodρTω_chemical_potential(model, ρ, t, [mass_fractions])
Get the chemical potential of the state in J/mol given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).
MembraneEOS.ρTω_chemical_potential_res
— MethodρTω_chemical_potential_res(model, ρ, t, [mass_fractions])
Get the residual chemical potential of the state in J/mol given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).