https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
BrineFluidProperties Class Reference

Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fraction. More...

#include <BrineFluidProperties.h>

Inheritance diagram for BrineFluidProperties:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 BrineFluidProperties (const InputParameters &parameters)
 
virtual ~BrineFluidProperties ()
 
virtual std::string fluidName () const override
 Fluid name.
 
Real molarMass (Real xnacl) const
 Average molar mass of brine.
 
FPADReal molarMass (const FPADReal &xnacl) const
 
Real molarMassNaCl () const
 NaCl molar mass.
 
Real molarMassH2O () const
 H2O molar mass.
 
virtual Real rho_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
FPADReal rho_from_p_T_X (const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
 
virtual void rho_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx) const override
 
virtual Real mu_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
virtual void mu_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const override
 
FPADReal h_from_p_T_X (const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
 
virtual Real h_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
virtual void h_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &h, Real &dh_dp, Real &dh_dT, Real &dh_dx) const override
 
virtual Real cp_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
FPADReal e_from_p_T_X (const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
 
virtual Real e_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
virtual void e_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &e, Real &de_dp, Real &de_dT, Real &de_dx) const override
 
virtual Real k_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override
 
Real vaporPressure (Real temperature, Real xnacl) const
 Brine vapour pressure From Haas, Physical properties of the coexisting phases and thermochemical properties of the H2O component in boiling NaCl solutions, Geological Survey Bulletin, 1421-A (1976).
 
Real haliteSolubility (Real temperature) const
 Solubility of halite (solid NaCl) in water Originally from Potter et al., A new method for determining the solubility of salts in aqueous solutions at elevated temperatures, J.
 
Real henryConstant (Real temperature, const std::vector< Real > &coeffs) const
 IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidProperties userobject)
 
void henryConstant (Real temperature, const std::vector< Real > &coeffs, Real &Kh, Real &dKh_dT) const
 
ADReal henryConstant (const ADReal &temperature, const std::vector< Real > &coeffs) const
 
virtual const SinglePhaseFluidProperties & getComponent (unsigned int component) const override
 Get UserObject for specified component.
 
virtual void rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
 Density and viscosity.
 
virtual void rho_mu_from_p_T_X (ADReal pressure, ADReal temperature, ADReal xmass, ADReal &rho, ADReal &mu) const
 
virtual void rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const
 Density and viscosity and their derivatives wrt pressure, temperature and mass fraction.
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 
bool needThreadedCopy () const override final
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObject * primaryThreadCopy ()
 
SubProblem & getSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
std::set< UserObjectName > getDependObjects () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnum & getExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBase & getUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBase & getUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainID > getMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryID > getMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBase & getMaterial (const std::string &name)
 
MaterialBase & getMaterial (const std::string &name)
 
MaterialBase & getMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBase & getMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const Function & getFunction (const std::string &name) const
 
const Function & getFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const T & getKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const T & getKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValue & getVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
T & getSampler (const std::string &name)
 
Sampler & getSampler (const std::string &name)
 
T & getSamplerByName (const SamplerName &name)
 
Sampler & getSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
virtual void meshDisplaced ()
 
PerfGraph & perfGraph ()
 
const PostprocessorValue & getPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const Distribution & getDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const Distribution & getDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const Distribution & getDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const Distribution & getDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header, NameFunc &&name_func)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const unsigned int WATER = 0
 Fluid component numbers for water and NaCl.
 
static const unsigned int NACL = 1
 
static const Real _R = 8.3144598
 Universal gas constant (J/mol/K)
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

Real massFractionToMolalConc (Real xnacl) const
 Conversion from mass fraction to molal concentration (molality)
 
Real massFractionToMoleFraction (Real xnacl) const
 Conversion from mass fraction to mole fraction.
 
FPADReal massFractionToMoleFraction (const FPADReal &xnacl) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const ReporterContextBase & getReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterName & getReporterName (const std::string &param_name) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValue & adCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValue & coupledVectorTagScalarValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
const VariableValue & coupledMatrixTagScalarValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValue & adCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValue & coupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagScalarValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagScalarValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::Scalar< const Real > kokkosCoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalar * getScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const Water97FluidProperties * _water97_fp
 Water97FluidProperties UserObject (for Henry's law)
 
const SinglePhaseFluidProperties * _water_fp
 Water97FluidProperties UserObject.
 
const SinglePhaseFluidProperties * _nacl_fp
 NaClFluidProperties UserObject.
 
Real _Mnacl
 Molar mass of NaCl (kg/mol)
 
Real _Mh2o
 Molar mass of water (H2O) (kg/mol)
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin.
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero.
 
const Moose::CoordinateSystemType & _coord_sys
 
const THREAD_ID _tid
 
SubProblem & _subproblem
 
FEProblemBase & _fe_problem
 
SystemBase & _sys
 
Assembly & _assembly
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp & _app
 
Factory & _factory
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
const ExecFlagEnum & _execute_enum
 
const ExecFlagType & _current_execute_flag
 
MooseApp & _restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase & _mci_feproblem
 
FEProblemBase & _mdi_feproblem
 
MooseApp & _pg_moose_app
 
const std::string _prefix
 
FEProblemBase & _sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue & _scalar_zero
 
const Point & _point_zero
 
const InputParameters & _mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase & _mi_feproblem
 
SubProblem & _mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData & _material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int > _material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const InputParameters & _ti_params
 
FEProblemBase & _ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Private Member Functions

const Moose::FunctionBase * getKokkosFunctionByNameHelper (const FunctionName &name) const
 
const UserObjectBase & getUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const T & castUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 
const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const VectorPostprocessorValue & getVectorPostprocessorByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name, bool broadcast, std::size_t t_index) const
 
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool vectorPostprocessorsAdded () const
 
