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