v0.8.23
Public Member Functions | Public Attributes | List of all members
MixTransport::MaterialWithAutomaticDifferentiation Struct Referenceabstract

#include <users_modules/basic_finite_elements/mix_transport/src/MaterialUnsaturatedFlow.hpp>

Inheritance diagram for MixTransport::MaterialWithAutomaticDifferentiation:
[legend]
Collaboration diagram for MixTransport::MaterialWithAutomaticDifferentiation:
[legend]

Public Member Functions

 MaterialWithAutomaticDifferentiation (const CommonMaterialData &data)
 
template<typename TYPE >
TYPE funSe (TYPE &theta)
 
virtual void recordTheta ()=0
 
virtual void recordKr ()=0
 
MoFEMErrorCode calK ()
 
MoFEMErrorCode calDiffK ()
 
MoFEMErrorCode calC ()
 
MoFEMErrorCode calDiffC ()
 
MoFEMErrorCode calTheta ()
 
MoFEMErrorCode calSe ()
 
- Public Member Functions inherited from MixTransport::CommonMaterialData
 CommonMaterialData ()
 
double initalPcEval () const
 Initialize head. More...
 
void addOptions (po::options_description &o, const std::string &prefix)
 
void printMatParameters (const int id, const std::string &prefix) const
 
- Public Member Functions inherited from MixTransport::GenericMaterial
virtual ~GenericMaterial ()
 

Public Attributes

double Kr
 
double diffKr
 
- Public Attributes inherited from MixTransport::CommonMaterialData
int blockId
 Block Id. More...
 
std::string matName
 material name More...
 
double Ks
 Saturated hydraulic conductivity [m/day]. More...
 
double hS
 minimum capillary height [m] More...
 
double thetaS
 saturated water content More...
 
double thetaR
 residual water contents More...
 
double thetaM
 model parameter More...
 
double alpha
 model parameter More...
 
double n
 model parameter More...
 
double Ah
 Initial hydraulic head coefficient. More...
 
double AhZ
 Initial hydraulic head coefficient. More...
 
double AhZZ
 Initial hydraulic head coefficient. More...
 
- Public Attributes inherited from MixTransport::GenericMaterial
double sCale
 Scale time dependent eq. More...
 
double h
 hydraulic head More...
 
double h_t
 rate of hydraulic head More...
 
double K
 Hydraulic conductivity [L/s]. More...
 
double diffK
 Derivative of hydraulic conductivity [L/s * L^2/F]. More...
 
double C
 Capacity [S^2/L^2]. More...
 
double diffC
 Derivative of capacity [S^2/L^2 * L^2/F ]. More...
 
double tHeta
 Water content. More...
 
double Se
 Effective saturation. More...
 
Range tEts
 Elements with this material. More...
 
double x
 
double y
 
double z
 in meters (L) More...
 

Additional Inherited Members

- Public Types inherited from MixTransport::CommonMaterialData
typedef boost::function< boost::shared_ptr< CommonMaterialData > const CommonMaterialData &data)> RegisterHook
 
- Static Public Attributes inherited from MixTransport::GenericMaterial
static double ePsilon0 = 0
 Regularization parameter. More...
 
static double ePsilon1 = 0
 Regularization parameter. More...
 

Detailed Description

Definition at line 146 of file MaterialUnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ MaterialWithAutomaticDifferentiation()

MixTransport::MaterialWithAutomaticDifferentiation::MaterialWithAutomaticDifferentiation ( const CommonMaterialData data)

Member Function Documentation

◆ calC()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calC ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 192 of file MaterialUnsaturatedFlow.hpp.

192  {
194  if (h < hS) {
195  int r = ::gradient(2 * blockId + 0, 1, &h, &C);
196  if (r < 0) {
197  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
198  "ADOL-C function evaluation with error");
199  }
200  } else {
201  C = 0;
202  }
203  C += ePsilon1;
205  }
double C
Capacity [S^2/L^2].
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]
static double ePsilon1
Regularization parameter.