bool reportersAdded () const
 
void possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string &param_name="") const
 
RestartableDataValue & registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValue & getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const VariableValue * getDefaultValue (const std::string &var_name) const
 
const ADVariableValue * getADDefaultValue (const std::string &var_name) const
 
void checkVar (const std::string &var_name) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagScalarVariable (const std::string &var_name, const std::string &tag_name, unsigned int comp) const
 
Moose::MaterialDataType getMaterialDataType (const std::set< BoundaryID > &boundary_ids) const
 
unsigned int getMaxQps () const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 
const PostprocessorValue & getPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

UserObject * _primary_thread_copy
 
std::set< std::string > _supplied_uo
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 
ExecFlagEnum _empty_execute_enum
 
const MooseObject & _fni_object
 
const InputParameters & _fni_params
 
FEProblemBase & _fni_feproblem
 
const THREAD_ID _fni_tid
 
const MooseObject & _uoi_moose_object
 
const FEProblemBase & _uoi_feproblem
 
const THREAD_ID _uoi_tid
 
const MooseObject & _ppi_moose_object
 
const InputParameters & _ppi_params
 
const FEProblemBase & _ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const bool _broadcast_by_default
 
const MooseObject & _vpi_moose_object
 
const FEProblemBase & _vpi_feproblem
 
const THREAD_ID _vpi_tid
 
const InputParameters & _ri_params
 
FEProblemBase & _ri_fe_problem_base
 
const ReporterData & _ri_reporter_data
 
const MooseObject & _ri_moose_object
 
const InputParameters & _dni_params
 
FEProblemBase & _dni_feproblem
 
const MooseObject *const _dni_moose_object_ptr
 
const InputParameters & _si_params
 
FEProblemBase & _si_feproblem
 
THREAD_ID _si_tid
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
MooseApp & _meta_data_app
 
const MooseObject *const _meta_data_object
 
const InputParameters & _sc_parameters
 
const std::string & _sc_name
 
const bool _sc_is_implicit
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 
std::set< TagID > _sc_coupleable_vector_tags
 
std::set< TagID > _sc_coupleable_matrix_tags
 
const MooseObject & _mi_moose_object
 
const bool _mi_boundary_restricted
 
const std::set< SubdomainID > & _mi_block_ids
 
const std::set< BoundaryID > & _mi_boundary_ids
 
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
 
