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

#include <users_modules/basic_finite_elements/mix_transport/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 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 ()
 

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...
 

Detailed Description

Examples
unsaturated_transport.cpp.

Definition at line 252 of file MaterialUnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ MaterialVanGenuchten()

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

Member Function Documentation

◆ createMatPtr()

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

Definition at line 255 of file MaterialUnsaturatedFlow.hpp.

255  {
256  return boost::shared_ptr<CommonMaterialData>(
257  new MaterialVanGenuchten(data));
258  }
MaterialVanGenuchten(const CommonMaterialData &data)

◆ funFunSeStar()

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

Definition at line 277 of file MaterialUnsaturatedFlow.hpp.

277  {
278  return pow(1 - pow(SeStar, 1 / m), m);
279  }

◆ funKr()

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

Definition at line 281 of file MaterialUnsaturatedFlow.hpp.

281  {
282  const double m = 1 - 1 / n;
283  aTheta = funTheta(ah, m);
284  aSe = funSe(aTheta);
285  aSeStar = aSe * (thetaS - thetaR) / (thetaM - thetaR);
286  double one = 1;
287  const double c = funFunSeStar<double>(one, m);
288  return sqrt(aSe) *
289  pow((1 - funFunSeStar<adouble>(aSeStar, m)) / (1 - c), 2);
290  }
double thetaS
saturated water content
TYPE funTheta(TYPE &h, const double m)
double thetaR
residual water contents

◆ funTheta()

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

Definition at line 272 of file MaterialUnsaturatedFlow.hpp.

272  {
273  return thetaR + (thetaM - thetaR) / pow(1 + pow(-alpha * h, n), m);
274  }
double thetaR
residual water contents

◆ printC()

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

Definition at line 337 of file MaterialUnsaturatedFlow.hpp.

338  {
339  h = b;
340  for (; h >= e; h += s) {
341  s = -pow(-s, 0.9);
342  calC();
343  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e\n", prefix.c_str(), h, C);
344  }
345  }
double C
Capacity [S^2/L^2].

◆ printKappa()

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

Definition at line 326 of file MaterialUnsaturatedFlow.hpp.

327  {
328  h = b;
329  for (; h >= e; h += s) {
330  s = -pow(-s, 0.9);
331  calK();
332  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e %6.4e\n", prefix.c_str(), h,
333  Kr, K);
334  }
335  }
double K
Hydraulic conductivity [L/s].

◆ printTheta()

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

Definition at line 313 of file MaterialUnsaturatedFlow.hpp.

314  {
315  const double m = 1 - 1 / n;
316  h = b;
317  for (; h >= e; h += s) {
318  s = -pow(-s, 0.9);
319  double theta = funTheta(h, m);
320  double Se = (theta - thetaR) / (thetaS - thetaR);
321  PetscPrintf(PETSC_COMM_SELF, "%s %6.4e %6.4e %6.4e\n", prefix.c_str(), h,
322  theta, Se);
323  }
324  }
double thetaS
saturated water content
double Se
Effective saturation.
TYPE funTheta(TYPE &h, const double m)
double thetaR
residual water contents

◆ recordKr()

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

Implements MixTransport::MaterialWithAutomaticDifferentiation.

Definition at line 303 of file MaterialUnsaturatedFlow.hpp.

303  {
304  h = -1 - hS;
305  trace_on(2 * blockId + 1, true);
306  ah <<= h;
307  aKr = funKr(ah);
308  double r_Kr;
309  aKr >>= r_Kr;
310  trace_off();
311  }
double hS
minimum capillary height [m]

◆ recordTheta()

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

Implements MixTransport::MaterialWithAutomaticDifferentiation.

Definition at line 292 of file MaterialUnsaturatedFlow.hpp.

292  {
293  h = -1 - hS;
294  trace_on(2 * blockId + 0, true);
295  ah <<= h;
296  const double m = 1 - 1 / n;
297  aTheta = funTheta(ah, m);
298  double r_theta;
299  aTheta >>= r_theta;
300  trace_off();
301  }
double hS
minimum capillary height [m]
TYPE funTheta(TYPE &h, const double m)

Member Data Documentation

◆ ah

adouble MixTransport::MaterialVanGenuchten::ah

Definition at line 266 of file MaterialUnsaturatedFlow.hpp.

◆ aKr

adouble MixTransport::MaterialVanGenuchten::aKr

Definition at line 268 of file MaterialUnsaturatedFlow.hpp.

◆ aSe

adouble MixTransport::MaterialVanGenuchten::aSe

Definition at line 269 of file MaterialUnsaturatedFlow.hpp.

◆ aSeStar

adouble MixTransport::MaterialVanGenuchten::aSeStar

Definition at line 270 of file MaterialUnsaturatedFlow.hpp.

◆ aTheta

adouble MixTransport::MaterialVanGenuchten::aTheta

Definition at line 267 of file MaterialUnsaturatedFlow.hpp.


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