www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
RichardsDensityConstBulkCut Class Reference

Fluid density assuming constant bulk modulus, for p>cut_limit Then following a cubic for zero_point <= p <= cut_limit Then zero for p<zero_point. More...

#include <RichardsDensityConstBulkCut.h>

Inheritance diagram for RichardsDensityConstBulkCut:
[legend]

Public Member Functions

 RichardsDensityConstBulkCut (const InputParameters &parameters)
 
Real density (Real p) const
 fluid density as a function of porepressure More...
 
Real ddensity (Real p) const
 derivative of fluid density wrt porepressure More...
 
Real d2density (Real p) const
 second derivative of fluid density wrt porepressure More...
 
void initialize ()
 
void execute ()
 
void finalize ()
 

Protected Attributes

Real _dens0
 density = _dens0*exp(p/_bulk), modified by cubic More...
 
Real _bulk
 density = _dens0*exp(p/_bulk), modified by cubic More...
 
Real _cut_limit
 where the cubic starts More...
 
Real _zero_point
 where the density is zero More...
 
Real _c3
 (cut_limit-zero_point)^3 More...
 

Detailed Description

Fluid density assuming constant bulk modulus, for p>cut_limit Then following a cubic for zero_point <= p <= cut_limit Then zero for p<zero_point.

The cubic is chosen so the function and its first derivative is continuous throughout

Definition at line 24 of file RichardsDensityConstBulkCut.h.

Constructor & Destructor Documentation

RichardsDensityConstBulkCut::RichardsDensityConstBulkCut ( const InputParameters &  parameters)

Definition at line 34 of file RichardsDensityConstBulkCut.C.

35  : RichardsDensity(parameters),
36  _dens0(getParam<Real>("dens0")),
37  _bulk(getParam<Real>("bulk_mod")),
38  _cut_limit(getParam<Real>("cut_limit")),
39  _zero_point(getParam<Real>("zero_point")),
41 {
42  if (_zero_point >= _cut_limit)
43  mooseError("RichardsDensityConstantbulkCut: zero_point must be less than cut_limit");
44 }
RichardsDensity(const InputParameters &parameters)
Real _cut_limit
where the cubic starts
Real _dens0
density = _dens0*exp(p/_bulk), modified by cubic
Real _bulk
density = _dens0*exp(p/_bulk), modified by cubic
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _c3
(cut_limit-zero_point)^3
Real _zero_point
where the density is zero

Member Function Documentation

Real RichardsDensityConstBulkCut::d2density ( Real  p) const
virtual

second derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 78 of file RichardsDensityConstBulkCut.C.

79 {
80  if (p <= _zero_point)
81  return 0;
82 
83  Real unmodified = _dens0 * std::exp(p / _bulk);
84  if (p >= _cut_limit)
85  return unmodified / _bulk / _bulk;
86 
87  Real modifier =
88  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
89  Real dmodifier = 6 * (_cut_limit - p) * (p - _zero_point) / _c3;
90  Real d2modifier = (6 * _cut_limit + 6 * _zero_point - 12 * p) / _c3;
91  return (modifier / _bulk / _bulk + 2 * dmodifier / _bulk + d2modifier) * unmodified;
92 }
Real _cut_limit
where the cubic starts
Real _dens0
density = _dens0*exp(p/_bulk), modified by cubic
Real _bulk
density = _dens0*exp(p/_bulk), modified by cubic
Real _c3
(cut_limit-zero_point)^3
Real _zero_point
where the density is zero
Real RichardsDensityConstBulkCut::ddensity ( Real  p) const
virtual

derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 62 of file RichardsDensityConstBulkCut.C.

63 {
64  if (p <= _zero_point)
65  return 0;
66 
67  Real unmodified = _dens0 * std::exp(p / _bulk);
68  if (p >= _cut_limit)
69  return unmodified / _bulk;
70 
71  Real modifier =
72  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
73  Real dmodifier = 6 * (_cut_limit - p) * (p - _zero_point) / _c3;
74  return (modifier / _bulk + dmodifier) * unmodified;
75 }
Real _cut_limit
where the cubic starts
Real _dens0
density = _dens0*exp(p/_bulk), modified by cubic
Real _bulk
density = _dens0*exp(p/_bulk), modified by cubic
Real _c3
(cut_limit-zero_point)^3
Real _zero_point
where the density is zero
Real RichardsDensityConstBulkCut::density ( Real  p) const
virtual

fluid density as a function of porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 47 of file RichardsDensityConstBulkCut.C.

48 {
49  if (p <= _zero_point)
50  return 0;
51 
52  Real unmodified = _dens0 * std::exp(p / _bulk);
53  if (p >= _cut_limit)
54  return unmodified;
55 
56  Real modifier =
57  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
58  return modifier * unmodified;
59 }
Real _cut_limit
where the cubic starts
Real _dens0
density = _dens0*exp(p/_bulk), modified by cubic
Real _bulk
density = _dens0*exp(p/_bulk), modified by cubic
Real _c3
(cut_limit-zero_point)^3
Real _zero_point
where the density is zero
void RichardsDensity::execute ( )
inherited

Definition at line 32 of file RichardsDensity.C.

33 {
34 }
void RichardsDensity::finalize ( )
inherited

Definition at line 37 of file RichardsDensity.C.

38 {
39 }
void RichardsDensity::initialize ( )
inherited

Definition at line 27 of file RichardsDensity.C.

28 {
29 }

Member Data Documentation

Real RichardsDensityConstBulkCut::_bulk
protected

density = _dens0*exp(p/_bulk), modified by cubic

Definition at line 52 of file RichardsDensityConstBulkCut.h.

Referenced by d2density(), ddensity(), and density().

Real RichardsDensityConstBulkCut::_c3
protected

(cut_limit-zero_point)^3

Definition at line 61 of file RichardsDensityConstBulkCut.h.

Referenced by d2density(), ddensity(), and density().

Real RichardsDensityConstBulkCut::_cut_limit
protected

where the cubic starts

Definition at line 55 of file RichardsDensityConstBulkCut.h.

Referenced by d2density(), ddensity(), density(), and RichardsDensityConstBulkCut().

Real RichardsDensityConstBulkCut::_dens0
protected

density = _dens0*exp(p/_bulk), modified by cubic

Definition at line 49 of file RichardsDensityConstBulkCut.h.

Referenced by d2density(), ddensity(), and density().

Real RichardsDensityConstBulkCut::_zero_point
protected

where the density is zero

Definition at line 58 of file RichardsDensityConstBulkCut.h.

Referenced by d2density(), ddensity(), density(), and RichardsDensityConstBulkCut().


The documentation for this class was generated from the following files: