https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GeochemistryTimeDependentReactor Class Reference

Class that controls the time-dependent (but not space-dependent) geochemistry reactions. More...

#include <GeochemistryTimeDependentReactor.h>

Inheritance diagram for GeochemistryTimeDependentReactor:
[legend]

Public Types

enum  TEST_TYPE
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 GeochemistryTimeDependentReactor (const InputParameters &parameters)
 
virtual void initialize () override
 
virtual void finalize () override
 
virtual void initialSetup () override
 
virtual void execute () override
 
virtual const GeochemicalSystemgetGeochemicalSystem (dof_id_type node_id) const override
 
virtual const std::stringstream & getSolverOutput (dof_id_type node_id) const override
 
virtual unsigned getSolverIterations (dof_id_type node_id) const override
 
virtual Real getSolverResidual (dof_id_type node_id) const override
 
virtual const DenseVector< Real > & getMoleAdditions (dof_id_type node_id) const override
 
virtual Real getMolesDumped (dof_id_type node_id, const std::string &species) const override
 
virtual void threadJoin (const UserObject &) override
 
const PertinentGeochemicalSystemgetPertinentGeochemicalSystem () const
 returns a reference to the PertinentGeochemicalSystem used to creat the ModelGeochemicalDatabase More...
 
virtual void subdomainSetup () override
 
bool isUniqueNodeExecute ()
 
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
 
virtual bool needThreadedCopy () 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 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
 
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 timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () 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 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< SubdomainName > & blocks () const
 
unsigned int numBlocks () const
 
virtual const std::set< SubdomainID > & blockIDs () const
 
unsigned int blocksMaxDimension () const
 
bool hasBlocks (const SubdomainName &name) const
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 
bool hasBlocks (const std::set< SubdomainName > &names) const
 
bool hasBlocks (SubdomainID id) const
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 
bool hasBlockMaterialProperty (const std::string &prop_name)
 
const std::set< SubdomainID > & meshBlockIDs () const
 
virtual bool blockRestricted () const
 
virtual void checkVariable (const MooseVariableFieldBase &variable) const
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 
const std::vector< BoundaryName > & boundaryNames () const
 
unsigned int numBoundaryIDs () const
 
bool hasBoundary (const BoundaryName &name) const
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 
bool hasBoundary (const BoundaryID &id) const
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 
virtual bool boundaryRestricted () const
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 
virtual bool checkVariableBoundaryIntegrity () const
 
virtual const VariableValuecoupledValueByName (const std::string &var_name)
 
virtual const ArrayVariableValuecoupledArrayValueByName (const std::string &var_name)
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > & getCoupledVars () const
 
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars () const
 
const std::vector< MooseVariable *> & getCoupledStandardMooseVars () const
 
const std::vector< VectorMooseVariable *> & getCoupledVectorMooseVars () const
 
const std::vector< ArrayMooseVariable *> & getCoupledArrayMooseVars () const
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 
bool hasWritableCoupledVariables () const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
const ADVectorVariableValuegetADDefaultVectorValue (const std::string &var_name) const
 
const ADVariableGradientgetADDefaultGradient () const
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 
const ADVariableSecondgetADDefaultSecond () const
 
const ADVectorVariableCurlgetADDefaultCurl () const
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const std::set< MooseVariableFieldBase *> & getMooseVariableDependencies () const
 
std::set< MooseVariableFieldBase *> checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 
std::set< MooseVariableFieldBase *> checkVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 
unsigned long getRandomLong () const
 
Real getRandomReal () const
 
unsigned int getSeed (std::size_t id)
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
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 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
 
T & getSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
T & getSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
virtual void meshDisplaced ()
 
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 T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (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 sharedParams ()
 params that are shared with AddTimeDependentReactionSolverAction More...
 
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)
 
static bool restricted (const std::set< BoundaryID > &ids)
 

Public Attributes

 ALL
 
 ANY
 
const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

Real newTemperature (const DenseVector< Real > &mole_additions) const
 Based on _temperature[0], mole_additions, the current mass of the system and the current temperature of the system, work out the resulting temperature. More...
 
void preSolveDump ()
 Activate the special "dump" mode prior to solving the geochemical system: More...
 
void preSolveFlush ()
 Activate the special "flush" mode prior to solving the geochemical system: More...
 
void postSolveFlowThrough ()
 Activate the special "flow-through" mode after solving the geochemical system: More...
 
void removeCurrentSpecies ()
 Alter _mole_additions so that it will represent the situation in which all current species are removed and replaced with source_species. More...
 
void postSolveExchanger ()
 This is relevant for mode=4 simulations (heat-exchanger simulations). More...
 
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
 
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
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 
virtual void coupledCallback (const std::string &, bool) const
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 
virtual bool isCoupledConstant (const std::string &var_name) const
 
