From 5ca8bb676dcc59b615adbd1f8d37ce5699b69654 Mon Sep 17 00:00:00 2001 From: kel85uk Date: Fri, 15 Dec 2017 13:24:15 +0100 Subject: [PATCH] Working aquifer object with equations implemented. Still need to do initialization solve. --- opm/autodiff/BlackoilAquiferModel.hpp | 1 - opm/autodiff/BlackoilAquiferModel_impl.hpp | 55 ++-------------------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/opm/autodiff/BlackoilAquiferModel.hpp b/opm/autodiff/BlackoilAquiferModel.hpp index 03771dced..f8b6e5c9f 100644 --- a/opm/autodiff/BlackoilAquiferModel.hpp +++ b/opm/autodiff/BlackoilAquiferModel.hpp @@ -152,7 +152,6 @@ namespace Opm { void calculateExplicitQuantities(); - // The number of components in the model. int numComponents() const; diff --git a/opm/autodiff/BlackoilAquiferModel_impl.hpp b/opm/autodiff/BlackoilAquiferModel_impl.hpp index b9a861e44..34d02203e 100644 --- a/opm/autodiff/BlackoilAquiferModel_impl.hpp +++ b/opm/autodiff/BlackoilAquiferModel_impl.hpp @@ -294,60 +294,15 @@ namespace Opm { const auto& deck = ebosSimulator.gridManager().deck(); const auto& eclState = ebosSimulator.gridManager().eclState(); - if (!deck.hasKeyword("AQUCT")){ - std::cout << "Nothing is shown! Where is AQUCT!????" << std::endl; - } + // Get all the carter tracy aquifer properties data and put it in aquifers vector + AquiferCT aquiferct = AquiferCT(eclState,deck); - const auto& aquctKeyword = deck.getKeyword("AQUCT"); - std::vector aquctParams; - // Resize the parameter vector container based on row entries in aquct - // We do the same for aquifers too because number of aquifers is assumed to be for each entry in aquct - aquctParams.resize(aquctKeyword.size()); - // aquifers.resize(aquctKeyword.size()); + std::vector aquifersData = aquiferct.getAquifers(); - const int tableID = 0; - - std::cout << "Parsing AQUCT stuff" << std::endl; - for (size_t aquctRecordIdx = 0; aquctRecordIdx < aquctKeyword.size(); ++ aquctRecordIdx) + for (auto aquiferData = aquifersData.begin(); aquiferData != aquifersData.end(); ++aquiferData) { - const auto& aquctRecord = aquctKeyword.getRecord(aquctRecordIdx); - - aquctParams.at(aquctRecordIdx).aquiferID = aquctRecord.getItem("AQUIFER_ID").template get(0); - aquctParams.at(aquctRecordIdx).h = aquctRecord.getItem("THICKNESS_AQ").template get(0); - aquctParams.at(aquctRecordIdx).phi_aq = aquctRecord.getItem("PORO_AQ").template get(0); - aquctParams.at(aquctRecordIdx).d0 = aquctRecord.getItem("DAT_DEPTH").getSIDouble(0); - aquctParams.at(aquctRecordIdx).C_t = aquctRecord.getItem("C_T").template get(0); - aquctParams.at(aquctRecordIdx).r_o = aquctRecord.getItem("RAD").getSIDouble(0); - aquctParams.at(aquctRecordIdx).k_a = aquctRecord.getItem("PERM_AQ").getSIDouble(0); - aquctParams.at(aquctRecordIdx).theta = aquctRecord.getItem("INFLUENCE_ANGLE").template get(0); - aquctParams.at(aquctRecordIdx).c1 = 0.008527; // We are using SI - aquctParams.at(aquctRecordIdx).c2 = 6.283; - aquctParams.at(aquctRecordIdx).inftableID = aquctRecord.getItem("TABLE_NUM_INFLUENCE_FN").template get(0) - 1; - aquctParams.at(aquctRecordIdx).pvttableID = aquctRecord.getItem("TABLE_NUM_WATER_PRESS").template get(0) - 1; - - std::cout << aquctParams.at(aquctRecordIdx).inftableID << std::endl; - // Get the correct influence table values - const auto& aqutabTable = eclState.getTableManager().getAqutabTables().getTable(aquctParams.at(aquctRecordIdx).inftableID); - const auto& aqutab_tdColumn = aqutabTable.getColumn(0); - const auto& aqutab_piColumn = aqutabTable.getColumn(1); - aquctParams.at(aquctRecordIdx).td = aqutab_tdColumn.vectorCopy(); - aquctParams.at(aquctRecordIdx).pi = aqutab_piColumn.vectorCopy(); - - // We determine the cell perforation here. - int cellID = 10 + aquctRecordIdx; - - aquctParams.at(aquctRecordIdx).cell_id = cellID; - - // We do not have mu_w as it has to be calculated from pvttable - aquifers.push_back(Aquifer_object( aquctParams.at(aquctRecordIdx) )); + aquifers.push_back( AquiferCarterTracy (*aquiferData, numComponents(), gravity_ ) ); } - - // I want to deliberately add another aquifer - aquifers.push_back( Aquifer_object(99) ); - - // aquifers_ = aquifers; - - return aquifers; } } // namespace Opm \ No newline at end of file