GEOS
QuasiDynamicEQ.hpp
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 
16 #ifndef GEOS_PHYSICSSOLVERS_INDUCED_QUASIDYNAMICEQ_HPP
17 #define GEOS_PHYSICSSOLVERS_INDUCED_QUASIDYNAMICEQ_HPP
18 
20 
21 namespace geos
22 {
23 
25 {
26 public:
28  QuasiDynamicEQ() = delete;
29 
31  QuasiDynamicEQ( const string & name,
32  Group * const parent );
33 
35  virtual ~QuasiDynamicEQ() override;
36 
37  static string catalogName() { return "QuasiDynamicEQ"; }
38 
42  virtual string getCatalogName() const override { return catalogName(); }
43 
45  virtual void registerDataOnMesh( Group & meshBodies ) override;
46 
48  {
50  static constexpr char const * stressSolverNameString() { return "stressSolverName"; }
52  constexpr static char const * frictionLawNameString() { return "frictionLawName"; }
54  constexpr static char const * shearImpedanceString() { return "shearImpedance"; }
56  constexpr static char const * targetSlipIncrementString() { return "targetSlipIncrement"; }
57  };
58 
59  virtual real64 solverStep( real64 const & time_n,
60  real64 const & dt,
61  integer const cycleNumber,
62  DomainPartition & domain ) override final;
63 
64  virtual real64 setNextDt( real64 const & currentDt,
65  DomainPartition & domain ) override final;
66 
67  real64 updateStresses( real64 const & time_n,
68  real64 const & dt,
69  const int cycleNumber,
70  DomainPartition & domain ) const;
71 
76  void saveOldStateAndUpdateSlip( ElementSubRegionBase & subRegion, real64 const dt ) const;
77 
78 
79 private:
80 
81 
82 
83  virtual void postInputInitialization() override;
84 
85 
86 
88  PhysicsSolverBase * m_stressSolver;
89 
91  string m_stressSolverName;
92 
94  real64 m_shearImpedance;
95 
97  real64 m_targetSlipIncrement;
98 
99  class SpringSliderParameters
100  {
101 public:
102 
104  SpringSliderParameters( real64 const normalTraction, real64 const a, real64 const b, real64 const Dc ):
105  tauRate( 1e-4 ),
106  springStiffness( 0.0 )
107  {
108  real64 const criticalStiffness = normalTraction * (b - a) / Dc;
109  springStiffness = 0.9 * criticalStiffness;
110  }
111 
113  SpringSliderParameters( SpringSliderParameters const & ) = default;
114 
116  SpringSliderParameters( SpringSliderParameters && ) = default;
117 
119  SpringSliderParameters() = delete;
120 
122  SpringSliderParameters & operator=( SpringSliderParameters const & ) = delete;
123 
125  SpringSliderParameters & operator=( SpringSliderParameters && ) = delete;
126 
127  real64 tauRate;
128 
129  real64 springStiffness;
130  };
131 };
132 
133 } /* namespace geos */
134 
135 #endif /* GEOS_PHYSICSSOLVERS_INDUCED_QUASIDYNAMICEQ_HPP */
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Base class for all physics solvers.
PhysicsSolverBase & operator=(PhysicsSolverBase const &)=delete
Deleted copy assignment operator.
QuasiDynamicEQ()=delete
The default nullary constructor is disabled to avoid compiler auto-generation:
virtual string getCatalogName() const override
QuasiDynamicEQ(const string &name, Group *const parent)
The constructor needs a user-defined "name" and a parent Group (to place this instance in the tree st...
virtual real64 solverStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, DomainPartition &domain) override final
entry function to perform a solver step
virtual ~QuasiDynamicEQ() override
Destructor.
virtual real64 setNextDt(real64 const &currentDt, DomainPartition &domain) override final
function to set the next time step size
void saveOldStateAndUpdateSlip(ElementSubRegionBase &subRegion, real64 const dt) const
save the old state
virtual void registerDataOnMesh(Group &meshBodies) override
This method ties properties with their supporting mesh.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
Structure to hold scoped key names.
constexpr static char const * shearImpedanceString()
Friction law name string.
static constexpr char const * stressSolverNameString()
stress solver name
constexpr static char const * targetSlipIncrementString()
target slip increment
constexpr static char const * frictionLawNameString()
Friction law name string.