const std::string _ti_name
 
 propfunc (rho, p, T, X) propfunc(mu
 Compute a fluid property given for the state defined by three given properties.
 
X propfunc (h, p, T, X) propfunc(cp
 
X X propfunc (e, p, T, X) propfunc(k
 
 p
 
X p
 
X X p
 
 T
 
X T
 
X X T
 

Detailed Description

Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fraction.

Most properties from: Driesner, The system H2O-NaCl. Part II: Correlations for molar volume, enthalpy, and isobaric heat capacity from 0 to 1000 C, 1 to 5000 bar, and 0 to 1 Xnacl, Geochimica et Cosmochimica Acta 71, 4902-4919 (2007)

Viscosity and thermal conductivity from: Phillips et al, A technical databook for geothermal energy utilization, LbL-12810 (1981) Note: uses water thermal conductivity from IAPWS rather than the correlation given by Phillips et al.

Definition at line 33 of file BrineFluidProperties.h.

Constructor & Destructor Documentation

◆ BrineFluidProperties()

BrineFluidProperties::BrineFluidProperties ( const InputParameters &  parameters)

Definition at line 24 of file BrineFluidProperties.C.

26{
27 // There are two possibilities to consider:
28 // 1) No water_fp has been supplied (in which case one is constructed)
29 // 2) A water_fp hase been supplied (in which case it is used)
30 // In both cases, though, a Water97FluidProperties UserObject must be added
31 // Note: this UserObject is only used to gain access to the Henry's constant
32 // formulation. All property calculations are performed using _water_fp
33 const std::string water_name = name() + ":water";
34 {
35 const std::string class_name = "Water97FluidProperties";
36 InputParameters params = _app.getFactory().getValidParams(class_name);
37 if (_tid == 0)
38 _fe_problem.addUserObject(class_name, water_name, params);
39 }
41
42 if (parameters.isParamSetByUser("water_fp"))
43 {
44 // SinglePhaseFluidPropertiesPT UserObject for water
45 _water_fp = &getUserObject<SinglePhaseFluidProperties>("water_fp");
46
47 // Check that a water userobject has actually been supplied
48 if (_water_fp->fluidName() != "water")
49 paramError("water_fp", "A water FluidProperties UserObject must be supplied");
50 }
51 else
52 {
53 // Construct a SinglePhaseFluidProperties UserObject for water
55 }
56
57 // SinglePhaseFluidProperties UserObject for NaCl
58 const std::string nacl_name = name() + ":nacl";
59 {
60 const std::string class_name = "NaClFluidProperties";
61 InputParameters params = _app.getFactory().getValidParams(class_name);
62 if (_tid == 0)
63 _fe_problem.addUserObject(class_name, nacl_name, params);
64 }
66
67 // Molar mass of NaCl and H20
70}
const SinglePhaseFluidProperties * _nacl_fp
NaClFluidProperties UserObject.
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject (for Henry's law)
Real _Mnacl
Molar mass of NaCl (kg/mol)
T & getUserObject(const std::string &name, unsigned int tid=0) const
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
bool isParamSetByUser(const std::string &name) const
Factory & getFactory()
const InputParameters & parameters() const
const std::string & name() const
void paramError(const std::string &param, Args... args) const
Common class for multiple component fluid properties using a pressure and temperature formulation.
Common class for single phase fluid properties.
virtual Real molarMass() const
Molar mass [kg/mol].
e e e e s T T T T T rho v v T e p T T virtual T std::string fluidName() const
Fluid name.
FEProblemBase & _fe_problem
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...

◆ ~BrineFluidProperties()

BrineFluidProperties::~BrineFluidProperties ( )
virtual

Definition at line 72 of file BrineFluidProperties.C.

72{}

Member Function Documentation

◆ cp_from_p_T_X()

Real BrineFluidProperties::cp_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 336 of file BrineFluidProperties.C.

337{
338 Real q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
339
340 // The correlation requires the pressure in bar, not Pa.
341 Real pbar = pressure * 1.0e-5;
342 Real pbar2 = pbar * pbar;
343
344 // The correlation requires mole fraction
345 Real Xnacl = massFractionToMoleFraction(xnacl);
346
347 q11 = -32.1724 + 0.0621255 * pbar;
348 q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
349 q22 = 0.0612567 + 1.88082e-5 * pbar;
350
351 q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
352 q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
353
354 q12 = -q11 - q1x1;
355 q10 = q1x1;
356
357 q20 = 1.0 - q21 * std::sqrt(q22);
358 q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
359
360 q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
361 q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
362 // The temperature Th where the brine has the same isobaric heat capacity
363 // as pure water. Note: correlation uses temperature in Celcius
364 Th = q1 + q2 * (temperature - _T_c2k);
365
366 // The brine isobaric heat capacity is then given by the isobaric heat
367 // capacity of water at temperature Th multiplied by q2
368 // Note: water isobaric heat capacity requires temperature in Kelvin
369 return q2 * _water_fp->cp_from_p_T(pressure, Th + _T_c2k);
370}
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ e_from_p_T_X() [1/3]

FPADReal BrineFluidProperties::e_from_p_T_X ( const FPADReal &  pressure,
const FPADReal &  temperature,
const FPADReal &  xnacl 
) const

Definition at line 373 of file BrineFluidProperties.C.

376{
377 FPADReal enthalpy = h_from_p_T_X(pressure, temperature, xnacl);
378 FPADReal density = rho_from_p_T_X(pressure, temperature, xnacl);
379
380 return enthalpy - pressure / density;
381}
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const

Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), and PorousFlowBrine::initQpStatefulProperties().

◆ e_from_p_T_X() [2/3]

Real BrineFluidProperties::e_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 384 of file BrineFluidProperties.C.

385{
386 Real enthalpy = h_from_p_T_X(pressure, temperature, xnacl);
387 Real density = rho_from_p_T_X(pressure, temperature, xnacl);
388
389 return enthalpy - pressure / density;
390}

◆ e_from_p_T_X() [3/3]

void BrineFluidProperties::e_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl,
Real &  e,
Real &  de_dp,
Real &  de_dT,
Real &  de_dx 
) const
overridevirtual

Definition at line 393 of file BrineFluidProperties.C.

400{
401 // Initialise the AD value and derivatives
402 FPADReal p = pressure;
403 Moose::derivInsert(p.derivatives(), 0, 1.0);
404 FPADReal T = temperature;
405 Moose::derivInsert(T.derivatives(), 1, 1.0);
406 FPADReal x = xnacl;
407 Moose::derivInsert(x.derivatives(), 2, 1.0);
408
409 FPADReal ad_e = e_from_p_T_X(p, T, x);
410
411 e = ad_e.value();
412 de_dp = ad_e.derivatives()[0];
413 de_dT = ad_e.derivatives()[1];
414 de_dx = ad_e.derivatives()[2];
415}
const std::vector< double > x
FPADReal e_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 33 of file FluidProperties.h.

33{}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 35 of file FluidProperties.h.

35{}

◆ fluidName()

std::string BrineFluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
"brine"

Reimplemented from MultiComponentFluidProperties.

Definition at line 91 of file BrineFluidProperties.C.

92{
93 return "brine";
94}

Referenced by PorousFlowBrineCO2::PorousFlowBrineCO2().

◆ getComponent()

const SinglePhaseFluidProperties & BrineFluidProperties::getComponent ( unsigned int  component) const
overridevirtual

Get UserObject for specified component.

Parameters
componentfluid component
Returns
reference to SinglePhaseFluidPropertiesPT UserObject for component

Reimplemented from MultiComponentFluidProperties.

Definition at line 75 of file BrineFluidProperties.C.

76{
77 switch (component)
78 {
79 case WATER:
80 return *_water_fp;
81
82 case NACL:
83 return *_nacl_fp;
84
85 default:
86 mooseError("BrineFluidProperties::getComponent has been provided an incorrect component");
87 }
88}
static const unsigned int NACL
static const unsigned int WATER
Fluid component numbers for water and NaCl.
void mooseError(Args &&... args) const

Referenced by BrineFluidPropertiesTest::buildObjects().

◆ h_from_p_T_X() [1/3]

FPADReal BrineFluidProperties::h_from_p_T_X ( const FPADReal &  pressure,
const FPADReal &  temperature,
const FPADReal &  xnacl 
) const

Definition at line 255 of file BrineFluidProperties.C.

258{
259 using std::sqrt;
260
261 FPADReal q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
262
263 // The correlation requires the pressure in bar, not Pa.
264 const FPADReal pbar = pressure * 1.0e-5;
265 const FPADReal pbar2 = pbar * pbar;
266
267 // The correlation requires mole fraction
268 const FPADReal Xnacl = massFractionToMoleFraction(xnacl);
269
270 q11 = -32.1724 + 0.0621255 * pbar;
271 q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
272 q22 = 0.0612567 + 1.88082e-5 * pbar;
273
274 q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
275 q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
276
277 q12 = -q11 - q1x1;
278 q10 = q1x1;
279
280 q20 = 1.0 - q21 * sqrt(q22);
281 q23 = q2x1 - q20 - q21 * sqrt(1.0 + q22);
282
283 q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
284 q2 = q20 + q21 * sqrt(Xnacl + q22) + q23 * Xnacl;
285 // The temperature Th where the brine has the same enthalpy as pure water
286 // Note: correlation uses temperature in Celcius
287 Th = q1 + q2 * (temperature - _T_c2k);
288
289 // The brine enthalpy is then given by the enthalpy of water at temperature Th
290 // Note: water enthalpy requires temperature in Kelvin
291 Real h, dh_dp, dh_dT;
292 _water_fp->h_from_p_T(pressure.value(), Th.value() + _T_c2k, h, dh_dp, dh_dT);
293 FPADReal enthalpy = h;
294 enthalpy.derivatives() = pressure.derivatives() * dh_dp + Th.derivatives() * dh_dT;
295
296 return enthalpy;
297}
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh

Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), e_from_p_T_X(), h_from_p_T_X(), h_from_p_T_X(), PorousFlowBrine::initQpStatefulProperties(), and PorousFlowBrineCO2::liquidProperties().

◆ h_from_p_T_X() [2/3]

Real BrineFluidProperties::h_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 300 of file BrineFluidProperties.C.

301{
302 // Initialise the AD value (no derivatives required)
303 FPADReal p = pressure;
304 FPADReal T = temperature;
305 FPADReal x = xnacl;
306
307 return h_from_p_T_X(p, T, x).value();
308}

◆ h_from_p_T_X() [3/3]

void BrineFluidProperties::h_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl,
Real &  h,
Real &  dh_dp,
Real &  dh_dT,
Real &  dh_dx 
) const
overridevirtual

