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 26 of file RichardsDensityConstBulkCut.h.

Constructor & Destructor Documentation

◆ RichardsDensityConstBulkCut()

RichardsDensityConstBulkCut::RichardsDensityConstBulkCut ( const InputParameters &  parameters)

Definition at line 38 of file RichardsDensityConstBulkCut.C.

39  : RichardsDensity(parameters),
40  _dens0(getParam<Real>("dens0")),
41  _bulk(getParam<Real>("bulk_mod")),
42  _cut_limit(getParam<Real>("cut_limit")),
43  _zero_point(getParam<Real>("zero_point")),
45 {
46  if (_zero_point >= _cut_limit)
47  mooseError("RichardsDensityConstantbulkCut: zero_point must be less than cut_limit");
48 }
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

◆ d2density()

Real RichardsDensityConstBulkCut::d2density ( Real  p) const
virtual

second derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 82 of file RichardsDensityConstBulkCut.C.

83 {
84  if (p <= _zero_point)
85  return 0;
86 
87  Real unmodified = _dens0 * std::exp(p / _bulk);
88  if (p >= _cut_limit)
89  return unmodified / _bulk / _bulk;
90 
91  Real modifier =
92  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
93  Real dmodifier = 6 * (_cut_limit - p) * (p - _zero_point) / _c3;
94  Real d2modifier = (6 * _cut_limit + 6 * _zero_point - 12 * p) / _c3;
95  return (modifier / _bulk / _bulk + 2 * dmodifier / _bulk + d2modifier) * unmodified;
96 }
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

◆ ddensity()

Real RichardsDensityConstBulkCut::ddensity ( Real  p) const
virtual

derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 66 of file RichardsDensityConstBulkCut.C.

67 {
68  if (p <= _zero_point)
69  return 0;
70 
71  Real unmodified = _dens0 * std::exp(p / _bulk);
72  if (p >= _cut_limit)
73  return unmodified / _bulk;
74 
75  Real modifier =
76  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
77  Real dmodifier = 6 * (_cut_limit - p) * (p - _zero_point) / _c3;
78  return (modifier / _bulk + dmodifier) * unmodified;
79 }
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

◆ density()

Real RichardsDensityConstBulkCut::density ( Real  p) const
virtual

fluid density as a function of porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 51 of file RichardsDensityConstBulkCut.C.

52 {
53  if (p <= _zero_point)
54  return 0;
55 
56  Real unmodified = _dens0 * std::exp(p / _bulk);
57  if (p >= _cut_limit)
58  return unmodified;
59 
60  Real modifier =
61  (3 * _cut_limit - 2 * p - _zero_point) * (p - _zero_point) * (p - _zero_point) / _c3;
62  return modifier * unmodified;
63 }
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

◆ execute()

void RichardsDensity::execute ( )
inherited

Definition at line 34 of file RichardsDensity.C.

35 {
36 }

◆ finalize()

void RichardsDensity::finalize ( )
inherited

Definition at line 39 of file RichardsDensity.C.

40 {
41 }

◆ initialize()

void RichardsDensity::initialize ( )
inherited

Definition at line 29 of file RichardsDensity.C.

30 {
31 }

Member Data Documentation

◆ _bulk

Real RichardsDensityConstBulkCut::_bulk
protected

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

Definition at line 54 of file RichardsDensityConstBulkCut.h.

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

◆ _c3

Real RichardsDensityConstBulkCut::_c3
protected

(cut_limit-zero_point)^3

Definition at line 63 of file RichardsDensityConstBulkCut.h.

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

◆ _cut_limit

Real RichardsDensityConstBulkCut::_cut_limit
protected

where the cubic starts

Definition at line 57 of file RichardsDensityConstBulkCut.h.

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

◆ _dens0

Real RichardsDensityConstBulkCut::_dens0
protected

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

Definition at line 51 of file RichardsDensityConstBulkCut.h.

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

◆ _zero_point

Real RichardsDensityConstBulkCut::_zero_point
protected

where the density is zero

Definition at line 60 of file RichardsDensityConstBulkCut.h.

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


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