opm-simulators
Loading...
Searching...
No Matches
BlackoilModelParameters.hpp
1/*
2 Copyright 2015 SINTEF ICT, Applied Mathematics.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
21#define OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
22
23#include <opm/simulators/flow/SubDomain.hpp>
24
25#include <string>
26
27namespace Opm::Parameters {
28
29template<class Scalar>
30struct DbhpMaxRel { static constexpr Scalar value = 1.0; };
31
32template<class Scalar>
33struct DwellFractionMax { static constexpr Scalar value = 0.2; };
34
35struct EclDeckFileName { static constexpr auto value = ""; };
36
37template<class Scalar>
38struct InjMultOscThreshold { static constexpr Scalar value = 0.1; };
39
40template<class Scalar>
41struct InjMultDampMult { static constexpr Scalar value = 0.9; };
42
43template<class Scalar>
44struct InjMultMinDampFactor { static constexpr Scalar value = 0.05; };
45
46template<class Scalar>
47struct MaxResidualAllowed { static constexpr Scalar value = 1e7; };
48
49template<class Scalar>
50struct RelaxedMaxPvFraction { static constexpr Scalar value = 0.03; };
51
52template<class Scalar>
53struct ToleranceMb { static constexpr Scalar value = 1e-7; };
54
55template<class Scalar>
56struct ToleranceMbRelaxed { static constexpr Scalar value = 1e-6; };
57
58template<class Scalar>
59struct ToleranceEnergyBalance { static constexpr Scalar value = 1e-7; };
60
61template<class Scalar>
62struct ToleranceEnergyBalanceRelaxed { static constexpr Scalar value = 1e-6; };
63
64template<class Scalar>
65struct ToleranceCnv { static constexpr Scalar value = 1e-2; };
66
67template<class Scalar>
68struct ToleranceCnvRelaxed { static constexpr Scalar value = 1.0; };
69
70template<class Scalar>
71struct ToleranceCnvEnergy { static constexpr Scalar value = 1e-2; };
72
73template<class Scalar>
74struct ToleranceCnvEnergyRelaxed { static constexpr Scalar value = 1.0; };
75
76template<class Scalar>
77struct ToleranceWells { static constexpr Scalar value = 1e-4; };
78
79template<class Scalar>
80struct ToleranceWellControl { static constexpr Scalar value = 1e-7; };
81
82struct MaxWelleqIter { static constexpr int value = 30; };
83
84template<class Scalar>
85struct MaxSinglePrecisionDays { static constexpr Scalar value = 20.0; };
86
87struct MinStrictCnvIter { static constexpr int value = -1; };
88struct MinStrictMbIter { static constexpr int value = -1; };
89struct SolveWelleqInitially { static constexpr bool value = true; };
90struct PreSolveNetwork { static constexpr bool value = true; };
91struct UpdateEquationsScaling { static constexpr bool value = false; };
92struct UseUpdateStabilization { static constexpr bool value = true; };
93struct MatrixAddWellContributions { static constexpr bool value = false; };
94
95struct UseMultisegmentWell { static constexpr bool value = true; };
96
97template<class Scalar>
98struct TolerancePressureMsWells { static constexpr Scalar value = 0.01*1e5; };
99
100template<class Scalar>
101struct MaxPressureChangeMsWells { static constexpr Scalar value = 10*1e5; };
102
103struct MaxNewtonIterationsWithInnerWellIterations { static constexpr int value = 8; };
104struct MaxInnerIterMsWells { static constexpr int value = 100; };
105struct MaxInnerIterWells { static constexpr int value = 50; };
106struct MaxWellStatusSwitchInInnerIterWells { static constexpr int value = 99; };
107struct MaxWellStatusSwitchForWells { static constexpr int value = 99; };
108struct ShutUnsolvableWells { static constexpr bool value = true; };
109struct AlternativeWellRateInit { static constexpr bool value = true; };
110struct StrictOuterIterWells { static constexpr int value = 6; };
111struct StrictInnerIterWells { static constexpr int value = 40; };
112
113template<class Scalar>
114struct RegularizationFactorWells { static constexpr Scalar value = 100.0; };
115
116struct EnableWellOperabilityCheck { static constexpr bool value = true; };
117struct EnableWellOperabilityCheckIter { static constexpr bool value = false; };
118struct DebugEmitCellPartition { static constexpr bool value = false; };
119
120template<class Scalar>
121struct RelaxedWellFlowTol { static constexpr Scalar value = 1e-3; };
122
123template<class Scalar>
124struct RelaxedPressureTolMsw { static constexpr Scalar value = 1e4; };
125
126struct MaximumNumberOfWellSwitches { static constexpr int value = 3; };
127struct MaximumNumberOfGroupSwitches { static constexpr int value = 3; };
128struct UseAverageDensityMsWells { static constexpr bool value = false; };
129struct LocalWellSolveControlSwitching { static constexpr bool value = true; };
130struct UseImplicitIpr { static constexpr bool value = true; };
131struct CheckGroupConstraintsInnerWellIterations { static constexpr bool value = true; };
132
133// Network solver parameters
134struct NetworkMaxStrictOuterIterations { static constexpr int value = 10; };
135struct NetworkMaxOuterIterations { static constexpr int value = 10; };
136struct NetworkMaxSubIterations { static constexpr int value = 20; };
137template<class Scalar>
138struct NetworkPressureUpdateDampingFactor { static constexpr Scalar value = 0.1; };
139template<class Scalar>
140struct NetworkMaxPressureUpdateInBars { static constexpr Scalar value = 5.0; };
141struct NonlinearSolver { static constexpr auto value = "newton"; };
142struct LocalSolveApproach { static constexpr auto value = "gauss-seidel"; };
143struct MaxLocalSolveIterations { static constexpr int value = 20; };
144struct NewtonMinIterations { static constexpr int value = 2; };
145
146struct WellGroupConstraintsMaxIterations { static constexpr int value = 1; };
147template<class Scalar>
148struct LocalToleranceScalingMb { static constexpr Scalar value = 1.0; };
149
150template<class Scalar>
151struct LocalToleranceScalingCnv { static constexpr Scalar value = 0.1; };
152struct NlddNumInitialNewtonIter { static constexpr int value = 1; };
153template<class Scalar>
154struct NlddRelativeMobilityChangeTol { static constexpr Scalar value = 0.1; };
155struct NumLocalDomains { static constexpr int value = 0; };
156
157template<class Scalar>
158struct LocalDomainsPartitioningImbalance { static constexpr Scalar value = 1.03; };
159
160struct LocalDomainsPartitioningMethod { static constexpr auto value = "zoltan"; };
161struct LocalDomainsPartitionWellNeighborLevels { static constexpr int value = 1; };
162struct LocalDomainsOrderingMeasure { static constexpr auto value = "maxpressure"; };
163
164struct ConvergenceMonitoring { static constexpr bool value = false; };
165struct ConvergenceMonitoringCutOff { static constexpr int value = 6; };
166template<class Scalar>
167struct ConvergenceMonitoringDecayFactor { static constexpr Scalar value = 0.75; };
168
169
170template<class Scalar>
171struct NupcolGroupRateTolerance { static constexpr Scalar value = 0.001; };
172
173} // namespace Opm::Parameters
174
175namespace Opm {
176
178template <class Scalar>
180{
181public:
196 Scalar relaxed_max_pv_fraction_;
216 // TODO: it might need to distinguish between rate control and pressure control later
222
225
228
231
234
237
240
243
246
249
252
256
259
262
265
268
271
274
281
283 std::string deck_file_name_;
284
287
292
295
298
301
304
307
310
313
316
319
322
325
328
331
334
336 std::string nonlinear_solver_;
337
339 DomainSolveApproach local_solve_approach_{DomainSolveApproach::Jacobi};
340
343
346
347 int max_local_solve_iterations_;
348
349 Scalar local_tolerance_scaling_mb_;
350 Scalar local_tolerance_scaling_cnv_;
351
352 int nldd_num_initial_newton_iter_{1};
355 int num_local_domains_{0};
356 Scalar local_domains_partition_imbalance_{1.03};
357 std::string local_domains_partition_method_;
358 int local_domains_partition_well_neighbor_levels_{1};
359 DomainOrderingMeasure local_domains_ordering_{DomainOrderingMeasure::MaxPressure};
360
361 bool write_partitions_{false};
362
373
375
376 // Relative tolerance of group rates (VREP, REIN)
377 // If violated the nupcol wellstate is updated
378 Scalar nupcol_group_rate_tolerance_;
379
382
383 static void registerParameters();
384};
385
386} // namespace Opm
387
388#endif // OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
DomainOrderingMeasure
Measure to use for domain ordering.
Definition SubDomain.hpp:39
DomainSolveApproach
Solver approach for NLDD.
Definition SubDomain.hpp:33
Struct holding convergence monitor params.
Definition BlackoilModelParameters.hpp:365
int cutoff_
Cut-off limit for convergence monitoring.
Definition BlackoilModelParameters.hpp:369
Scalar decay_factor_
Decay factor used in convergence monitoring.
Definition BlackoilModelParameters.hpp:371
bool enabled_
Whether to enable convergence monitoring.
Definition BlackoilModelParameters.hpp:367
Scalar tolerance_mb_relaxed_
Relaxed mass balance tolerance (can be used when iter >= min_strict_mb_iter_).
Definition BlackoilModelParameters.hpp:200
Scalar tolerance_energy_balance_
Relative energy balance tolerance (total energy balance error).
Definition BlackoilModelParameters.hpp:202
int max_niter_inner_well_iter_
Maximum newton iterations with inner well iterations.
Definition BlackoilModelParameters.hpp:242
int max_number_of_well_switches_
Maximum number of times a well can switch to the same control.
Definition BlackoilModelParameters.hpp:294
bool use_average_density_ms_wells_
Whether to approximate segment densities by averaging over segment and its outlet.
Definition BlackoilModelParameters.hpp:300
bool matrix_add_well_contributions_
Whether to add influences of wells between cells to the matrix and preconditioner matrix.
Definition BlackoilModelParameters.hpp:286
bool solve_welleq_initially_
Solve well equation initially.
Definition BlackoilModelParameters.hpp:264
bool update_equations_scaling_
Update scaling factors for mass balance equations.
Definition BlackoilModelParameters.hpp:270
Scalar tolerance_well_control_
Tolerance for the well control equations.
Definition BlackoilModelParameters.hpp:217
int max_inner_iter_wells_
Maximum inner iteration number for standard wells.
Definition BlackoilModelParameters.hpp:248
Scalar tolerance_energy_balance_relaxed_
Relaxed energy balance tolerance (can be used when iter >= min_strict_mb_iter_).
Definition BlackoilModelParameters.hpp:204
int network_max_outer_iterations_
Maximum number of iterations in the network solver before giving up.
Definition BlackoilModelParameters.hpp:315
int max_well_status_switch_
Maximum number of status switches (open<->stop> during a time step.
Definition BlackoilModelParameters.hpp:333
bool shut_unsolvable_wells_
Whether to shut unsolvable well.
Definition BlackoilModelParameters.hpp:245
Scalar inj_mult_osc_threshold_
Injectivity multiplier oscillation threshold.
Definition BlackoilModelParameters.hpp:187
bool use_implicit_ipr_
Whether to use implicit IPR for thp stability checks and solution search.
Definition BlackoilModelParameters.hpp:306
int newton_min_iter_
Minimum number of Newton iterations per time step.
Definition BlackoilModelParameters.hpp:345
int min_strict_mb_iter_
Minimum number of Newton iterations before we can use relaxed MB convergence criterion.
Definition BlackoilModelParameters.hpp:261
Scalar max_pressure_change_ms_wells_
Maximum pressure change over an iteratio for ms wells.
Definition BlackoilModelParameters.hpp:227
int min_strict_cnv_iter_
Minimum number of Newton iterations before we can use relaxed CNV convergence criterion.
Definition BlackoilModelParameters.hpp:258
bool check_well_operability_
Whether to check well operability.
Definition BlackoilModelParameters.hpp:289
bool check_well_operability_iter_
Whether to check well operability during iterations.
Definition BlackoilModelParameters.hpp:291
Scalar dwell_fraction_max_
Max absolute change in well volume fraction in single iteration.
Definition BlackoilModelParameters.hpp:185
int max_welleq_iter_
Maximum iteration number of the well equation solution.
Definition BlackoilModelParameters.hpp:251
Scalar network_max_pressure_update_in_bars_
Maximum pressure update in the inner network pressure update iterations.
Definition BlackoilModelParameters.hpp:324
bool use_update_stabilization_
Try to detect oscillation or stagnation.
Definition BlackoilModelParameters.hpp:273
int max_number_of_group_switches_
Maximum number of times group can switch to the same control.
Definition BlackoilModelParameters.hpp:297
Scalar inj_mult_min_damp_factor_
Minimum damping factor for injectivity multipliers.
Definition BlackoilModelParameters.hpp:191
bool check_group_constraints_inner_well_iterations_
Whether to allow checking/changing to group controls during inner well iterations.
Definition BlackoilModelParameters.hpp:309
Scalar regularization_factor_wells_
Regularization factor for wells.
Definition BlackoilModelParameters.hpp:239
DomainSolveApproach local_solve_approach_
'jacobi' and 'gauss-seidel' supported
Definition BlackoilModelParameters.hpp:339
BlackoilModelParameters()
Construct from user parameters or defaults.
Definition BlackoilModelParameters.cpp:35
Scalar tolerance_pressure_ms_wells_
Tolerance for the pressure equations for multisegment wells.
Definition BlackoilModelParameters.hpp:219
Scalar tolerance_cnv_energy_
Local energy convergence tolerance (max of local energy errors).
Definition BlackoilModelParameters.hpp:210
int newton_max_iter_
Maximum number of Newton iterations per time step.
Definition BlackoilModelParameters.hpp:342
int network_max_sub_iterations_
Maximum number of sub-iterations to update network pressures (within a single well/group control upda...
Definition BlackoilModelParameters.hpp:318
int max_well_status_switch_inner_iter_
Maximum number of status switches (open<->stop> in local well iterations.
Definition BlackoilModelParameters.hpp:330
bool local_well_solver_control_switching_
Whether to allow control switching during local well solutions.
Definition BlackoilModelParameters.hpp:303
Scalar tolerance_wells_
Well convergence tolerance.
Definition BlackoilModelParameters.hpp:214
Scalar max_residual_allowed_
Absolute max limit for residuals.
Definition BlackoilModelParameters.hpp:193
bool use_multisegment_well_
Whether to use MultisegmentWell to handle multisegment wells it is something temporary before the mul...
Definition BlackoilModelParameters.hpp:280
Scalar nldd_relative_mobility_change_tol_
Threshold for single cell relative mobility change in NLDD.
Definition BlackoilModelParameters.hpp:354
int max_inner_iter_ms_wells_
Maximum inner iteration number for ms wells.
Definition BlackoilModelParameters.hpp:230
int strict_outer_iter_wells_
Newton iteration where wells are stricly convergent.
Definition BlackoilModelParameters.hpp:236
Scalar tolerance_cnv_energy_relaxed_
Relaxed local energy convergence tolerance (can be used when iter >= min_strict_cnv_iter_ && cnvViola...
Definition BlackoilModelParameters.hpp:212
Scalar inj_mult_damp_mult_
Injectivity multiplier dampening multiplier.
Definition BlackoilModelParameters.hpp:189
Scalar tolerance_mb_
Relative mass balance tolerance (total mass balance error).
Definition BlackoilModelParameters.hpp:198
Scalar tolerance_cnv_
Local convergence tolerance (max of local saturation errors).
Definition BlackoilModelParameters.hpp:206
Scalar dbhp_max_rel_
Max relative change in bhp in single iteration.
Definition BlackoilModelParameters.hpp:183
Scalar tolerance_cnv_relaxed_
Relaxed local convergence tolerance (can be used when iter >= min_strict_cnv_iter_ && cnvViolatedPV <...
Definition BlackoilModelParameters.hpp:208
bool pre_solve_network_
Pre solve and iterate network model.
Definition BlackoilModelParameters.hpp:267
Scalar relaxed_tolerance_pressure_ms_well_
Relaxed tolerance for the MSW pressure solution.
Definition BlackoilModelParameters.hpp:224
Scalar network_pressure_update_damping_factor_
Damping factor in the inner network pressure update iterations.
Definition BlackoilModelParameters.hpp:321
std::string deck_file_name_
The file name of the deck.
Definition BlackoilModelParameters.hpp:283
ConvergenceMonitorParams monitor_params_
Convergence monitoring parameters.
Definition BlackoilModelParameters.hpp:374
int network_max_strict_outer_iterations_
Maximum number of iterations in the network solver before relaxing tolerance.
Definition BlackoilModelParameters.hpp:312
int well_group_constraints_max_iterations_
Maximum number of iterations in the well/group switch algorithm.
Definition BlackoilModelParameters.hpp:327
std::string nonlinear_solver_
Nonlinear solver type: newton or nldd.
Definition BlackoilModelParameters.hpp:336
int strict_inner_iter_wells_
Strict inner iteration number for wells.
Definition BlackoilModelParameters.hpp:233
Scalar relaxed_tolerance_flow_well_
Relaxed tolerance for for the well flow residual.
Definition BlackoilModelParameters.hpp:221
Scalar maxSinglePrecisionTimeStep_
Tolerance for time step in seconds where single precision can be used for solving for the Jacobian.
Definition BlackoilModelParameters.hpp:255
Definition BlackoilModelParameters.hpp:109
Definition BlackoilModelParameters.hpp:131
Definition BlackoilModelParameters.hpp:165
Definition BlackoilModelParameters.hpp:167
Definition BlackoilModelParameters.hpp:164
Definition BlackoilModelParameters.hpp:30
Definition BlackoilModelParameters.hpp:118
Definition BlackoilModelParameters.hpp:33
Definition BlackoilModelParameters.hpp:35
Definition BlackoilModelParameters.hpp:117
Definition BlackoilModelParameters.hpp:116
Definition BlackoilModelParameters.hpp:41
Definition BlackoilModelParameters.hpp:44
Definition BlackoilModelParameters.hpp:38
Definition BlackoilModelParameters.hpp:162
Definition BlackoilModelParameters.hpp:161
Definition BlackoilModelParameters.hpp:158
Definition BlackoilModelParameters.hpp:160
Definition BlackoilModelParameters.hpp:142
Definition BlackoilModelParameters.hpp:151
Definition BlackoilModelParameters.hpp:148
Definition BlackoilModelParameters.hpp:129
Definition BlackoilModelParameters.hpp:93
Definition BlackoilModelParameters.hpp:104
Definition BlackoilModelParameters.hpp:105
Definition BlackoilModelParameters.hpp:143
Definition BlackoilModelParameters.hpp:103
Definition BlackoilModelParameters.hpp:101
Definition BlackoilModelParameters.hpp:47
Definition BlackoilModelParameters.hpp:85
Definition BlackoilModelParameters.hpp:107
Definition BlackoilModelParameters.hpp:106
Definition BlackoilModelParameters.hpp:82
Definition BlackoilModelParameters.hpp:127
Definition BlackoilModelParameters.hpp:126
Definition BlackoilModelParameters.hpp:87
Definition BlackoilModelParameters.hpp:88
Definition BlackoilModelParameters.hpp:135
Definition BlackoilModelParameters.hpp:140
Definition BlackoilModelParameters.hpp:134
Definition BlackoilModelParameters.hpp:136
Definition BlackoilModelParameters.hpp:138
Definition BlackoilModelParameters.hpp:144
Definition BlackoilModelParameters.hpp:152
Definition BlackoilModelParameters.hpp:154
Definition BlackoilModelParameters.hpp:141
Definition BlackoilModelParameters.hpp:155
Definition BlackoilModelParameters.hpp:171
Definition BlackoilModelParameters.hpp:90
Definition BlackoilModelParameters.hpp:114
Definition BlackoilModelParameters.hpp:50
Definition BlackoilModelParameters.hpp:124
Definition BlackoilModelParameters.hpp:121
Definition BlackoilModelParameters.hpp:108
Definition BlackoilModelParameters.hpp:89
Definition BlackoilModelParameters.hpp:111
Definition BlackoilModelParameters.hpp:110
Definition BlackoilModelParameters.hpp:74
Definition BlackoilModelParameters.hpp:71
Definition BlackoilModelParameters.hpp:68
Definition BlackoilModelParameters.hpp:65
Definition BlackoilModelParameters.hpp:62
Definition BlackoilModelParameters.hpp:59
Definition BlackoilModelParameters.hpp:56
Definition BlackoilModelParameters.hpp:53
Definition BlackoilModelParameters.hpp:98
Definition BlackoilModelParameters.hpp:80
Definition BlackoilModelParameters.hpp:77
Definition BlackoilModelParameters.hpp:91
Definition BlackoilModelParameters.hpp:128
Definition BlackoilModelParameters.hpp:130
Definition BlackoilModelParameters.hpp:95
Definition BlackoilModelParameters.hpp:92
Definition BlackoilModelParameters.hpp:146