unsigned int coupledComponents (const std::string &var_name) const
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValues (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVectorVariableValue< is_ad > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVectorVariableValue< false > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
const GenericVectorVariableValue< true > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableValue< is_ad > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< false > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< true > *> coupledGenericValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericDofValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< is_ad > & coupledGenericDot (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< is_ad > & coupledGenericDotDot (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
virtual const VariableValuecoupledValueLower (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledValues (const std::string &var_name) const
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVectorVariableValue *> adCoupledVectorValues (const std::string &var_name) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, TagID tag) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValuecoupledVectorTagArrayDofValue (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ArrayVariableValue *> coupledArrayValues (const std::string &var_name) const
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 
void checkWritableVar (MooseWritableVariable *var)
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOld (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOlder (const std::string &var_name) const
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradients (const std::string &var_name) const
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableGradientadCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableGradient *> adCoupledGradients (const std::string &var_name) const
 
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableGradient< false > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
const GenericVariableGradient< true > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableGradient< is_ad > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< false > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< true > *> coupledGenericGradients (const std::string &var_name) const
 
const ADVectorVariableGradientadCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableSecondadCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradientsOld (const std::string &var_name) const
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableCurladCoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDiv (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledDots (const std::string &var_name) const
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledDots (const std::string &var_name) const
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const Moose::ADType< T >::typeadCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValues (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOlder (const std::string &var_name) const
 
virtual const ArrayVariableValuecoupledArrayDofValues (const std::string &var_name, unsigned int comp=0) const
 
virtual const ADVariableValueadCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadZeroValue () const
 
const ADVariableGradientadZeroGradient () const
 
const ADVariableSecondadZeroSecond () const
 
const GenericVariableValue< is_ad > & genericZeroValue ()
 
const GenericVariableValue< false > & genericZeroValue ()
 
const GenericVariableValue< true > & genericZeroValue ()
 
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 
const GenericVariableGradient< false > & genericZeroGradient ()
 
const GenericVariableGradient< true > & genericZeroGradient ()
 
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 
const GenericVariableSecond< false > & genericZeroSecond ()
 
const GenericVariableSecond< true > & genericZeroSecond ()
 
bool checkVar (const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
const T * getVarHelper (const std::string &var_name, unsigned int comp) const
 
T * getVarHelper (const std::string &var_name, unsigned int comp)
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) 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
 
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
 

Static Protected Member Functions

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

Protected Attributes

const VariableValue_temperature
 Temperature specified by user. More...
 
const VariableValue_cold_temperature
 Cold temperature specified by user, which is used only when mode==4. More...
 
const unsigned _heating_increments
 If mode=4 then temperature is ramped from _cold_temperature to _temperature in heating_increments increments. More...
 
Real _new_temperature
 Temperature at which the solution is required. More...
 
Real _previous_temperature
 Temperature at which the _egs was last made consistent. More...
 
GeochemicalSystem _egs
 The equilibrium geochemical system that holds all the molalities, activities, etc. More...
 
GeochemicalSolver _solver
 The solver. More...
 
const unsigned _num_kin
 Number of kinetic species. More...
 
const Real _close_system_at_time
 Defines the time at which to close the system. More...
 
bool _closed_system
 Whether the system has been closed. More...
 
const std::vector< std::string > _source_species_names
 Names of the source species. More...
 
const unsigned _num_source_species
 Number of source species. More...
 
const std::vector< const VariableValue * > _source_species_rates
 Rates of the source species. More...
 
const std::vector< std::string > _remove_fixed_activity_name
 Names of species to remove the fixed activity or fugacity constraint from. More...
 
const std::vector< Real_remove_fixed_activity_time
 Times at which to remove the fixed activity or fugacity from the species in _remove_fixed_activity_name. More...
 
const unsigned _num_removed_fixed
 Number of elements in the vector _remove_fixed_activity_name;. More...
 
std::vector< bool > _removed_fixed_activity
 Whether the activity or activity constraint has been removfed. More...
 
const std::vector< std::string > _controlled_activity_species_names
 Names of the species with controlled activity or fugacity. More...
 
const unsigned _num_controlled_activity
 Number of species with controlled activity or fugacity. More...
 
const std::vector< const VariableValue * > _controlled_activity_species_values
 Activity or fugacity of the species with controlled activity or fugacity. More...
 
DenseVector< Real_mole_additions
 Moles of each basis species added at the current timestep, along with kinetic rates. More...
 
DenseMatrix< Real_dmole_additions
 Derivative of moles_added. More...
 
const VariableValue_mode
 Mode of the system (flush, flow-through, etc) More...
 
std::unordered_map< std::string, Real_minerals_dumped
 Moles of mineral removed by dump and flow-through. More...
 
const unsigned _ramp_subsequent
 the ramp_max_ionic_strength to use during time-stepping More...
 
const unsigned _num_my_nodes
 Number of nodes handled by this processor (will need to be made un-const when mesh adaptivity is handled) More...
 
ModelGeochemicalDatabase _mgd
 my copy of the underlying ModelGeochemicalDatabase More...
 
const PertinentGeochemicalSystem_pgs
 Reference to the original PertinentGeochemicalSystem used to create the ModelGeochemicalDatabase. More...
 
const unsigned _num_basis
 number of basis species More...
 
const unsigned _num_eqm
 number of equilibrium species More...
 
const Real _initial_max_ionic_str
 Initial value of maximum ionic strength. More...
 
GeochemistryIonicStrength _is
 The ionic strength calculator. More...
 
GeochemistryActivityCoefficientsDebyeHuckel _gac
 The activity calculator. More...
 
const unsigned _max_swaps_allowed
 Maximum number of swaps allowed during a single solve. More...
 
GeochemistrySpeciesSwapper _swapper
 The species swapper. More...
 
const Real _small_molality
 A small value of molality. More...
 
std::vector< std::stringstream > _solver_output
 The solver output at each node. More...
 
std::vector< unsigned > _tot_iter
 Number of iterations used by the solver at each node. More...
 
std::vector< Real_abs_residual
 L1norm of the solver residual at each node. More...
 
MooseMesh_mesh
 
const unsigned int _qp
 
const Node *const & _current_node
 
const bool & _unique_node_execute
 
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
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const MaterialData_blk_material_data
 
const InputParameters_c_parameters
 
const std::string & _c_name
 
const std::string & _c_type
 
FEProblemBase_c_fe_problem
 
const SystemBase *const _c_sys
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > _coupled_vars
 
std::vector< MooseVariableFieldBase *> _coupled_moose_vars
 
std::vector< MooseVariable *> _coupled_standard_moose_vars
 
std::vector< VectorMooseVariable *> _coupled_vector_moose_vars
 
std::vector< ArrayMooseVariable *> _coupled_array_moose_vars
 
std::vector< MooseVariableFV< Real > *> _coupled_standard_fv_moose_vars
 
std::vector< MooseLinearVariableFV< Real > *> _coupled_standard_linear_fv_moose_vars
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 
bool _c_nodal
 
bool _c_is_implicit
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
 
VariableValue _default_value_zero
 
VariableGradient _default_gradient
 
MooseArray< ADRealVectorValue_ad_default_gradient
 
MooseArray< ADRealTensorValue_ad_default_vector_gradient
 
VariableSecond _default_second
 
MooseArray< ADRealTensorValue_ad_default_second
 
MooseArray< ADRealVectorValue_ad_default_curl
 
const VariableValue_zero
 
const VariablePhiValue_phi_zero
 
const MooseArray< ADReal > & _ad_zero
 
const VariableGradient_grad_zero
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient_grad_phi_zero
 
const VariableSecond_second_zero
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 
const VectorVariableValue_vector_zero
 
const VectorVariableCurl_vector_curl_zero
 
VectorVariableValue _default_vector_value_zero
 
VectorVariableGradient _default_vector_gradient
 
VectorVariableCurl _default_vector_curl
 
VectorVariableDivergence _default_div
 
ArrayVariableValue _default_array_value_zero
 
ArrayVariableGradient _default_array_gradient
 
bool _coupleable_neighbor
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
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
 

Detailed Description

Class that controls the time-dependent (but not space-dependent) geochemistry reactions.

Definition at line 18 of file GeochemistryTimeDependentReactor.h.

Constructor & Destructor Documentation

◆ GeochemistryTimeDependentReactor()

GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor ( const InputParameters parameters)

Definition at line 139 of file GeochemistryTimeDependentReactor.C.

142  _temperature(coupledValue("temperature")),
143  _cold_temperature(coupledValue("cold_temperature")),
144  _heating_increments(getParam<unsigned>("heating_increments")),
145  _new_temperature(getParam<Real>("initial_temperature")),
146  _previous_temperature(getParam<Real>("initial_temperature")),
147  _egs(_mgd,
148  _gac,
149  _is,
150  _swapper,
151  getParam<std::vector<std::string>>("swap_out_of_basis"),
152  getParam<std::vector<std::string>>("swap_into_basis"),
153  getParam<std::string>("charge_balance_species"),
154  getParam<std::vector<std::string>>("constraint_species"),
155  getParam<std::vector<Real>>("constraint_value"),
156  getParam<MultiMooseEnum>("constraint_unit"),
157  getParam<MultiMooseEnum>("constraint_meaning"),
159  getParam<unsigned>("extra_iterations_to_make_consistent"),
160  getParam<Real>("min_initial_molality"),
161  getParam<std::vector<std::string>>("kinetic_species_name"),
162  getParam<std::vector<Real>>("kinetic_species_initial_value"),
163  getParam<MultiMooseEnum>("kinetic_species_unit")),
165  _mgd.kin_species_name.size(),
166  _is,
167  getParam<Real>("abs_tol"),
168  getParam<Real>("rel_tol"),
169  getParam<unsigned>("max_iter"),
170  getParam<Real>("max_initial_residual"),
173  getParam<std::vector<std::string>>("prevent_precipitation"),
174  getParam<Real>("max_ionic_strength"),
175  getParam<unsigned>("ramp_max_ionic_strength_initial"),
176  getParam<bool>("evaluate_kinetic_rates_always")),
178  _close_system_at_time(getParam<Real>("close_system_at_time")),
179  _closed_system(false),
180  _source_species_names(getParam<std::vector<std::string>>("source_species_names")),
182  _source_species_rates(coupledValues("source_species_rates")),
183  _remove_fixed_activity_name(getParam<std::vector<std::string>>("remove_fixed_activity_name")),
184  _remove_fixed_activity_time(getParam<std::vector<Real>>("remove_fixed_activity_time")),
188  getParam<std::vector<std::string>>("controlled_activity_name")),
190  _controlled_activity_species_values(coupledValues("controlled_activity_value")),
193  _mode(coupledValue("mode")),
195  _ramp_subsequent(getParam<unsigned>("ramp_max_ionic_strength_subsequent"))
196 {
197  // check sources and set the rates
198  if (coupledComponents("source_species_rates") != _num_source_species)
199  paramError("source_species_names", "must have the same size as source_species_rates");
200  for (unsigned i = 0; i < _num_source_species; ++i)
201  if (!(_mgd.basis_species_index.count(_source_species_names[i]) == 1 ||
204  paramError("source_species_names",
205  "The name " + _source_species_names[i] +
206  " does not appear in the basis, equilibrium or kinetic species list");
207 
208  // check and set activity controllers
209  for (unsigned i = 0; i < _num_removed_fixed; ++i)
210  {
212  paramError(
213  "remove_fixed_activity_name",
214  "The species ",
216  " is not in the basis, so cannot have its activity or fugacity constraint removed");
217  else
218  {
219  const unsigned basis_ind = _mgd.basis_species_index.at(_remove_fixed_activity_name[i]);
223  paramError("remove_fixed_activity_name",
224  "The species ",
226  " is does not have an activity or fugacity constraint so cannot have such a "
227  "constraint removed");
228  }
229  }
231  paramError("remove_fixed_activity_name",
232  "must be of the same size as remove_fixed_activity_time");
233  if (coupledComponents("controlled_activity_value") != _num_controlled_activity)
234  paramError("controlled_activity_name", "must have the same size as controlled_activity_value");
235 
236  // record coupled variables
237  const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
238  for (unsigned int i = 0; i < coupled_vars.size(); i++)
239  addMooseVariableDependency(coupled_vars[i]);
240 
241  // setup minerals_dumped
242  for (unsigned i = 0; i < _mgd.basis_species_name.size(); ++i)
245  for (unsigned j = 0; j < _mgd.eqm_species_name.size(); ++j)
248  for (unsigned k = 0; k < _mgd.kin_species_name.size(); ++k)
251 }
const unsigned _num_basis
number of basis species
const unsigned _num_source_species
Number of source species.
const unsigned _max_swaps_allowed
Maximum number of swaps allowed during a single solve.
std::vector< bool > kin_species_mineral
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
std::vector< bool > _removed_fixed_activity
Whether the activity or activity constraint has been removfed.
bool _closed_system
Whether the system has been closed.
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
std::unordered_map< std::string, unsigned > basis_species_index
basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal ...
const std::vector< Real > _remove_fixed_activity_time
Times at which to remove the fixed activity or fugacity from the species in _remove_fixed_activity_na...
const VariableValue & _mode
Mode of the system (flush, flow-through, etc)
const unsigned _num_removed_fixed
Number of elements in the vector _remove_fixed_activity_name;.
std::unordered_map< std::string, unsigned > eqm_species_index
eqm_species_index[name] = index of the equilibrium species (secondary aqueous species, redox couples in equilibrium with the aqueous solution, minerals in equilibrium with the aqueous solution, gases in equilibrium with the aqueous solution) within all ModelGeochemicalDatabase internal datastrcutres, with given name
const VariableValue & _temperature
Temperature specified by user.
const std::vector< std::string > _remove_fixed_activity_name
Names of species to remove the fixed activity or fugacity constraint from.
unsigned getNumKinetic() const
returns the number of kinetic species
const unsigned _num_kin
Number of kinetic species.
std::unordered_map< std::string, unsigned > kin_species_index
kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal ...
ConstraintMeaningEnum
Each basis species has one of the following constraints.
Real _previous_temperature
Temperature at which the _egs was last made consistent.
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
std::unordered_map< std::string, Real > _minerals_dumped
Moles of mineral removed by dump and flow-through.
const VariableValue & _cold_temperature
Cold temperature specified by user, which is used only when mode==4.
const std::vector< const VariableValue * > _source_species_rates
Rates of the source species.
const std::vector< std::string > _controlled_activity_species_names
Names of the species with controlled activity or fugacity.
const T & getParam(const std::string &name) const
const std::vector< std::string > _source_species_names
Names of the source species.
void paramError(const std::string &param, Args... args) const
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars() const
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
unsigned int coupledComponents(const std::string &var_name) const
const unsigned _num_controlled_activity
Number of species with controlled activity or fugacity.
Real _new_temperature
Temperature at which the solution is required.
void addMooseVariableDependency(MooseVariableFieldBase *var)
GeochemistryIonicStrength _is
The ionic strength calculator.
std::vector< const VariableValue *> coupledValues(const std::string &var_name) const
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
GeochemistryReactorBase(const InputParameters &parameters)
const unsigned _ramp_subsequent
the ramp_max_ionic_strength to use during time-stepping
GeochemistrySpeciesSwapper _swapper
The species swapper.
const InputParameters & parameters() const
std::vector< std::string > kin_species_name
kin_species_name[j] = name of the j^th kinetic species
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< bool > eqm_species_mineral
eqm_species_mineral[i] = true iff the i^th equilibrium species is a mineral
const unsigned _heating_increments
If mode=4 then temperature is ramped from _cold_temperature to _temperature in heating_increments inc...
const std::vector< const VariableValue * > _controlled_activity_species_values
Activity or fugacity of the species with controlled activity or fugacity.
const Real _small_molality
A small value of molality.
std::vector< std::string > eqm_species_name
eqm_species_name[i] = name of the i^th eqm species
static const std::string k
Definition: NS.h:130
GeochemistryActivityCoefficientsDebyeHuckel _gac
The activity calculator.
std::vector< std::string > basis_species_name
basis_species_name[j] = name of the j^th basis species
const std::vector< GeochemicalSystem::ConstraintMeaningEnum > & getConstraintMeaning() const
const Real _close_system_at_time
Defines the time at which to close the system.
DenseMatrix< Real > _dmole_additions
Derivative of moles_added.

Member Function Documentation

◆ execute()

void GeochemistryTimeDependentReactor::execute ( )
overridevirtual

Reimplemented from GeochemistryReactorBase.

Definition at line 282 of file GeochemistryTimeDependentReactor.C.

283 {
284  if (_current_node->id() != 0)
285  return;
286 
288 
289  _mole_additions.zero();
291 
292  // remove appropriate constraints
294  {
295  _egs.closeSystem();
296  _closed_system = true;
297  }
298  for (unsigned i = 0; i < _num_removed_fixed; ++i)
299  {
301  {
304  _removed_fixed_activity[i] = true;
305  }
306  }
307 
308  // control activity
309  for (unsigned ca = 0; ca < _num_controlled_activity; ++ca)
310  {
311  const std::vector<GeochemicalSystem::ConstraintMeaningEnum> & cm = _egs.getConstraintMeaning();
313  {
314  const unsigned basis_ind =
319  }
320  }
321 
322  // compute moles added
323  for (unsigned i = 0; i < _num_source_species; ++i)
324  {
325  const Real this_rate = (*_source_species_rates[i])[0];
327  {
328  const unsigned basis_ind = _mgd.basis_species_index.at(_source_species_names[i]);
329  _mole_additions(basis_ind) += this_rate;
330  }
331  else if (_mgd.eqm_species_index.count(_source_species_names[i]))
332  {
333  const unsigned eqm_j = _mgd.eqm_species_index.at(_source_species_names[i]);
334  for (unsigned basis_ind = 0; basis_ind < _num_basis; ++basis_ind)
335  _mole_additions(basis_ind) += _mgd.eqm_stoichiometry(eqm_j, basis_ind) * this_rate;
336  }
337  else
338  {
339  const unsigned kin_ind = _mgd.kin_species_index.at(_source_species_names[i]);
340  _mole_additions(_num_basis + kin_ind) += this_rate;
341  }
342  }
343  for (unsigned i = 0; i < _num_basis + _num_kin; ++i)
344  _mole_additions(i) *= _dt;
345 
346  // activate special modes
347  if (_mode[0] == 1.0)
348  preSolveDump();
349  else if (_mode[0] == 3.0)
350  preSolveFlush();
351  else if (_mode[0] == 4.0)
352  {
355  }
356  else // nothing special: simply compute the desired temperature
358 
359  // set temperature, if necessary
361  {
364  }
366 
367  // solve the geochemical system
369  _solver_output[0],
370  _tot_iter[0],
371  _abs_residual[0],
372  _dt,
375 
376  // activate special modes
377  if (_mode[0] == 2.0)
379  else if (_mode[0] == 4.0)
381 }
const unsigned _num_basis
number of basis species
void computeConsistentConfiguration()
Compute a reasonably consistent configuration that can be used as an initial condition in a Newton pr...
const unsigned _num_source_species
Number of source species.
std::vector< unsigned > _tot_iter
Number of iterations used by the solver at each node.
std::vector< bool > _removed_fixed_activity
Whether the activity or activity constraint has been removfed.
void changeConstraintToBulk(unsigned basis_ind)
Changes the constraint to MOLES_BULK_SPECIES (or MOLES_BULK_WATER if basis_ind = 0) for the basis ind...
bool _closed_system
Whether the system has been closed.
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
virtual void zero() override final
void preSolveFlush()
Activate the special "flush" mode prior to solving the geochemical system:
std::unordered_map< std::string, unsigned > basis_species_index
basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal ...
void preSolveDump()
Activate the special "dump" mode prior to solving the geochemical system:
const Node *const & _current_node
const std::vector< Real > _remove_fixed_activity_time
Times at which to remove the fixed activity or fugacity from the species in _remove_fixed_activity_na...
const VariableValue & _mode
Mode of the system (flush, flow-through, etc)
const unsigned _num_removed_fixed
Number of elements in the vector _remove_fixed_activity_name;.
std::unordered_map< std::string, unsigned > eqm_species_index
eqm_species_index[name] = index of the equilibrium species (secondary aqueous species, redox couples in equilibrium with the aqueous solution, minerals in equilibrium with the aqueous solution, gases in equilibrium with the aqueous solution) within all ModelGeochemicalDatabase internal datastrcutres, with given name
void removeCurrentSpecies()
Alter _mole_additions so that it will represent the situation in which all current species are remove...
const std::vector< std::string > _remove_fixed_activity_name
Names of species to remove the fixed activity or fugacity constraint from.
const unsigned _num_kin
Number of kinetic species.
std::unordered_map< std::string, unsigned > kin_species_index
kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal ...
DenseMatrix< Real > eqm_stoichiometry
eqm_stoichiometry(i, j) = stoichiometric coefficient for equilibrium species "i" in terms of the basi...
Real _previous_temperature
Temperature at which the _egs was last made consistent.
std::vector< std::stringstream > _solver_output
The solver output at each node.
const VariableValue & _cold_temperature
Cold temperature specified by user, which is used only when mode==4.
void postSolveFlowThrough()
Activate the special "flow-through" mode after solving the geochemical system:
const std::vector< const VariableValue * > _source_species_rates
Rates of the source species.
const std::vector< std::string > _controlled_activity_species_names
Names of the species with controlled activity or fugacity.
const std::vector< std::string > _source_species_names
Names of the source species.
void solveSystem(GeochemicalSystem &egs, std::stringstream &ss, unsigned &tot_iter, Real &abs_residual, Real dt, DenseVector< Real > &mole_additions, DenseMatrix< Real > &dmole_additions)
Solve the system.
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
const unsigned _num_controlled_activity
Number of species with controlled activity or fugacity.
Real _new_temperature
Temperature at which the solution is required.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _abs_residual
L1norm of the solver residual at each node.
void setRampMaxIonicStrength(unsigned ramp_max_ionic_strength)
Sets the value of _ramp_max_ionic_strength.
void setTemperature(Real temperature)
Sets the temperature to the given quantity.
Real newTemperature(const DenseVector< Real > &mole_additions) const
Based on _temperature[0], mole_additions, the current mass of the system and the current temperature ...
const unsigned _ramp_subsequent
the ramp_max_ionic_strength to use during time-stepping
const std::vector< const VariableValue * > _controlled_activity_species_values
Activity or fugacity of the species with controlled activity or fugacity.
void setConstraintValue(unsigned basis_ind, Real value)
Set the constraint value for the basis species.
void postSolveExchanger()
This is relevant for mode=4 simulations (heat-exchanger simulations).
void closeSystem()
Changes a KG_SOLVENT_WATER constraint to MOLES_BULK_WATER (if there is such a constraint) and all FRE...
const std::vector< GeochemicalSystem::ConstraintMeaningEnum > & getConstraintMeaning() const
const Real _close_system_at_time
Defines the time at which to close the system.
DenseMatrix< Real > _dmole_additions
Derivative of moles_added.

◆ finalize()

void GeochemistryTimeDependentReactor::finalize ( )
overridevirtual

Reimplemented from GeochemistryReactorBase.

Definition at line 259 of file GeochemistryTimeDependentReactor.C.

260 {
262 }
virtual void finalize() override

◆ getGeochemicalSystem()

const GeochemicalSystem & GeochemistryTimeDependentReactor::getGeochemicalSystem ( dof_id_type  node_id) const
overridevirtual
Returns
a reference to the equilibrium geochemical system at the given node
Parameters
node_idthe ID of the node

Implements GeochemistryReactorBase.

Definition at line 384 of file GeochemistryTimeDependentReactor.C.

385 {
386  return _egs;
387 }
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.

◆ getMoleAdditions()

const DenseVector< Real > & GeochemistryTimeDependentReactor::getMoleAdditions ( dof_id_type  node_id) const
overridevirtual
Returns
the mole additions (the first num_basis of these are additions to the bulk composition of the equilibrium system, the last num_kin of these are -dt*kinetic_reaction_rate, ie dt*dissolution_rate) at the specified node_id
Parameters
node_idthe node ID

Implements GeochemistryReactorBase.

Definition at line 390 of file GeochemistryTimeDependentReactor.C.

391 {
392  return _mole_additions;
393 }
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.

◆ getMolesDumped()

Real GeochemistryTimeDependentReactor::getMolesDumped ( dof_id_type  node_id,
const std::string &  species 
) const
overridevirtual
Returns
the moles dumped of the given species at the specified node_id
Parameters
speciesthe name of the species
node_idthe node ID

Implements GeochemistryReactorBase.

Definition at line 412 of file GeochemistryTimeDependentReactor.C.

414 {
415  if (_minerals_dumped.count(species) == 1)
416  return _minerals_dumped.at(species);
417  return 0.0;
418 }
std::unordered_map< std::string, Real > _minerals_dumped
Moles of mineral removed by dump and flow-through.

◆ getPertinentGeochemicalSystem()

const PertinentGeochemicalSystem& GeochemistryReactorBase::getPertinentGeochemicalSystem ( ) const
inlineinherited

returns a reference to the PertinentGeochemicalSystem used to creat the ModelGeochemicalDatabase

Definition at line 73 of file GeochemistryReactorBase.h.

Referenced by GeochemistryQuantityAux::computeValue(), GeochemistryQuantityAux::GeochemistryQuantityAux(), and GeochemistryConsoleOutput::output().

73 { return _pgs; };
const PertinentGeochemicalSystem & _pgs
Reference to the original PertinentGeochemicalSystem used to create the ModelGeochemicalDatabase.

◆ getSolverIterations()

unsigned GeochemistryTimeDependentReactor::getSolverIterations ( dof_id_type  node_id) const
overridevirtual
Returns
the total number of iterations used by the most recent solve at the specified node_id
Parameters
node_idthe node ID

Implements GeochemistryReactorBase.

Definition at line 401 of file GeochemistryTimeDependentReactor.C.

402 {
403  return _tot_iter[0];
404 }
std::vector< unsigned > _tot_iter
Number of iterations used by the solver at each node.

◆ getSolverOutput()

const std::stringstream & GeochemistryTimeDependentReactor::getSolverOutput ( dof_id_type  node_id) const
overridevirtual
Returns
a reference to the most recent solver output (containing iteration info, swap info, residuals, etc) at the specified node_id
Parameters
node_idthe node ID

Implements GeochemistryReactorBase.

Definition at line 396 of file GeochemistryTimeDependentReactor.C.

397 {
398  return _solver_output[0];
399 }
std::vector< std::stringstream > _solver_output
The solver output at each node.

◆ getSolverResidual()

Real GeochemistryTimeDependentReactor::getSolverResidual ( dof_id_type  node_id) const
overridevirtual
Returns
the L1norm of the residual at the end of the most recent solve at the specified node_id
Parameters
node_idthe node ID

Implements GeochemistryReactorBase.

Definition at line 406 of file GeochemistryTimeDependentReactor.C.

407 {
408  return _abs_residual[0];
409 }
std::vector< Real > _abs_residual
L1norm of the solver residual at each node.

◆ initialize()

void GeochemistryTimeDependentReactor::initialize ( )
overridevirtual

Reimplemented from GeochemistryReactorBase.

Definition at line 254 of file GeochemistryTimeDependentReactor.C.

255 {
257 }
virtual void initialize() override

◆ initialSetup()

void GeochemistryTimeDependentReactor::initialSetup ( )
overridevirtual

Reimplemented from NodalUserObject.

Definition at line 265 of file GeochemistryTimeDependentReactor.C.

266 {
267  // solve the geochemical system with its initial composition and with dt=0 so no kinetic additions
268  if (_num_my_nodes == 0)
269  return; // rather peculiar case where user has used many processors
270  _mole_additions.zero();
273  _solver_output[0],
274  _tot_iter[0],
275  _abs_residual[0],
276  0.0,
279 }
std::vector< unsigned > _tot_iter
Number of iterations used by the solver at each node.
virtual void zero() override final
const unsigned _num_my_nodes
Number of nodes handled by this processor (will need to be made un-const when mesh adaptivity is hand...
std::vector< std::stringstream > _solver_output
The solver output at each node.
void solveSystem(GeochemicalSystem &egs, std::stringstream &ss, unsigned &tot_iter, Real &abs_residual, Real dt, DenseVector< Real > &mole_additions, DenseMatrix< Real > &dmole_additions)
Solve the system.
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
std::vector< Real > _abs_residual
L1norm of the solver residual at each node.
DenseMatrix< Real > _dmole_additions
Derivative of moles_added.

◆ newTemperature()

Real GeochemistryTimeDependentReactor::newTemperature ( const DenseVector< Real > &  mole_additions) const
protected

Based on _temperature[0], mole_additions, the current mass of the system and the current temperature of the system, work out the resulting temperature.

This is either:

  • _temperature[0] if no mole_additions are positive (nothing is being added to the system)
  • a weighted sum of _temperature[0] (the temperature of the reactants being added) and the current system temperature, assuming the heat capacities of the inputs equal the heat capacities of the existing constituents in the system
    Parameters
    mole_additionsNumber of moles of each species being added to the system

Definition at line 421 of file GeochemistryTimeDependentReactor.C.

Referenced by execute(), preSolveDump(), and preSolveFlush().

422 {
424  return _temperature[0];
425 
426  // if no reactants are being added, the system temperature will be _temperature[0]
427  bool any_additions = false;
428  for (unsigned i = 0; i < _num_basis + _num_kin; ++i)
429  if (mole_additions(i) > 0)
430  {
431  any_additions = true;
432  break;
433  }
434  if (!any_additions)
435  return _temperature[0];
436 
437  // assume heat capacities of inputs and outputs are the same, so final temperature is dictated
438  // by masses, also assume that the input happens first, then temperature equilibration, then
439  // the outputs occur
440  Real new_temperature = _temperature[0];
441  const std::vector<Real> & current_bulk = _egs.getBulkMolesOld();
442  Real current_kg = current_bulk[0] / GeochemistryConstants::MOLES_PER_KG_WATER;
443  Real input_kg = std::max(mole_additions(0), 0.0) / GeochemistryConstants::MOLES_PER_KG_WATER;
444  for (unsigned i = 1; i < _num_basis; ++i)
445  {
446  current_kg += current_bulk[i] * _mgd.basis_species_molecular_weight[i] / 1000.0;
447  input_kg += std::max(mole_additions(i), 0.0) * _mgd.basis_species_molecular_weight[i] / 1000.0;
448  }
449  for (unsigned k = 0; k < _num_kin; ++k)
450  input_kg += std::max(mole_additions(k + _num_basis), 0.0) *
452  new_temperature =
453  (_previous_temperature * current_kg + _temperature[0] * input_kg) / (current_kg + input_kg);
454  return new_temperature;
455 }
const unsigned _num_basis
number of basis species
constexpr Real MOLES_PER_KG_WATER
const std::vector< Real > & getBulkMolesOld() const
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
std::vector< Real > kin_species_molecular_weight
all quantities have a molecular weight (g/mol)
const VariableValue & _temperature
Temperature specified by user.
const unsigned _num_kin
Number of kinetic species.
Real _previous_temperature
Temperature at which the _egs was last made consistent.
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
std::vector< Real > basis_species_molecular_weight
all quantities have a molecular weight (g)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string k
Definition: NS.h:130

◆ postSolveExchanger()

void GeochemistryTimeDependentReactor::postSolveExchanger ( )
protected

This is relevant for mode=4 simulations (heat-exchanger simulations).

Any precipitates are removed from the system, the system is then heated to temperature and re-solved, and any precipitates are removed from the system

Definition at line 602 of file GeochemistryTimeDependentReactor.C.

Referenced by execute().

603 {
604  // remove precipitates
606 
607  DenseVector<Real> zero_mole_additions(_num_basis + _num_kin);
608  DenseMatrix<Real> zero_dmole_additions(_num_basis + _num_kin, _num_basis + _num_kin);
609 
610  const Real del_temperature = (_temperature[0] - _previous_temperature) / _heating_increments;
611 
612  for (unsigned incr = 0; incr < _heating_increments; ++incr)
613  {
614  // set temperature
615  _new_temperature = _previous_temperature + del_temperature;
619 
620  zero_mole_additions.zero();
621  zero_dmole_additions.zero();
622 
623  // solve the geochemical system
625  _solver_output[0],
626  _tot_iter[0],
627  _abs_residual[0],
628  _dt,
629  zero_mole_additions,
630  zero_dmole_additions);
631 
632  // remove precipitates
634  }
635 }
const unsigned _num_basis
number of basis species
void computeConsistentConfiguration()
Compute a reasonably consistent configuration that can be used as an initial condition in a Newton pr...
std::vector< unsigned > _tot_iter
Number of iterations used by the solver at each node.
const VariableValue & _temperature
Temperature specified by user.
const unsigned _num_kin
Number of kinetic species.
Real _previous_temperature
Temperature at which the _egs was last made consistent.
std::vector< std::stringstream > _solver_output
The solver output at each node.
void postSolveFlowThrough()
Activate the special "flow-through" mode after solving the geochemical system:
void solveSystem(GeochemicalSystem &egs, std::stringstream &ss, unsigned &tot_iter, Real &abs_residual, Real dt, DenseVector< Real > &mole_additions, DenseMatrix< Real > &dmole_additions)
Solve the system.
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
Real _new_temperature
Temperature at which the solution is required.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _abs_residual
L1norm of the solver residual at each node.
void setTemperature(Real temperature)
Sets the temperature to the given quantity.
const unsigned _heating_increments
If mode=4 then temperature is ramped from _cold_temperature to _temperature in heating_increments inc...

◆ postSolveFlowThrough()

void GeochemistryTimeDependentReactor::postSolveFlowThrough ( )
protected

Activate the special "flow-through" mode after solving the geochemical system:

  • precipitated minerals are removed by setting the free mole number of minerals (basis and kinetic) is set to a small number
  • _minerals_dumped is updated accordingly

Definition at line 558 of file GeochemistryTimeDependentReactor.C.

Referenced by execute(), and postSolveExchanger().

559 {
560  // copy the current_molal values into a new vector
561  const std::vector<Real> current_molal = _egs.getSolventMassAndFreeMolalityAndMineralMoles();
562  // remove minerals
563  for (unsigned i = 1; i < _num_basis; ++i)
565  {
566  const Real to_remove = current_molal[i] - _small_molality * 10.0;
567  _egs.addToBulkMoles(i, -to_remove);
568  _minerals_dumped[_mgd.basis_species_name[i]] += to_remove;
569  }
570 
571  // copy the current kinetic moles into a new vector
572  const std::vector<Real> kin_moles = _egs.getKineticMoles();
573  // remove minerals
574  for (unsigned k = 0; k < _num_kin; ++k)
576  {
577  const Real to_remove = kin_moles[k] - _small_molality;
578  for (unsigned i = 0; i < _num_basis; ++i)
579  if (_mgd.kin_stoichiometry(k, i) != 0)
581  -_mgd.kin_stoichiometry(k, i) *
582  to_remove); // remember bulk moles contains kinetic contributions
584  _minerals_dumped[_mgd.kin_species_name[k]] += to_remove;
585  }
586 
588 }
const unsigned _num_basis
number of basis species
std::vector< bool > kin_species_mineral
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
DenseMatrix< Real > kin_stoichiometry
kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis sp...
const unsigned _num_kin
Number of kinetic species.
void setKineticMoles(unsigned kin, Real moles)
Sets the current AND old mole number for a kinetic species.
std::unordered_map< std::string, Real > _minerals_dumped
Moles of mineral removed by dump and flow-through.
Real getKineticMoles(unsigned kin) const
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
std::vector< std::string > kin_species_name
kin_species_name[j] = name of the j^th kinetic species
const std::vector< Real > & getSolventMassAndFreeMolalityAndMineralMoles() const
void addToBulkMoles(unsigned basis_ind, Real value)
Add to the MOLES_BULK_SPECIES (or MOLES_BULK_WATER if basis_ind = 0) for the basis species...
const Real _small_molality
A small value of molality.
void setMineralRelatedFreeMoles(Real value)
Set the free mole number of mineral-related species to the value provided.
static const std::string k
Definition: NS.h:130
std::vector< std::string > basis_species_name
basis_species_name[j] = name of the j^th basis species

◆ preSolveDump()

void GeochemistryTimeDependentReactor::preSolveDump ( )
protected

Activate the special "dump" mode prior to solving the geochemical system:

  • _mole_additions for basis mineral moles are set to the free mineral mole numbers (potentially overwriting a user's choice)
  • _minerals_dumped is updated
  • the new temperature is computed
  • the free mineral moles and bulk mole numbers in the GeochemicalSystem are updated accordingly, and _mole_additions is zero
  • all minerals are swapped out of the basis

Definition at line 458 of file GeochemistryTimeDependentReactor.C.

Referenced by execute().

459 {
460  // remove basis mineral moles
461  const std::vector<Real> & current_molal = _egs.getSolventMassAndFreeMolalityAndMineralMoles();
462  for (unsigned i = 1; i < _num_basis; ++i)
464  {
465  _mole_additions(i) = -current_molal[i]; // might overwrite the rates set above, which is good
466  _minerals_dumped[_mgd.basis_species_name[i]] += current_molal[i];
467  }
468 
470 
471  // add the chemicals immediately instead of during the solve (as occurs for other modes)
472  for (unsigned basis_ind = 0; basis_ind < _num_basis; ++basis_ind)
473  {
474  _egs.addToBulkMoles(basis_ind, _mole_additions(basis_ind));
475  _mole_additions(basis_ind) = 0.0;
476  }
477  // dump needs free mineral moles to be exactly zero and the above addToBulkMoles will have set
478  // this for standard minerals, but not things related to sorption or kinetic minerals, so:
480 
481  // Now need to swap all minerals out of the basis
482  const std::vector<Real> & eqm_molality = _egs.getEquilibriumMolality();
483  unsigned swap_into_basis = 0;
484  for (unsigned i = 0; i < _num_basis; ++i)
486  {
487  const bool legitimate_swap_found = _egs.getSwapper().findBestEqmSwap(
488  i, _mgd, eqm_molality, false, false, false, swap_into_basis);
489  if (legitimate_swap_found)
490  {
491  try
492  {
493  _egs.performSwap(i, swap_into_basis);
494  }
495  catch (const MooseException & e)
496  {
497  mooseError(e.what());
498  }
499  }
500  }
501 }
const unsigned _num_basis
number of basis species
virtual const char * what() const
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
std::unordered_map< std::string, Real > _minerals_dumped
Moles of mineral removed by dump and flow-through.
bool findBestEqmSwap(unsigned basis_ind, const ModelGeochemicalDatabase &mgd, const std::vector< Real > &eqm_molality, bool minerals_allowed, bool gas_allowed, bool sorption_allowed, unsigned &best_eqm_species) const
For the the given basis index, find the equilibrium index that it should be swapped with...
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
Real _new_temperature
Temperature at which the solution is required.
Real getEquilibriumMolality(unsigned j) const
Real newTemperature(const DenseVector< Real > &mole_additions) const
Based on _temperature[0], mole_additions, the current mass of the system and the current temperature ...
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
void mooseError(Args &&... args) const
const std::vector< Real > & getSolventMassAndFreeMolalityAndMineralMoles() const
const GeochemistrySpeciesSwapper & getSwapper() const
void addToBulkMoles(unsigned basis_ind, Real value)
Add to the MOLES_BULK_SPECIES (or MOLES_BULK_WATER if basis_ind = 0) for the basis species...
void performSwap(unsigned swap_out_of_basis, unsigned swap_into_basis)
Perform the basis swap, and ensure that the resulting system is consistent.
void setMineralRelatedFreeMoles(Real value)
Set the free mole number of mineral-related species to the value provided.
std::vector< std::string > basis_species_name
basis_species_name[j] = name of the j^th basis species

◆ preSolveFlush()

void GeochemistryTimeDependentReactor::preSolveFlush ( )
protected

Activate the special "flush" mode prior to solving the geochemical system:

  • the new temperature is computed
  • the total mass of aqueous solution entering the system (ie, without free mineral moles and kinetic-mineral moles) is computed
  • the current mass of the aqueous solution is computed
  • _mole_additions is updated by removing species from the current aqueous solution so that the final mass (after _mole_additions has been added) will be the same as the current mass of aqueous solution

Definition at line 504 of file GeochemistryTimeDependentReactor.C.

Referenced by execute().

505 {
507 
508  // Here we conserve mass, so compute the mass of the solution, without the free mineral moles.
509  // We don't include the free mineral moles because users of GeochemistWorkbench will want
510  // "flush" to operate like Bethke Eqn(13.14)
511  // I assume we also don't include kinetic-mineral moles
513  for (unsigned i = 1; i < _num_basis; ++i)
514  if (!_mgd.basis_species_mineral[i])
515  kg_in += _mole_additions(i) * _mgd.basis_species_molecular_weight[i] / 1000.0;
516  for (unsigned kin = 0; kin < _num_kin; ++kin)
517  if (!_mgd.kin_species_mineral[kin])
518  kg_in += _mole_additions(kin + _num_basis) * _mgd.kin_species_molecular_weight[kin] / 1000.0;
519 
520  const std::vector<Real> & current_bulk = _egs.getBulkMolesOld();
521  const std::vector<Real> & current_molal = _egs.getSolventMassAndFreeMolalityAndMineralMoles();
522  const std::vector<Real> & kin_moles = _egs.getKineticMoles();
523 
524  // compute the current mass, without moles from free minerals and without kinetic minerals
525  Real current_kg = current_bulk[0] / GeochemistryConstants::MOLES_PER_KG_WATER;
526  for (unsigned i = 1; i < _num_basis; ++i)
527  {
528  Real kinetic_contribution = 0.0;
529  for (unsigned k = 0; k < _num_kin; ++k)
531  kinetic_contribution += kin_moles[k] * _mgd.kin_stoichiometry(k, i);
533  current_kg += (current_bulk[i] - current_molal[i] - kinetic_contribution) *
535  else
536  current_kg += (current_bulk[i] - kinetic_contribution) *
538  }
539 
540  const Real fraction_to_remove = kg_in / current_kg;
541  for (unsigned i = 0; i < _num_basis; ++i)
542  {
543  Real all_kinetic_contribution = 0.0;
544  for (unsigned k = 0; k < _num_kin; ++k)
545  all_kinetic_contribution += kin_moles[k] * _mgd.kin_stoichiometry(k, i);
547  _mole_additions(i) -=
548  fraction_to_remove * (current_bulk[i] - current_molal[i] - all_kinetic_contribution);
549  else
550  _mole_additions(i) -= fraction_to_remove * (current_bulk[i] - all_kinetic_contribution);
551  }
552  for (unsigned k = 0; k < _num_kin; ++k)
553  if (!_mgd.kin_species_mineral[k])
554  _mole_additions(k + _num_basis) -= fraction_to_remove * kin_moles[k];
555 }
const unsigned _num_basis
number of basis species
constexpr Real MOLES_PER_KG_WATER
std::vector< bool > kin_species_mineral
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
const std::vector< Real > & getBulkMolesOld() const
ModelGeochemicalDatabase _mgd
my copy of the underlying ModelGeochemicalDatabase
DenseMatrix< Real > kin_stoichiometry
kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis sp...
std::vector< Real > kin_species_molecular_weight
all quantities have a molecular weight (g/mol)
const unsigned _num_kin
Number of kinetic species.
Real getKineticMoles(unsigned kin) const
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
std::vector< Real > basis_species_molecular_weight
all quantities have a molecular weight (g)
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
Real _new_temperature
Temperature at which the solution is required.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real newTemperature(const DenseVector< Real > &mole_additions) const
Based on _temperature[0], mole_additions, the current mass of the system and the current temperature ...
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
const std::vector< Real > & getSolventMassAndFreeMolalityAndMineralMoles() const
static const std::string k
Definition: NS.h:130

◆ removeCurrentSpecies()

void GeochemistryTimeDependentReactor::removeCurrentSpecies ( )
protected

Alter _mole_additions so that it will represent the situation in which all current species are removed and replaced with source_species.

Definition at line 591 of file GeochemistryTimeDependentReactor.C.

Referenced by execute().

592 {
593  const std::vector<Real> & current_bulk = _egs.getBulkMolesOld();
594  for (unsigned i = 0; i < _num_basis; ++i)
595  _mole_additions(i) -= current_bulk[i];
596  const std::vector<Real> & kin_moles = _egs.getKineticMoles();
597  for (unsigned k = 0; k < _num_kin; ++k)
598  _mole_additions(k + _num_basis) -= kin_moles[k];
599 }
const unsigned _num_basis
number of basis species
const std::vector< Real > & getBulkMolesOld() const
const unsigned _num_kin
Number of kinetic species.
Real getKineticMoles(unsigned kin) const
GeochemicalSystem _egs
The equilibrium geochemical system that holds all the molalities, activities, etc.
DenseVector< Real > _mole_additions
Moles of each basis species added at the current timestep, along with kinetic rates.
static const std::string k
Definition: NS.h:130

◆ sharedParams()

InputParameters GeochemistryTimeDependentReactor::sharedParams ( )
static

params that are shared with AddTimeDependentReactionSolverAction

Definition at line 15 of file GeochemistryTimeDependentReactor.C.

Referenced by AddTimeDependentReactionSolverAction::validParams(), and validParams().

16 {
18  params.addParam<unsigned>(
19  "ramp_max_ionic_strength_subsequent",
20  0,
21  "The number of iterations over which to progressively increase the maximum ionic strength "
22  "(from zero to max_ionic_strength) during time-stepping. Unless a great deal occurs in each "
23  "time step, this parameter can be set quite small");
24  params.addCoupledVar(
25  "mode",
26  0.0,
27  "This may vary temporally. If mode=1 then 'dump' mode is used, which means all non-kinetic "
28  "mineral masses are removed from the system before the equilibrium solution is sought (ie, "
29  "removal occurs at the beginning of the time step). If mode=2 then 'flow-through' mode is "
30  "used, which means all mineral masses are removed from the system after it the "
31  "equilbrium solution has been found (ie, at the end of a time step). If mode=3 then 'flush' "
32  "mode is used, then before the equilibrium solution is sought (ie, at the start of a time "
33  "step) water+species is removed from the system at the same rate as pure water + non-mineral "
34  "solutes are entering the system (specified in source_species_rates). If mode=4 then "
35  "'heat-exchanger' mode is used, which means the entire current aqueous solution is removed, "
36  "then the source_species are added, then the temperature is set to 'cold_temperature', the "
37  "system is solved and any precipitated minerals are removed, then the temperature is set to "
38  "'temperature', the system re-solved and any precipitated minerals are removed. If mode is "
39  "any other number, no special mode is active (the system simply responds to the "
40  "source_species_rates, controlled_activity_value, etc).");
41  params.addCoupledVar(
42  "temperature",
43  25,
44  "Temperature. This has two different meanings if mode!=4. (1) If no species are being "
45  "added to the solution (no source_species_rates are positive) then this is the temperature "
46  "of the aqueous solution. (2) If species are being added, this is the temperature of the "
47  "species being added. In case (2), the final aqueous-solution temperature is computed "
48  "assuming the species are added, temperature is equilibrated and then, if species are also "
49  "being removed, they are removed. If you wish to add species and simultaneously alter the "
50  "temperature, you will have to use a sequence of heat-add-heat-add, etc steps. In the case "
51  "that mode=4, temperature is the final temperature of the aqueous solution");
52  params.addCoupledVar(
53  "cold_temperature",
54  25,
55  "This is only used if mode=4, where it is the cold temperature of the heat exchanger.");
56  params.addRangeCheckedParam<unsigned>(
57  "heating_increments",
58  1,
59  "heating_increments > 0",
60  "This is only used if mode=4. Internal to this object, the temperature is ramped from "
61  "cold_temperature to temperature in heating_increments increments. This helps difficult "
62  "problems converge");
63  params.addParam<Real>("initial_temperature",
64  25.0,
65  "The initial aqueous solution is equilibrated at this system before adding "
66  "reactants, changing temperature, etc.");
67  params.addParam<Real>("close_system_at_time",
68  0.0,
69  "Time at which to 'close' the system, that is, change a kg_solvent_water "
70  "constraint to moles_bulk_water, and all free_molality and "
71  "free_moles_mineral_species to moles_bulk_species");
72  params.addParam<std::vector<std::string>>(
73  "remove_fixed_activity_name",
74  {},
75  "The name of the species that should have their activity or fugacity constraint removed at "
76  "time given in remove_fixed_activity_time. There should be an equal number of these names "
77  "as times given in remove_fixed_activity_time. Each of these must be in the basis and have "
78  "an activity or fugacity constraint");
79  params.addParam<std::vector<Real>>("remove_fixed_activity_time",
80  {},
81  "The times at which the species in remove_fixed_activity_name "
82  "should have their activity or fugacity constraint removed.");
83  params.addParam<std::vector<std::string>>(
84  "source_species_names",
85  {},
86  "The name of the species that are added at rates given in source_species_rates. There must "
87  "be an equal number of these as source_species_rates.");
88  params.addCoupledVar("source_species_rates",
89  "Rates, in mols/time_unit, of addition of the species with names given in "
90  "source_species_names. A negative value corresponds to removing a species: "
91  "be careful that you don't cause negative mass problems!");
92  params.addParam<std::vector<std::string>>(
93  "controlled_activity_name",
94  {},
95  "The names of the species that have their activity or fugacity constrained. There should be "
96  "an equal number of these names as values given in controlled_activity_value. NOTE: if "
97  "these species are not in the basis, or they do not have an activity (or fugacity) "
98  "constraint then their activity cannot be controlled: in this case MOOSE will ignore the "
99  "value you prescribe in controlled_activity_value.");
100  params.addCoupledVar("controlled_activity_value",
101  "Values of the activity or fugacity of the species in "
102  "controlled_activity_name list. These should always be positive");
103  params.addParam<bool>(
104  "evaluate_kinetic_rates_always",
105  true,
106  "If true, then, evaluate the kinetic rates at every Newton step during the solve using the "
107  "current values of molality, activity, etc (ie, implement an implicit solve). If false, "
108  "then evaluate the kinetic rates using the values of molality, activity, etc, at the start "
109  "of the current time step (ie, implement an explicit solve)");
110  params.addParam<std::vector<std::string>>(
111  "kinetic_species_name",
112  {},
113  "Names of the kinetic species given initial values in kinetic_species_initial_value");
114  params.addParam<std::vector<Real>>(
115  "kinetic_species_initial_value",
116  {},
117  "Initial number of moles, mass or volume (depending on kinetic_species_unit) for each of the "
118  "species named in kinetic_species_name");
119  MultiMooseEnum kin_species_unit("dimensionless moles molal kg g mg ug kg_per_kg_solvent "
120  "g_per_kg_solvent mg_per_kg_solvent ug_per_kg_solvent cm3");
121  params.addParam<MultiMooseEnum>(
122  "kinetic_species_unit",
123  kin_species_unit,
124  "Units of the numerical values given in kinetic_species_initial_value. Moles: mole number. "
125  "kg: kilograms. g: grams. mg: milligrams. ug: micrograms. cm3: cubic centimeters");
126  return params;
127 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
InputParameters emptyInputParameters()
void addCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)

◆ threadJoin()

virtual void GeochemistryReactorBase::threadJoin ( const UserObject )
inlineoverridevirtualinherited

Implements NodalUserObject.

Reimplemented in GeochemistrySpatialReactor.

Definition at line 28 of file GeochemistryReactorBase.h.

28 {}

◆ validParams()

InputParameters GeochemistryTimeDependentReactor::validParams ( )
static

Definition at line 130 of file GeochemistryTimeDependentReactor.C.

131 {
134  params.addClassDescription("UserObject that controls the time-dependent geochemistry reaction "
135  "processes. Spatial dependence is not possible using this class");
136  return params;
137 }
static InputParameters validParams()
static InputParameters sharedParams()
params that are shared with AddTimeDependentReactionSolverAction
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _abs_residual

std::vector<Real> GeochemistryReactorBase::_abs_residual
protectedinherited

◆ _close_system_at_time

const Real GeochemistryTimeDependentReactor::_close_system_at_time
protected

Defines the time at which to close the system.

Definition at line 58 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _closed_system

bool GeochemistryTimeDependentReactor::_closed_system
protected

Whether the system has been closed.

Definition at line 60 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _cold_temperature

const VariableValue& GeochemistryTimeDependentReactor::_cold_temperature
protected

Cold temperature specified by user, which is used only when mode==4.

Definition at line 44 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _controlled_activity_species_names

const std::vector<std::string> GeochemistryTimeDependentReactor::_controlled_activity_species_names
protected

Names of the species with controlled activity or fugacity.

Definition at line 76 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _controlled_activity_species_values

const std::vector<const VariableValue *> GeochemistryTimeDependentReactor::_controlled_activity_species_values
protected

Activity or fugacity of the species with controlled activity or fugacity.

Definition at line 80 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _dmole_additions

DenseMatrix<Real> GeochemistryTimeDependentReactor::_dmole_additions
protected

Derivative of moles_added.

Definition at line 84 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and initialSetup().

◆ _egs

GeochemicalSystem GeochemistryTimeDependentReactor::_egs
protected

The equilibrium geochemical system that holds all the molalities, activities, etc.

Definition at line 52 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), GeochemistryTimeDependentReactor(), getGeochemicalSystem(), initialSetup(), newTemperature(), postSolveExchanger(), postSolveFlowThrough(), preSolveDump(), preSolveFlush(), and removeCurrentSpecies().

◆ _gac

GeochemistryActivityCoefficientsDebyeHuckel GeochemistryReactorBase::_gac
protectedinherited

The activity calculator.

Definition at line 91 of file GeochemistryReactorBase.h.

Referenced by GeochemistrySpatialReactor::GeochemistrySpatialReactor().

◆ _heating_increments

const unsigned GeochemistryTimeDependentReactor::_heating_increments
protected

If mode=4 then temperature is ramped from _cold_temperature to _temperature in heating_increments increments.

Definition at line 46 of file GeochemistryTimeDependentReactor.h.

Referenced by postSolveExchanger().

◆ _initial_max_ionic_str

const Real GeochemistryReactorBase::_initial_max_ionic_str
protectedinherited

Initial value of maximum ionic strength.

Definition at line 87 of file GeochemistryReactorBase.h.

◆ _is

GeochemistryIonicStrength GeochemistryReactorBase::_is
protectedinherited

The ionic strength calculator.

Definition at line 89 of file GeochemistryReactorBase.h.

Referenced by GeochemistrySpatialReactor::GeochemistrySpatialReactor().

◆ _max_swaps_allowed

const unsigned GeochemistryReactorBase::_max_swaps_allowed
protectedinherited

Maximum number of swaps allowed during a single solve.

Definition at line 93 of file GeochemistryReactorBase.h.

◆ _mgd

ModelGeochemicalDatabase GeochemistryReactorBase::_mgd
protectedinherited

◆ _minerals_dumped

std::unordered_map<std::string, Real> GeochemistryTimeDependentReactor::_minerals_dumped
protected

Moles of mineral removed by dump and flow-through.

Definition at line 88 of file GeochemistryTimeDependentReactor.h.

Referenced by GeochemistryTimeDependentReactor(), getMolesDumped(), postSolveFlowThrough(), and preSolveDump().

◆ _mode

const VariableValue& GeochemistryTimeDependentReactor::_mode
protected

Mode of the system (flush, flow-through, etc)

Definition at line 86 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _mole_additions

DenseVector<Real> GeochemistryTimeDependentReactor::_mole_additions
protected

Moles of each basis species added at the current timestep, along with kinetic rates.

Definition at line 82 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), getMoleAdditions(), initialSetup(), preSolveDump(), preSolveFlush(), and removeCurrentSpecies().

◆ _new_temperature

Real GeochemistryTimeDependentReactor::_new_temperature
protected

Temperature at which the solution is required.

Definition at line 48 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), postSolveExchanger(), preSolveDump(), and preSolveFlush().

◆ _num_basis

const unsigned GeochemistryReactorBase::_num_basis
protectedinherited

◆ _num_controlled_activity

const unsigned GeochemistryTimeDependentReactor::_num_controlled_activity
protected

Number of species with controlled activity or fugacity.

Definition at line 78 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _num_eqm

const unsigned GeochemistryReactorBase::_num_eqm
protectedinherited

number of equilibrium species

Definition at line 85 of file GeochemistryReactorBase.h.

◆ _num_kin

const unsigned GeochemistryTimeDependentReactor::_num_kin
protected

◆ _num_my_nodes

const unsigned GeochemistryReactorBase::_num_my_nodes
protectedinherited

◆ _num_removed_fixed

const unsigned GeochemistryTimeDependentReactor::_num_removed_fixed
protected

Number of elements in the vector _remove_fixed_activity_name;.

Definition at line 72 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _num_source_species

const unsigned GeochemistryTimeDependentReactor::_num_source_species
protected

Number of source species.

Definition at line 64 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _pgs

const PertinentGeochemicalSystem& GeochemistryReactorBase::_pgs
protectedinherited

Reference to the original PertinentGeochemicalSystem used to create the ModelGeochemicalDatabase.

Definition at line 81 of file GeochemistryReactorBase.h.

Referenced by GeochemistryReactorBase::getPertinentGeochemicalSystem().

◆ _previous_temperature

Real GeochemistryTimeDependentReactor::_previous_temperature
protected

Temperature at which the _egs was last made consistent.

Definition at line 50 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), newTemperature(), and postSolveExchanger().

◆ _ramp_subsequent

const unsigned GeochemistryTimeDependentReactor::_ramp_subsequent
protected

the ramp_max_ionic_strength to use during time-stepping

Definition at line 90 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _remove_fixed_activity_name

const std::vector<std::string> GeochemistryTimeDependentReactor::_remove_fixed_activity_name
protected

Names of species to remove the fixed activity or fugacity constraint from.

Definition at line 68 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _remove_fixed_activity_time

const std::vector<Real> GeochemistryTimeDependentReactor::_remove_fixed_activity_time
protected

Times at which to remove the fixed activity or fugacity from the species in _remove_fixed_activity_name.

Definition at line 70 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _removed_fixed_activity

std::vector<bool> GeochemistryTimeDependentReactor::_removed_fixed_activity
protected

Whether the activity or activity constraint has been removfed.

Definition at line 74 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _small_molality

const Real GeochemistryReactorBase::_small_molality
protectedinherited

A small value of molality.

Definition at line 97 of file GeochemistryReactorBase.h.

Referenced by postSolveFlowThrough().

◆ _solver

GeochemicalSolver GeochemistryTimeDependentReactor::_solver
protected

The solver.

Definition at line 54 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), initialSetup(), and postSolveExchanger().

◆ _solver_output

std::vector<std::stringstream> GeochemistryReactorBase::_solver_output
protectedinherited

◆ _source_species_names

const std::vector<std::string> GeochemistryTimeDependentReactor::_source_species_names
protected

Names of the source species.

Definition at line 62 of file GeochemistryTimeDependentReactor.h.

Referenced by execute(), and GeochemistryTimeDependentReactor().

◆ _source_species_rates

const std::vector<const VariableValue *> GeochemistryTimeDependentReactor::_source_species_rates
protected

Rates of the source species.

Definition at line 66 of file GeochemistryTimeDependentReactor.h.

Referenced by execute().

◆ _swapper

GeochemistrySpeciesSwapper GeochemistryReactorBase::_swapper
protectedinherited

The species swapper.

Definition at line 95 of file GeochemistryReactorBase.h.

Referenced by GeochemistrySpatialReactor::GeochemistrySpatialReactor().

◆ _temperature

const VariableValue& GeochemistryTimeDependentReactor::_temperature
protected

Temperature specified by user.

Definition at line 42 of file GeochemistryTimeDependentReactor.h.

Referenced by newTemperature(), and postSolveExchanger().

◆ _tot_iter

std::vector<unsigned> GeochemistryReactorBase::_tot_iter
protectedinherited

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