mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
equil initializer: use TEMPI to specify the initial temperature
this also implicitly takes care of RTEMPVD, RTEMP and all the other ways of specifying the initial reservoir temperature.
This commit is contained in:
@@ -88,16 +88,20 @@ public:
|
||||
: simulator_(simulator)
|
||||
{
|
||||
const auto& vanguard = simulator.vanguard();
|
||||
const auto& eclState = vanguard.eclState();
|
||||
|
||||
unsigned numElems = vanguard.grid().size(0);
|
||||
unsigned numCartesianElems = vanguard.cartesianSize();
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
|
||||
EQUIL::DeckDependent::InitialStateComputer<TypeTag> initialState(materialLawManager,
|
||||
vanguard.eclState(),
|
||||
eclState,
|
||||
vanguard.grid(),
|
||||
simulator.problem().gravity()[dimWorld - 1]);
|
||||
|
||||
const std::vector<double>& tempiData =
|
||||
eclState.get3DProperties().getDoubleGridProperty("TEMPI").getData();
|
||||
|
||||
// copy the result into the array of initial fluid states
|
||||
initialFluidStates_.resize(numCartesianElems);
|
||||
for (unsigned int elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||
@@ -127,10 +131,14 @@ public:
|
||||
fluidState.setRv(0.0);
|
||||
|
||||
|
||||
// set the temperature
|
||||
// TODO Get the temperature from the initialState
|
||||
Scalar T = FluidSystem::surfaceTemperature;
|
||||
fluidState.setTemperature(T);
|
||||
// set the temperature.
|
||||
//
|
||||
// TODO: setting temperature explicitly while computing static equilibirum
|
||||
// for everything else is a bit inconsistent, i.e.,
|
||||
// Opm::initStateEquil() should be extended to provide correct initial
|
||||
// temperatures
|
||||
assert(std::isfinite(tempiData[cartesianElemIdx]));
|
||||
fluidState.setTemperature(tempiData[cartesianElemIdx]);
|
||||
|
||||
// set the phase pressures.
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||
|
||||
Reference in New Issue
Block a user