◆ calDiffC()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calDiffC ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 207 of file MaterialUnsaturatedFlow.hpp.

207  {
209  if (h < hS) {
210  double v = 1;
211  int r = ::hess_vec(2 * blockId + 0, 1, &h, &v, &diffC);
212  if (r < 0) {
213  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
214  "ADOL-C function evaluation with error");
215  }
216  } else {
217  diffC = 0;
218  }
220  }
double diffC
Derivative of capacity [S^2/L^2 * L^2/F ].
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]

◆ calDiffK()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calDiffK ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 176 of file MaterialUnsaturatedFlow.hpp.

176  {
178  if (h < hS) {
179  diffK = 0;
180  int r = ::gradient(2 * blockId + 1, 1, &h, &diffKr);
181  if (r < 0) {
182  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
183  "ADOL-C function evaluation with error");
184  }
185  diffK = Ks * diffKr;
186  } else {
187  diffK = 0;
188  }
190  };
double diffK
Derivative of hydraulic conductivity [L/s * L^2/F].
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
double Ks
Saturated hydraulic conductivity [m/day].
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]

◆ calK()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calK ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 159 of file MaterialUnsaturatedFlow.hpp.

159  {
161  if (h < hS) {
162  int r = ::function(2 * blockId + 1, 1, 1, &h, &Kr);
163  if (r < 0) {
164  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
165  "ADOL-C function evaluation with error");
166  }
167  K = Ks * Kr;
168  } else {
169  K = Ks;
170  }
171  K += Ks * ePsilon0;
173  };
static double ePsilon0
Regularization parameter.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
double Ks
Saturated hydraulic conductivity [m/day].
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]
double K
Hydraulic conductivity [L/s].

◆ calSe()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calSe ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 236 of file MaterialUnsaturatedFlow.hpp.

236  {
238  if (h < hS) {
239  int r = ::function(2 * blockId + 0, 1, 1, &h, &tHeta);
240  Se = funSe(tHeta);
241  if (r < 0) {
242  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
243  "ADOL-C function evaluation with error");
244  }
245  } else {
246  tHeta = thetaS;
247  }
249  }
double thetaS
saturated water content
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]
double Se
Effective saturation.

◆ calTheta()

MoFEMErrorCode MixTransport::MaterialWithAutomaticDifferentiation::calTheta ( )
virtual

Reimplemented from MixTransport::GenericMaterial.

Definition at line 222 of file MaterialUnsaturatedFlow.hpp.

222  {
224  if (h < hS) {
225  int r = ::function(2 * blockId + 0, 1, 1, &h, &tHeta);
226  if (r < 0) {
227  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
228  "ADOL-C function evaluation with error");
229  }
230  } else {
231  tHeta = thetaS;
232  }
234  }
double thetaS
saturated water content
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
double hS
minimum capillary height [m]

◆ funSe()

template<typename TYPE >
TYPE MixTransport::MaterialWithAutomaticDifferentiation::funSe ( TYPE &  theta)

Definition at line 150 of file MaterialUnsaturatedFlow.hpp.

150  {
151  return (theta - thetaR) / (thetaS - thetaR);
152  }
double thetaS
saturated water content
double thetaR
residual water contents

◆ recordKr()

virtual void MixTransport::MaterialWithAutomaticDifferentiation::recordKr ( )
pure virtual

◆ recordTheta()

virtual void MixTransport::MaterialWithAutomaticDifferentiation::recordTheta ( )
pure virtual

Member Data Documentation

◆ diffKr

double MixTransport::MaterialWithAutomaticDifferentiation::diffKr

Definition at line 173 of file MaterialUnsaturatedFlow.hpp.

◆ Kr

double MixTransport::MaterialWithAutomaticDifferentiation::Kr

Definition at line 158 of file MaterialUnsaturatedFlow.hpp.


The documentation for this struct was generated from the following file: