mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 18:50:19 -06:00
Add setThresholdPressures() method.
This commit is contained in:
parent
f7fa3488cb
commit
c5de6635c5
@ -74,6 +74,16 @@ namespace Opm {
|
||||
const bool has_disgas,
|
||||
const bool has_vapoil );
|
||||
|
||||
/// \brief Set threshold pressures that prevent or reduce flow.
|
||||
/// This prevents flow across faces if the potential
|
||||
/// difference is less than the threshold. If the potential
|
||||
/// difference is greater, the threshold value is subtracted
|
||||
/// before calculating flow. This is treated symmetrically, so
|
||||
/// flow is prevented or reduced in both directions equally.
|
||||
/// \param[in] threshold_pressures array of size equal to the number of interior faces
|
||||
/// of the grid passed in the constructor.
|
||||
void setThresholdPressures(const Eigen::Array<double, Eigen::Dynamic, 1>& threshold_pressures);
|
||||
|
||||
/// Take a single forward step, modifiying
|
||||
/// state.pressure()
|
||||
/// state.faceflux()
|
||||
|
@ -214,6 +214,23 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class T>
|
||||
void
|
||||
FullyImplicitBlackoilSolver<T>::
|
||||
setThresholdPressures(const Eigen::Array<double, Eigen::Dynamic, 1>& threshold_pressures)
|
||||
{
|
||||
const int ifacesize = ops_.internal_faces.size();
|
||||
if (threshold_pressures.size() != ifacesize) {
|
||||
OPM_THROW(std::runtime_error, "Illegal size of threshold_pressures input, must be equal to number of interior faces.");
|
||||
}
|
||||
use_threshold_pressure_ = true;
|
||||
threshold_pressures_by_face_ = threshold_pressures;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class T>
|
||||
void
|
||||
FullyImplicitBlackoilSolver<T>::
|
||||
|
Loading…
Reference in New Issue
Block a user