commit
ff5c8eea84
@ -129,16 +129,17 @@ public:
|
||||
bool sortInputs = true)
|
||||
{
|
||||
assert(x.size() == y.size());
|
||||
assert(x.size() > 1);
|
||||
|
||||
resizeArrays_(x.size());
|
||||
std::copy(x.begin(), x.end(), xValues_.begin());
|
||||
std::copy(y.begin(), y.end(), yValues_.begin());
|
||||
if (x.size() > 0) {
|
||||
std::copy(x.begin(), x.end(), xValues_.begin());
|
||||
std::copy(y.begin(), y.end(), yValues_.begin());
|
||||
|
||||
if (sortInputs)
|
||||
sortInput_();
|
||||
else if (xValues_[0] > xValues_[numSamples() - 1])
|
||||
reverseSamplingPoints_();
|
||||
if (sortInputs)
|
||||
sortInput_();
|
||||
else if (xValues_[0] > xValues_[numSamples() - 1])
|
||||
reverseSamplingPoints_();
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1099,9 +1099,9 @@ private:
|
||||
GasOilEffectiveParamVector gasOilEffectiveParamVector_;
|
||||
OilWaterEffectiveParamVector oilWaterEffectiveParamVector_;
|
||||
|
||||
Opm::EclMultiplexerApproach threePhaseApproach_;
|
||||
Opm::EclMultiplexerApproach threePhaseApproach_ = EclMultiplexerApproach::EclDefaultApproach;
|
||||
// this attribute only makes sense for twophase simulations!
|
||||
enum EclTwoPhaseApproach twoPhaseApproach_;
|
||||
enum EclTwoPhaseApproach twoPhaseApproach_ = EclTwoPhaseApproach::EclTwoPhaseGasOil;
|
||||
|
||||
std::vector<std::shared_ptr<MaterialLawParams> > materialLawParams_;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
, realWaterPvt_(realWaterPvt)
|
||||
{ }
|
||||
|
||||
WaterPvtMultiplexer(const WaterPvtMultiplexer<Scalar,enableThermal>& data)
|
||||
WaterPvtMultiplexer(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data)
|
||||
{
|
||||
*this = data;
|
||||
}
|
||||
@ -274,7 +274,7 @@ public:
|
||||
|
||||
const void* realWaterPvt() const { return realWaterPvt_; }
|
||||
|
||||
bool operator==(const WaterPvtMultiplexer<Scalar,enableThermal, enableBrine>& data) const
|
||||
bool operator==(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data) const
|
||||
{
|
||||
if (this->approach() != data.approach())
|
||||
return false;
|
||||
@ -294,7 +294,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
WaterPvtMultiplexer<Scalar,enableThermal, enableBrine>& operator=(const WaterPvtMultiplexer<Scalar,enableThermal>& data)
|
||||
WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& operator=(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data)
|
||||
{
|
||||
approach_ = data.approach_;
|
||||
switch (approach_) {
|
||||
|
@ -69,29 +69,28 @@ public:
|
||||
thermalConductivityApproach_ = ThermalConductionLawParams::undefinedApproach;
|
||||
}
|
||||
|
||||
void initFromDeck(const Opm::Deck& deck,
|
||||
const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
void initParamsForElements(const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
{
|
||||
const auto& fp = eclState.fieldProps();
|
||||
const auto& tableManager = eclState.getTableManager();
|
||||
bool has_heatcr = fp.has_double("HEATCR");
|
||||
bool has_thconr = fp.has_double("THCONR");
|
||||
bool has_thc = fp.has_double("THCROCK") || fp.has_double("THCOIL") || fp.has_double("THCGAS") || fp.has_double("THCWATER");
|
||||
|
||||
if (has_heatcr)
|
||||
initHeatcr_(deck, eclState, compressedToCartesianElemIdx);
|
||||
else if (deck.hasKeyword("SPECROCK"))
|
||||
initSpecrock_(deck, eclState, compressedToCartesianElemIdx);
|
||||
initHeatcr_(eclState, compressedToCartesianElemIdx);
|
||||
else if (tableManager.hasTables("SPECROCK"))
|
||||
initSpecrock_(eclState, compressedToCartesianElemIdx);
|
||||
else
|
||||
initNullRockEnergy_(deck, eclState, compressedToCartesianElemIdx);
|
||||
|
||||
initNullRockEnergy_();
|
||||
|
||||
if (has_thconr)
|
||||
initThconr_(deck, eclState, compressedToCartesianElemIdx);
|
||||
initThconr_(eclState, compressedToCartesianElemIdx);
|
||||
else if (has_thc)
|
||||
initThc_(deck, eclState, compressedToCartesianElemIdx);
|
||||
initThc_(eclState, compressedToCartesianElemIdx);
|
||||
else
|
||||
initNullCond_(deck, eclState, compressedToCartesianElemIdx);
|
||||
initNullCond_();
|
||||
}
|
||||
|
||||
const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const
|
||||
@ -139,8 +138,7 @@ private:
|
||||
/*!
|
||||
* \brief Initialize the parameters for the solid energy law using using HEATCR and friends.
|
||||
*/
|
||||
void initHeatcr_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState,
|
||||
void initHeatcr_(const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
{
|
||||
solidEnergyApproach_ = SolidEnergyLawParams::heatcrApproach;
|
||||
@ -168,8 +166,7 @@ private:
|
||||
/*!
|
||||
* \brief Initialize the parameters for the solid energy law using using SPECROCK and friends.
|
||||
*/
|
||||
void initSpecrock_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState,
|
||||
void initSpecrock_(const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
{
|
||||
solidEnergyApproach_ = SolidEnergyLawParams::specrockApproach;
|
||||
@ -209,9 +206,7 @@ private:
|
||||
/*!
|
||||
* \brief Specify the solid energy law by setting heat capacity of rock to 0
|
||||
*/
|
||||
void initNullRockEnergy_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState OPM_UNUSED,
|
||||
const std::vector<int>& compressedToCartesianElemIdx OPM_UNUSED)
|
||||
void initNullRockEnergy_()
|
||||
{
|
||||
solidEnergyApproach_ = SolidEnergyLawParams::nullApproach;
|
||||
|
||||
@ -222,8 +217,7 @@ private:
|
||||
/*!
|
||||
* \brief Initialize the parameters for the thermal conduction law using THCONR and friends.
|
||||
*/
|
||||
void initThconr_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState,
|
||||
void initThconr_(const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
{
|
||||
thermalConductivityApproach_ = ThermalConductionLawParams::thconrApproach;
|
||||
@ -257,8 +251,7 @@ private:
|
||||
/*!
|
||||
* \brief Initialize the parameters for the thermal conduction law using THCROCK and friends.
|
||||
*/
|
||||
void initThc_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState,
|
||||
void initThc_(const Opm::EclipseState& eclState,
|
||||
const std::vector<int>& compressedToCartesianElemIdx)
|
||||
{
|
||||
thermalConductivityApproach_ = ThermalConductionLawParams::thcApproach;
|
||||
@ -306,9 +299,7 @@ private:
|
||||
/*!
|
||||
* \brief Disable thermal conductivity
|
||||
*/
|
||||
void initNullCond_(const Opm::Deck& deck OPM_UNUSED,
|
||||
const Opm::EclipseState& eclState OPM_UNUSED,
|
||||
const std::vector<int>& compressedToCartesianElemIdx OPM_UNUSED)
|
||||
void initNullCond_()
|
||||
{
|
||||
thermalConductivityApproach_ = ThermalConductionLawParams::nullApproach;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user