v0.14.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
MixTransport::MaterialVanGenuchten Struct Reference

#include <tutorials/cor-0to1/src/MaterialUnsaturatedFlow.hpp>

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

Public Member Functions

 MaterialVanGenuchten (const CommonMaterialData &data)
 
template<typename TYPE >
TYPE funTheta (TYPE &h, const double m)
 
template<typename TYPE >
TYPE funFunSeStar (TYPE &SeStar, const double m)
 
adouble funKr (adouble &ah)
 
virtual void recordTheta ()
 
virtual void recordKr ()
 
void printTheta (const double b, const double e, double s, const std::string &prefix)
 
void printKappa (const double b, const double e, double s, const std::string &prefix)
 
void printC (const double b, const double e, double s, const std::string &prefix)
 
- Public Member Functions inherited from MixTransport::MaterialWithAutomaticDifferentiation
 MaterialWithAutomaticDifferentiation (const CommonMaterialData &data)
 
template<typename TYPE >
TYPE funSe (TYPE &theta)
 
MoFEMErrorCode calK ()
 
MoFEMErrorCode calDiffK ()
 
MoFEMErrorCode calC ()
 
MoFEMErrorCode calDiffC ()
 
MoFEMErrorCode calTheta ()
 
MoFEMErrorCode calSe ()
 
- Public Member Functions inherited from MixTransport::CommonMaterialData
 CommonMaterialData ()
 
double initialPcEval () 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 ()
 

Static Public Member Functions

static boost::shared_ptr< CommonMaterialDatacreateMatPtr (const CommonMaterialData &data)
 

Public Attributes

adouble ah
 
adouble aTheta
 
adouble aKr
 
adouble aSe
 
adouble aSeStar
 
- Public Attributes inherited from MixTransport::MaterialWithAutomaticDifferentiation
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...
 
static double scaleZ = 1
 Scale z direction. More...
 

Detailed Description

Examples
unsaturated_transport.cpp.

Definition at line 254 of file MaterialUnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ MaterialVanGenuchten()

MixTransport::MaterialVanGenuchten::MaterialVanGenuchten ( const CommonMaterialData data)
inline

Definition at line 262 of file MaterialUnsaturatedFlow.hpp.

264  recordTheta();
265  recordKr();
266  }

Member Function Documentation

◆ createMatPtr()

static boost::shared_ptr<CommonMaterialData> MixTransport::MaterialVanGenuchten::createMatPtr ( const CommonMaterialData data)
inlinestatic

Definition at line 257 of file MaterialUnsaturatedFlow.hpp.

257  {
258  return boost::shared_ptr<CommonMaterialData>(
259  new MaterialVanGenuchten(data));
260  }

◆ funFunSeStar()

template<typename TYPE >
TYPE MixTransport::MaterialVanGenuchten::funFunSeStar ( TYPE &  SeStar,
const double  m 
)
inline

Definition at line 279 of file MaterialUnsaturatedFlow.hpp.

279  {
280  return pow(1 - pow(SeStar, 1 / m), m);
281  }

◆ funKr()

adouble MixTransport::MaterialVanGenuchten::funKr ( adouble ah)
inline

Definition at line 283 of file MaterialUnsaturatedFlow.hpp.

283  {
284  const double m = 1 - 1 / n;
285  aTheta = funTheta(ah, m);
286  aSe = funSe(aTheta);
287  aSeStar = aSe * (thetaS - thetaR) / (thetaM - thetaR);
288  double one = 1;
289  const double c = funFunSeStar<double>(one, m);
290  return sqrt(aSe) *
291  pow((1 - funFunSeStar<adouble>(aSeStar, m)) / (1 - c), 2);
292  }

◆ funTheta()

template<typename TYPE >
TYPE MixTransport::MaterialVanGenuchten::funTheta ( TYPE &  h,
const double  m 
)
inline

