mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-03 18:40:29 -06:00
Fix bug in RS initialisation.
Also throw if default init is specified and datum != goc depth.
This commit is contained in:
parent
bbcf7a5833
commit
6ccc8d7bf8
@ -275,7 +275,13 @@ namespace Opm
|
||||
// Default initialisation: constant Rs below contact, saturated above.
|
||||
for (size_t i = 0; i < rec.size(); ++i) {
|
||||
const int cell = *(eqlmap.cells(i + 1).begin());
|
||||
const double p_contact = rec[i].goc.press;
|
||||
if (rec[i].goc.depth != rec[i].main.depth) {
|
||||
OPM_THROW(std::runtime_error,
|
||||
"Cannot initialise: when no explicit RSVD table is given, \n"
|
||||
"datum depth must be at the gas-oil-contact. "
|
||||
"In EQUIL region " << (i + 1) << " (counting from 1), this does not hold.");
|
||||
}
|
||||
const double p_contact = rec[i].main.press;
|
||||
rs_func_.push_back(std::make_shared<Miscibility::RsSatAtContact>(props, cell, p_contact));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user