Opm::IncompPropertiesShadow Struct Reference

#include <IncompPropertiesShadow.hpp>

Inheritance diagram for Opm::IncompPropertiesShadow:
Inheritance graph

Public Member Functions

 IncompPropertiesShadow (const IncompPropertiesInterface &original)
 
virtual int numDimensions () const
 
virtual int numCells () const
 
virtual const double * porosity () const
 
virtual const double * permeability () const
 
virtual int numPhases () const
 
virtual const double * viscosity () const
 
virtual const double * density () const
 
virtual const double * surfaceDensity () const
 
virtual void relperm (const int n, const double *s, const int *cells, double *kr, double *dkrds) const
 
virtual void capPress (const int n, const double *s, const int *cells, double *pc, double *dpcds) const
 
virtual void satRange (const int n, const int *cells, double *smin, double *smax) const
 
IncompPropertiesShadowusePorosity (const double *poro)
 
IncompPropertiesShadowusePorosity (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowusePermeability (const double *perm)
 
IncompPropertiesShadowusePermeability (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseViscosity (const double *visc)
 
IncompPropertiesShadowuseViscosity (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseDensity (const double *dens)
 
IncompPropertiesShadowuseDensity (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseSurfaceDensity (const double *surf)
 
IncompPropertiesShadowuseSurfaceDensity (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseRockProps (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseFluidProps (const IncompPropertiesInterface &other)
 
IncompPropertiesShadowuseRockAndFluidProps (const IncompPropertiesInterface &other)
 

Constructor & Destructor Documentation

Opm::IncompPropertiesShadow::IncompPropertiesShadow ( const IncompPropertiesInterface original)
inline

Shadow another set of properties. If no properties are overridden, the values from the original will be used.

Initialize so that all properties are retrieved from original.

Member Function Documentation

void Opm::IncompPropertiesShadow::capPress ( const int  n,
const double *  s,
const int *  cells,
double *  pc,
double *  dpcds 
) const
inlinevirtual
Parameters
[in]nNumber of data points.
[in]sArray of nP saturation values.
[in]cellsArray of n cell indices to be associated with the s values.
[out]pcArray of nP capillary pressure values, array must be valid before calling.
[out]dpcdsIf non-null: array of nP^2 derivative values, array must be valid before calling. The P^2 derivative matrix is m_{ij} = {dpc_i}{ds^j}, and is output in Fortran order (m_00 m_10 m_20 m01 ...)

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::capPress().

const double * Opm::IncompPropertiesShadow::density ( ) const
inlinevirtual

Densities of fluid phases at reservoir conditions.

Returns
Array of P density values.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::density().

int Opm::IncompPropertiesShadow::numCells ( ) const
inlinevirtual
Returns
N, the number of cells.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::numCells().

int Opm::IncompPropertiesShadow::numDimensions ( ) const
inlinevirtual

Implement all methods from the IncompPropertiesInterface.

The format of the prototype and the shadow must be the same, so these methods should always be forwarded directly.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::numDimensions().

int Opm::IncompPropertiesShadow::numPhases ( ) const
inlinevirtual
Returns
P, the number of phases (also the number of components).

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::numPhases().

const double * Opm::IncompPropertiesShadow::permeability ( ) const
inlinevirtual
Returns
Array of ND^2 permeability values. The D^2 permeability values for a cell are organized as a matrix, which is symmetric (so ordering does not matter).

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::permeability().

const double * Opm::IncompPropertiesShadow::porosity ( ) const
inlinevirtual

Return the new value if indicated in the bitfield, otherwise use the original value from the other object.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::porosity().

void Opm::IncompPropertiesShadow::relperm ( const int  n,
const double *  s,
const int *  cells,
double *  kr,
double *  dkrds 
) const
inlinevirtual

These methods are sufficiently advanced (the s parameter is a non-integral index) for there not to be a trivial implementation, so they are not overridden yet.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::relperm().

void Opm::IncompPropertiesShadow::satRange ( const int  n,
const int *  cells,
double *  smin,
double *  smax 
) const
inlinevirtual

Obtain the range of allowable saturation values. In cell cells[i], saturation of phase p is allowed to be in the interval [smin[i*P + p], smax[i*P + p]].

Parameters
[in]nNumber of data points.
[in]cellsArray of n cell indices.
[out]sminArray of nP minimum s values, array must be valid before calling.
[out]smaxArray of nP maximum s values, array must be valid before calling.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::satRange().

const double * Opm::IncompPropertiesShadow::surfaceDensity ( ) const
inlinevirtual

Densities of fluid phases at surface conditions. Note: a reasonable question to ask is why there can be different densities at surface and reservoir conditions, when the phases are assumed incompressible. The answer is that even if we approximate the phases as being incompressible during simulation, the density difference between surface and reservoir may be larger. For accurate reporting and using data given in terms of surface values, we need to handle this difference.

Returns
Array of P density values.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::surfaceDensity().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useDensity ( const double *  dens)
inline

Use a different set of densities.

Parameters
densIterator containing new density values. It must contain numPhases() values.
Returns
A reference to this object, so it can be used for chaining.
Remarks
This object does not assume ownership of the underlaying memory nor makes any copies of it. Hence, the calling code must manage the array so that it points to valid memory for the lifetime of this object.

Referenced by useDensity(), and useFluidProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useFluidProps ( const IncompPropertiesInterface other)
inline

Convenience method to set both viscosity and density.

References useDensity(), useSurfaceDensity(), and useViscosity().

Referenced by useRockAndFluidProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::usePermeability ( const double *  perm)
inline

Use a different set of permeabilities.

Parameters
permIterator containing new permeability values. It must contain numCells()*numDimensions()*numDimensions() values.
Returns
A reference to this object, so it can be used for chaining.
Remarks
This object does not assume ownership of the underlaying memory nor makes any copies of it. Hence, the calling code must manage the array so that it points to valid memory for the lifetime of this object.

Referenced by usePermeability(), and useRockProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::usePorosity ( const double *  poro)
inline

Use a different set of porosities.

Parameters
poroIterator containing new porosity values. It must contain numCells() values.
Returns
A reference to this object, so it can be used for chaining.
Remarks
This object does not assume ownership of the underlaying memory nor makes any copies of it. Hence, the calling code must manage the array so that it points to valid memory for the lifetime of this object.

Store the pointer and indicate that the new value should be used.

Referenced by usePorosity(), and useRockProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::usePorosity ( const IncompPropertiesInterface other)
inline

Copy the pointer from another property interface, after checking that they are compatible.

References Opm::IncompPropertiesInterface::numCells(), Opm::IncompPropertiesInterface::porosity(), and usePorosity().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useRockAndFluidProps ( const IncompPropertiesInterface other)
inline

Convenience method to set both rock and fluid properties.

References useFluidProps(), and useRockProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useRockProps ( const IncompPropertiesInterface other)
inline

Convenience method to set both porosity and permeability.

Convenience methods to set several set of properties at once.

References usePermeability(), and usePorosity().

Referenced by useRockAndFluidProps().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useSurfaceDensity ( const double *  surf)
inline

Use a different set of surface densities.

Parameters
surfIterator containing new surface density values. It must contain numPhases() values.
Returns
A reference to this object, so it can be used for chaining.
Remarks
This object does not assume ownership of the underlaying memory nor makes any copies of it. Hence, the calling code must manage the array so that it points to valid memory for the lifetime of this object.

Referenced by useFluidProps(), and useSurfaceDensity().

IncompPropertiesShadow & Opm::IncompPropertiesShadow::useViscosity ( const double *  visc)
inline

Use a different set of viscosities.

Parameters
viscIterator containing new viscosity values. It must contain numPhases() values.
Returns
A reference to this object, so it can be used for chaining.
Remarks
This object does not assume ownership of the underlaying memory nor makes any copies of it. Hence, the calling code must manage the array so that it points to valid memory for the lifetime of this object.

References Opm::unit::perm_details::visc.

Referenced by useFluidProps(), and useViscosity().

const double * Opm::IncompPropertiesShadow::viscosity ( ) const
inlinevirtual
Returns
Array of P viscosity values.

Implements Opm::IncompPropertiesInterface.

References Opm::IncompPropertiesInterface::viscosity().


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