Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 | 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. More...
 
Real molarMass (Real xnacl) const
 Average molar mass of brine. More...
 
FPADReal molarMass (const FPADReal &xnacl) const
 
Real molarMassNaCl () const
 NaCl molar mass. More...
 
Real molarMassH2O () const
 H2O molar mass. More...
 
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). More...
 
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. More...
 
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) More...
 
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 SinglePhaseFluidPropertiesgetComponent (unsigned int component) const override
 Get UserObject for specified component. More...
 
virtual void rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
 Density and viscosity. More...
 
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. More...
 
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
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () 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)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
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< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TgetRenamedParam (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 &nm) const
 
void paramError (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
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) 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 ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (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)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (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< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (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)
 
bool getMaterialPropertyCalled () const
 
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)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (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 hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (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 VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (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
 
TgetSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
TgetSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (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 DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (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 sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static const unsigned int WATER = 0
 Fluid component numbers for water and NaCl. More...
 
static const unsigned int NACL = 1
 
static const Real _R = 8.3144598
 Universal gas constant (J/mol/K) More...
 
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) More...
 
Real massFractionToMoleFraction (Real xnacl) const
 Conversion from mass fraction to mole fraction. More...
 
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 UserObject &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (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 VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (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 VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (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)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 

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) More...
 
const SinglePhaseFluidProperties_water_fp
 Water97FluidProperties UserObject. More...
 
const SinglePhaseFluidProperties_nacl_fp
 NaClFluidProperties UserObject. More...
 
Real _Mnacl
 Molar mass of NaCl (kg/mol) More...
 
Real _Mh2o
 Molar mass of water (H2O) (kg/mol) More...
 
bool _water_fp_derivs
 Flag to indicate whether to calculate derivatives in water_fp. More...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero. More...
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
const THREAD_ID _tid
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
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
 
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 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
 
 propfunc (rho, p, T, X) propfunc(mu
 Compute a fluid property given for the state defined by three given properties. More...
 
propfunc (h, p, T, X) propfunc(cp
 
X X propfunc (e, p, T, X) propfunc(k
 
 p
 
p
 
X X p
 
 T
 
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 }
T & getUserObject(const std::string &name, unsigned int tid=0) const
const SinglePhaseFluidProperties * _nacl_fp
NaClFluidProperties UserObject.
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject (for Henry&#39;s law)
virtual Real molarMass() const
Molar mass [kg/mol].
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
Factory & getFactory()
Real _Mnacl
Molar mass of NaCl (kg/mol)
MultiComponentFluidProperties(const InputParameters &parameters)
Common class for single phase fluid properties.
void paramError(const std::string &param, Args... args) const
bool isParamSetByUser(const std::string &name) const
FEProblemBase & _fe_problem
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...
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.
const InputParameters & parameters() const
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ ~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 351 of file BrineFluidProperties.C.

352 {
353  Real q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
354 
355  // The correlation requires the pressure in bar, not Pa.
356  Real pbar = pressure * 1.0e-5;
357  Real pbar2 = pbar * pbar;
358 
359  // The correlation requires mole fraction
360  Real Xnacl = massFractionToMoleFraction(xnacl);
361 
362  q11 = -32.1724 + 0.0621255 * pbar;
363  q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
364  q22 = 0.0612567 + 1.88082e-5 * pbar;
365 
366  q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
367  q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
368 
369  q12 = -q11 - q1x1;
370  q10 = q1x1;
371 
372  q20 = 1.0 - q21 * std::sqrt(q22);
373  q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
374 
375  q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
376  q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
377  // The temperature Th where the brine has the same isobaric heat capacity
378  // as pure water. Note: correlation uses temperature in Celcius
379  Th = q1 + q2 * (temperature - _T_c2k);
380 
381  // The brine isobaric heat capacity is then given by the isobaric heat
382  // capacity of water at temperature Th multiplied by q2
383  // Note: water isobaric heat capacity requires temperature in Kelvin
384  return q2 * _water_fp->cp_from_p_T(pressure, Th + _T_c2k);
385 }
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
static const std::string temperature
Definition: NS.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.

◆ 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 388 of file BrineFluidProperties.C.

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

391 {
392  FPADReal enthalpy = h_from_p_T_X(pressure, temperature, xnacl);
394 
395  return enthalpy - pressure / density;
396 }
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
static const std::string density
Definition: NS.h:33
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
static const std::string pressure
Definition: NS.h:56

◆ 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 399 of file BrineFluidProperties.C.

400 {
401  Real enthalpy = h_from_p_T_X(pressure, temperature, xnacl);
403 
404  return enthalpy - pressure / density;
405 }
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
static const std::string density
Definition: NS.h:33
static const std::string temperature
Definition: NS.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56

◆ 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 408 of file BrineFluidProperties.C.

415 {
416  // Initialise the AD value and derivatives
417  FPADReal p = pressure;
418  Moose::derivInsert(p.derivatives(), 0, 1.0);
420  Moose::derivInsert(T.derivatives(), 1, 1.0);
421  FPADReal x = xnacl;
422  Moose::derivInsert(x.derivatives(), 2, 1.0);
423 
424  _water_fp_derivs = true;
425  FPADReal ad_e = e_from_p_T_X(p, T, x);
426 
427  e = ad_e.value();
428  de_dp = ad_e.derivatives()[0];
429  de_dT = ad_e.derivatives()[1];
430  de_dx = ad_e.derivatives()[2];
431 }
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
const std::vector< double > x
FPADReal e_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
static const std::string pressure
Definition: NS.h:56
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ 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.

Referenced by PorousFlowBrineCO2::PorousFlowBrineCO2().

92 {
93  return "brine";
94 }

◆ 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.

Referenced by BrineFluidPropertiesTest::buildObjects().

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 }
const SinglePhaseFluidProperties * _nacl_fp
NaClFluidProperties UserObject.
static const std::string component
Definition: NS.h:153
static const unsigned int NACL
void mooseError(Args &&... args) const
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
static const unsigned int WATER
Fluid component numbers for water and NaCl.

◆ 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 263 of file BrineFluidProperties.C.

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

266 {
267  FPADReal q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
268 
269  // The correlation requires the pressure in bar, not Pa.
270  const FPADReal pbar = pressure * 1.0e-5;
271  const FPADReal pbar2 = pbar * pbar;
272 
273  // The correlation requires mole fraction
274  const FPADReal Xnacl = massFractionToMoleFraction(xnacl);
275 
276  q11 = -32.1724 + 0.0621255 * pbar;
277  q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
278  q22 = 0.0612567 + 1.88082e-5 * pbar;
279 
280  q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
281  q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
282 
283  q12 = -q11 - q1x1;
284  q10 = q1x1;
285 
286  q20 = 1.0 - q21 * std::sqrt(q22);
287  q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
288 
289  q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
290  q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
291  // The temperature Th where the brine has the same enthalpy as pure water
292  // Note: correlation uses temperature in Celcius
293  Th = q1 + q2 * (temperature - _T_c2k);
294 
295  // The brine enthalpy is then given by the enthalpy of water at temperature Th
296  // Note: water enthalpy requires temperature in Kelvin
297  FPADReal enthalpy;
298  if (_water_fp_derivs)
299  {
300  Real h, dh_dp, dh_dT;
301  _water_fp->h_from_p_T(pressure.value(), Th.value() + _T_c2k, h, dh_dp, dh_dT);
302  enthalpy = h;
303 
304  enthalpy.derivatives() = pressure.derivatives() * dh_dp + Th.derivatives() * dh_dT;
305  }
306  else
307  enthalpy = _water_fp->h_from_p_T(pressure.value(), Th.value() + _T_c2k);
308 
309  return enthalpy;
310 }
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ 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 313 of file BrineFluidProperties.C.

314 {
315  // Initialise the AD value (no derivatives required)
316  FPADReal p = pressure;
318  FPADReal x = xnacl;
319 
320  _water_fp_derivs = false;
321  return h_from_p_T_X(p, T, x).value();
322 }
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
const std::vector< double > x
static const std::string pressure
Definition: NS.h:56
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ 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 325 of file BrineFluidProperties.C.

332 {
333  // Initialise the AD value and derivatives
334  FPADReal p = pressure;
335  Moose::derivInsert(p.derivatives(), 0, 1.0);
337  Moose::derivInsert(T.derivatives(), 1, 1.0);
338  FPADReal x = xnacl;
339  Moose::derivInsert(x.derivatives(), 2, 1.0);
340 
341  _water_fp_derivs = true;
342  FPADReal ad_h = h_from_p_T_X(p, T, x);
343 
344  h = ad_h.value();
345  dh_dp = ad_h.derivatives()[0];
346  dh_dT = ad_h.derivatives()[1];
347  dh_dx = ad_h.derivatives()[2];
348 }
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
const std::vector< double > x
static const std::string pressure
Definition: NS.h:56
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ 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 470 of file BrineFluidProperties.C.

471 {
472  // This correlation requires temperature in Celcius
473  Real Tc = temperature - _T_c2k;
474 
475  return (26.18 + 7.2e-3 * Tc + 1.06e-4 * Tc * Tc) / 100.0;
476 }
static const std::string temperature
Definition: NS.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.

◆ henryConstant() [1/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 503 of file BrineFluidProperties.C.

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

504 {
505  return _water97_fp->henryConstant(temperature, coeffs);
506 }
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject (for Henry&#39;s law)
static const std::string temperature
Definition: NS.h:59
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water From Guidelines on the Henry&#39;s con...

◆ henryConstant() [2/3]

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

Definition at line 509 of file BrineFluidProperties.C.

513 {
514  _water97_fp->henryConstant(temperature, coeffs, Kh, dKh_dT);
515 }
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject (for Henry&#39;s law)
static const std::string temperature
Definition: NS.h:59
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water From Guidelines on the Henry&#39;s con...

◆ henryConstant() [3/3]

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

Definition at line 518 of file BrineFluidProperties.C.

520 {
521  Real Kh, dKh_dT;
522  henryConstant(temperature.value(), coeffs, Kh, dKh_dT);
523 
524  ADReal henry = Kh;
525  henry.derivatives() = temperature.derivatives() * dKh_dT;
526 
527  return henry;
528 }
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeType, true > ADReal
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water (implemented in water FluidPropert...

◆ 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 434 of file BrineFluidProperties.C.

435 {
436  // Correlation requires molal concentration (mol/kg)
437  Real mol = massFractionToMolalConc(xnacl);
438  // Correlation requires temperature in C
439  Real Tc = temperature - _T_c2k;
440 
441  Real S = 100.0 * _Mnacl * mol / (1.0 + _Mnacl * mol);
442  Real lambdaw = _water_fp->k_from_p_T(pressure, temperature);
443  Real lambda = 1.0 - (2.3434e-3 - 7.924e-6 * Tc + 3.924e-8 * Tc * Tc) * S +
444  (1.06e-5 - 2.0e-8 * Tc - 1.2e-10 * Tc * Tc) * S * S;
445 
446  return lambda * lambdaw;
447 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
static const std::string temperature
Definition: NS.h:59
Real _Mnacl
Molar mass of NaCl (kg/mol)
static const std::string S
Definition: NS.h:163
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.

◆ 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 479 of file BrineFluidProperties.C.

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

480 {
481  return xnacl / ((1.0 - xnacl) * _Mnacl);
482 }
Real _Mnacl
Molar mass of NaCl (kg/mol)

◆ massFractionToMoleFraction() [1/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 485 of file BrineFluidProperties.C.

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

486 {
487  // The average molar mass of brine from the mass fraction
488  Real Mbrine = molarMass(xnacl);
489  // The mole fraction is then
490  return xnacl * Mbrine / _Mnacl;
491 }
Real molarMass(Real xnacl) const
Average molar mass of brine.
Real _Mnacl
Molar mass of NaCl (kg/mol)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ massFractionToMoleFraction() [2/2]

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

Definition at line 494 of file BrineFluidProperties.C.

495 {
496  // The average molar mass of brine from the mass fraction
497  FPADReal Mbrine = molarMass(xnacl);
498  // The mole fraction is then
499  return xnacl * Mbrine / _Mnacl;
500 }
Real molarMass(Real xnacl) const
Average molar mass of brine.
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
Real _Mnacl
Molar mass of NaCl (kg/mol)

◆ molarMass() [1/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.

Referenced by massFractionToMoleFraction(), and rho_from_p_T_X().

104 {
105  return 1.0 / (xnacl / _Mnacl + (1.0 - xnacl) / _Mh2o);
106 }
Real _Mnacl
Molar mass of NaCl (kg/mol)
Real _Mh2o
Molar mass of water (H2O) (kg/mol)

◆ molarMass() [2/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 }
Real _Mnacl
Molar mass of NaCl (kg/mol)
Real _Mh2o
Molar mass of water (H2O) (kg/mol)

◆ 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 }
Real _Mh2o
Molar mass of water (H2O) (kg/mol)

◆ 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 }
Real _Mnacl
Molar mass of NaCl (kg/mol)

◆ 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 210 of file BrineFluidProperties.C.

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

211 {
212  // Correlation requires molal concentration (mol/kg)
213  const Real mol = massFractionToMolalConc(xnacl);
214  const Real mol2 = mol * mol;
215  const Real mol3 = mol2 * mol;
216 
217  // Correlation requires temperature in C
218  const Real Tc = temperature - _T_c2k;
219 
220  const Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
221  0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
222 
223  const Real water_viscosity = _water_fp->mu_from_p_T(pressure, temperature);
224 
225  return a * water_viscosity;
226 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
static const std::string temperature
Definition: NS.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.

◆ 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 229 of file BrineFluidProperties.C.

236 {
237  // Viscosity of water and derivatives wrt pressure and temperature
238  Real muw, dmuw_dp, dmuw_dT;
239  _water_fp->mu_from_p_T(pressure, temperature, muw, dmuw_dp, dmuw_dT);
240 
241  // Correlation requires molal concentration (mol/kg)
242  Real mol = massFractionToMolalConc(xnacl);
243  Real dmol_dx = 1.0 / ((1.0 - xnacl) * (1.0 - xnacl) * _Mnacl);
244  Real mol2 = mol * mol;
245  Real mol3 = mol2 * mol;
246 
247  // Correlation requires temperature in C
248  Real Tc = temperature - _T_c2k;
249 
250  Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
251  0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
252  Real da_dx =
253  (0.0816 + 0.0244 * mol + 3.84e-4 * mol2 + 4.403e-4 * Tc * std::exp(-0.7 * mol)) * dmol_dx;
254  Real da_dT = 0.629e-3 * (1.0 - std::exp(-0.7 * mol));
255 
256  mu = a * muw;
257  dmu_dp = a * dmuw_dp;
258  dmu_dx = da_dx * muw;
259  dmu_dT = da_dT * muw + a * dmuw_dT;
260 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
static const std::string temperature
Definition: NS.h:59
Real _Mnacl
Molar mass of NaCl (kg/mol)
static const std::string mu
Definition: NS.h:123
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.

◆ propfunc() [1/3]

MultiComponentFluidProperties::propfunc ( rho  ,
p  ,
T  ,
 
)
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:

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:

// 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.

◆ propfunc() [2/3]

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

◆ propfunc() [3/3]

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

◆ rho_from_p_T_X() [1/3]

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

Definition at line 170 of file BrineFluidProperties.C.

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

171 {
172  // Initialise the AD value (no derivatives required)
173  FPADReal p = pressure;
175  FPADReal x = xnacl;
176 
177  _water_fp_derivs = false;
178  FPADReal ad_rho = this->rho_from_p_T_X(p, T, x);
179 
180  return ad_rho.value();
181 }
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
const std::vector< double > x
static const std::string pressure
Definition: NS.h:56
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ rho_from_p_T_X() [2/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  // The correlation requires the pressure in bar, not Pa.
126  FPADReal pbar = pressure * 1.0e-5;
127  FPADReal pbar2 = pbar * pbar;
128  FPADReal pbar3 = pbar2 * pbar;
129 
130  // The correlation requires mole fraction
131  const FPADReal Xnacl = massFractionToMoleFraction(xnacl);
132 
133  const FPADReal n11 = -54.2958 - 45.7623 * std::exp(-9.44785e-4 * pbar);
134  const FPADReal n21 = -2.6142 - 2.39092e-4 * pbar;
135  const FPADReal n22 = 0.0356828 + 4.37235e-6 * pbar + 2.0566e-9 * pbar2;
136  const FPADReal n1x1 = 330.47 + 0.942876 * std::sqrt(pbar) + 0.0817193 * pbar -
137  2.47556e-8 * pbar2 + 3.45052e-10 * pbar3;
138  const FPADReal n2x1 = -0.0370751 + 0.00237723 * std::sqrt(pbar) + 5.42049e-5 * pbar +
139  5.84709e-9 * pbar2 - 5.99373e-13 * pbar3;
140  const FPADReal n12 = -n1x1 - n11;
141  const FPADReal n20 = 1.0 - n21 * std::sqrt(n22);
142  const FPADReal n23 = n2x1 - n20 - n21 * std::sqrt(1.0 + n22);
143 
144  // The temperature Tv where the brine has the same molar volume as pure water
145  // Note: correlation uses temperature in Celcius
146  const FPADReal n1 = n1x1 + n11 * (1.0 - Xnacl) + n12 * (1.0 - Xnacl) * (1.0 - Xnacl);
147  const FPADReal n2 = n20 + n21 * std::sqrt(Xnacl + n22) + n23 * Xnacl;
148  const FPADReal Tv = n1 + n2 * (temperature - _T_c2k);
149 
150  // The density of water at temperature Tv
151  // Note: convert Tv to Kelvin to calculate water density
152  FPADReal water_density;
153  if (_water_fp_derivs)
154  {
155  Real rho, drho_dp, drho_dT;
156  _water_fp->rho_from_p_T(pressure.value(), Tv.value() + _T_c2k, rho, drho_dp, drho_dT);
157  water_density = rho;
158 
159  water_density.derivatives() = pressure.derivatives() * drho_dp + Tv.derivatives() * drho_dT;
160  }
161  else
162  water_density = _water_fp->rho_from_p_T(pressure.value(), Tv.value() + _T_c2k);
163 
164  // The brine density is given by the water density scaled by the ratio of
165  // brine molar mass to pure water molar mass
166  return water_density * molarMass(xnacl) / _Mh2o;
167 }
Real molarMass(Real xnacl) const
Average molar mass of brine.
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
static const std::string pressure
Definition: NS.h:56
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ 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 184 of file BrineFluidProperties.C.

191 {
192  // Initialise the AD value and derivatives
193  FPADReal p = pressure;
194  Moose::derivInsert(p.derivatives(), 0, 1.0);
196  Moose::derivInsert(T.derivatives(), 1, 1.0);
197  FPADReal x = xnacl;
198  Moose::derivInsert(x.derivatives(), 2, 1.0);
199 
200  _water_fp_derivs = true;
201  FPADReal ad_rho = this->rho_from_p_T_X(p, T, x);
202 
203  rho = ad_rho.value();
204  drho_dp = ad_rho.derivatives()[0];
205  drho_dT = ad_rho.derivatives()[1];
206  drho_dx = ad_rho.derivatives()[2];
207 }
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeSize< 5 > > FPADReal
const std::vector< double > x
static const std::string pressure
Definition: NS.h:56
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
bool _water_fp_derivs
Flag to indicate whether to calculate derivatives in water_fp.

◆ rho_mu_from_p_T_X() [1/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 }
static const std::string temperature
Definition: NS.h:59
static const std::string mu
Definition: NS.h:123
static const std::string pressure
Definition: NS.h:56

◆ rho_mu_from_p_T_X() [2/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 }
static const std::string temperature
Definition: NS.h:59
static const std::string mu
Definition: NS.h:123
static const std::string pressure
Definition: NS.h:56

◆ 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 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 }
static const std::string temperature
Definition: NS.h:59
static const std::string mu
Definition: NS.h:123
static const std::string pressure
Definition: NS.h:56

◆ 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 450 of file BrineFluidProperties.C.

Referenced by PorousFlowBrineCO2::solveEquilibriumMoleFractionHighTemp().

451 {
452  // Correlation requires molal concentration (mol/kg)
453  Real mol = massFractionToMolalConc(xnacl);
454  Real mol2 = mol * mol;
455  Real mol3 = mol2 * mol;
456 
457  Real a = 1.0 + 5.93582e-6 * mol - 5.19386e-5 * mol2 + 1.23156e-5 * mol3;
458  Real b = 1.1542e-6 * mol + 1.41254e-7 * mol2 - 1.92476e-8 * mol3 - 1.70717e-9 * mol * mol3 +
459  1.0539e-10 * mol2 * mol3;
460 
461  // The temperature of pure water at the same pressure as the brine is given by
462  Real th20 = std::exp(std::log(temperature) / (a + b * temperature));
463 
464  // The brine vapour pressure is then found by evaluating the saturation pressure for pure water
465  // using this effective temperature
466  return _water_fp->vaporPressure(th20);
467 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
static const std::string temperature
Definition: NS.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real vaporPressure(Real T) const
Vapor pressure.
const SinglePhaseFluidProperties * _water_fp
Water97FluidProperties UserObject.

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 47 of file FluidProperties.h.

Referenced by VaporMixtureFluidProperties::imperfectJacobianMessage(), and SinglePhaseFluidProperties::unimplementedDerivativeMethod().

◆ _Mh2o

Real BrineFluidProperties::_Mh2o
protected

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

Definition at line 199 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), 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(), and henryConstant().

◆ _water_fp

const SinglePhaseFluidProperties* BrineFluidProperties::_water_fp
protected

◆ _water_fp_derivs

bool BrineFluidProperties::_water_fp_derivs
mutableprotected

Flag to indicate whether to calculate derivatives in water_fp.

Definition at line 201 of file BrineFluidProperties.h.

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

◆ 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

Definition at line 120 of file MultiComponentFluidProperties.h.

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

◆ 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

Definition at line 120 of file MultiComponentFluidProperties.h.

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

◆ 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: