mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding thresholdPressure() interface to FlowProblemComp
although we do not support it yet.
This commit is contained in:
parent
3635132d95
commit
e4d1311589
@ -488,7 +488,7 @@ public:
|
|||||||
this->actionState(),
|
this->actionState(),
|
||||||
this->udqState(),
|
this->udqState(),
|
||||||
this->summaryState(),
|
this->summaryState(),
|
||||||
{}, // this->simulator_.problem().thresholdPressure().getRestartVector(),
|
this->simulator_.problem().thresholdPressure().getRestartVector(),
|
||||||
curTime, nextStepSize,
|
curTime, nextStepSize,
|
||||||
Parameters::Get<Parameters::EclOutputDoublePrecision>(),
|
Parameters::Get<Parameters::EclOutputDoublePrecision>(),
|
||||||
isFlowsn, std::move(flowsn),
|
isFlowsn, std::move(flowsn),
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <opm/simulators/flow/FlowProblem.hpp>
|
#include <opm/simulators/flow/FlowProblem.hpp>
|
||||||
|
#include <opm/simulators/flow/FlowThresholdPressure.hpp>
|
||||||
#include <opm/simulators/flow/OutputCompositionalModule.hpp>
|
#include <opm/simulators/flow/OutputCompositionalModule.hpp>
|
||||||
|
|
||||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||||
@ -109,6 +110,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
explicit FlowProblemComp(Simulator& simulator)
|
explicit FlowProblemComp(Simulator& simulator)
|
||||||
: FlowProblemType(simulator)
|
: FlowProblemType(simulator)
|
||||||
|
, thresholdPressures_(simulator)
|
||||||
{
|
{
|
||||||
eclWriter_ = std::make_unique<EclWriterType>(simulator);
|
eclWriter_ = std::make_unique<EclWriterType>(simulator);
|
||||||
enableEclOutput_ = Parameters::Get<Parameters::EnableEclOutput>();
|
enableEclOutput_ = Parameters::Get<Parameters::EnableEclOutput>();
|
||||||
@ -408,11 +410,19 @@ public:
|
|||||||
const std::vector<InitialFluidState>& initialFluidStates() const
|
const std::vector<InitialFluidState>& initialFluidStates() const
|
||||||
{ return initialFluidStates_; }
|
{ return initialFluidStates_; }
|
||||||
|
|
||||||
|
const FlowThresholdPressure<TypeTag>& thresholdPressure() const
|
||||||
|
{
|
||||||
|
assert( !thresholdPressures_.enableThresholdPressure() &&
|
||||||
|
" Threshold Pressures are not supported by compostional simulation ");
|
||||||
|
return thresholdPressures_;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: do we need this one?
|
// TODO: do we need this one?
|
||||||
template<class Serializer>
|
template<class Serializer>
|
||||||
void serializeOp(Serializer& serializer)
|
void serializeOp(Serializer& serializer)
|
||||||
{
|
{
|
||||||
serializer(static_cast<FlowProblemType&>(*this));
|
serializer(static_cast<FlowProblemType&>(*this));
|
||||||
|
serializer(*eclWriter_);
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -586,6 +596,8 @@ private:
|
|||||||
throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC");
|
throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FlowThresholdPressure<TypeTag> thresholdPressures_;
|
||||||
|
|
||||||
std::vector<InitialFluidState> initialFluidStates_;
|
std::vector<InitialFluidState> initialFluidStates_;
|
||||||
|
|
||||||
bool enableEclOutput_;
|
bool enableEclOutput_;
|
||||||
|
@ -1816,13 +1816,11 @@ INSTANTIATE_TYPE(float)
|
|||||||
template<class T> using FS##NUM = GenericOilGasFluidSystem<T, NUM>; \
|
template<class T> using FS##NUM = GenericOilGasFluidSystem<T, NUM>; \
|
||||||
template class GenericOutputBlackoilModule<FS##NUM<double>>;
|
template class GenericOutputBlackoilModule<FS##NUM<double>>;
|
||||||
|
|
||||||
//INSTANTIATE_COMP(2)
|
INSTANTIATE_COMP(2)
|
||||||
INSTANTIATE_COMP(3)
|
INSTANTIATE_COMP(3)
|
||||||
//INSTANTIATE_COMP(4)
|
INSTANTIATE_COMP(4)
|
||||||
//INSTANTIATE_COMP(5)
|
INSTANTIATE_COMP(5)
|
||||||
//INSTANTIATE_COMP(6)
|
INSTANTIATE_COMP(6)
|
||||||
//INSTANTIATE_COMP(7)
|
INSTANTIATE_COMP(7)
|
||||||
// template class GenericOutputBlackoilModule<GenericOilGasFluidSystem<double, 3>>;
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -81,6 +81,8 @@ public:
|
|||||||
//! \details Returns the union of explicitly configured entries and defaulted values.
|
//! \details Returns the union of explicitly configured entries and defaulted values.
|
||||||
std::vector<Scalar> getRestartVector() const;
|
std::vector<Scalar> getRestartVector() const;
|
||||||
|
|
||||||
|
bool enableThresholdPressure() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
* \brief Actually compute the threshold pressures over a face as a pre-compute step.
|
* \brief Actually compute the threshold pressures over a face as a pre-compute step.
|
||||||
|
@ -246,6 +246,15 @@ getRestartVector() const
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Grid, class GridView, class ElementMapper, class Scalar>
|
||||||
|
bool
|
||||||
|
GenericThresholdPressure<Grid,GridView,ElementMapper,Scalar>::
|
||||||
|
enableThresholdPressure() const
|
||||||
|
{
|
||||||
|
return this->enableThresholdPressure_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Grid, class GridView, class ElementMapper, class Scalar>
|
template<class Grid, class GridView, class ElementMapper, class Scalar>
|
||||||
void
|
void
|
||||||
GenericThresholdPressure<Grid,GridView,ElementMapper,Scalar>::
|
GenericThresholdPressure<Grid,GridView,ElementMapper,Scalar>::
|
||||||
|
Loading…
Reference in New Issue
Block a user