Definition at line 311 of file BrineFluidProperties.C.

318{
319 // Initialise the AD value and derivatives
320 FPADReal p = pressure;
321 Moose::derivInsert(p.derivatives(), 0, 1.0);
322 FPADReal T = temperature;
323 Moose::derivInsert(T.derivatives(), 1, 1.0);
324 FPADReal x = xnacl;
325 Moose::derivInsert(x.derivatives(), 2, 1.0);
326
327 FPADReal ad_h = h_from_p_T_X(p, T, x);
328
329 h = ad_h.value();
330 dh_dp = ad_h.derivatives()[0];
331 dh_dT = ad_h.derivatives()[1];
332 dh_dx = ad_h.derivatives()[2];
333}

◆ haliteSolubility()

Real BrineFluidProperties::haliteSolubility ( Real  temperature) const

Solubility of halite (solid NaCl) in water Originally from Potter et al., A new method for determining the solubility of salts in aqueous solutions at elevated temperatures, J.

Res. U.S. Geol. Surv., 5, 389-395 (1977). Equation describing halite solubility is repeated in Chou, Phase relations in the system NaCI-KCI-H2O. III: Solubilities of halite in vapor-saturated liquids above 445 C and redetermination of phase equilibrium properties in the system NaCI-HzO to 1000 C and 1500 bars, Geochimica et Cosmochimica Acta 51, 1965-1975 (1987). Note: this correlation is valid for 0 <= T <= 424.5 C

