20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEBASE_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEBASE_HPP_
26 #include "constitutive/fluid/singlefluid/SingleFluidBase.hpp"
27 #include "constitutive/solid/CoupledSolidBase.hpp"
33 namespace constitutive
36 class ConstitutiveBase;
54 Group *
const parent );
116 real64 const scalingFactor )
override;
151 template<
typename SUBREGION_TYPE >
153 SUBREGION_TYPE
const & subRegion,
206 string const & jumpDofKey ) = 0;
229 static constexpr
char const * elemDofFieldString() {
return "singlePhaseVariables"; }
424 virtual ThermalFluidPropViews getThermalFluidProperties( constitutive::ConstitutiveBase
const & fluid )
const;
431 template<
typename SUBREGION_TYPE >
433 SUBREGION_TYPE
const & subRegion,
437 geos::constitutive::SingleFluidBase
const & fluid =
438 getConstitutiveModel< geos::constitutive::SingleFluidBase >( subRegion, subRegion.template getReference< string >( viewKeyStruct::fluidNamesString() ) );
440 geos::constitutive::CoupledSolidBase
const & solid =
441 getConstitutiveModel< geos::constitutive::CoupledSolidBase >( subRegion, subRegion.template getReference< string >( viewKeyStruct::solidNamesString() ) );
444 string const dofKey = dofManager.
getKey( viewKeyStruct::elemDofFieldString() );
448 thermalSinglePhaseBaseKernels::
449 AccumulationKernelFactory::
450 createAndLaunch< parallelDevicePolicy<> >( dofManager.
rankOffset(),
460 singlePhaseBaseKernels::
461 AccumulationKernelFactory::
462 createAndLaunch< parallelDevicePolicy<> >( dofManager.
rankOffset(),
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
globalIndex rankOffset(string const &fieldName) const
string const & getKey(string const &fieldName) const
Return the key used to record the field in the DofManager.
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
integer m_isThermal
flag to determine whether or not this is a thermal simulation
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
virtual void updatePressureGradient(DomainPartition &domain)
Update the cell-wise pressure gradient.
virtual void setConstitutiveNamesCallSuper(ElementSubRegionBase &subRegion) const override
This function sets constitutive name fields on an ElementSubRegionBase, and calls the base function i...
SinglePhaseBase & operator=(SinglePhaseBase &&)=delete
deleted move operator
real64 updateFluidState(ElementSubRegionBase &subRegion) const
Function to update all constitutive state and dependent variables.
virtual void saveConvergedState(ElementSubRegionBase &subRegion) const override
Utility function to save the converged state.
void keepVariablesConstantDuringInitStep(real64 const time, real64 const dt, DofManager const &dofManager, DomainPartition &domain, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) const
Function to fix the initial state during the initialization step in coupled problems.
virtual ~SinglePhaseBase() override=default
default destructor
void updateEnergy(ElementSubRegionBase &subRegion) const
Function to update energy.
void initializeAquiferBC() const
Initialize the aquifer boundary condition (gravity vector, water phase index)
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 =0
Apply aquifer boundary conditions to the system.
void computeHydrostaticEquilibrium()
Compute the hydrostatic equilibrium using the compositions and temperature input tables.
void updateMobility(ObjectManagerBase &dataGroup) const
Function to update fluid mobility.
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)=0
assembles the flux terms for all cells for the poroelastic case
SinglePhaseBase & operator=(SinglePhaseBase const &)=delete
deleted assignment operator
void updateSolidInternalEnergyModel(ObjectManagerBase &dataGroup) const
Update all relevant solid internal energy models using current values of temperature.
SinglePhaseBase()=delete
deleted default constructor
SinglePhaseBase(SinglePhaseBase const &)=delete
deleted copy constructor
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
void updateMass(ElementSubRegionBase &subRegion) const
Function to update fluid mass.
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
Apply source flux boundary conditions to the system.
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
Function to perform the Application of Dirichlet type BC's.
virtual void validateConstitutiveModels(DomainPartition &domain) const
Checks constitutive models for consistency.
void assembleAccumulationTerms(DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
assembles the accumulation terms for all cells
virtual void registerDataOnMesh(Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
virtual void updateFluidModel(ObjectManagerBase &dataGroup) const
Function to update all constitutive models.
virtual void updateState(DomainPartition &domain) override final
Recompute all dependent quantities from primary variables (including constitutive models)
virtual FluidPropViews getFluidProperties(constitutive::ConstitutiveBase const &fluid) const
Extract properties from a fluid.
virtual void assembleStabilizedFluxTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)=0
assembles the flux terms for all cells including jump stabilization
virtual void assembleFluxTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)=0
assembles the flux terms for all cells
virtual void assembleHydrofracFluxTerms(real64 const time_n, real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, CRSMatrixView< real64, localIndex const > const &dR_dAper)=0
assembles the flux terms for all cells for the hydrofracture case
void accumulationAssemblyLaunch(DofManager const &dofManager, SUBREGION_TYPE const &subRegion, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
assembles the accumulation terms for all cells of a spcefici subRegion.
SinglePhaseBase(const string &name, Group *const parent)
main constructor for Group Objects
void updateThermalConductivity(ElementSubRegionBase &subRegion) const
Update thermal conductivity.
SinglePhaseBase(SinglePhaseBase &&)=default
default move constructor
virtual void initializePreSubGroups() override
Called by Initialize() prior to initializing sub-Groups.
virtual real64 scalingForSystemSolution(DomainPartition &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localSolution) override
Function to determine if the solution vector should be scaled back in order to maintain a known const...
virtual void implicitStepComplete(real64 const &time, real64 const &dt, DomainPartition &domain) override
perform cleanup for implicit timestep
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 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
virtual bool checkSystemSolution(DomainPartition &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localSolution, real64 const scalingFactor) override
Function to check system solution for physical consistency and constraint violation.
virtual void implicitStepSetup(real64 const &time_n, real64 const &dt, DomainPartition &domain) override
function to perform setup for implicit timestep
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override
reset state of physics back to the beginning of the step.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
double real64
64-bit floating point type.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Structure holding views into fluid properties used by the base solver.
arrayView2d< real64 const > const dDens_dPres
derivative of density w.r.t. pressure
arrayView2d< real64 const > const visc
viscosity
real64 const defaultViscosity
default vi to use for new elements
real64 const defaultDensity
default density to use for new elements
arrayView2d< real64 const > const dVisc_dPres
derivative of viscosity w.r.t. pressure
arrayView2d< real64 const > const dens
density
Structure holding views into thermal fluid properties used by the base solver.
arrayView2d< real64 const > const dDens_dTemp
derivative of density w.r.t. temperature
arrayView2d< real64 const > const dVisc_dTemp
derivative of viscosity w.r.t. temperature