Loading...
Searching...
No Matches
StandardWellAssemble.hpp
/*
Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
Copyright 2017 Statoil ASA.
Copyright 2016 - 2017 IRIS AS.
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_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
#define OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
#include <opm/input/eclipse/Schedule/Well/Well.hpp>
namespace Opm
{
class DeferredLogger;
template<class Scalar> class GroupState;
class Schedule;
template<typename Scalar, typename IndexTraits, int numEq> class StandardWellEquations;
template<class FluidSystem, class Indices> class StandardWellPrimaryVariables;
class SummaryState;
template<class FluidSystem> class WellInterfaceFluidSystem;
template<typename Scalar, typename IndexTraits> class WellState;
template<class FluidSystem, class Indices>
class StandardWellAssemble
{
public:
using Scalar = typename FluidSystem::Scalar;
using PrimaryVariables = StandardWellPrimaryVariables<FluidSystem,Indices>;
using EvalWell = typename PrimaryVariables::EvalWell;
using IndexTraits = typename FluidSystem::IndexTraitsType;
using StandardWellEquationsType = StandardWellEquations<Scalar, IndexTraits, Indices::numEq>;
explicit StandardWellAssemble(const WellInterfaceFluidSystem<FluidSystem>& well)
: well_(well)
{}
void assembleControlEq(const WellState<Scalar, IndexTraits>& well_state,
const GroupState<Scalar>& group_state,
const Schedule& schedule,
const SummaryState& summaryState,
const Well::InjectionControls& inj_controls,
const Well::ProductionControls& prod_controls,
const PrimaryVariables& primary_variables,
const Scalar rho,
StandardWellEquationsType& eqns,
const bool stopped_or_zero_target,
DeferredLogger& deferred_logger) const;
void assembleInjectivityEq(const EvalWell& eq_pskin,
const EvalWell& eq_wat_vel,
const int pskin_index,
const int wat_vel_index,
const int cell_idx,
const int numWellEq,
StandardWellEquationsType& eqns) const;
void assemblePerforationEq(const EvalWell& cq_s_effective,
const int componentIdx,
const int cell_idx,
const int numWellEq,
StandardWellEquationsType& eqns) const;
void assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
const int cell_idx,
const int numWellEq,
StandardWellEquationsType& eqns) const;
void assembleSourceEq(const EvalWell& resWell_loc,
const int componentIdx,
const int numWellEq,
StandardWellEquationsType& eqns) const;
private:
const WellInterfaceFluidSystem<FluidSystem>& well_;
};
}
#endif // OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
Opm::DeferredLogger
Definition DeferredLogger.hpp:57
Opm::GroupState
Definition GroupState.hpp:41
Opm::StandardWellAssemble::assembleSourceEq
void assembleSourceEq(const EvalWell &resWell_loc, const int componentIdx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble a source term.
Definition StandardWellAssemble.cpp:234
Opm::StandardWellAssemble::assembleZFracEq
void assembleZFracEq(const EvalWell &cq_s_zfrac_effective, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble equation for Z fraction.
Definition StandardWellAssemble.cpp:248
Opm::StandardWellAssemble::StandardWellAssemble
StandardWellAssemble(const WellInterfaceFluidSystem< FluidSystem > &well)
Constructor initializes reference to well.
Definition StandardWellAssemble.hpp:52
Opm::StandardWellAssemble::assembleControlEq
void assembleControlEq(const WellState< Scalar, IndexTraits > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const PrimaryVariables &primary_variables, const Scalar rho, StandardWellEquationsType &eqns, const bool stopped_or_zero_target, DeferredLogger &deferred_logger) const
Assemble control equation.
Definition StandardWellAssemble.cpp:86
Opm::StandardWellAssemble::assembleInjectivityEq
void assembleInjectivityEq(const EvalWell &eq_pskin, const EvalWell &eq_wat_vel, const int pskin_index, const int wat_vel_index, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble injectivity equation.
Definition StandardWellAssemble.cpp:185
Opm::StandardWellAssemble::assemblePerforationEq
void assemblePerforationEq(const EvalWell &cq_s_effective, const int componentIdx, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble equation for a perforation.
Definition StandardWellAssemble.cpp:209
Opm::StandardWellEquations
Definition StandardWellEquations.hpp:47
Opm::StandardWellPrimaryVariables
Class holding primary variables for StandardWell.
Definition StandardWellPrimaryVariables.hpp:41
Opm::StandardWellPrimaryVariables::EvalWell
DenseAd::DynamicEvaluation< Scalar, numStaticWellEq+Indices::numEq+1 > EvalWell
Evaluation for the well equations.
Definition StandardWellPrimaryVariables.hpp:88
Opm::WellInterfaceFluidSystem
Definition WellInterfaceFluidSystem.hpp:49
Opm::WellState
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition WellState.hpp:66
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43