20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEREACTIVETRANSPORT_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEREACTIVETRANSPORT_HPP_
38 #include "constitutive/fluid/reactivefluid/ReactiveSinglePhaseFluid.hpp"
87 return "SinglePhaseReactiveTransport";
132 real64 const scalingFactor,
155 void updateKineticReactionMolarIncrements(
real64 const dt,
252 template<
typename OBJECT_TYPE >
256 char const logMessage[],
257 string const fieldKey,
258 string const boundaryFieldKey )
const;
275 string const & jumpDofKey )
override final;
286 static constexpr
char const * diffusionNamesString() {
return "diffusionNames"; }
287 static constexpr
char const * isUpdateReactivePorosityString() {
return "isUpdateReactivePorosity"; }
288 static constexpr
char const * isUpdateSurfaceAreaString() {
return "isUpdateSurfaceArea"; }
289 static constexpr
char const * immobilePrimarySpeciesIndicesString() {
return "immobilePrimarySpeciesIndices"; }
326 void applyFaceDirichletBC(
real64 const time_n,
335 template<
typename OBJECT_TYPE >
339 char const logMessage[],
340 string const fieldKey,
341 string const boundaryFieldKey )
const
345 fsManager.
apply< OBJECT_TYPE >( time_n + dt,
349 string const & setName,
351 OBJECT_TYPE & targetGroup,
356 globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( lset.size() );
358 getName(), time_n+dt, fs.getCatalogName(), fs.getName(),
359 setName, targetGroup.getName(), fs.getScale(), numTargetElems ) );
364 parallelDevicePolicy<> >( lset,
#define GEOS_LOG_RANK_0(msg)
Log a message on screen on rank 0.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
void apply(real64 const time, MeshLevel &mesh, string const &fieldName, LAMBDA &&lambda) const
This function is the main driver for the field applications.
static FieldSpecificationManager & getInstance()
Class facilitating the representation of a multi-level discretization of a MeshBody.
integer m_numNewtonIterations
The number of nonlinear iterations that have been exectued.
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
NonlinearSolverParameters m_nonlinearSolverParameters
Nonlinear solver parameters.
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
virtual void validateConstitutiveModels(DomainPartition &domain) const override final
Checks constitutive models for consistency.
virtual ~SinglePhaseReactiveTransport() override=default
default destructor
virtual void applyDirichletBC(real64 const time_n, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) const override
Function to perform the Application of Dirichlet type BC's.
virtual void applySourceFluxBC(real64 const time_n, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) const override
Apply source flux boundary conditions to the system.
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override
reset state of physics back to the beginning of the step.
virtual void assembleStabilizedFluxTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
assembles the flux terms for all cells including jump stabilization
virtual void applyBoundaryConditions(real64 const time_n, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
apply boundary condition to system
array1d< integer > m_immobilePrimarySpeciesIndices
array to store the indices of immobile primary species
virtual void saveConvergedState(ElementSubRegionBase &subRegion) const override final
Utility function to save the converged state.
virtual void applySystemSolution(DofManager const &dofManager, arrayView1d< real64 const > const &localSolution, real64 const scalingFactor, real64 const dt, DomainPartition &domain) override
Function to apply the solution vector to the state.
virtual void updateFluidModel(ObjectManagerBase &dataGroup) const override
Function to update all constitutive models.
integer m_isUpdateSurfaceArea
flag to determine whether or not to update the surface area
virtual void assembleSystem(real64 const time_n, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
function to assemble the linear system matrix and rhs
virtual void implicitStepComplete(real64 const &time, real64 const &dt, DomainPartition &domain) override final
perform cleanup for implicit timestep
virtual void updateState(DomainPartition &domain) override final
Recompute all dependent quantities from primary variables (including constitutive models)
integer numPrimarySpecies() const
Getter for the number of fluid components (species)
integer m_hasDiffusion
flag to determine whether or not to apply diffusion
integer m_isUpdateReactivePorosity
flag to determine whether or not to use the reactive porosity
SinglePhaseReactiveTransport(SinglePhaseReactiveTransport &&)=default
default move constructor
virtual void registerDataOnMesh(dataRepository::Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
virtual void implicitStepSetup(real64 const &time_n, real64 const &dt, DomainPartition &domain) override final
function to perform setup for implicit timestep
void applyFieldValue(real64 const &time_n, real64 const &dt, MeshLevel &mesh, char const logMessage[], string const fieldKey, string const boundaryFieldKey) const
Utility function that encapsulates the call to FieldSpecificationBase::applyFieldValue in BC applicat...
void assembleAccumulationTermsInMassBalanceAndSpeciesAmountEqs(real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) const
assembles the accumulation terms in total mass balance and primary species amount equation for all ce...
static string catalogName()
name of the node manager in the object catalog
virtual void setupDofs(DomainPartition const &domain, DofManager &dofManager) const override
Populate degree-of-freedom manager with fields relevant to this solver.
SinglePhaseReactiveTransport(SinglePhaseReactiveTransport const &)=delete
deleted copy constructor
virtual void assembleEDFMFluxTerms(real64 const time_n, real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, string const &jumpDofKey) override final
assembles the flux terms for all cells for the poroelastic case
string getCatalogName() const override
integer m_numKineticReactions
the number of kinetic reactions
SinglePhaseReactiveTransport & operator=(SinglePhaseReactiveTransport const &)=delete
deleted assignment operator
SinglePhaseReactiveTransport(const string &name, dataRepository::Group *const parent)
main constructor for Group Objects
SinglePhaseReactiveTransport & operator=(SinglePhaseReactiveTransport &&)=delete
deleted move operator
virtual real64 calculateResidualNorm(real64 const &time_n, real64 const &dt, DomainPartition const &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localRhs) override
calculate the norm of the global system residual
virtual void applyAquiferBC(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) const override
Apply aquifer boundary conditions to the system.
integer m_numPrimarySpecies
the number of primary species in the fluid
virtual void assembleFluxTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
assembles the flux terms for all cells
string m_reactiveFluidModelName
name of the reactive fluid constitutive model
string const & getName() const
Get group name.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
stdVector< string > string_array
A 1-dimensional array of geos::string types.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
double real64
64-bit floating point type.
LvArray::CRSMatrixView< T, COL_INDEX, INDEX_TYPE const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
int integer
Signed integer type.
Array< T, 1 > array1d
Alias for 1D array.