GEOS
ProppantTransport.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORT_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORT_HPP_
22 
24 #include "constitutive/fluid/singlefluid/ParticleFluidBase.hpp"
25 #include "constitutive/fluid/singlefluid/SlurryFluidBase.hpp"
26 
27 namespace geos
28 {
29 
30 namespace dataRepository
31 {
32 class Group;
33 }
34 class FieldSpecificationBase;
35 class FiniteElementBase;
36 class DomainPartition;
37 
44 {
45 public:
46 
48  static string coupledSolverAttributePrefix() { return "proppant"; }
49 
55  ProppantTransport( const string & name,
56  Group * const parent );
57 
58 
60  ProppantTransport() = delete;
61 
63  ProppantTransport( ProppantTransport const & ) = delete;
64 
67 
70 
73 
77  virtual ~ProppantTransport() override = default;
78 
83  static string catalogName() { return "ProppantTransport"; }
87  string getCatalogName() const override { return catalogName(); }
88 
89  virtual void initializePreSubGroups() override;
90 
91  virtual void registerDataOnMesh( Group & meshBodies ) override;
92 
93  void preStepUpdate( real64 const & time_n,
94  real64 const & dt,
95  DomainPartition & domain );
96 
97  void postStepUpdate( real64 const & time_n,
98  real64 const & dt,
99  DomainPartition & domain );
100 
108  virtual void
109  implicitStepSetup( real64 const & time_n,
110  real64 const & dt,
111  DomainPartition & domain ) override;
112 
113  virtual void
114  setupDofs( DomainPartition const & domain,
115  DofManager & dofManager ) const override;
116 
117  virtual void
118  assembleSystem( real64 const time,
119  real64 const dt,
120  DomainPartition & domain,
121  DofManager const & dofManager,
122  CRSMatrixView< real64, globalIndex const > const & localMatrix,
123  arrayView1d< real64 > const & localRhs ) override;
124 
125  virtual void
127  real64 const dt,
128  DomainPartition & domain,
129  DofManager const & dofManager,
130  CRSMatrixView< real64, globalIndex const > const & localMatrix,
131  arrayView1d< real64 > const & localRhs ) override;
132 
133  virtual real64
134  calculateResidualNorm( real64 const & time_n,
135  real64 const & dt,
136  DomainPartition const & domain,
137  DofManager const & dofManager,
138  arrayView1d< real64 const > const & localRhs ) override;
139 
140  virtual void
141  applySystemSolution( DofManager const & dofManager,
142  arrayView1d< real64 const > const & localSolution,
143  real64 const scalingFactor,
144  real64 const dt,
145  DomainPartition & domain ) override;
146 
147  virtual void
149 
150  virtual void
152  real64 const & dt,
153  DomainPartition & domain ) override;
154 
164  DomainPartition const & domain,
165  DofManager const & dofManager,
166  CRSMatrixView< real64, globalIndex const > const & localMatrix,
167  arrayView1d< real64 > const & localRhs );
168 
176  void assembleFluxTerms( real64 const dt,
177  DomainPartition const & domain,
178  DofManager const & dofManager,
179  CRSMatrixView< real64, globalIndex const > const & localMatrix,
180  arrayView1d< real64 > const & localRhs );
181 
184  void resizeFractureFields( MeshLevel & mesh, arrayView1d< string const > const & regionNames );
185 
187  {
188  static constexpr char const * proppantNamesString() { return "proppantNames"; }
189 
190  // these are used to store last converged time step values
191 
192  static constexpr char const * updateProppantPackingString() { return "updateProppantPacking"; }
193  static constexpr char const * bridgingFactorString() { return "bridgingFactor"; }
194  static constexpr char const * maxProppantConcentrationString() { return "maxProppantConcentration"; }
195  static constexpr char const * proppantDiameterString() { return "proppantDiameter"; }
196  static constexpr char const * proppantDensityString() { return "proppantDensity"; }
197  static constexpr char const * criticalShieldsNumberString() { return "criticalShieldsNumber"; }
198  static constexpr char const * frictionCoefficientString() { return "frictionCoefficient"; }
199  };
200 
202 
203  void updateProppantMobility( ObjectManagerBase & dataGroup );
204 
208  void updateProppantPackVolume( real64 const time_n, real64 const dt, DomainPartition & domain );
209 
210  virtual void updateState ( DomainPartition & domain ) override final { GEOS_UNUSED_VAR( domain ); };
211 
216  void updateState( ObjectManagerBase & dataGroup );
217 
218 protected:
219 
220  virtual void postInputInitialization() override;
221 
222 private:
223 
228  void updateFluidModel( ObjectManagerBase & dataGroup );
229 
230  void updateComponentDensity( ObjectManagerBase & dataGroup );
231 
232  void updateProppantModel( ObjectManagerBase & dataGroup );
233 
237  void updateCellBasedFlux( real64 const time_n,
238  DomainPartition & domain );
239 
240  void setConstitutiveNames( ElementSubRegionBase & subRegion ) const override;
241 
242  integer m_numComponents;
243 
244  integer m_updateProppantPacking;
245  real64 m_bridgingFactor;
246  real64 m_minAperture;
247  real64 m_maxProppantConcentration;
248  real64 m_proppantDiameter;
249  real64 m_proppantDensity;
250  real64 m_criticalShieldsNumber;
251  real64 m_frictionCoefficient;
252 };
253 
254 
255 } /* namespace geos */
256 
257 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORT_HPP_
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
Definition: GeosxMacros.hpp:84
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Definition: DofManager.hpp:44
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:42
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
virtual void updateState(DomainPartition &domain) override final
Recompute all dependent quantities from primary variables (including constitutive models)
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
ProppantTransport(ProppantTransport const &)=delete
deleted copy constructor
static string catalogName()
name of the node manager in the object catalog
ProppantTransport()=delete
deleted default constructor
virtual void initializePreSubGroups() override
Called by Initialize() prior to initializing sub-Groups.
ProppantTransport & operator=(ProppantTransport &&)=delete
deleted move operator
virtual void registerDataOnMesh(Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
ProppantTransport & operator=(ProppantTransport const &)=delete
deleted assignment operator
void updateProppantPackVolume(real64 const time_n, real64 const dt, DomainPartition &domain)
Function to update proppant pack volume fraction.
virtual void postInputInitialization() override
static string coupledSolverAttributePrefix()
String used to form the solverName used to register single-physics solvers in CoupledSolver.
string getCatalogName() const override
ProppantTransport(ProppantTransport &&)=default
default move constructor
void updateState(ObjectManagerBase &dataGroup)
Function to update fluid and proppant properties.
ProppantTransport(const string &name, Group *const parent)
main constructor for Group Objects
virtual ~ProppantTransport() override=default
default destructor
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override
reset state of physics back to the beginning of the step.
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 setupDofs(DomainPartition const &domain, DofManager &dofManager) const override
Populate degree-of-freedom manager with fields relevant to this solver.
virtual void assembleSystem(real64 const time, 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
void assembleFluxTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
assembles the flux terms for all cells
virtual void implicitStepSetup(real64 const &time_n, real64 const &dt, DomainPartition &domain) override
function to perform setup for implicit timestep
virtual void implicitStepComplete(real64 const &time, real64 const &dt, DomainPartition &domain) override
perform cleanup for implicit timestep
void assembleAccumulationTerms(real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
assembles the accumulation terms for all cells
virtual void applyBoundaryConditions(real64 const time, 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 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
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:310
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82