Parameters
temperaturetemperature (K)
Returns
halite solubility (kg/kg)

Definition at line 454 of file BrineFluidProperties.C.

455{
456 // This correlation requires temperature in Celcius
457 Real Tc = temperature - _T_c2k;
458
459 return (26.18 + 7.2e-3 * Tc + 1.06e-4 * Tc * Tc) / 100.0;
460}

◆ henryConstant() [1/3]

ADReal BrineFluidProperties::henryConstant ( const ADReal &  temperature,
const std::vector< Real > &  coeffs 
) const

Definition at line 502 of file BrineFluidProperties.C.

504{
505 Real Kh, dKh_dT;
506 henryConstant(temperature.value(), coeffs, Kh, dKh_dT);
507
508 ADReal henry = Kh;
509 henry.derivatives() = temperature.derivatives() * dKh_dT;
510
511 return henry;
512}
DualNumber< Real, DNDerivativeType, true > ADReal
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidPropert...

◆ henryConstant() [2/3]

Real BrineFluidProperties::henryConstant ( Real  temperature,
const std::vector< Real > &  coeffs 
) const

IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidProperties userobject)

Parameters
Tfluid temperature (K)
coeffsHenry's constant coefficients of gas
[out]KhHenry's constant
[out]dKh_dTderivative of Kh wrt temperature

Definition at line 487 of file BrineFluidProperties.C.

488{
489 return _water97_fp->henryConstant(temperature, coeffs);
490}
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's con...

Referenced by PorousFlowBrineCO2::henryConstant(), and henryConstant().

◆ henryConstant() [3/3]

void BrineFluidProperties::henryConstant ( Real  temperature,
const std::vector< Real > &  coeffs,
Real &  Kh,
Real &  dKh_dT 
) const

Definition at line 493 of file BrineFluidProperties.C.

497{
498 _water97_fp->henryConstant(temperature, coeffs, Kh, dKh_dT);
499}

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 34 of file FluidProperties.h.

34{}

◆ k_from_p_T_X()

Real BrineFluidProperties::k_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 418 of file BrineFluidProperties.C.

419{
420 // Correlation requires molal concentration (mol/kg)
421 Real mol = massFractionToMolalConc(xnacl);
422 // Correlation requires temperature in C
423 Real Tc = temperature - _T_c2k;
424
425 Real S = 100.0 * _Mnacl * mol / (1.0 + _Mnacl * mol);
426 Real lambdaw = _water_fp->k_from_p_T(pressure, temperature);
427 Real lambda = 1.0 - (2.3434e-3 - 7.924e-6 * Tc + 3.924e-8 * Tc * Tc) * S +
428 (1.06e-5 - 2.0e-8 * Tc - 1.2e-10 * Tc * Tc) * S * S;
429
430 return lambda * lambdaw;
431}
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)

◆ massFractionToMolalConc()

Real BrineFluidProperties::massFractionToMolalConc ( Real  xnacl) const
protected

Conversion from mass fraction to molal concentration (molality)

Parameters
xnaclNaCl mass fraction (kg/kg)
Returns
molal concentration (mol/kg)

Definition at line 463 of file BrineFluidProperties.C.

464{
465 return xnacl / ((1.0 - xnacl) * _Mnacl);
466}

Referenced by k_from_p_T_X(), mu_from_p_T_X(), mu_from_p_T_X(), and vaporPressure().

◆ massFractionToMoleFraction() [1/2]

FPADReal BrineFluidProperties::massFractionToMoleFraction ( const FPADReal &  xnacl) const
protected

Definition at line 478 of file BrineFluidProperties.C.

479{
480 // The average molar mass of brine from the mass fraction
481 FPADReal Mbrine = molarMass(xnacl);
482 // The mole fraction is then
483 return xnacl * Mbrine / _Mnacl;
484}
Real molarMass(Real xnacl) const
Average molar mass of brine.

◆ massFractionToMoleFraction() [2/2]

Real BrineFluidProperties::massFractionToMoleFraction ( Real  xnacl) const
protected

Conversion from mass fraction to mole fraction.

Parameters
xnaclNaCl mass fraction (kg/kg)
Returns
mole fraction (mol/mol)

Definition at line 469 of file BrineFluidProperties.C.

470{
471 // The average molar mass of brine from the mass fraction
472 Real Mbrine = molarMass(xnacl);
473 // The mole fraction is then
474 return xnacl * Mbrine / _Mnacl;
475}

Referenced by cp_from_p_T_X(), h_from_p_T_X(), and rho_from_p_T_X().

◆ molarMass() [1/2]

FPADReal BrineFluidProperties::molarMass ( const FPADReal &  xnacl) const

Definition at line 97 of file BrineFluidProperties.C.

98{
99 return 1.0 / (xnacl / _Mnacl + (1.0 - xnacl) / _Mh2o);
100}

◆ molarMass() [2/2]

Real BrineFluidProperties::molarMass ( Real  xnacl) const

