www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
RichardsDensityMethane20degC Class Reference

Methane density - a quadratic fit to expressions in: "Results of (pressure, density, temperature) measurements on methane and on nitrogen in the temperature range from 273.15K to 323.15K at pressures up to 12MPa using new apparatus for accurate gas-density" This is only valid for p>=0, which is the physical region. More...

#include <RichardsDensityMethane20degC.h>

Inheritance diagram for RichardsDensityMethane20degC:
[legend]

Public Member Functions

 RichardsDensityMethane20degC (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 ()
 

Private Attributes

Real _p_unit
 Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa, etc) More...
 

Detailed Description

Methane density - a quadratic fit to expressions in: "Results of (pressure, density, temperature) measurements on methane and on nitrogen in the temperature range from 273.15K to 323.15K at pressures up to 12MPa using new apparatus for accurate gas-density" This is only valid for p>=0, which is the physical region.

I extend to the p>0 domain with an exponential, which will probably be sampled as the newton interative process converges towards the solution. NOTE: this expression is only valid to about P=20MPa. Use van der Waals (RichardsDensityVDW) for higher pressures.

Definition at line 29 of file RichardsDensityMethane20degC.h.

Constructor & Destructor Documentation

RichardsDensityMethane20degC::RichardsDensityMethane20degC ( const InputParameters &  parameters)

Definition at line 34 of file RichardsDensityMethane20degC.C.

35  : RichardsDensity(parameters), _p_unit(getParam<Real>("p_unit"))
36 {
37 }
RichardsDensity(const InputParameters &parameters)
Real _p_unit
Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa...

Member Function Documentation

Real RichardsDensityMethane20degC::d2density ( Real  p) const
virtual

second derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 58 of file RichardsDensityMethane20degC.C.

59 {
60  if (p >= 0)
61  return 2.08715433094E-13 * std::pow(_p_unit, 2);
62  else
63  return 0.1 * std::pow(6.54576947608E-5 * _p_unit, 2) * std::exp(6.54576947608E-5 * p * _p_unit);
64 }
Real _p_unit
Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa...
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real RichardsDensityMethane20degC::ddensity ( Real  p) const
virtual

derivative of fluid density wrt porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 49 of file RichardsDensityMethane20degC.C.

50 {
51  if (p >= 0)
52  return (0.00654576947608E-3 + 2.08715433094E-13 * p * _p_unit) * _p_unit;
53  else
54  return 0.1 * 6.54576947608E-5 * _p_unit * std::exp(6.54576947608E-5 * p * _p_unit);
55 }
Real _p_unit
Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa...
Real RichardsDensityMethane20degC::density ( Real  p) const
virtual

fluid density as a function of porepressure

Parameters
pporepressure

Implements RichardsDensity.

Definition at line 40 of file RichardsDensityMethane20degC.C.

41 {
42  if (p >= 0)
43  return 0.00654576947608E-3 * p * _p_unit + 1.04357716547E-13 * std::pow(p * _p_unit, 2);
44  else
45  return 0.1 * (std::exp(6.54576947608E-5 * p * _p_unit) - 1);
46 }
Real _p_unit
Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa...
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
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 RichardsDensityMethane20degC::_p_unit
private

Unit of measurement for pressure (should be 1 for pressure in Pa, 1E6 for pressure in MPa, etc)

Definition at line 54 of file RichardsDensityMethane20degC.h.

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


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