mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added solver parameters to void reading in every step.
This commit is contained in:
parent
b337873e7f
commit
2a33063966
@ -25,7 +25,6 @@
|
|||||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||||
#include <opm/autodiff/LinearisedBlackoilResidual.hpp>
|
#include <opm/autodiff/LinearisedBlackoilResidual.hpp>
|
||||||
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
|
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
|
||||||
#include <opm/autodiff/TimeStepControl.hpp>
|
|
||||||
|
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
struct Wells;
|
struct Wells;
|
||||||
@ -53,6 +52,27 @@ namespace Opm {
|
|||||||
class FullyImplicitBlackoilSolver
|
class FullyImplicitBlackoilSolver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// the Newton relaxation type
|
||||||
|
enum RelaxType { DAMPEN, SOR };
|
||||||
|
|
||||||
|
// class holding the solver parameters
|
||||||
|
struct SolverParameter
|
||||||
|
{
|
||||||
|
double dp_max_rel_;
|
||||||
|
double ds_max_;
|
||||||
|
double drs_max_rel_;
|
||||||
|
enum RelaxType relax_type_;
|
||||||
|
double relax_max_;
|
||||||
|
double relax_increment_;
|
||||||
|
double relax_rel_tol_;
|
||||||
|
int max_iter_;
|
||||||
|
|
||||||
|
SolverParameter( const parameter::ParameterGroup& param );
|
||||||
|
SolverParameter();
|
||||||
|
|
||||||
|
void reset();
|
||||||
|
};
|
||||||
|
|
||||||
/// \brief The type of the grid that we use.
|
/// \brief The type of the grid that we use.
|
||||||
typedef T Grid;
|
typedef T Grid;
|
||||||
/// Construct a solver. It will retain references to the
|
/// Construct a solver. It will retain references to the
|
||||||
@ -65,7 +85,7 @@ namespace Opm {
|
|||||||
/// \param[in] rock_comp_props if non-null, rock compressibility properties
|
/// \param[in] rock_comp_props if non-null, rock compressibility properties
|
||||||
/// \param[in] wells well structure
|
/// \param[in] wells well structure
|
||||||
/// \param[in] linsolver linear solver
|
/// \param[in] linsolver linear solver
|
||||||
FullyImplicitBlackoilSolver(const parameter::ParameterGroup& param,
|
FullyImplicitBlackoilSolver(const SolverParameter& param,
|
||||||
const Grid& grid ,
|
const Grid& grid ,
|
||||||
const BlackoilPropsAdInterface& fluid,
|
const BlackoilPropsAdInterface& fluid,
|
||||||
const DerivedGeology& geo ,
|
const DerivedGeology& geo ,
|
||||||
@ -94,8 +114,7 @@ namespace Opm {
|
|||||||
/// \param[in] dt time step size
|
/// \param[in] dt time step size
|
||||||
/// \param[in] state reservoir state
|
/// \param[in] state reservoir state
|
||||||
/// \param[in] wstate well state
|
/// \param[in] wstate well state
|
||||||
/// \return new suggested time step
|
void
|
||||||
double
|
|
||||||
step(const double dt ,
|
step(const double dt ,
|
||||||
BlackoilState& state ,
|
BlackoilState& state ,
|
||||||
WellStateFullyImplicitBlackoil& wstate);
|
WellStateFullyImplicitBlackoil& wstate);
|
||||||
@ -139,8 +158,6 @@ namespace Opm {
|
|||||||
Oil = BlackoilPropsAdInterface::Oil ,
|
Oil = BlackoilPropsAdInterface::Oil ,
|
||||||
Gas = BlackoilPropsAdInterface::Gas };
|
Gas = BlackoilPropsAdInterface::Gas };
|
||||||
|
|
||||||
// the Newton relaxation type
|
|
||||||
enum RelaxType { DAMPEN, SOR };
|
|
||||||
enum PrimalVariables { Sg = 0, RS = 1, RV = 2 };
|
enum PrimalVariables { Sg = 0, RS = 1, RV = 2 };
|
||||||
|
|
||||||
// Member data
|
// Member data
|
||||||
@ -159,14 +176,8 @@ namespace Opm {
|
|||||||
const WellOps wops_;
|
const WellOps wops_;
|
||||||
const bool has_disgas_;
|
const bool has_disgas_;
|
||||||
const bool has_vapoil_;
|
const bool has_vapoil_;
|
||||||
double dp_max_rel_;
|
|
||||||
double ds_max_;
|
SolverParameter param_;
|
||||||
double drs_max_rel_;
|
|
||||||
enum RelaxType relax_type_;
|
|
||||||
double relax_max_;
|
|
||||||
double relax_increment_;
|
|
||||||
double relax_rel_tol_;
|
|
||||||
int max_iter_;
|
|
||||||
bool use_threshold_pressure_;
|
bool use_threshold_pressure_;
|
||||||
V threshold_pressures_by_interior_face_;
|
V threshold_pressures_by_interior_face_;
|
||||||
|
|
||||||
@ -178,8 +189,6 @@ namespace Opm {
|
|||||||
|
|
||||||
std::vector<int> primalVariable_;
|
std::vector<int> primalVariable_;
|
||||||
|
|
||||||
IterationCountTimeStepControl timeStepControl_;
|
|
||||||
|
|
||||||
// Private methods.
|
// Private methods.
|
||||||
SolutionState
|
SolutionState
|
||||||
constantState(const BlackoilState& x,
|
constantState(const BlackoilState& x,
|
||||||
@ -326,14 +335,14 @@ namespace Opm {
|
|||||||
|
|
||||||
void stablizeNewton(V& dx, V& dxOld, const double omega, const RelaxType relax_type) const;
|
void stablizeNewton(V& dx, V& dxOld, const double omega, const RelaxType relax_type) const;
|
||||||
|
|
||||||
double dpMaxRel() const { return dp_max_rel_; }
|
double dpMaxRel() const { return param_.dp_max_rel_; }
|
||||||
double dsMax() const { return ds_max_; }
|
double dsMax() const { return param_.ds_max_; }
|
||||||
double drsMaxRel() const { return drs_max_rel_; }
|
double drsMaxRel() const { return param_.drs_max_rel_; }
|
||||||
enum RelaxType relaxType() const { return relax_type_; }
|
enum RelaxType relaxType() const { return param_.relax_type_; }
|
||||||
double relaxMax() const { return relax_max_; };
|
double relaxMax() const { return param_.relax_max_; };
|
||||||
double relaxIncrement() const { return relax_increment_; };
|
double relaxIncrement() const { return param_.relax_increment_; };
|
||||||
double relaxRelTol() const { return relax_rel_tol_; };
|
double relaxRelTol() const { return param_.relax_rel_tol_; };
|
||||||
double maxIter() const { return max_iter_; }
|
double maxIter() const { return param_.max_iter_; }
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user