From 82216fa24f628a617f43723d60cbc41fc4e2eee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 19 Feb 2014 13:38:21 +0100 Subject: [PATCH] Add (defaulted) gravity argument in some places. This is done to facilitate testing, using gravity = 10 m/s^2 for example. --- opm/core/simulator/initStateEquil.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index f9b5a65af..cde37352b 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -643,14 +643,15 @@ namespace Opm public: PhasePressureComputer(const BlackoilPropertiesInterface& props, const EclipseGridParser& deck , - const UnstructuredGrid& G ) + const UnstructuredGrid& G , + const double grav = unit::gravity) : pp_(props.numPhases(), std::vector(G.number_of_cells)) { const std::vector rec = getEquil(deck); const RegionMapping<> eqlmap(equilnum(deck, G)); - calcII(eqlmap, rec, props, G); + calcII(eqlmap, rec, props, G, grav); } typedef std::vector PVal; @@ -669,7 +670,8 @@ namespace Opm calcII(const RMap& reg , const std::vector< EquilRecord >& rec , const Opm::BlackoilPropertiesInterface& props, - const UnstructuredGrid& G ) + const UnstructuredGrid& G , + const double grav) { typedef miscibility::NoMixing NoMix; @@ -685,7 +687,7 @@ namespace Opm const EqReg eqreg(rec[r], calc, NoMix(), NoMix(), props.phaseUsage()); - const PPress& res = phasePressures(G, eqreg, cells); + const PPress& res = phasePressures(G, eqreg, cells, grav); for (int p = 0, np = props.numPhases(); p < np; ++p) { PVal& d = pp_[p];