|
My Project
|
A model implementation for three-phase black oil. More...
#include <BlackoilModelEbos.hpp>
Classes | |
| class | ComponentName |
Public Types | |
| typedef BlackoilModelParametersEbos< TypeTag > | ModelParameters |
| using | Simulator = GetPropType< TypeTag, Properties::Simulator > |
| using | Grid = GetPropType< TypeTag, Properties::Grid > |
| using | ElementContext = GetPropType< TypeTag, Properties::ElementContext > |
| using | SparseMatrixAdapter = GetPropType< TypeTag, Properties::SparseMatrixAdapter > |
| using | SolutionVector = GetPropType< TypeTag, Properties::SolutionVector > |
| using | PrimaryVariables = GetPropType< TypeTag, Properties::PrimaryVariables > |
| using | FluidSystem = GetPropType< TypeTag, Properties::FluidSystem > |
| using | Indices = GetPropType< TypeTag, Properties::Indices > |
| using | MaterialLaw = GetPropType< TypeTag, Properties::MaterialLaw > |
| using | MaterialLawParams = GetPropType< TypeTag, Properties::MaterialLawParams > |
| typedef double | Scalar |
| typedef Dune::FieldVector< Scalar, numEq > | VectorBlockType |
| typedef SparseMatrixAdapter::MatrixBlock | MatrixBlockType |
| typedef SparseMatrixAdapter::IstlMatrix | Mat |
| typedef Dune::BlockVector< VectorBlockType > | BVector |
| typedef ISTLSolverEbos< TypeTag > | ISTLSolverType |
Public Member Functions | |
| BlackoilModelEbos (Simulator &ebosSimulator, const ModelParameters ¶m, BlackoilWellModel< TypeTag > &well_model, const bool terminal_output) | |
| Construct the model. | |
| bool | isParallel () const |
| const EclipseState & | eclState () const |
| SimulatorReportSingle | prepareStep (const SimulatorTimerInterface &timer) |
| Called once before each time step. | |
| template<class NonlinearSolverType > | |
| SimulatorReportSingle | nonlinearIteration (const int iteration, const SimulatorTimerInterface &timer, NonlinearSolverType &nonlinear_solver) |
| Called once per nonlinear iteration. | |
| void | printIf (int c, double x, double y, double eps, std::string type) |
| SimulatorReportSingle | afterStep (const SimulatorTimerInterface &) |
| Called once after each time step. | |
| SimulatorReportSingle | assembleReservoir (const SimulatorTimerInterface &, const int iterationIdx) |
| Assemble the residual and Jacobian of the nonlinear system. | |
| double | relativeChange () const |
| int | linearIterationsLastSolve () const |
| Number of linear iterations used in last call to solveJacobianSystem(). | |
| void | solveJacobianSystem (BVector &x) |
| Solve the Jacobian system Jx = r where J is the Jacobian and r is the residual. | |
| void | updateSolution (const BVector &dx) |
| Apply an update to the primary variables. | |
| bool | terminalOutputEnabled () const |
| Return true if output to cout is wanted. | |
| template<class CollectiveCommunication > | |
| std::tuple< double, double > | convergenceReduction (const CollectiveCommunication &comm, const double pvSumLocal, const double numAquiferPvSumLocal, std::vector< Scalar > &R_sum, std::vector< Scalar > &maxCoeff, std::vector< Scalar > &B_avg) |
| std::tuple< double, double > | localConvergenceData (std::vector< Scalar > &R_sum, std::vector< Scalar > &maxCoeff, std::vector< Scalar > &B_avg) |
| Get reservoir quantities on this process needed for convergence calculations. | |
| double | computeCnvErrorPv (const std::vector< Scalar > &B_avg, double dt) |
| Compute the total pore volume of cells violating CNV that are not part of a numerical aquifer. | |
| ConvergenceReport | getReservoirConvergence (const double reportTime, const double dt, const int iteration, std::vector< Scalar > &B_avg, std::vector< Scalar > &residual_norms) |
| ConvergenceReport | getConvergence (const SimulatorTimerInterface &timer, const int iteration, std::vector< double > &residual_norms) |
| Compute convergence based on total mass balance (tol_mb) and maximum residual mass balance (tol_cnv). | |
| int | numPhases () const |
| The number of active fluid phases in the model. | |
| template<class T > | |
| std::vector< std::vector< double > > | computeFluidInPlace (const T &, const std::vector< int > &fipnum) const |
| Wrapper required due to not following generic API. | |
| std::vector< std::vector< double > > | computeFluidInPlace (const std::vector< int > &) const |
| Should not be called. | |
| const Simulator & | ebosSimulator () const |
| Simulator & | ebosSimulator () |
| const SimulatorReportSingle & | failureReport () const |
| return the statistics if the nonlinearIteration() method failed | |
| const std::vector< StepReport > & | stepReports () const |
| std::vector< StepReport > | getStepReportsDestructively () const |
| BlackoilWellModel< TypeTag > & | wellModel () |
| return the StandardWells object | |
| const BlackoilWellModel< TypeTag > & | wellModel () const |
| void | beginReportStep () |
| void | endReportStep () |
Public Attributes | |
| std::vector< bool > | wasSwitched_ |
Static Public Attributes | |
| static const int | numEq = Indices::numEq |
| static const int | contiSolventEqIdx = Indices::contiSolventEqIdx |
| static const int | contiZfracEqIdx = Indices::contiZfracEqIdx |
| static const int | contiPolymerEqIdx = Indices::contiPolymerEqIdx |
| static const int | contiEnergyEqIdx = Indices::contiEnergyEqIdx |
| static const int | contiPolymerMWEqIdx = Indices::contiPolymerMWEqIdx |
| static const int | contiFoamEqIdx = Indices::contiFoamEqIdx |
| static const int | contiBrineEqIdx = Indices::contiBrineEqIdx |
| static const int | contiMicrobialEqIdx = Indices::contiMicrobialEqIdx |
| static const int | contiOxygenEqIdx = Indices::contiOxygenEqIdx |
| static const int | contiUreaEqIdx = Indices::contiUreaEqIdx |
| static const int | contiBiofilmEqIdx = Indices::contiBiofilmEqIdx |
| static const int | contiCalciteEqIdx = Indices::contiCalciteEqIdx |
| static const int | solventSaturationIdx = Indices::solventSaturationIdx |
| static const int | zFractionIdx = Indices::zFractionIdx |
| static const int | polymerConcentrationIdx = Indices::polymerConcentrationIdx |
| static const int | polymerMoleWeightIdx = Indices::polymerMoleWeightIdx |
| static const int | temperatureIdx = Indices::temperatureIdx |
| static const int | foamConcentrationIdx = Indices::foamConcentrationIdx |
| static const int | saltConcentrationIdx = Indices::saltConcentrationIdx |
| static const int | microbialConcentrationIdx = Indices::microbialConcentrationIdx |
| static const int | oxygenConcentrationIdx = Indices::oxygenConcentrationIdx |
| static const int | ureaConcentrationIdx = Indices::ureaConcentrationIdx |
| static const int | biofilmConcentrationIdx = Indices::biofilmConcentrationIdx |
| static const int | calciteConcentrationIdx = Indices::calciteConcentrationIdx |
Protected Attributes | |
| Simulator & | ebosSimulator_ |
| const Grid & | grid_ |
| const PhaseUsage | phaseUsage_ |
| ModelParameters | param_ |
| SimulatorReportSingle | failureReport_ |
| BlackoilWellModel< TypeTag > & | well_model_ |
| bool | terminal_output_ |
| Whether we print something to std::cout. | |
| long int | global_nc_ |
| The number of cells of the global grid. | |
| std::vector< std::vector< double > > | residual_norms_history_ |
| double | current_relaxation_ |
| BVector | dx_old_ |
| std::vector< StepReport > | convergence_reports_ |
| ComponentName | compNames_ {} |
Static Protected Attributes | |
| static constexpr bool | has_solvent_ = getPropValue<TypeTag, Properties::EnableSolvent>() |
| static constexpr bool | has_extbo_ = getPropValue<TypeTag, Properties::EnableExtbo>() |
| static constexpr bool | has_polymer_ = getPropValue<TypeTag, Properties::EnablePolymer>() |
| static constexpr bool | has_polymermw_ = getPropValue<TypeTag, Properties::EnablePolymerMW>() |
| static constexpr bool | has_energy_ = getPropValue<TypeTag, Properties::EnableEnergy>() |
| static constexpr bool | has_foam_ = getPropValue<TypeTag, Properties::EnableFoam>() |
| static constexpr bool | has_brine_ = getPropValue<TypeTag, Properties::EnableBrine>() |
| static constexpr bool | has_micp_ = getPropValue<TypeTag, Properties::EnableMICP>() |
A model implementation for three-phase black oil.
The simulator is capable of handling three-phase problems where gas can be dissolved in oil and vice versa. It uses an industry-standard TPFA discretization with per-phase upwind weighting of mobilities.
|
inline |
Construct the model.
It will retain references to the arguments of this functions, and they are expected to remain in scope for the lifetime of the solver.
| [in] | param | parameters |
| [in] | grid | grid data structure |
| [in] | wells | well structure |
| [in] | vfp_properties | Vertical flow performance tables |
| [in] | linsolver | linear solver |
| [in] | eclState | eclipse state |
| [in] | terminal_output | request output to cout/cerr |
|
inline |
Called once after each time step.
In this class, this function does nothing.
| [in] | timer | simulation timer |
|
inline |
Assemble the residual and Jacobian of the nonlinear system.
| [in] | reservoir_state | reservoir state variables |
| [in,out] | well_state | well state variables |
| [in] | initial_assembly | pass true if this is the first call to assemble() in this timestep |
|
inline |
Compute convergence based on total mass balance (tol_mb) and maximum residual mass balance (tol_cnv).
| [in] | timer | simulation timer |
| [in] | iteration | current iteration number |
| [out] | residual_norms | CNV residuals by phase |
|
inline |
Get reservoir quantities on this process needed for convergence calculations.
|
inline |
Called once per nonlinear iteration.
This model will perform a Newton-Raphson update, changing reservoir_state and well_state. It will also use the nonlinear_solver to do relaxation of updates if necessary.
| [in] | iteration | should be 0 for the first call of a new timestep |
| [in] | timer | simulation timer |
| [in] | nonlinear_solver | nonlinear solver used (for oscillation/relaxation control) |
| [in,out] | reservoir_state | reservoir state variables |
| [in,out] | well_state | well state variables |
|
inline |
Called once before each time step.
| [in] | timer | simulation timer |