Average molar mass of brine.

Parameters
xnaclNaCl mass fraction (-)
Returns
average molar mass (kg/mol)

Definition at line 103 of file BrineFluidProperties.C.

104{
105 return 1.0 / (xnacl / _Mnacl + (1.0 - xnacl) / _Mh2o);
106}

Referenced by massFractionToMoleFraction(), massFractionToMoleFraction(), and rho_from_p_T_X().

◆ molarMassH2O()

Real BrineFluidProperties::molarMassH2O ( ) const

H2O molar mass.

Returns
molar mass of H2O (kg/mol)

Definition at line 115 of file BrineFluidProperties.C.

116{
117 return _Mh2o;
118}

◆ molarMassNaCl()

Real BrineFluidProperties::molarMassNaCl ( ) const

NaCl molar mass.

Returns
molar mass of NaCl (kg/mol)

Definition at line 109 of file BrineFluidProperties.C.

110{
111 return _Mnacl;
112}

◆ mu_from_p_T_X() [1/2]

Real BrineFluidProperties::mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 202 of file BrineFluidProperties.C.

203{
204 // Correlation requires molal concentration (mol/kg)
205 const Real mol = massFractionToMolalConc(xnacl);
206 const Real mol2 = mol * mol;
207 const Real mol3 = mol2 * mol;
208
209 // Correlation requires temperature in C
210 const Real Tc = temperature - _T_c2k;
211
212 const Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
213 0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
214
215 const Real water_viscosity = _water_fp->mu_from_p_T(pressure, temperature);
216
217 return a * water_viscosity;
218}

Referenced by PorousFlowBrine::computeQpProperties(), and PorousFlowBrineCO2::liquidProperties().

◆ mu_from_p_T_X() [2/2]

void BrineFluidProperties::mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT,
Real &  dmu_dx 
) const
overridevirtual

Definition at line 221 of file BrineFluidProperties.C.

228{
229 // Viscosity of water and derivatives wrt pressure and temperature
230 Real muw, dmuw_dp, dmuw_dT;
231 _water_fp->mu_from_p_T(pressure, temperature, muw, dmuw_dp, dmuw_dT);
232
233 // Correlation requires molal concentration (mol/kg)
234 Real mol = massFractionToMolalConc(xnacl);
235 Real dmol_dx = 1.0 / ((1.0 - xnacl) * (1.0 - xnacl) * _Mnacl);
236 Real mol2 = mol * mol;
237 Real mol3 = mol2 * mol;
238
239 // Correlation requires temperature in C
240 Real Tc = temperature - _T_c2k;
241
242 Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
243 0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
244 Real da_dx =
245 (0.0816 + 0.0244 * mol + 3.84e-4 * mol2 + 4.403e-4 * Tc * std::exp(-0.7 * mol)) * dmol_dx;
246 Real da_dT = 0.629e-3 * (1.0 - std::exp(-0.7 * mol));
247
248 mu = a * muw;
249 dmu_dp = a * dmuw_dp;
250 dmu_dx = da_dx * muw;
251 dmu_dT = da_dT * muw + a * dmuw_dT;
252}
const double mu

◆ propfunc() [1/3]

X X MultiComponentFluidProperties::propfunc ( e  ,
p  ,
T  ,
X   
)
inherited

◆ propfunc() [2/3]

X MultiComponentFluidProperties::propfunc ( h  ,
p  ,
T  ,
X   
)
inherited

◆ propfunc() [3/3]

MultiComponentFluidProperties::propfunc ( rho  ,
p  ,
T  ,
X   
)
inherited

Compute a fluid property given for the state defined by three given properties.

For all functions, the first three arguments are the given properties that define the fluid state. For the three-argument variants, the desired property is the return value. The seven-argument variants also provide partial derivatives x/da, dx/db and dx/dc where x is the desired property being computed, a is the first given property, b is the second given property etc. The desired property, dx/da, dx/db and dx/dc are stored into the 4rd, 5th, 6th and 7th arguments respectively.

Properties/parameters used in these function are listed below with their units:

@begincode p pressure [Pa] T temperature [K] X solute mass fraction [-] e specific internal energy [J/kg] rho density [kg/m^3] h specific enthalpy [J/kg] mu viscosity [Pa*s] k thermal conductivity [W/(m*K)] c speed of sound [m/s] cp constant-pressure specific heat [J/K] cv constant-volume specific heat [J/K]

As an example:

@begincode // calculate desnity given pressure, temperature and solute mass fraction: auto density = your_fluid_properties_object.rho_from_p_T_X(p, T, X);

// or use the derivative variant: Real rho = 0; // density will be stored into here Real drho_dp = 0; // derivative will be stored into here Real drho_dT = 0; // derivative will be stored into here Real drho_dX = 0; // derivative will be stored into here your_fluid_properties_object.rho_from_p_T_X(p, T, X, rho, drho_dp, drho_dT, drho_dX);

Automatic differentiation (AD) support is provided through prop_from_p_T_X(ADReal p, ADReal T, ADReal X) versions of the functions where p, T and X must be ADReal/DualNumber's calculated using all AD-supporting values.

