mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
code clean-up based on review
This commit is contained in:
parent
f00ad22d98
commit
54c8a48481
@ -75,7 +75,6 @@ namespace Opm
|
|||||||
using Base::Water;
|
using Base::Water;
|
||||||
using Base::Oil;
|
using Base::Oil;
|
||||||
using Base::Gas;
|
using Base::Gas;
|
||||||
using Base::Energy;
|
|
||||||
|
|
||||||
// polymer concentration and temperature are already known by the well, so
|
// polymer concentration and temperature are already known by the well, so
|
||||||
// polymer and energy conservation do not need to be considered explicitly
|
// polymer and energy conservation do not need to be considered explicitly
|
||||||
@ -108,8 +107,6 @@ namespace Opm
|
|||||||
using Base::contiSolventEqIdx;
|
using Base::contiSolventEqIdx;
|
||||||
using Base::contiPolymerEqIdx;
|
using Base::contiPolymerEqIdx;
|
||||||
static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx;
|
static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx;
|
||||||
static const int temperatureIdx = Indices::temperatureIdx;
|
|
||||||
|
|
||||||
|
|
||||||
StandardWell(const Well* well, const int time_step, const Wells* wells,
|
StandardWell(const Well* well, const int time_step, const Wells* wells,
|
||||||
const ModelParameters& param,
|
const ModelParameters& param,
|
||||||
|
@ -634,10 +634,10 @@ namespace Opm
|
|||||||
well_state.perfPhaseRates()[(first_perf_ + perf) * np + ebosCompIdxToFlowCompIdx(componentIdx)] = cq_s[componentIdx].value();
|
well_state.perfPhaseRates()[(first_perf_ + perf) * np + ebosCompIdxToFlowCompIdx(componentIdx)] = cq_s[componentIdx].value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GET_PROP_VALUE(TypeTag, EnableEnergy)) {
|
if (has_energy) {
|
||||||
|
|
||||||
auto fs = intQuants.fluidState();
|
auto fs = intQuants.fluidState();
|
||||||
int reportStepIdx = ebosSimulator.episodeIndex();
|
const int reportStepIdx = ebosSimulator.episodeIndex();
|
||||||
|
|
||||||
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) {
|
||||||
if (!FluidSystem::phaseIsActive(phaseIdx)) {
|
if (!FluidSystem::phaseIsActive(phaseIdx)) {
|
||||||
@ -658,7 +658,7 @@ namespace Opm
|
|||||||
// q_os = q_or * b_o + rv * q_gr * b_g
|
// q_os = q_or * b_o + rv * q_gr * b_g
|
||||||
// q_gs = q_gr * g_g + rs * q_or * b_o
|
// q_gs = q_gr * g_g + rs * q_or * b_o
|
||||||
// d = 1.0 - rs * rv
|
// d = 1.0 - rs * rv
|
||||||
EvalWell d = extendEval(1.0 - fs.Rv() * fs.Rs());
|
const EvalWell d = extendEval(1.0 - fs.Rv() * fs.Rs());
|
||||||
// q_gr = 1 / (b_g * d) * (q_gs - rs * q_os)
|
// q_gr = 1 / (b_g * d) * (q_gs - rs * q_os)
|
||||||
if(FluidSystem::gasPhaseIdx == phaseIdx)
|
if(FluidSystem::gasPhaseIdx == phaseIdx)
|
||||||
cq_r_thermal = (cq_s[gasCompIdx] - extendEval(fs.Rs()) * cq_s[oilCompIdx]) / (d * extendEval(fs.invB(phaseIdx)) );
|
cq_r_thermal = (cq_s[gasCompIdx] - extendEval(fs.Rs()) * cq_s[oilCompIdx]) / (d * extendEval(fs.invB(phaseIdx)) );
|
||||||
@ -676,7 +676,7 @@ namespace Opm
|
|||||||
fs.setTemperature(injProps.temperature);
|
fs.setTemperature(injProps.temperature);
|
||||||
typedef typename std::decay<decltype(fs)>::type::Scalar FsScalar;
|
typedef typename std::decay<decltype(fs)>::type::Scalar FsScalar;
|
||||||
typename FluidSystem::template ParameterCache<FsScalar> paramCache;
|
typename FluidSystem::template ParameterCache<FsScalar> paramCache;
|
||||||
unsigned pvtRegionIdx = intQuants.pvtRegionIndex();
|
const unsigned pvtRegionIdx = intQuants.pvtRegionIndex();
|
||||||
paramCache.setRegionIndex(pvtRegionIdx);
|
paramCache.setRegionIndex(pvtRegionIdx);
|
||||||
paramCache.setMaxOilSat(ebosSimulator.problem().maxOilSaturation(cell_idx));
|
paramCache.setMaxOilSat(ebosSimulator.problem().maxOilSaturation(cell_idx));
|
||||||
paramCache.updatePhase(fs, phaseIdx);
|
paramCache.updatePhase(fs, phaseIdx);
|
||||||
@ -1496,7 +1496,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
// the following implementation assume that the polymer is always after the w-o-g phases
|
// the following implementation assume that the polymer is always after the w-o-g phases
|
||||||
// For the polymer case and the energy case, there is one more mass balance equations of reservoir than wells
|
// For the polymer case and the energy case, there is one more mass balance equations of reservoir than wells
|
||||||
assert((int(B_avg.size()) == num_components_) || has_polymer || GET_PROP_VALUE(TypeTag, EnableEnergy));
|
assert((int(B_avg.size()) == num_components_) || has_polymer || has_energy);
|
||||||
|
|
||||||
const double tol_wells = param_.tolerance_wells_;
|
const double tol_wells = param_.tolerance_wells_;
|
||||||
const double maxResidualAllowed = param_.max_residual_allowed_;
|
const double maxResidualAllowed = param_.max_residual_allowed_;
|
||||||
|
@ -71,7 +71,6 @@ namespace Opm
|
|||||||
static const int Water = BlackoilPhases::Aqua;
|
static const int Water = BlackoilPhases::Aqua;
|
||||||
static const int Oil = BlackoilPhases::Liquid;
|
static const int Oil = BlackoilPhases::Liquid;
|
||||||
static const int Gas = BlackoilPhases::Vapour;
|
static const int Gas = BlackoilPhases::Vapour;
|
||||||
static const int Energy = BlackoilPhases::Energy;
|
|
||||||
|
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <opm/simulators/flow_ebos_polymer.hpp>
|
#include <opm/simulators/flow_ebos_energy.hpp>
|
||||||
|
|
||||||
#include <opm/material/common/ResetLocale.hpp>
|
#include <opm/material/common/ResetLocale.hpp>
|
||||||
#include <opm/grid/CpGrid.hpp>
|
#include <opm/grid/CpGrid.hpp>
|
||||||
|
@ -20,7 +20,7 @@ copyToReferenceDir () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tests=${@:2}
|
tests=${@:2}
|
||||||
test -z "$tests" && tests="spe11 spe12 spe12p spe1oilgas spe1nowells spe3 spe5 spe9 norne_init msw_2d_h msw_3d_hfa polymer2d spe9group polymer_oilwater"
|
test -z "$tests" && tests="spe11 spe12 spe12p spe1oilgas spe1nowells spe1thermal spe3 spe5 spe9 norne_init msw_2d_h msw_3d_hfa polymer2d spe9group polymer_oilwater"
|
||||||
if grep -q -i "norne " <<< $ghprbCommentBody
|
if grep -q -i "norne " <<< $ghprbCommentBody
|
||||||
then
|
then
|
||||||
if test -d $WORKSPACE/deps/opm-data/norne/flow
|
if test -d $WORKSPACE/deps/opm-data/norne/flow
|
||||||
|
Loading…
Reference in New Issue
Block a user