RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
|
Represents the equation of state for fluid mixtures in the simulation. More...
Public Types | |
enum class | Type : int { PengRobinson = 0 , PengRobinsonGasem = 1 , SoaveRedlichKwong = 2 } |
Enumeration of supported equations of state. More... | |
enum class | MultiComponentMixingRules : int { VanDerWaals = 0 } |
Enumeration of mixing rules for multi-component systems. More... | |
enum class | FluidState : int { Unknown = 0 , SuperCriticalFluid = 1 , Vapor = 2 , Liquid = 3 , VaporLiquid = 4 } |
Enumeration of possible fluid states. More... | |
Public Member Functions | |
EquationOfState ()=default | |
Default constructor for the EquationOfState struct. | |
EquationOfState (EquationOfState::Type type, EquationOfState::MultiComponentMixingRules multiComponentMixingRules, double temperature, double pressure, const SimulationBox &simulationBox, double heliumVoidFraction, std::vector< Component > &components) | |
Constructs an EquationOfState with specified parameters. | |
void | computeComponentFluidProperties (EquationOfState::Type equationOfState, EquationOfState::MultiComponentMixingRules multiComponentMixingRules, double temperature, double pressure, const SimulationBox &simulationBox, double heliumVoidFraction, std::vector< Component > &components) |
Computes the fluid properties for each component in the mixture. | |
Public Attributes | |
std::uint64_t | versionNumber {1} |
Version number for serialization. | |
EquationOfState::FluidState | fluidState {EquationOfState::FluidState::Unknown} |
Current fluid state. | |
EquationOfState::Type | equationOfState {EquationOfState::Type::PengRobinson} |
Type of equation of state used. | |
EquationOfState::MultiComponentMixingRules | multiComponentMixingRules |
Mixing rules for multi-component systems. | |
Friends | |
Archive< std::ofstream > & | operator<< (Archive< std::ofstream > &archive, const EquationOfState &s) |
Serializes the EquationOfState object to an output archive. | |
Archive< std::ifstream > & | operator>> (Archive< std::ifstream > &archive, EquationOfState &s) |
Deserializes the EquationOfState object from an input archive. | |
Represents the equation of state for fluid mixtures in the simulation.
The EquationOfState struct encapsulates the properties and behaviors associated with computing the thermodynamic properties of fluid mixtures based on different equations of state. It supports various types of equations of state, mixing rules for multi-component systems, and fluid states. The struct provides methods to compute component fluid properties and supports serialization through friend operators.
|
strong |
|
strong |
|
strong |
|
default |
Default constructor for the EquationOfState struct.
Initializes an EquationOfState object with default values.
EquationOfState::EquationOfState | ( | EquationOfState::Type | type, |
EquationOfState::MultiComponentMixingRules | multiComponentMixingRules, | ||
double | temperature, | ||
double | pressure, | ||
const SimulationBox & | simulationBox, | ||
double | heliumVoidFraction, | ||
std::vector< Component > & | components | ||
) |
Constructs an EquationOfState with specified parameters.
Initializes an EquationOfState object and computes the fluid properties for the given components based on the specified equation of state and mixing rules.
type | The type of equation of state to use. |
multiComponentMixingRules | The mixing rules for multi-component systems. |
temperature | The temperature of the system in Kelvin. |
pressure | The pressure of the system in Pascal. |
simulationBox | The simulation box containing the system dimensions. |
heliumVoidFraction | The fraction of void space occupied by helium. |
components | The components present in the fluid mixture. |
void EquationOfState::computeComponentFluidProperties | ( | EquationOfState::Type | equationOfState, |
EquationOfState::MultiComponentMixingRules | multiComponentMixingRules, | ||
double | temperature, | ||
double | pressure, | ||
const SimulationBox & | simulationBox, | ||
double | heliumVoidFraction, | ||
std::vector< Component > & | components | ||
) |
Computes the fluid properties for each component in the mixture.
Calculates various thermodynamic properties such as fugacity coefficients, amount of excess molecules, bulk fluid density, and compressibility factors for the components based on the specified equation of state and mixing rules.
equationOfState | The type of equation of state to use. |
multiComponentMixingRules | The mixing rules for multi-component systems. |
temperature | The temperature of the system in Kelvin. |
pressure | The pressure of the system in Pascal. |
simulationBox | The simulation box containing the system dimensions. |
heliumVoidFraction | The fraction of void space occupied by helium. |
components | The components present in the fluid mixture. |
|
friend |
Serializes the EquationOfState object to an output archive.
archive | The output archive to serialize to. |
s | The EquationOfState object to serialize. |
|
friend |
Deserializes the EquationOfState object from an input archive.
archive | The input archive to deserialize from. |
s | The EquationOfState object to deserialize into. |
EquationOfState::MultiComponentMixingRules EquationOfState::multiComponentMixingRules |
Mixing rules for multi-component systems.