Definition at line 274 of file MaterialUnsaturatedFlow.hpp.

274  {
275  return thetaR + (thetaM - thetaR) / pow(1 + pow(-alpha * h, n), m);
276  }

◆ printC()

void MixTransport::MaterialVanGenuchten::printC ( const double  b,
const double  e,
double  s,
const std::string &  prefix 
)
inline
Examples
unsaturated_transport.cpp.

Definition at line 339 of file MaterialUnsaturatedFlow.hpp.

340  {
341  h = b;
342  for (; h >= e; h += s) {
343  s = -pow(-s, 0.9);
344  calC();
345  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e\n", prefix.c_str(), h, C);
346  }
347  }

◆ printKappa()

void MixTransport::MaterialVanGenuchten::printKappa ( const double  b,
const double  e,
double  s,
const std::string &  prefix 
)
inline
Examples
unsaturated_transport.cpp.

Definition at line 328 of file MaterialUnsaturatedFlow.hpp.

329  {
330  h = b;
331  for (; h >= e; h += s) {
332  s = -pow(-s, 0.9);
333  calK();
334  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e %6.4e\n", prefix.c_str(), h,
335  Kr, K);
336  }
337  }

◆ printTheta()

void MixTransport::MaterialVanGenuchten::printTheta ( const double  b,
const double  e,
double  s,
const std::string &  prefix 
)
inline
Examples
unsaturated_transport.cpp.

Definition at line 315 of file MaterialUnsaturatedFlow.hpp.

316  {
317  const double m = 1 - 1 / n;
318  h = b;
319  for (; h >= e; h += s) {
320  s = -pow(-s, 0.9);
321  double theta = funTheta(h, m);
322  double Se = (theta - thetaR) / (thetaS - thetaR);
323  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e %6.4e\n", prefix.c_str(), h,
324  theta, Se);
325  }
326  }

◆ recordKr()

virtual void MixTransport::MaterialVanGenuchten::recordKr ( )
inlinevirtual

Implements MixTransport::MaterialWithAutomaticDifferentiation.

Definition at line 305 of file MaterialUnsaturatedFlow.hpp.

305  {
306  h = -1 - hS;
307  trace_on(2 * blockId + 1, true);
308  ah <<= h;
309  aKr = funKr(ah);
310  double r_Kr;
311  aKr >>= r_Kr;
312  trace_off();
313  }

◆ recordTheta()

virtual void MixTransport::MaterialVanGenuchten::recordTheta ( )
inlinevirtual

Implements MixTransport::MaterialWithAutomaticDifferentiation.

Definition at line 294 of file MaterialUnsaturatedFlow.hpp.

294  {
295  h = -1 - hS;
296  trace_on(2 * blockId + 0, true);
297  ah <<= h;
298  const double m = 1 - 1 / n;
299  aTheta = funTheta(ah, m);
300  double r_theta;
301  aTheta >>= r_theta;
302  trace_off();
303  }

Member Data Documentation

◆ ah

adouble MixTransport::MaterialVanGenuchten::ah

Definition at line 268 of file MaterialUnsaturatedFlow.hpp.

◆ aKr

adouble MixTransport::MaterialVanGenuchten::aKr

Definition at line 270 of file MaterialUnsaturatedFlow.hpp.

◆ aSe

adouble MixTransport::MaterialVanGenuchten::aSe

Definition at line 271 of file MaterialUnsaturatedFlow.hpp.

◆ aSeStar

adouble MixTransport::MaterialVanGenuchten::aSeStar

Definition at line 272 of file MaterialUnsaturatedFlow.hpp.

◆ aTheta

adouble MixTransport::MaterialVanGenuchten::aTheta

Definition at line 269 of file MaterialUnsaturatedFlow.hpp.


