mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 01:01:00 -06:00
changed: use AquiferConfig when setting up aquifers
This commit is contained in:
parent
187534780c
commit
9906cc47f7
@ -139,72 +139,32 @@ template <typename TypeTag>
|
|||||||
void
|
void
|
||||||
BlackoilAquiferModel<TypeTag>::init()
|
BlackoilAquiferModel<TypeTag>::init()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
const auto& comm = this->simulator_.vanguard().gridView().comm();
|
|
||||||
const auto& aquifer = this->simulator_.vanguard().eclState().aquifer();
|
const auto& aquifer = this->simulator_.vanguard().eclState().aquifer();
|
||||||
const auto& connections = aquifer.connections();
|
|
||||||
|
|
||||||
|
|
||||||
for (const auto& aq : aquifer.fetp())
|
|
||||||
aquifers_Fetkovich.push_back(AquiferFetkovich<TypeTag>(connections[aq.aquiferID], cartesian_to_compressed_, this->simulator_, aq));
|
|
||||||
|
|
||||||
for (const auto& aq : aquifer.ct())
|
|
||||||
aquifers_CarterTracy.push_back(AquiferCarterTracy<TypeTag>(connections[aq.aquiferID], cartesian_to_compressed_, this->simulator_, aq));
|
|
||||||
*/
|
|
||||||
|
|
||||||
const auto& deck = this->simulator_.vanguard().deck();
|
|
||||||
const auto& comm = this->simulator_.vanguard().gridView().comm();
|
|
||||||
|
|
||||||
bool has;
|
|
||||||
if (comm.rank() == 0)
|
|
||||||
has = deck.hasKeyword("AQUCT");
|
|
||||||
comm.broadcast(&has, 1, 0);
|
|
||||||
|
|
||||||
if (has) {
|
|
||||||
if (comm.size() > 1)
|
|
||||||
throw std::runtime_error("Aquifers currently do not work in parallel.");
|
|
||||||
|
|
||||||
// updateConnectionIntensiveQuantities();
|
|
||||||
const auto& eclState = this->simulator_.vanguard().eclState();
|
|
||||||
|
|
||||||
// Get all the carter tracy aquifer properties data and put it in aquifers vector
|
|
||||||
const AquiferCT aquiferct = AquiferCT(eclState.getTableManager(), deck);
|
|
||||||
const Aquancon aquifer_connect = Aquancon(eclState.getInputGrid(), deck);
|
|
||||||
|
|
||||||
const auto& ugrid = simulator_.vanguard().grid();
|
|
||||||
const auto& gridView = simulator_.gridView();
|
|
||||||
const int number_of_cells = gridView.size(0);
|
|
||||||
|
|
||||||
cartesian_to_compressed_ = cartesianToCompressed(number_of_cells, Opm::UgGridHelpers::globalCell(ugrid));
|
|
||||||
|
|
||||||
for (const auto& aquifer : aquiferct)
|
|
||||||
aquifers_CarterTracy.push_back(AquiferCarterTracy<TypeTag>(aquifer_connect[aquifer.aquiferID], cartesian_to_compressed_, this->simulator_, aquifer));
|
|
||||||
|
|
||||||
|
if (!aquifer.active()) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (comm.rank() == 0)
|
|
||||||
has = deck.hasKeyword("AQUFETP");
|
|
||||||
comm.broadcast(&has, 1, 0);
|
|
||||||
|
|
||||||
if (has) {
|
const auto& comm = this->simulator_.vanguard().gridView().comm();
|
||||||
if (comm.size() > 1)
|
if (comm.size() > 1)
|
||||||
throw std::runtime_error("Aquifers currently do not work in parallel.");
|
throw std::runtime_error("Aquifers currently do not work in parallel.");
|
||||||
|
|
||||||
// updateConnectionIntensiveQuantities();
|
// Get all the carter tracy aquifer properties data and put it in aquifers vector
|
||||||
const auto& eclState = this->simulator_.vanguard().eclState();
|
const auto& ugrid = simulator_.vanguard().grid();
|
||||||
|
const int number_of_cells = simulator_.gridView().size(0);
|
||||||
|
|
||||||
// Get all the carter tracy aquifer properties data and put it in aquifers vector
|
cartesian_to_compressed_ = cartesianToCompressed(number_of_cells,
|
||||||
const Aquifetp aquifetp = Aquifetp(deck);
|
Opm::UgGridHelpers::globalCell(ugrid));
|
||||||
const Aquancon aquifer_connect = Aquancon(eclState.getInputGrid(), deck);
|
|
||||||
|
|
||||||
const auto& ugrid = simulator_.vanguard().grid();
|
const auto& connections = aquifer.connections();
|
||||||
const auto& gridView = simulator_.gridView();
|
for (const auto& aq : aquifer.ct()) {
|
||||||
const int number_of_cells = gridView.size(0);
|
aquifers_CarterTracy.emplace_back(connections[aq.aquiferID],
|
||||||
|
cartesian_to_compressed_, this->simulator_, aq);
|
||||||
cartesian_to_compressed_ = cartesianToCompressed(number_of_cells, Opm::UgGridHelpers::globalCell(ugrid));
|
}
|
||||||
|
|
||||||
for (const auto& aquifer : aquifetp)
|
|
||||||
aquifers_Fetkovich.push_back(AquiferFetkovich<TypeTag>(aquifer_connect[aquifer.aquiferID], cartesian_to_compressed_, this->simulator_, aquifer));
|
|
||||||
|
|
||||||
|
for (const auto& aq : aquifer.fetp()) {
|
||||||
|
aquifers_Fetkovich.emplace_back(connections[aq.aquiferID],
|
||||||
|
cartesian_to_compressed_, this->simulator_, aq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template <typename TypeTag>
|
template <typename TypeTag>
|
||||||
|
Loading…
Reference in New Issue
Block a user