mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
commit
d13f217bd5
@ -925,7 +925,7 @@ namespace Opm {
|
||||
// We also use relaxed tolerances for cells with total poro volume less than relaxed_max_pv_fraction_
|
||||
// Default value of relaxed_max_pv_fraction_ is 0.03
|
||||
const bool relax_final_iteration_cnv = (param_.min_strict_cnv_iter_ < 0) && (iteration == maxIter);
|
||||
const bool relax_iter_cnv = param_.min_strict_mb_iter_ >= 0 && iteration >= param_.min_strict_mb_iter_;
|
||||
const bool relax_iter_cnv = param_.min_strict_cnv_iter_ >= 0 && iteration >= param_.min_strict_cnv_iter_;
|
||||
const bool relax_pv_fraction_cnv = cnvErrorPvFraction < param_.relaxed_max_pv_fraction_;
|
||||
const bool use_relaxed_cnv = relax_final_iteration_cnv || relax_pv_fraction_cnv || relax_iter_cnv;
|
||||
|
||||
|
@ -228,7 +228,7 @@ template<class TypeTag>
|
||||
struct ToleranceMb<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1e-6;
|
||||
static constexpr type value = 1e-7;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
@ -283,7 +283,7 @@ struct MaxSinglePrecisionDays<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
|
||||
template<class TypeTag>
|
||||
struct MinStrictCnvIter<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
{ static constexpr int value = 0; };
|
||||
{ static constexpr int value = -1; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct MinStrictMbIter<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
@ -390,11 +390,11 @@ struct UseAverageDensityMsWells<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
|
||||
template<class TypeTag>
|
||||
struct LocalWellSolveControlSwitching<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
{ static constexpr bool value = false; };
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct UseImplicitIpr<TypeTag, Properties::TTag::FlowModelParameters>
|
||||
{ static constexpr bool value = false; };
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
// Network solver parameters
|
||||
template<class TypeTag>
|
||||
|
@ -371,7 +371,7 @@ struct EnableDebuggingChecks<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
// as default if experimental mode is enabled.
|
||||
template<class TypeTag>
|
||||
struct EnableDriftCompensation<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// enable the ECL output by default
|
||||
template<class TypeTag>
|
||||
|
@ -182,7 +182,7 @@ struct ScaleLinearSystem<TypeTag, Properties::TTag::FlowIstlSolverParams>
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolver<TypeTag, Properties::TTag::FlowIstlSolverParams>
|
||||
{ static constexpr auto value = "ilu0"; };
|
||||
{ static constexpr auto value = "cprw"; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolverPrintJsonDefinition<TypeTag, Properties::TTag::FlowIstlSolverParams>
|
||||
@ -367,7 +367,7 @@ struct FlowLinearSolverParameters
|
||||
newton_use_gmres_ = false;
|
||||
ignoreConvergenceFailure_ = false;
|
||||
scale_linear_system_ = false;
|
||||
linsolver_ = "ilu0";
|
||||
linsolver_ = "cprw";
|
||||
linear_solver_print_json_definition_ = true;
|
||||
cpr_reuse_setup_ = 4;
|
||||
cpr_reuse_interval_ = 30;
|
||||
|
@ -62,6 +62,10 @@
|
||||
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
||||
#include <opm/simulators/wells/WellState.hpp>
|
||||
|
||||
#if HAVE_MPI
|
||||
#include <opm/simulators/utils/MPISerializer.hpp>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
@ -1749,11 +1753,26 @@ getMaxWellConnections() const
|
||||
schedule_wells.erase(std::remove_if(schedule_wells.begin(), schedule_wells.end(), not_on_process_), schedule_wells.end());
|
||||
wells.reserve(schedule_wells.size());
|
||||
|
||||
auto possibleFutureConnections = schedule().getPossibleFutureConnections();
|
||||
#if HAVE_MPI
|
||||
// Communicate Map to other processes, since it is only available on rank 0
|
||||
Parallel::MpiSerializer ser(comm_);
|
||||
ser.broadcast(possibleFutureConnections);
|
||||
#endif
|
||||
// initialize the additional cell connections introduced by wells.
|
||||
for (const auto& well : schedule_wells)
|
||||
{
|
||||
std::vector<int> compressed_well_perforations = this->getCellsForConnections(well);
|
||||
|
||||
const auto possibleFutureConnectionSetIt = possibleFutureConnections.find(well.name());
|
||||
if (possibleFutureConnectionSetIt != possibleFutureConnections.end()) {
|
||||
for (auto& global_index : possibleFutureConnectionSetIt->second) {
|
||||
int compressed_idx = compressedIndexForInterior(global_index);
|
||||
if (compressed_idx >= 0) { // Ignore connections in inactive/remote cells.
|
||||
compressed_well_perforations.push_back(compressed_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
// also include wells with no perforations in case
|
||||
std::sort(compressed_well_perforations.begin(),
|
||||
compressed_well_perforations.end());
|
||||
|
@ -20,26 +20,26 @@ class TestBasic(unittest.TestCase):
|
||||
sim.step_init()
|
||||
sim.step()
|
||||
oil_pressure = sim.get_fluidstate_variable(name='po')
|
||||
self.assertAlmostEqual(oil_pressure[0], 35795160.67, places=2, msg='value of oil pressure')
|
||||
self.assertAlmostEqual(oil_pressure[0], 35795160.67, delta=1e4, msg='value of oil pressure')
|
||||
gas_pressure = sim.get_fluidstate_variable(name='pg')
|
||||
self.assertAlmostEqual(gas_pressure[0], 35795160.67, places=2, msg='value of gas pressure')
|
||||
self.assertAlmostEqual(gas_pressure[0], 35795160.67, delta=1e4, msg='value of gas pressure')
|
||||
water_pressure = sim.get_fluidstate_variable(name='pw')
|
||||
self.assertAlmostEqual(water_pressure[0], 35795160.67, places=2, msg='value of water pressure')
|
||||
self.assertAlmostEqual(water_pressure[0], 35795160.67, delta=1e4, msg='value of water pressure')
|
||||
rho_w = sim.get_fluidstate_variable(name='rho_w')
|
||||
self.assertAlmostEqual(rho_w[0], 998.9822355, places=6, msg='value of water density')
|
||||
self.assertAlmostEqual(rho_w[0], 998.9822355, places=3, msg='value of water density')
|
||||
rho_g = sim.get_fluidstate_variable(name='rho_g')
|
||||
self.assertAlmostEqual(rho_g[0], 241.36955087, places=7, msg='value of gas density')
|
||||
self.assertAlmostEqual(rho_g[0], 241.36955087, places=2, msg='value of gas density')
|
||||
rho_o = sim.get_fluidstate_variable(name='rho_o')
|
||||
self.assertAlmostEqual(rho_o[0], 631.78611238, places=7, msg='value of oil density')
|
||||
self.assertAlmostEqual(rho_o[0], 631.78611238, places=3, msg='value of oil density')
|
||||
Rs = sim.get_fluidstate_variable(name='Rs')
|
||||
self.assertAlmostEqual(Rs[0], 226.19666048, places=7, msg='value of solution gas-oil ratio')
|
||||
self.assertAlmostEqual(Rs[0], 226.19666048, places=5, msg='value of solution gas-oil ratio')
|
||||
Rv = sim.get_fluidstate_variable(name='Rv')
|
||||
self.assertAlmostEqual(Rv[0], 0.0, places=7, msg='value of volatile gas-oil ratio')
|
||||
self.assertAlmostEqual(Rv[0], 0.0, places=5, msg='value of volatile gas-oil ratio')
|
||||
Sw = sim.get_fluidstate_variable(name='Sw')
|
||||
self.assertAlmostEqual(Sw[0], 0.11969486712, places=10, msg='value of water saturation')
|
||||
self.assertAlmostEqual(Sw[0], 0.11969486712, places=5, msg='value of water saturation')
|
||||
So = sim.get_fluidstate_variable(name='So')
|
||||
self.assertAlmostEqual(So[0], 0.825166164326, places=10, msg='value of oil saturation')
|
||||
self.assertAlmostEqual(So[0], 0.825166164326, places=5, msg='value of oil saturation')
|
||||
Sg = sim.get_fluidstate_variable(name='Sg')
|
||||
self.assertAlmostEqual(Sg[0], 0.055138968544, places=10, msg='value of gas saturation')
|
||||
self.assertAlmostEqual(Sg[0], 0.055138968544, places=5, msg='value of gas saturation')
|
||||
T = sim.get_fluidstate_variable(name='T')
|
||||
self.assertAlmostEqual(T[0], 288.705, places=3, msg='value of temperature')
|
||||
|
@ -20,7 +20,7 @@ class TestBasic(unittest.TestCase):
|
||||
sim.step_init()
|
||||
sim.step()
|
||||
pressure = sim.get_primary_variable(variable='pressure')
|
||||
self.assertAlmostEqual(pressure[0], 35795160.67, places=2, msg='value of pressure')
|
||||
self.assertAlmostEqual(pressure[0], 35795160.67, delta=1e4, msg='value of pressure')
|
||||
pressure_meaning = sim.get_primary_variable_meaning(
|
||||
variable='pressure')
|
||||
pressure_meaning_map = sim.get_primary_variable_meaning_map(
|
||||
|
Loading…
Reference in New Issue
Block a user