The documentation for this struct was generated from the following file:
MixTransport::MaterialWithAutomaticDifferentiation::calK
MoFEMErrorCode calK()
Definition: MaterialUnsaturatedFlow.hpp:161
MixTransport::CommonMaterialData::hS
double hS
minimum capillary height [m]
Definition: MaterialUnsaturatedFlow.hpp:35
MixTransport::MaterialVanGenuchten::aKr
adouble aKr
Definition: MaterialUnsaturatedFlow.hpp:270
MixTransport::MaterialVanGenuchten::funTheta
TYPE funTheta(TYPE &h, const double m)
Definition: MaterialUnsaturatedFlow.hpp:274
MixTransport::MaterialWithAutomaticDifferentiation::calC
MoFEMErrorCode calC()
Definition: MaterialUnsaturatedFlow.hpp:194
MixTransport::GenericMaterial::C
double C
Capacity [S^2/L^2].
Definition: UnsaturatedFlow.hpp:37
MixTransport::MaterialWithAutomaticDifferentiation::MaterialWithAutomaticDifferentiation
MaterialWithAutomaticDifferentiation(const CommonMaterialData &data)
Definition: MaterialUnsaturatedFlow.hpp:149
c
const double c
speed of light (cm/ns)
Definition: initial_diffusion.cpp:39
MixTransport::CommonMaterialData::n
double n
model parameter
Definition: MaterialUnsaturatedFlow.hpp:40
MixTransport::CommonMaterialData::thetaR
double thetaR
residual water contents
Definition: MaterialUnsaturatedFlow.hpp:37
MixTransport::GenericMaterial::K
double K
Hydraulic conductivity [L/s].
Definition: UnsaturatedFlow.hpp:35
MixTransport::MaterialVanGenuchten::aSeStar
adouble aSeStar
Definition: MaterialUnsaturatedFlow.hpp:272
MixTransport::GenericMaterial::h
double h
hydraulic head
Definition: UnsaturatedFlow.hpp:32
MixTransport::CommonMaterialData::alpha
double alpha
model parameter
Definition: MaterialUnsaturatedFlow.hpp:39
MixTransport::CommonMaterialData::thetaM
double thetaM
model parameter
Definition: MaterialUnsaturatedFlow.hpp:38
MixTransport::CommonMaterialData::blockId
int blockId
Block Id.
Definition: MaterialUnsaturatedFlow.hpp:31
MixTransport::MaterialVanGenuchten::MaterialVanGenuchten
MaterialVanGenuchten(const CommonMaterialData &data)
Definition: MaterialUnsaturatedFlow.hpp:262
MixTransport::MaterialVanGenuchten::recordKr
virtual void recordKr()
Definition: MaterialUnsaturatedFlow.hpp:305
MixTransport::MaterialWithAutomaticDifferentiation::funSe
TYPE funSe(TYPE &theta)
Definition: MaterialUnsaturatedFlow.hpp:152
MixTransport::CommonMaterialData::thetaS
double thetaS
saturated water content
Definition: MaterialUnsaturatedFlow.hpp:36
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MixTransport::MaterialVanGenuchten::aSe
adouble aSe
Definition: MaterialUnsaturatedFlow.hpp:271
MixTransport::MaterialVanGenuchten::ah
adouble ah
Definition: MaterialUnsaturatedFlow.hpp:268
MixTransport::MaterialVanGenuchten::recordTheta
virtual void recordTheta()
Definition: MaterialUnsaturatedFlow.hpp:294
MixTransport::MaterialWithAutomaticDifferentiation::Kr
double Kr
Definition: MaterialUnsaturatedFlow.hpp:160
MixTransport::MaterialVanGenuchten::aTheta
adouble aTheta
Definition: MaterialUnsaturatedFlow.hpp:269
MixTransport::MaterialVanGenuchten::funKr
adouble funKr(adouble &ah)
Definition: MaterialUnsaturatedFlow.hpp:283
MixTransport::GenericMaterial::Se
double Se
Effective saturation.
Definition: UnsaturatedFlow.hpp:40