My Project
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 ShutUnsolvableWells { static constexpr bool value = true; };
107struct AlternativeWellRateInit { static constexpr bool value = true; };
108struct StrictOuterIterWells { static constexpr int value = 6; };
109struct StrictInnerIterWells { static constexpr int value = 40; };
110
111template<class Scalar>
112struct RegularizationFactorWells { static constexpr Scalar value = 100.0; };
113
114struct EnableWellOperabilityCheck { static constexpr bool value = true; };
115struct EnableWellOperabilityCheckIter { static constexpr bool value = false; };
116struct DebugEmitCellPartition { static constexpr bool value = false; };
117
118template<class Scalar>
119struct RelaxedWellFlowTol { static constexpr Scalar value = 1e-3; };
120
121template<class Scalar>
122struct RelaxedPressureTolMsw { static constexpr Scalar value = 1e4; };
123
124struct MaximumNumberOfWellSwitches { static constexpr int value = 3; };
125struct MaximumNumberOfGroupSwitches { static constexpr int value = 3; };
126struct UseAverageDensityMsWells { static constexpr bool value = false; };
127struct LocalWellSolveControlSwitching { static constexpr bool value = true; };
128struct UseImplicitIpr { static constexpr bool value = true; };
129struct CheckGroupConstraintsInnerWellIterations { static constexpr bool value = true; };
130
131// Network solver parameters
132struct NetworkMaxStrictOuterIterations { static constexpr int value = 10; };
133struct NetworkMaxOuterIterations { static constexpr int value = 10; };
134struct NetworkMaxSubIterations { static constexpr int value = 20; };
135template<class Scalar>
136struct NetworkPressureUpdateDampingFactor { static constexpr Scalar value = 0.1; };
137template<class Scalar>
138struct NetworkMaxPressureUpdateInBars { static constexpr Scalar value = 5.0; };
139struct NonlinearSolver { static constexpr auto value = "newton"; };
140struct LocalSolveApproach { static constexpr auto value = "gauss-seidel"; };
141struct MaxLocalSolveIterations { static constexpr int value = 20; };
142
143template<class Scalar>
144struct LocalToleranceScalingMb { static constexpr Scalar value = 1.0; };
145
146template<class Scalar>
147struct LocalToleranceScalingCnv { static constexpr Scalar value = 0.1; };
148struct NlddNumInitialNewtonIter { static constexpr int value = 1; };
149struct NumLocalDomains { static constexpr int value = 0; };
150
151template<class Scalar>
152struct LocalDomainsPartitioningImbalance { static constexpr Scalar value = 1.03; };
153
154struct LocalDomainsPartitioningMethod { static constexpr auto value = "zoltan"; };
155struct LocalDomainsPartitionWellNeighborLevels { static constexpr int value = 1; };
156struct LocalDomainsOrderingMeasure { static constexpr auto value = "maxpressure"; };
157
158struct ConvergenceMonitoring { static constexpr bool value = false; };
159struct ConvergenceMonitoringCutOff { static constexpr int value = 6; };
160template<class Scalar>
161struct ConvergenceMonitoringDecayFactor { static constexpr Scalar value = 0.75; };
162
163
164template<class Scalar>
165struct NupcolGroupRateTolerance { static constexpr Scalar value = 0.001; };
166
167} // namespace Opm::Parameters
168
169namespace Opm {
170
172template <class Scalar>
174{
175public:
190 Scalar relaxed_max_pv_fraction_;
210 // TODO: it might need to distinguish between rate control and pressure control later
216
219
222
225
228
231
234
237
240
243
246
250
253
256
259
262
265
268
275
277 std::string deck_file_name_;
278
281
286
289
292
295
298
301
304
307
310
313
316
319
321 std::string nonlinear_solver_;
323 DomainSolveApproach local_solve_approach_{DomainSolveApproach::Jacobi};
324
325 int max_local_solve_iterations_;
326
327 Scalar local_tolerance_scaling_mb_;
328 Scalar local_tolerance_scaling_cnv_;
329
330 int nldd_num_initial_newton_iter_{1};
331 int num_local_domains_{0};
332 Scalar local_domains_partition_imbalance_{1.03};
333 std::string local_domains_partition_method_;
334 int local_domains_partition_well_neighbor_levels_{1};
335 DomainOrderingMeasure local_domains_ordering_{DomainOrderingMeasure::MaxPressure};
336
337 bool write_partitions_{false};
338
349
351
352 // Relative tolerance of group rates (VREP, REIN)
353 // If violated the nupcol wellstate is updated
354 Scalar nupcol_group_rate_tolerance_;
355
358
359 static void registerParameters();
360};
361
362} // namespace Opm
363
364#endif // OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
DomainOrderingMeasure
Measure to use for domain ordering.
Definition SubDomain.hpp:39
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
DomainSolveApproach
Solver approach for NLDD.
Definition SubDomain.hpp:33
Struct holding convergence monitor params.
Definition BlackoilModelParameters.hpp:341
int cutoff_
Cut-off limit for convergence monitoring.
Definition BlackoilModelParameters.hpp:345
Scalar decay_factor_
Decay factor used in convergence monitoring.
Definition BlackoilModelParameters.hpp:347
bool enabled_
Whether to enable convergence monitoring.
Definition BlackoilModelParameters.hpp:343
Solver parameters for the BlackoilModel.
Definition BlackoilModelParameters.hpp:174
Scalar tolerance_mb_relaxed_
Relaxed mass balance tolerance (can be used when iter >= min_strict_mb_iter_).
Definition BlackoilModelParameters.hpp:194
Scalar tolerance_energy_balance_
Relative energy balance tolerance (total energy balance error).
Definition BlackoilModelParameters.hpp:196
int max_niter_inner_well_iter_
Maximum newton iterations with inner well iterations.
Definition BlackoilModelParameters.hpp:236
int max_number_of_well_switches_
Maximum number of times a well can switch to the same control.
Definition BlackoilModelParameters.hpp:288
bool use_average_density_ms_wells_
Whether to approximate segment densities by averaging over segment and its outlet.
Definition BlackoilModelParameters.hpp:294
bool matrix_add_well_contributions_
Whether to add influences of wells between cells to the matrix and preconditioner matrix.
Definition BlackoilModelParameters.hpp:280
bool solve_welleq_initially_
Solve well equation initially.
Definition BlackoilModelParameters.hpp:258
bool update_equations_scaling_
Update scaling factors for mass balance equations.
Definition BlackoilModelParameters.hpp:264
Scalar tolerance_well_control_
Tolerance for the well control equations.
Definition BlackoilModelParameters.hpp:211
int max_inner_iter_wells_
Maximum inner iteration number for standard wells.
Definition BlackoilModelParameters.hpp:242
Scalar tolerance_energy_balance_relaxed_
Relaxed energy balance tolerance (can be used when iter >= min_strict_mb_iter_).
Definition BlackoilModelParameters.hpp:198
int network_max_outer_iterations_
Maximum number of iterations in the network solver before giving up.
Definition BlackoilModelParameters.hpp:309
bool shut_unsolvable_wells_
Whether to shut unsolvable well.
Definition BlackoilModelParameters.hpp:239
Scalar inj_mult_osc_threshold_
Injectivity multiplier oscillation threshold.
Definition BlackoilModelParameters.hpp:181
bool use_implicit_ipr_
Whether to use implicit IPR for thp stability checks and solution search.
Definition BlackoilModelParameters.hpp:300
int min_strict_mb_iter_
Minimum number of Newton iterations before we can use relaxed MB convergence criterion.
Definition BlackoilModelParameters.hpp:255
Scalar max_pressure_change_ms_wells_
Maximum pressure change over an iteratio for ms wells.
Definition BlackoilModelParameters.hpp:221
int min_strict_cnv_iter_
Minimum number of Newton iterations before we can use relaxed CNV convergence criterion.
Definition BlackoilModelParameters.hpp:252
bool check_well_operability_
Whether to check well operability.
Definition BlackoilModelParameters.hpp:283
bool check_well_operability_iter_
Whether to check well operability during iterations.
Definition BlackoilModelParameters.hpp:285
Scalar dwell_fraction_max_
Max absolute change in well volume fraction in single iteration.
Definition BlackoilModelParameters.hpp:179
int max_welleq_iter_
Maximum iteration number of the well equation solution.
Definition BlackoilModelParameters.hpp:245
Scalar network_max_pressure_update_in_bars_
Maximum pressure update in the inner network pressure update iterations.
Definition BlackoilModelParameters.hpp:318
bool use_update_stabilization_
Try to detect oscillation or stagnation.
Definition BlackoilModelParameters.hpp:267
int max_number_of_group_switches_
Maximum number of times group can switch to the same control.
Definition BlackoilModelParameters.hpp:291
Scalar inj_mult_min_damp_factor_
Minimum damping factor for injectivity multipliers.
Definition BlackoilModelParameters.hpp:185
bool check_group_constraints_inner_well_iterations_
Whether to allow checking/changing to group controls during inner well iterations.
Definition BlackoilModelParameters.hpp:303
Scalar regularization_factor_wells_
Regularization factor for wells.
Definition BlackoilModelParameters.hpp:233
DomainSolveApproach local_solve_approach_
'jacobi' and 'gauss-seidel' supported.
Definition BlackoilModelParameters.hpp:323
BlackoilModelParameters()
Construct from user parameters or defaults.
Definition BlackoilModelParameters.cpp:33
Scalar tolerance_pressure_ms_wells_
Tolerance for the pressure equations for multisegment wells.
Definition BlackoilModelParameters.hpp:213
Scalar tolerance_cnv_energy_
Local energy convergence tolerance (max of local energy errors).
Definition BlackoilModelParameters.hpp:204
int network_max_sub_iterations_
Maximum number of sub-iterations to update network pressures (within a single well/group control upda...
Definition BlackoilModelParameters.hpp:312
bool local_well_solver_control_switching_
Whether to allow control switching during local well solutions.
Definition BlackoilModelParameters.hpp:297
Scalar tolerance_wells_
Well convergence tolerance.
Definition BlackoilModelParameters.hpp:208
Scalar max_residual_allowed_
Absolute max limit for residuals.
Definition BlackoilModelParameters.hpp:187
bool use_multisegment_well_
Whether to use MultisegmentWell to handle multisegment wells it is something temporary before the mul...
Definition BlackoilModelParameters.hpp:274
int max_inner_iter_ms_wells_
Maximum inner iteration number for ms wells.
Definition BlackoilModelParameters.hpp:224
int strict_outer_iter_wells_
Newton iteration where wells are stricly convergent.
Definition BlackoilModelParameters.hpp:230
Scalar tolerance_cnv_energy_relaxed_
Relaxed local energy convergence tolerance (can be used when iter >= min_strict_cnv_iter_ && cnvViola...
Definition BlackoilModelParameters.hpp:206
Scalar inj_mult_damp_mult_
Injectivity multiplier dampening multiplier.
Definition BlackoilModelParameters.hpp:183
Scalar tolerance_mb_
Relative mass balance tolerance (total mass balance error).
Definition BlackoilModelParameters.hpp:192
Scalar tolerance_cnv_
Local convergence tolerance (max of local saturation errors).
Definition BlackoilModelParameters.hpp:200
Scalar dbhp_max_rel_
Max relative change in bhp in single iteration.
Definition BlackoilModelParameters.hpp:177
Scalar tolerance_cnv_relaxed_
Relaxed local convergence tolerance (can be used when iter >= min_strict_cnv_iter_ && cnvViolatedPV <...
Definition BlackoilModelParameters.hpp:202
bool pre_solve_network_
Pre solve and iterate network model.
Definition BlackoilModelParameters.hpp:261
Scalar relaxed_tolerance_pressure_ms_well_
Relaxed tolerance for the MSW pressure solution.
Definition BlackoilModelParameters.hpp:218
Scalar network_pressure_update_damping_factor_
Damping factor in the inner network pressure update iterations.
Definition BlackoilModelParameters.hpp:315
std::string deck_file_name_
The file name of the deck.
Definition BlackoilModelParameters.hpp:277
ConvergenceMonitorParams monitor_params_
Convergence monitoring parameters.
Definition BlackoilModelParameters.hpp:350
int network_max_strict_outer_iterations_
Maximum number of iterations in the network solver before relaxing tolerance.
Definition BlackoilModelParameters.hpp:306
std::string nonlinear_solver_
Nonlinear solver type: newton or nldd.
Definition BlackoilModelParameters.hpp:321
int strict_inner_iter_wells_
Strict inner iteration number for wells.
Definition BlackoilModelParameters.hpp:227
Scalar relaxed_tolerance_flow_well_
Relaxed tolerance for for the well flow residual.
Definition BlackoilModelParameters.hpp:215
Scalar maxSinglePrecisionTimeStep_
Tolerance for time step in seconds where single precision can be used for solving for the Jacobian.
Definition BlackoilModelParameters.hpp:249
Definition BlackoilModelParameters.hpp:107
Definition BlackoilModelParameters.hpp:129
Definition BlackoilModelParameters.hpp:159
Definition BlackoilModelParameters.hpp:161
Definition BlackoilModelParameters.hpp:158
Definition BlackoilModelParameters.hpp:30
Definition BlackoilModelParameters.hpp:116
Definition BlackoilModelParameters.hpp:33
Definition BlackoilModelParameters.hpp:35
Definition BlackoilModelParameters.hpp:115
Definition BlackoilModelParameters.hpp:114
Definition BlackoilModelParameters.hpp:41
Definition BlackoilModelParameters.hpp:44
Definition BlackoilModelParameters.hpp:38
Definition BlackoilModelParameters.hpp:156
Definition BlackoilModelParameters.hpp:155
Definition BlackoilModelParameters.hpp:152
Definition BlackoilModelParameters.hpp:154
Definition BlackoilModelParameters.hpp:140
Definition BlackoilModelParameters.hpp:147
Definition BlackoilModelParameters.hpp:144
Definition BlackoilModelParameters.hpp:127
Definition BlackoilModelParameters.hpp:93
Definition BlackoilModelParameters.hpp:104
Definition BlackoilModelParameters.hpp:105
Definition BlackoilModelParameters.hpp:141
Definition BlackoilModelParameters.hpp:103
Definition BlackoilModelParameters.hpp:101
Definition BlackoilModelParameters.hpp:47
Definition BlackoilModelParameters.hpp:85
Definition BlackoilModelParameters.hpp:82
Definition BlackoilModelParameters.hpp:125
Definition BlackoilModelParameters.hpp:124
Definition BlackoilModelParameters.hpp:87
Definition BlackoilModelParameters.hpp:88
Definition BlackoilModelParameters.hpp:133
Definition BlackoilModelParameters.hpp:138
Definition BlackoilModelParameters.hpp:132
Definition BlackoilModelParameters.hpp:134
Definition BlackoilModelParameters.hpp:136
Definition BlackoilModelParameters.hpp:148
Definition BlackoilModelParameters.hpp:139
Definition BlackoilModelParameters.hpp:149
Definition BlackoilModelParameters.hpp:165
Definition BlackoilModelParameters.hpp:90
Definition BlackoilModelParameters.hpp:112
Definition BlackoilModelParameters.hpp:50
Definition BlackoilModelParameters.hpp:122
Definition BlackoilModelParameters.hpp:119
Definition BlackoilModelParameters.hpp:106
Definition BlackoilModelParameters.hpp:89
Definition BlackoilModelParameters.hpp:109
Definition BlackoilModelParameters.hpp:108
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:126
Definition BlackoilModelParameters.hpp:128
Definition BlackoilModelParameters.hpp:95
Definition BlackoilModelParameters.hpp:92