◆ rho_from_p_T_X() [1/3]

FPADReal BrineFluidProperties::rho_from_p_T_X ( const FPADReal &  pressure,
const FPADReal &  temperature,
const FPADReal &  xnacl 
) const

Definition at line 121 of file BrineFluidProperties.C.

124{
125 using std::exp, std::sqrt;
126 // The correlation requires the pressure in bar, not Pa.
127 FPADReal pbar = pressure * 1.0e-5;
128 FPADReal pbar2 = pbar * pbar;
129 FPADReal pbar3 = pbar2 * pbar;
130
131 // The correlation requires mole fraction
132 const FPADReal Xnacl = massFractionToMoleFraction(xnacl);
133
134 const FPADReal n11 = -54.2958 - 45.7623 * exp(-9.44785e-4 * pbar);
135 const FPADReal n21 = -2.6142 - 2.39092e-4 * pbar;
136 const FPADReal n22 = 0.0356828 + 4.37235e-6 * pbar + 2.0566e-9 * pbar2;
137 const FPADReal n1x1 =
138 330.47 + 0.942876 * sqrt(pbar) + 0.0817193 * pbar - 2.47556e-8 * pbar2 + 3.45052e-10 * pbar3;
139 const FPADReal n2x1 = -0.0370751 + 0.00237723 * sqrt(pbar) + 5.42049e-5 * pbar +
140 5.84709e-9 * pbar2 - 5.99373e-13 * pbar3;
141 const FPADReal n12 = -n1x1 - n11;
142 const FPADReal n20 = 1.0 - n21 * sqrt(n22);
143 const FPADReal n23 = n2x1 - n20 - n21 * sqrt(1.0 + n22);
144
145 // The temperature Tv where the brine has the same molar volume as pure water
146 // Note: correlation uses temperature in Celcius
147 const FPADReal n1 = n1x1 + n11 * (1.0 - Xnacl) + n12 * (1.0 - Xnacl) * (1.0 - Xnacl);
148 const FPADReal n2 = n20 + n21 * sqrt(Xnacl + n22) + n23 * Xnacl;
149 const FPADReal Tv = n1 + n2 * (temperature - _T_c2k);
150
151 // The density of water at temperature Tv
152 // Note: convert Tv to Kelvin to calculate water density
153 Real rho, drho_dp, drho_dT;
154 _water_fp->rho_from_p_T(pressure.value(), Tv.value() + _T_c2k, rho, drho_dp, drho_dT);
155 FPADReal water_density = rho;
156 water_density.derivatives() = pressure.derivatives() * drho_dp + Tv.derivatives() * drho_dT;
157
158 // The brine density is given by the water density scaled by the ratio of
159 // brine molar mass to pure water molar mass
160 return water_density * molarMass(xnacl) / _Mh2o;
161}
const double rho
auto exp(const T &)

◆ rho_from_p_T_X() [2/3]

Real BrineFluidProperties::rho_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Definition at line 164 of file BrineFluidProperties.C.

165{
166 // Initialise the AD value (no derivatives required)
167 FPADReal p = pressure;
168 FPADReal T = temperature;
169 FPADReal x = xnacl;
170
171 FPADReal ad_rho = this->rho_from_p_T_X(p, T, x);
172
173 return ad_rho.value();
174}

Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), e_from_p_T_X(), PorousFlowBrine::initQpStatefulProperties(), PorousFlowBrineCO2::liquidProperties(), rho_from_p_T_X(), rho_from_p_T_X(), and PorousFlowBrineCO2::saturation().

◆ rho_from_p_T_X() [3/3]

void BrineFluidProperties::rho_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xnacl,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx 
) const
overridevirtual

Definition at line 177 of file BrineFluidProperties.C.

184{
185 // Initialise the AD value and derivatives
186 FPADReal p = pressure;
187 Moose::derivInsert(p.derivatives(), 0, 1.0);
188 FPADReal T = temperature;
189 Moose::derivInsert(T.derivatives(), 1, 1.0);
190 FPADReal x = xnacl;
191 Moose::derivInsert(x.derivatives(), 2, 1.0);
192
193 FPADReal ad_rho = this->rho_from_p_T_X(p, T, x);
194
195 rho = ad_rho.value();
196 drho_dp = ad_rho.derivatives()[0];
197 drho_dT = ad_rho.derivatives()[1];
198 drho_dx = ad_rho.derivatives()[2];
199}

◆ rho_mu_from_p_T_X() [1/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( ADReal  pressure,
ADReal  temperature,
ADReal  xmass,
ADReal &  rho,
ADReal &  mu 
) const
virtualinherited

Definition at line 41 of file MultiComponentFluidProperties.C.

43{
44 rho = rho_from_p_T_X(pressure, temperature, xmass);
45 mu = mu_from_p_T_X(pressure, temperature, xmass);
46}

◆ rho_mu_from_p_T_X() [2/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT,
Real &  dmu_dx 
) const
virtualinherited

Density and viscosity and their derivatives wrt pressure, temperature and mass fraction.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]drho_dxderivative of density wrt mass fraction
[out]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature
[out]dmu_dxderivative of viscosity wrt mass fraction

