mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-19 05:53:28 -06:00
Created new initialization routine, using RS from deck.
This commit is contained in:
parent
6e9a46b34d
commit
a0a9c482ea
@ -599,6 +599,29 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Initialize a blackoil state from input deck.
|
||||||
|
template <class Props, class State>
|
||||||
|
void initBlackoilStateFromDeck(const UnstructuredGrid& grid,
|
||||||
|
const Props& props,
|
||||||
|
const EclipseGridParser& deck,
|
||||||
|
const double gravity,
|
||||||
|
State& state)
|
||||||
|
{
|
||||||
|
initStateFromDeck(grid, props, deck, gravity, state);
|
||||||
|
initBlackoilSurfvol(grid, props, state);
|
||||||
|
if (deck.hasField("RS")) {
|
||||||
|
const std::vector<double>& rs_deck = deck.getFloatingPointValue("RS");
|
||||||
|
const int num_cells = grid.number_of_cells;
|
||||||
|
for (int c = 0; c < num_cells; ++c) {
|
||||||
|
int c_deck = (grid.global_cell == NULL) ? c : grid.global_cell[c];
|
||||||
|
state.gasoilratio()[c] = rs_deck[c_deck];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
THROW("Temporarily, we require the RS field.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user