use the same value as opm-{core,autodiff} for the gravity constant

also, make setting this vector more bullet-proof.
This commit is contained in:
Andreas Lauser 2015-11-12 19:24:07 +01:00
parent 4f4e25c25f
commit bac1a6990d

View File

@ -262,14 +262,13 @@ public:
auto& simulator = this->simulator();
// invert the direction of the gravity vector for ECL problems
// (z coodinates represent depth, not height.)
this->gravity_[dim - 1] *= -1;
// set the value of the gravity constant to the one used by the FLOW simulator
this->gravity_ = 0.0;
// the "NOGRAV" keyword from Frontsim disables gravity...
const auto& deck = simulator.gridManager().deck();
if (deck->hasKeyword("NOGRAV") || !EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
this->gravity_ = 0.0;
if (!deck->hasKeyword("NOGRAV") && EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
this->gravity_[dim - 1] = 9.80665;
initFluidSystem_();
readRockParameters_();