Definition at line 49 of file MultiComponentFluidProperties.C.

60{
61 rho_from_p_T_X(pressure, temperature, xmass, rho, drho_dp, drho_dT, drho_dx);
62 mu_from_p_T_X(pressure, temperature, xmass, mu, dmu_dp, dmu_dT, dmu_dx);
63}

◆ rho_mu_from_p_T_X() [3/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  mu 
) const
virtualinherited

Density and viscosity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]rhodensity (kg/m^3)

Definition at line 33 of file MultiComponentFluidProperties.C.

35{
36 rho = rho_from_p_T_X(pressure, temperature, xmass);
37 mu = mu_from_p_T_X(pressure, temperature, xmass);
38}

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Reimplemented from ThreadedGeneralUserObject.

Definition at line 38 of file FluidProperties.h.

38{}

◆ threadJoin()

virtual void FluidProperties::threadJoin ( const UserObject &  )
inlinefinalvirtualinherited

Reimplemented from ThreadedGeneralUserObject.

Definition at line 37 of file FluidProperties.h.

37{}

◆ validParams()

InputParameters BrineFluidProperties::validParams ( )
static

Definition at line 15 of file BrineFluidProperties.C.

16{
18 params.addParam<UserObjectName>("water_fp",
19 "The name of the FluidProperties UserObject for water");
20 params.addClassDescription("Fluid properties for brine");
21 return params;
22}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

◆ vaporPressure()

Real BrineFluidProperties::vaporPressure ( Real  temperature,
Real  xnacl 
) const

Brine vapour pressure From Haas, Physical properties of the coexisting phases and thermochemical properties of the H2O component in boiling NaCl solutions, Geological Survey Bulletin, 1421-A (1976).

Parameters
temperaturebrine temperature (K)
xnaclsalt mass fraction (-)
Returns
brine vapour pressure (Pa)

Definition at line 434 of file BrineFluidProperties.C.

435{
436 // Correlation requires molal concentration (mol/kg)
437 Real mol = massFractionToMolalConc(xnacl);
438 Real mol2 = mol * mol;
439 Real mol3 = mol2 * mol;
440
441 Real a = 1.0 + 5.93582e-6 * mol - 5.19386e-5 * mol2 + 1.23156e-5 * mol3;
442 Real b = 1.1542e-6 * mol + 1.41254e-7 * mol2 - 1.92476e-8 * mol3 - 1.70717e-9 * mol * mol3 +
443 1.0539e-10 * mol2 * mol3;
444
445 // The temperature of pure water at the same pressure as the brine is given by
446 Real th20 = std::exp(std::log(temperature) / (a + b * temperature));
447
448 // The brine vapour pressure is then found by evaluating the saturation pressure for pure water
449 // using this effective temperature
450 return _water_fp->vaporPressure(th20);
451}
virtual Real vaporPressure(Real T) const
Vapor pressure.

Referenced by PorousFlowBrineCO2::solveEquilibriumMoleFractionHighTemp().

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

◆ _Mh2o

Real BrineFluidProperties::_Mh2o
protected

Molar mass of water (H2O) (kg/mol)

Definition at line 199 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), molarMass(), molarMass(), molarMassH2O(), and rho_from_p_T_X().

◆ _Mnacl

Real BrineFluidProperties::_Mnacl
protected

◆ _nacl_fp

const SinglePhaseFluidProperties* BrineFluidProperties::_nacl_fp
protected

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _water97_fp

const Water97FluidProperties* BrineFluidProperties::_water97_fp
protected

Water97FluidProperties UserObject (for Henry's law)

Definition at line 190 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), henryConstant(), and henryConstant().

◆ _water_fp

const SinglePhaseFluidProperties* BrineFluidProperties::_water_fp
protected

◆ NACL

const unsigned int BrineFluidProperties::NACL = 1
static

Definition at line 169 of file BrineFluidProperties.h.

Referenced by getComponent(), and TEST_F().

◆ p [1/3]

MultiComponentFluidProperties::p
inherited

◆ p [2/3]

X MultiComponentFluidProperties::p
inherited

Definition at line 122 of file MultiComponentFluidProperties.h.

◆ p [3/3]

X X MultiComponentFluidProperties::p
inherited

Definition at line 124 of file MultiComponentFluidProperties.h.

◆ T [1/3]

MultiComponentFluidProperties::T
inherited

◆ T [2/3]

X MultiComponentFluidProperties::T
inherited

Definition at line 122 of file MultiComponentFluidProperties.h.

◆ T [3/3]

X X MultiComponentFluidProperties::T
inherited

Definition at line 124 of file MultiComponentFluidProperties.h.

◆ WATER

const unsigned int BrineFluidProperties::WATER = 0
static

Fluid component numbers for water and NaCl.

Definition at line 168 of file BrineFluidProperties.h.

Referenced by BrineFluidPropertiesTest::buildObjects(), getComponent(), and TEST_F().


The documentation for this class was generated from the following files: