2015-05-24 10:33:06 -05:00
|
|
|
/*
|
|
|
|
Copyright 2015 SINTEF ICT, Applied Mathematics.
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
|
|
|
|
#define OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
|
|
|
|
|
2016-07-12 10:53:38 -05:00
|
|
|
#include <string>
|
|
|
|
|
2015-05-24 10:33:06 -05:00
|
|
|
namespace Opm
|
|
|
|
{
|
|
|
|
|
2017-04-28 08:36:25 -05:00
|
|
|
class ParameterGroup;
|
2015-05-24 10:33:06 -05:00
|
|
|
|
|
|
|
/// Solver parameters for the BlackoilModel.
|
|
|
|
struct BlackoilModelParameters
|
|
|
|
{
|
|
|
|
/// Max relative change in pressure in single iteration.
|
|
|
|
double dp_max_rel_;
|
|
|
|
/// Max absolute change in saturation in single iteration.
|
|
|
|
double ds_max_;
|
|
|
|
/// Max relative change in gas-oil or oil-gas ratio in single iteration.
|
|
|
|
double dr_max_rel_;
|
2016-10-27 08:01:44 -05:00
|
|
|
/// Max relative change in bhp in single iteration.
|
|
|
|
double dbhp_max_rel_;
|
2016-11-25 05:40:33 -06:00
|
|
|
/// Max absolute change in well volume fraction in single iteration.
|
|
|
|
double dwell_fraction_max_;
|
2015-05-24 10:33:06 -05:00
|
|
|
/// Absolute max limit for residuals.
|
|
|
|
double max_residual_allowed_;
|
|
|
|
/// Relative mass balance tolerance (total mass balance error).
|
|
|
|
double tolerance_mb_;
|
|
|
|
/// Local convergence tolerance (max of local saturation errors).
|
|
|
|
double tolerance_cnv_;
|
2018-03-08 01:19:44 -06:00
|
|
|
/// Relaxed local convergence tolerance (used when iter >= max_strict_iter_).
|
|
|
|
double tolerance_cnv_relaxed_;
|
2015-05-24 10:33:06 -05:00
|
|
|
/// Well convergence tolerance.
|
|
|
|
double tolerance_wells_;
|
2016-11-11 06:26:22 -06:00
|
|
|
/// Tolerance for the well control equations
|
|
|
|
// TODO: it might need to distinguish between rate control and pressure control later
|
|
|
|
double tolerance_well_control_;
|
2017-10-03 08:23:38 -05:00
|
|
|
/// Tolerance for the pressure equations for multisegment wells
|
|
|
|
double tolerance_pressure_ms_wells_;
|
2017-10-04 06:09:49 -05:00
|
|
|
/// Maximum pressure change over an iteratio for ms wells
|
|
|
|
double max_pressure_change_ms_wells_;
|
|
|
|
|
2017-10-10 07:30:23 -05:00
|
|
|
/// Whether to use inner iterations for ms wells
|
|
|
|
bool use_inner_iterations_ms_wells_;
|
|
|
|
|
2017-10-12 05:01:48 -05:00
|
|
|
/// Maximum inner iteration number for ms wells
|
|
|
|
int max_inner_iter_ms_wells_;
|
|
|
|
|
2017-10-04 06:09:49 -05:00
|
|
|
/// Maximum iteration number of the well equation solution
|
|
|
|
int max_welleq_iter_;
|
2015-05-24 10:33:06 -05:00
|
|
|
|
2016-11-21 10:18:24 -06:00
|
|
|
/// Tolerance for time step in seconds where single precision can be used
|
|
|
|
/// for solving for the Jacobian
|
|
|
|
double maxSinglePrecisionTimeStep_;
|
|
|
|
|
2017-06-13 08:55:19 -05:00
|
|
|
/// Maximum number of Newton iterations before we give up on the CNV convergence criterion
|
|
|
|
int max_strict_iter_;
|
2017-06-09 06:41:34 -05:00
|
|
|
|
2015-06-11 23:49:25 -05:00
|
|
|
/// Solve well equation initially
|
2015-06-16 06:12:49 -05:00
|
|
|
bool solve_welleq_initially_;
|
2015-06-11 23:49:25 -05:00
|
|
|
|
2015-08-27 09:58:44 -05:00
|
|
|
/// Update scaling factors for mass balance equations
|
|
|
|
bool update_equations_scaling_;
|
|
|
|
|
2016-01-15 04:30:07 -06:00
|
|
|
/// Try to detect oscillation or stagnation.
|
|
|
|
bool use_update_stabilization_;
|
|
|
|
|
2017-10-16 09:46:28 -05:00
|
|
|
/// Whether to use MultisegmentWell to handle multisegment wells
|
|
|
|
/// it is something temporary before the multisegment well model is considered to be
|
|
|
|
/// well developed and tested.
|
|
|
|
/// if it is false, we will handle multisegment wells as standard wells, which will be
|
|
|
|
/// the default behavoir for the moment. Later, we might set it to be true by default if necessary
|
2017-09-25 08:09:34 -05:00
|
|
|
bool use_multisegment_well_;
|
|
|
|
|
2017-10-16 09:46:28 -05:00
|
|
|
/// The file name of the deck
|
2016-07-12 10:53:38 -05:00
|
|
|
std::string deck_file_name_;
|
|
|
|
|
2018-03-05 09:40:17 -06:00
|
|
|
// Whether to add influences of wells between cells to the matrix and preconditioner matrix
|
2017-05-15 05:34:26 -05:00
|
|
|
bool matrix_add_well_contributions_;
|
|
|
|
|
2018-03-05 09:40:17 -06:00
|
|
|
// Whether to add influences of wells between cells to the preconditioner matrix only
|
|
|
|
bool preconditioner_add_well_contributions_;
|
|
|
|
|
2015-05-24 10:33:06 -05:00
|
|
|
/// Construct from user parameters or defaults.
|
2017-04-28 08:36:25 -05:00
|
|
|
explicit BlackoilModelParameters( const ParameterGroup& param );
|
2015-05-24 10:33:06 -05:00
|
|
|
|
|
|
|
/// Construct with default parameters.
|
|
|
|
BlackoilModelParameters();
|
|
|
|
|
|
|
|
/// Set default parameters.
|
|
|
|
void reset();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Opm
|
|
|
|
|
|
|
|
#endif // OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
|