All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
IncompPropertiesShadow.hpp
1 /* Copyright (c) 2013 Uni Research AS.
2  This file is licensed under the GNU General Public License v3.0 or later. */
3 #ifndef OPM_INCOMPPROPERTIESSHADOW_HEADER_INCLUDED
4 #define OPM_INCOMPPROPERTIESSHADOW_HEADER_INCLUDED
5 
6 #ifndef OPM_INCOMPPROPERTIESINTERFACE_HEADER_INCLUDED
7 #include <opm/core/props/IncompPropertiesInterface.hpp>
8 #endif /* OPM_INCOMPPROPERTIESINTERFACE_HEADER_INCLUDED */
9 
10 namespace Opm
11 {
34  {
40 
44  virtual int numDimensions () const;
45  virtual int numCells () const;
46  virtual const double* porosity () const;
47  virtual const double* permeability () const;
48  virtual int numPhases () const;
49  virtual const double* viscosity () const;
50  virtual const double* density () const;
51  virtual const double* surfaceDensity () const;
52  virtual void relperm (const int n,
53  const double* s,
54  const int* cells,
55  double* kr,
56  double* dkrds) const;
57  virtual void capPress (const int n,
58  const double* s,
59  const int* cells,
60  double* pc,
61  double* dpcds) const;
62  virtual void satRange (const int n,
63  const int* cells,
64  double* smin,
65  double* smax) const;
66 
81  IncompPropertiesShadow& usePorosity (const double* poro);
83 
98  IncompPropertiesShadow& usePermeability (const double* perm);
100 
115  IncompPropertiesShadow& useViscosity (const double* visc);
117 
132  IncompPropertiesShadow& useDensity (const double* dens);
134 
149  IncompPropertiesShadow& useSurfaceDensity (const double* surf);
151 
156 
161 
166 
167  private:
173  const IncompPropertiesInterface& prototype_;
174 
180  int shadowed_;
181 
185  static const int POROSITY = 1 << 1;
186  static const int PERMEABILITY = 1 << 2;
187  static const int VISCOSITY = 1 << 3;
188  static const int DENSITY = 1 << 4;
189  static const int SURFACE_DENSITY = 1 << 5;
190 
196  const double* poro_;
197  const double* perm_;
198  const double* visc_;
199  const double* dens_;
200  const double* surf_;
201  };
202 } /* namespace Opm */
203 
204 // body of inline methods are defined here:
205 #include <opm/core/props/IncompPropertiesShadow_impl.hpp>
206 
207 #endif /* OPM_INCOMPPROPERTIESSHADOW_HEADER_INCLUDED */
IncompPropertiesShadow(const IncompPropertiesInterface &original)
Shadow another set of properties.
Definition: IncompPropertiesShadow_impl.hpp:14
IncompPropertiesShadow & usePermeability(const double *perm)
Use a different set of permeabilities.
Definition: IncompPropertiesShadow_impl.hpp:114
virtual void relperm(const int n, const double *s, const int *cells, double *kr, double *dkrds) const
These methods are sufficiently advanced (the s parameter is a non-integral index) for there not to be...
Definition: IncompPropertiesShadow_impl.hpp:49
virtual int numDimensions() const
Implement all methods from the IncompPropertiesInterface.
Definition: IncompPropertiesShadow_impl.hpp:29
virtual void capPress(const int n, const double *s, const int *cells, double *pc, double *dpcds) const
Definition: IncompPropertiesShadow_impl.hpp:58
virtual int numPhases() const
Definition: IncompPropertiesShadow_impl.hpp:39
virtual const double * permeability() const
Definition: IncompPropertiesShadow_impl.hpp:84
IncompPropertiesShadow & useFluidProps(const IncompPropertiesInterface &other)
Convenience method to set both viscosity and density.
Definition: IncompPropertiesShadow_impl.hpp:185
IncompPropertiesShadow & useRockProps(const IncompPropertiesInterface &other)
Convenience method to set both porosity and permeability.
Definition: IncompPropertiesShadow_impl.hpp:180
virtual const double * porosity() const
Return the new value if indicated in the bitfield, otherwise use the original value from the other ob...
Definition: IncompPropertiesShadow_impl.hpp:79
IncompPropertiesShadow & useDensity(const double *dens)
Use a different set of densities.
Definition: IncompPropertiesShadow_impl.hpp:128
virtual const double * viscosity() const
Definition: IncompPropertiesShadow_impl.hpp:89
IncompPropertiesShadow & useViscosity(const double *visc)
Use a different set of viscosities.
Definition: IncompPropertiesShadow_impl.hpp:121
virtual const double * surfaceDensity() const
Densities of fluid phases at surface conditions.
Definition: IncompPropertiesShadow_impl.hpp:99
IncompPropertiesShadow & useSurfaceDensity(const double *surf)
Use a different set of surface densities.
Definition: IncompPropertiesShadow_impl.hpp:135
virtual int numCells() const
Definition: IncompPropertiesShadow_impl.hpp:34
Definition: IncompPropertiesShadow.hpp:33
virtual void satRange(const int n, const int *cells, double *smin, double *smax) const
Obtain the range of allowable saturation values.
Definition: IncompPropertiesShadow_impl.hpp:67
IncompPropertiesShadow & useRockAndFluidProps(const IncompPropertiesInterface &other)
Convenience method to set both rock and fluid properties.
Definition: IncompPropertiesShadow_impl.hpp:190
IncompPropertiesShadow & usePorosity(const double *poro)
Use a different set of porosities.
Definition: IncompPropertiesShadow_impl.hpp:107
virtual const double * density() const
Densities of fluid phases at reservoir conditions.
Definition: IncompPropertiesShadow_impl.hpp:94
Abstract base class for incompressible fluid and reservoir properties.
Definition: IncompPropertiesInterface.hpp:35