diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index ab76d9288e3..b34012e1d8d 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -27,7 +27,7 @@ If applicable, add screenshots to help explain your problem. **Platform (please complete the following information):** - Machine [e.g. LLNL/Quartz] - Compiler: [e.g. gcc 8.1.0] -- GEOSX Version [e.g. 0.2] +- GEOS Version [e.g. 0.2] **Additional context** Add any other context about the problem here. diff --git a/.integrated_tests.yaml b/.integrated_tests.yaml index 14a5dd73076..9b8f7b83af5 100644 --- a/.integrated_tests.yaml +++ b/.integrated_tests.yaml @@ -1,6 +1,6 @@ baselines: bucket: geosx - baseline: integratedTests/baseline_integratedTests-pr3197-6679-a003f43 + baseline: integratedTests/baseline_integratedTests-pr3278-6753-f7f9add allow_fail: all: '' diff --git a/BASELINE_NOTES.md b/BASELINE_NOTES.md index be5e9d7d934..4eea0a9bfc9 100644 --- a/BASELINE_NOTES.md +++ b/BASELINE_NOTES.md @@ -6,9 +6,11 @@ This file is designed to track changes to the integrated test baselines. Any developer who updates the baseline ID in the .integrated_tests.yaml file is expected to create an entry in this file with the pull request number, date, and their justification for rebaselining. These notes should be in reverse-chronological order, and use the following time format: (YYYY-MM-DD). -PR 3197 (2024-08-07) + + +PR 3278 (2024-08-12) ==================== -Separation of contact and friction laws. +Renamed GEOSX to GEOS in enternal mesh import, so rebaseline to change these names is the baselines. PR #3202 (2024-08-03) ====================== diff --git a/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml b/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml index d0c07591e87..dbc28b749b6 100644 --- a/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml +++ b/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml @@ -16,7 +16,7 @@ logLevel="5" file="../../../../../GEOSDATA/DataSets/Class09_p3/Johansen_faces.vtu" fieldsToImport="{ perm, poro }" - fieldNamesInGEOSX="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability }"> + fieldNamesInGEOS="{ rockPerm_permeability }"> diff --git a/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml b/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml index 865a4850f1a..26c4b973932 100644 --- a/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml +++ b/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml @@ -10,7 +10,7 @@ partitionMethod="ptscotch" scale="{ 50, 50, 50 }" fieldsToImport="{ PORO, NTG, DENSITY, BULKMOD }" - fieldNamesInGEOSX="{ rockPorosity_referencePorosity, netToGross, skeleton_density, skeleton_bulkModulus }" + fieldNamesInGEOS="{ rockPorosity_referencePorosity, netToGross, skeleton_density, skeleton_bulkModulus }" file="../singlePhaseFlow/pebi3d_with_properties.vtu"/> diff --git a/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml b/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml index caf219bb716..0ab2e1e9527 100755 --- a/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml +++ b/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml @@ -69,7 +69,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml index 20566c84bac..506201fab18 100644 --- a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml +++ b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml @@ -63,7 +63,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_large.vts" regionAttribute="regionAttribute" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml index 074d11adb4e..3a8e2c869ad 100644 --- a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml +++ b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml @@ -63,7 +63,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm b/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm index 14785b5f2ab..abb0265a6ca 100644 --- a/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm +++ b/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm @@ -5,7 +5,7 @@ name="main" file="Domain_Mesh_FaultModel.vtu" fieldsToImport="{ YoungModulus, PoissonRatio }" - fieldNamesInGEOSX="{ rock_youngModulus, rock_poissonRatio }" + fieldNamesInGEOS="{ rock_youngModulus, rock_poissonRatio }" /> diff --git a/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml b/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml index d2b84ef7de2..7b3d9723f66 100644 --- a/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml +++ b/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml @@ -66,7 +66,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/src/conf.py b/src/conf.py index e54573753a0..bcc5a918a58 100644 --- a/src/conf.py +++ b/src/conf.py @@ -79,9 +79,9 @@ # -- Project information ----------------------------------------------------- -project = u'GEOSX' -copyright = u'2018-2021 Lawrence Livermore National Security, The Board of Trustees of the Leland Stanford Junior University, TotalEnergies, and GEOSX Contributors.' -author = u'GEOSX Contributors' +project = u'GEOS' +copyright = u'2016-2024 Lawrence Livermore National Security LLC, 2018-2024 Total, S.A, The Board of Trustees of the Leland Stanford Junior University, 2023-2024 Chevron, 2019- GEOS/GEOSX Contributors' +author = u'GEOS/GEOSX Contributors' # The short X.Y version version = u'' @@ -220,8 +220,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'GEOSX.tex', u'GEOSX Documentation', - u'Randolph Settgast', 'manual'), + (master_doc, 'GEOS.tex', u'GEOS Documentation', + u'GEOS/GEOSX Developers', 'manual'), ] @@ -230,7 +230,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'geosx', u'GEOSX Documentation', + (master_doc, 'geos', u'GEOS Documentation', [author], 1) ] @@ -241,8 +241,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'GEOSX', u'GEOSX Documentation', - author, 'GEOSX', 'One line description of project.', + (master_doc, 'GEOS', u'GEOS Documentation', + author, 'GEOS', 'GEOS simulation framework.', 'Miscellaneous'), ] diff --git a/src/coreComponents/LvArray b/src/coreComponents/LvArray index 02ce362c009..69948929ca4 160000 --- a/src/coreComponents/LvArray +++ b/src/coreComponents/LvArray @@ -1 +1 @@ -Subproject commit 02ce362c009f11ddb2ade0286df23408d7334c4f +Subproject commit 69948929ca40acf490143fc020f72cd12d331f37 diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.hpp index cc0978206c0..b29592473a1 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.hpp @@ -144,7 +144,7 @@ void BrineEnthalpyUpdate::compute( real64 const & pressure, arraySlice1d< real64, USD3 > const & dValue, bool useMass ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 const input[2] = { pressure, temperature }; real64 brineEnthalpy_dTemperature = 0.0; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.hpp index 41aaa3ea1d5..6f00ccc7a53 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.hpp @@ -131,7 +131,7 @@ void CO2EnthalpyUpdate::compute( real64 const & pressure, { GEOS_UNUSED_VAR( phaseComposition, dPhaseComposition ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 const input[2] = { pressure, temperature }; real64 CO2EnthalpyDeriv[2]{}; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.hpp index d69edc81041..269528420fc 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.hpp @@ -42,8 +42,8 @@ class CO2SolubilityUpdate final : public FlashModelBaseUpdate { public: - using PhaseProp = MultiFluidVar< real64, 3, multifluid::LAYOUT_PHASE, multifluid::LAYOUT_PHASE_DC >; - using PhaseComp = MultiFluidVar< real64, 4, multifluid::LAYOUT_PHASE_COMP, multifluid::LAYOUT_PHASE_COMP_DC >; + using PhaseProp = MultiFluidVar< real64, 3, constitutive::multifluid::LAYOUT_PHASE, constitutive::multifluid::LAYOUT_PHASE_DC >; + using PhaseComp = MultiFluidVar< real64, 4, constitutive::multifluid::LAYOUT_PHASE_COMP, constitutive::multifluid::LAYOUT_PHASE_COMP_DC >; CO2SolubilityUpdate( arrayView1d< real64 const > const & componentMolarWeight, TableFunction const & CO2SolubilityTable, @@ -167,7 +167,7 @@ CO2SolubilityUpdate::compute( real64 const & pressure, PhaseProp::SliceType const phaseFraction, PhaseComp::SliceType const phaseCompFraction ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // Solubility of CO2 is read from the tables in the form of moles of CO2 per kg of water // Solubility of water is read from the tables in the form of moles of water per kg of CO2 diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.hpp index 17a084355c2..892baf5751f 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.hpp @@ -173,7 +173,7 @@ void EzrokhiBrineDensityUpdate::compute( real64 const & pressure, bool useMass ) const { constexpr integer numDof = 4; - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 waterSatDensity_dTemperature = 0.0; real64 waterSatPressure_dTemperature = 0.0; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.hpp index 6a8c66be0c3..19db851b67f 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.hpp @@ -158,7 +158,7 @@ void EzrokhiBrineViscosityUpdate::compute( real64 const & pressure, { GEOS_UNUSED_VAR( pressure, useMass ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 waterVisc_dTemperature = 0.0; real64 const waterVisc = m_waterViscosityTable.compute( &temperature, &waterVisc_dTemperature ); diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.hpp index 3f9dd756f00..23803a777f9 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.hpp @@ -125,7 +125,7 @@ void FenghourCO2ViscosityUpdate::compute( real64 const & pressure, dPhaseComposition, useMass ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 const input[2] = { pressure, temperature }; real64 densityDeriv[2]{}; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.hpp index 8d5dbe22103..9033b586fa7 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.hpp @@ -136,7 +136,7 @@ void PhillipsBrineDensityUpdate::compute( real64 const & pressure, arraySlice1d< real64, USD3 > const & dValue, bool useMass ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // this method implements the method proposed by E. Garcia (2001) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.hpp index 14dd9c2c65c..e3776fe90cc 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.hpp @@ -140,7 +140,7 @@ void PhillipsBrineViscosityUpdate::compute( real64 const & pressure, dPhaseComposition, useMass ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // compute the viscosity of pure water as a function of temperature real64 dPureWaterVisc_dTemperature; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.hpp index e68d2ea01d2..c706cd95264 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.hpp @@ -135,7 +135,7 @@ void SpanWagnerCO2DensityUpdate::compute( real64 const & pressure, { GEOS_UNUSED_VAR( phaseComposition, dPhaseComposition ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 const input[2] = { pressure, temperature }; real64 densityDeriv[2]{}; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.hpp index 96e1eecf0e0..ad3e8dd5c11 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.hpp @@ -118,7 +118,7 @@ void WaterDensityUpdate::compute( real64 const & pressure, { GEOS_UNUSED_VAR( phaseComposition, dPhaseComposition, useMass ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 const input[2] = { pressure, temperature }; real64 densityDeriv[2]{}; diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index 825fac729af..b7b9a387b94 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -128,67 +128,67 @@ class MultiFluidBase : public ConstitutiveBase */ void setMassFlag( bool const flag ) { m_useMass = flag; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseFraction() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseFraction() const { return m_phaseFraction.value; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseFraction() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseFraction() const { return m_phaseFraction.derivs; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseDensity() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseDensity() const { return m_phaseDensity.value; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseDensity_n() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseDensity_n() const { return m_phaseDensity_n; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseDensity() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseDensity() const { return m_phaseDensity.derivs; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseMassDensity() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseMassDensity() const { return m_phaseMassDensity.value; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseMassDensity() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseMassDensity() const { return m_phaseMassDensity.derivs; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseViscosity() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseViscosity() const { return m_phaseViscosity.value; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseViscosity() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseViscosity() const { return m_phaseViscosity.derivs; } - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > phaseCompFraction() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > phaseCompFraction() const { return m_phaseCompFraction.value; } - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > phaseCompFraction_n() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > phaseCompFraction_n() const { return m_phaseCompFraction_n; } - arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > dPhaseCompFraction() const + arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > dPhaseCompFraction() const { return m_phaseCompFraction.derivs; } - arrayView2d< real64 const, multifluid::USD_FLUID > totalDensity() const + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > totalDensity() const { return m_totalDensity.value; } - arrayView2d< real64 const, multifluid::USD_FLUID > totalDensity_n() const + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > totalDensity_n() const { return m_totalDensity_n; } - arrayView3d< real64 const, multifluid::USD_FLUID_DC > dTotalDensity() const + arrayView3d< real64 const, constitutive::multifluid::USD_FLUID_DC > dTotalDensity() const { return m_totalDensity.derivs; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseEnthalpy() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseEnthalpy() const { return m_phaseEnthalpy.value; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseEnthalpy_n() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseEnthalpy_n() const { return m_phaseEnthalpy_n; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseEnthalpy() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseEnthalpy() const { return m_phaseEnthalpy.derivs; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseInternalEnergy() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseInternalEnergy() const { return m_phaseInternalEnergy.value; } - arrayView3d< real64 const, multifluid::USD_PHASE > phaseInternalEnergy_n() const + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseInternalEnergy_n() const { return m_phaseInternalEnergy_n; } - arrayView4d< real64 const, multifluid::USD_PHASE_DC > dPhaseInternalEnergy() const + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > dPhaseInternalEnergy() const { return m_phaseInternalEnergy.derivs; } /** @@ -222,9 +222,9 @@ class MultiFluidBase : public ConstitutiveBase public: - using PhaseProp = MultiFluidVar< real64, 3, multifluid::LAYOUT_PHASE, multifluid::LAYOUT_PHASE_DC >; - using PhaseComp = MultiFluidVar< real64, 4, multifluid::LAYOUT_PHASE_COMP, multifluid::LAYOUT_PHASE_COMP_DC >; - using FluidProp = MultiFluidVar< real64, 2, multifluid::LAYOUT_FLUID, multifluid::LAYOUT_FLUID_DC >; + using PhaseProp = MultiFluidVar< real64, 3, constitutive::multifluid::LAYOUT_PHASE, constitutive::multifluid::LAYOUT_PHASE_DC >; + using PhaseComp = MultiFluidVar< real64, 4, constitutive::multifluid::LAYOUT_PHASE_COMP, constitutive::multifluid::LAYOUT_PHASE_COMP_DC >; + using FluidProp = MultiFluidVar< real64, 2, constitutive::multifluid::LAYOUT_FLUID, constitutive::multifluid::LAYOUT_FLUID_DC >; public: class KernelWrapper @@ -271,28 +271,28 @@ class MultiFluidBase : public ConstitutiveBase GEOS_FORCE_INLINE integer numPhases() const { return LvArray::integerConversion< integer >( m_phaseFraction.value.size( 2 ) ); } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseFraction() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseFraction() const { return m_phaseFraction.value; } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseDensity() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseDensity() const { return m_phaseDensity.value; } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseMassDensity() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseMassDensity() const { return m_phaseMassDensity.value; } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseViscosity() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseViscosity() const { return m_phaseViscosity.value; } - GEOS_HOST_DEVICE arrayView4d< real64 const, multifluid::USD_PHASE_COMP > phaseCompFraction() const + GEOS_HOST_DEVICE arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > phaseCompFraction() const { return m_phaseCompFraction.value; } - GEOS_HOST_DEVICE arrayView2d< real64 const, multifluid::USD_FLUID > totalDensity() const + GEOS_HOST_DEVICE arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > totalDensity() const { return m_totalDensity.value; } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseEnthalpy() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseEnthalpy() const { return m_phaseEnthalpy.value; } - GEOS_HOST_DEVICE arrayView3d< real64 const, multifluid::USD_PHASE > phaseInternalEnergy() const + GEOS_HOST_DEVICE arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > phaseInternalEnergy() const { return m_phaseInternalEnergy.value; } /** @@ -318,13 +318,13 @@ class MultiFluidBase : public ConstitutiveBase real64 const pressure, real64 const temperature, arraySlice1d< real64 const, compflow::USD_COMP - 1 > const & composition, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseFraction, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseDensity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseMassDensity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseViscosity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseEnthalpy, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseInternalEnergy, - arraySlice2d< real64, multifluid::USD_PHASE_COMP-2 > const & phaseCompFraction, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseFraction, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseDensity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseMassDensity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseViscosity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseEnthalpy, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseInternalEnergy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_COMP-2 > const & phaseCompFraction, real64 & totalDensity ); protected: @@ -404,8 +404,8 @@ class MultiFluidBase : public ConstitutiveBase template< integer maxNumComp, integer maxNumPhase > GEOS_HOST_DEVICE void convertToMassFractions( real64 const (&phaseMolecularWeight)[maxNumPhase], - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice2d< real64, multifluid::USD_PHASE_COMP - 2 > const phaseCompFrac ) const; + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_COMP - 2 > const phaseCompFrac ) const; /** * @brief Utility function to convert mole fractions to mass fractions and keep derivatives @@ -432,10 +432,10 @@ class MultiFluidBase : public ConstitutiveBase real64 const (&dPhaseMolecularWeight)[maxNumPhase][maxNumComp+2], PhaseProp::SliceType const phaseFrac, PhaseComp::SliceType const phaseCompFrac, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseDens, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const; + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const; /** * @brief Utility function to compute the internal energy from pressure, enthalpy, and density @@ -450,10 +450,10 @@ class MultiFluidBase : public ConstitutiveBase template< integer maxNumComp, integer maxNumPhase > GEOS_HOST_DEVICE void computeInternalEnergy( real64 const & pressure, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseMassDens, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseEnthalpy, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseInternalEnergy ) const; + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseMassDens, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseEnthalpy, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseInternalEnergy ) const; /** * @brief Utility function to compute the internal energy from pressure, enthalpy, and density and keep derivatives @@ -480,8 +480,8 @@ class MultiFluidBase : public ConstitutiveBase */ template< integer maxNumComp, integer maxNumPhase > GEOS_HOST_DEVICE - void computeTotalDensity( arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseDens, + void computeTotalDensity( arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseDens, real64 & totalDens ) const; /** @@ -523,7 +523,7 @@ class MultiFluidBase : public ConstitutiveBase real64 totalCompressibility( integer const i, integer const q ) const { real64 const totalFluidDensity = totalDensity()( i, q ); - real64 const dTotalFluidDensity_dP = m_totalDensity.derivs( i, q, multifluid::DerivativeOffset::dP ); + real64 const dTotalFluidDensity_dP = m_totalDensity.derivs( i, q, constitutive::multifluid::DerivativeOffset::dP ); return 0.0 < totalFluidDensity ? dTotalFluidDensity_dP / totalFluidDensity : 0.0; } @@ -600,10 +600,10 @@ class MultiFluidBase : public ConstitutiveBase void computeDerivativesWrtMassFractions( real64 const (&dCompMoleFrac_dCompMassFrac)[maxNumComp][maxNumComp], PhaseProp::SliceType const phaseFrac, PhaseComp::SliceType const phaseCompFrac, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseDens, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const; + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const; /** * @brief Main compute function to update properties in a cell with derivatives (used in Newton iterations) @@ -693,11 +693,11 @@ class MultiFluidBase : public ConstitutiveBase // backup data - array3d< real64, multifluid::LAYOUT_PHASE > m_phaseDensity_n; - array3d< real64, multifluid::LAYOUT_PHASE > m_phaseEnthalpy_n; - array3d< real64, multifluid::LAYOUT_PHASE > m_phaseInternalEnergy_n; - array4d< real64, multifluid::LAYOUT_PHASE_COMP > m_phaseCompFraction_n; - array2d< real64, multifluid::LAYOUT_FLUID > m_totalDensity_n; + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > m_phaseDensity_n; + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > m_phaseEnthalpy_n; + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > m_phaseInternalEnergy_n; + array4d< real64, constitutive::multifluid::LAYOUT_PHASE_COMP > m_phaseCompFraction_n; + array2d< real64, constitutive::multifluid::LAYOUT_FLUID > m_totalDensity_n; }; @@ -708,13 +708,13 @@ MultiFluidBase::KernelWrapper::computeValues( FLUIDWRAPPER const fluidWrapper, real64 const pressure, real64 const temperature, arraySlice1d< real64 const, compflow::USD_COMP - 1 > const & composition, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseFraction, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseDensity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseMassDensity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseViscosity, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseEnthalpy, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const & phaseInternalEnergy, - arraySlice2d< real64, multifluid::USD_PHASE_COMP-2 > const & phaseCompFraction, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseFraction, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseDensity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseMassDensity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseViscosity, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseEnthalpy, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const & phaseInternalEnergy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_COMP-2 > const & phaseCompFraction, real64 & totalDensity ) { integer constexpr maxNumPhase = MAX_NUM_PHASES; @@ -726,9 +726,9 @@ MultiFluidBase::KernelWrapper::computeValues( FLUIDWRAPPER const fluidWrapper, // Allocate data for derivatives. All properties of the same type will use the same memory // space for the derivatives. The derivatives returned will clearly be garbage but the values // should be correct. - StackArray< real64, 4, maxNumDof * maxNumPhase, multifluid::LAYOUT_PHASE_DC > dPhaseProp( 1, 1, numPhase, numComp+2 ); - StackArray< real64, 5, maxNumDof * maxNumComp * maxNumPhase, multifluid::LAYOUT_PHASE_COMP_DC > dPhaseComp( 1, 1, numPhase, numComp, numComp+2 ); - StackArray< real64, 3, maxNumDof, multifluid::LAYOUT_FLUID_DC > dFluidProp( 1, 1, numComp+2 ); + StackArray< real64, 4, maxNumDof * maxNumPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseProp( 1, 1, numPhase, numComp+2 ); + StackArray< real64, 5, maxNumDof * maxNumComp * maxNumPhase, constitutive::multifluid::LAYOUT_PHASE_COMP_DC > dPhaseComp( 1, 1, numPhase, numComp, numComp+2 ); + StackArray< real64, 3, maxNumDof, constitutive::multifluid::LAYOUT_FLUID_DC > dFluidProp( 1, 1, numComp+2 ); // Wrap the output in multi variable objects PhaseProp::SliceType phaseFractionWrapper { phaseFraction, dPhaseProp[0][0] }; @@ -808,8 +808,8 @@ GEOS_FORCE_INLINE void MultiFluidBase::KernelWrapper:: convertToMassFractions( real64 const (&phaseMolecularWeight)[maxNumPhase], - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice2d< real64, multifluid::USD_PHASE_COMP - 2 > const phaseCompFrac ) const + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_COMP - 2 > const phaseCompFrac ) const { using namespace multifluid; @@ -854,10 +854,10 @@ MultiFluidBase::KernelWrapper:: real64 const (&dPhaseMolecularWeight)[maxNumPhase][maxNumComp+2], PhaseProp::SliceType const phaseFrac, PhaseComp::SliceType const phaseCompFrac, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseDens, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const { convertToPhaseMassFractions( phaseMolecularWeight, dPhaseMolecularWeight, @@ -884,7 +884,7 @@ MultiFluidBase::KernelWrapper:: real64 const (&dPhaseMolecularWeight)[maxNumPhase][maxNumDof], PhaseProp::SliceType const phaseFrac ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numPhase = numPhases(); integer const numComp = numComponents(); @@ -939,7 +939,7 @@ MultiFluidBase::KernelWrapper:: PhaseProp::SliceType const phaseFrac, PhaseComp::SliceType const phaseCompFrac ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numPhase = numPhases(); integer const numComp = numComponents(); @@ -985,12 +985,12 @@ MultiFluidBase::KernelWrapper:: computeDerivativesWrtMassFractions( real64 const (&dCompMoleFrac_dCompMassFrac)[maxNumComp][maxNumComp], PhaseProp::SliceType const phaseFrac, PhaseComp::SliceType const phaseCompFrac, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseDens, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, - arraySlice2d< real64, multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseEnthalpy, + arraySlice2d< real64, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseInternalEnergy ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numPhase = numPhases(); integer const numComp = numComponents(); @@ -1017,10 +1017,10 @@ GEOS_FORCE_INLINE void MultiFluidBase::KernelWrapper:: computeInternalEnergy( real64 const & pressure, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseMassDens, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseEnthalpy, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseInternalEnergy ) const + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseMassDens, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseEnthalpy, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseInternalEnergy ) const { using namespace multifluid; @@ -1087,8 +1087,8 @@ template< integer maxNumComp, integer maxNumPhase > GEOS_HOST_DEVICE inline void MultiFluidBase::KernelWrapper:: - computeTotalDensity( arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseFrac, - arraySlice1d< real64, multifluid::USD_PHASE - 2 > const phaseDens, + computeTotalDensity( arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac, + arraySlice1d< real64, constitutive::multifluid::USD_PHASE - 2 > const phaseDens, real64 & totalDens ) const { using namespace multifluid; @@ -1119,7 +1119,7 @@ MultiFluidBase::KernelWrapper:: PhaseProp::SliceType const phaseDensity, FluidProp::SliceType const totalDensity ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numComp = numComponents(); integer const numPhase = numPhases(); diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidSelector.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidSelector.hpp index 470720f3617..8391c62965f 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidSelector.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidSelector.hpp @@ -37,7 +37,7 @@ namespace constitutive { template< typename LAMBDA > -void constitutiveUpdatePassThru( MultiFluidBase const & fluid, +void constitutiveUpdatePassThru( constitutive::MultiFluidBase const & fluid, LAMBDA && lambda ) { ConstitutivePassThruHandler< DeadOilFluid, @@ -59,7 +59,7 @@ void constitutiveUpdatePassThru( MultiFluidBase const & fluid, } template< typename LAMBDA > -void constitutiveUpdatePassThru( MultiFluidBase & fluid, +void constitutiveUpdatePassThru( constitutive::MultiFluidBase & fluid, LAMBDA && lambda ) { ConstitutivePassThruHandler< DeadOilFluid, @@ -117,7 +117,7 @@ struct ComponentSelector< camp::idx_seq< Is ... > > } template< bool THERMAL = false, typename LAMBDA = NoOpFunc > -void constitutiveComponentUpdatePassThru( MultiFluidBase & fluidBase, +void constitutiveComponentUpdatePassThru( constitutive::MultiFluidBase & fluidBase, integer const numComps, LAMBDA && lambda ) { diff --git a/src/coreComponents/constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp b/src/coreComponents/constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp index 29ff379ea41..832ea0904e8 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp @@ -142,7 +142,7 @@ class BlackOilFluid : public BlackOilFluidBase void computeDensitiesViscosities( bool const needDerivs, real64 const pressure, real64 const composition[NC_BO], - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & phaseFrac, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & phaseFrac, PhaseProp::SliceType const & phaseDens, PhaseProp::SliceType const & phaseMassDens, PhaseProp::SliceType const & phaseVisc, @@ -253,7 +253,7 @@ class BlackOilFluid : public BlackOilFluidBase real64 const dBo_dPres, real64 const dBo_dComp[HNC_BO], real64 & dens, - arraySlice1d< real64, multifluid::USD_PHASE_DC - 3 > const & dDens ) const; + arraySlice1d< real64, constitutive::multifluid::USD_PHASE_DC - 3 > const & dDens ) const; /// Data needed to update the oil phase properties PVTOData::KernelWrapper m_PVTOView; @@ -415,7 +415,7 @@ BlackOilFluid::KernelWrapper:: PhaseProp::SliceType const & phaseFraction, PhaseComp::SliceType const & phaseCompFraction ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; using PT = BlackOilFluid::PhaseType; integer const ipOil = m_phaseOrder[PT::OIL]; @@ -563,14 +563,14 @@ BlackOilFluid::KernelWrapper:: computeDensitiesViscosities( bool const needDerivs, real64 const pressure, real64 const composition[NC_BO], - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & phaseFrac, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & phaseFrac, PhaseProp::SliceType const & phaseDens, PhaseProp::SliceType const & phaseMassDens, PhaseProp::SliceType const & phaseVisc, real64 phaseMolecularWeight[NP_BO], real64 dPhaseMolecularWeight[NP_BO][NC_BO+2] ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; using PT = BlackOilFluid::PhaseType; integer const ipOil = m_phaseOrder[PT::OIL]; @@ -905,9 +905,9 @@ BlackOilFluid::KernelWrapper:: real64 const dBo_dPres, real64 const dBo_dComp[HNC_BO], real64 & dens, - arraySlice1d< real64, multifluid::USD_PHASE_DC - 3 > const & dDens ) const + arraySlice1d< real64, constitutive::multifluid::USD_PHASE_DC - 3 > const & dDens ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; using PT = BlackOilFluid::PhaseType; real64 const oilDens = (useMass)? m_PVTOView.m_surfaceMassDensity[PT::OIL]: diff --git a/src/coreComponents/constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp b/src/coreComponents/constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp index 361f15aa343..e0405f17f20 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp @@ -161,7 +161,7 @@ DeadOilFluid::KernelWrapper:: computeDensities( real64 const pressure, PhaseProp::SliceType const & phaseMassDens ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; LvArray::forValuesInSlice( phaseMassDens.derivs, []( real64 & val ){ val = 0.0; } ); @@ -207,7 +207,7 @@ DeadOilFluid::KernelWrapper:: computeViscosities( real64 const pressure, PhaseProp::SliceType const & phaseVisc ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; LvArray::forValuesInSlice( phaseVisc.derivs, []( real64 & val ){ val = 0.0; } ); @@ -255,7 +255,7 @@ DeadOilFluid::KernelWrapper:: { GEOS_UNUSED_VAR( temperature, phaseEnthalpy, phaseInternalEnergy ); - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const nComps = numComponents(); integer const nPhases = numPhases(); diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.hpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.hpp index 85bb218a6f3..3df983ad857 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.hpp @@ -188,7 +188,7 @@ CompositionalMultiphaseFluidPVTPackage::KernelWrapper:: GEOS_UNUSED_VAR( totalDensity ); #else - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer constexpr maxNumComp = MultiFluidBase::MAX_NUM_COMPONENTS; integer constexpr maxNumPhase = MultiFluidBase::MAX_NUM_PHASES; diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidUpdates.hpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidUpdates.hpp index bcf0e5c482e..7b37415f954 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidUpdates.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidUpdates.hpp @@ -421,7 +421,7 @@ convertDerivativesToTotalMoleFraction( integer const numComps, arraySlice1d< real64, USD2 > const & dProperty, arraySlice1d< real64 > const & workSpace ) { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numDofs = numComps + 2; for( integer kc = 0; kc < numDofs; ++kc ) { diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/functions/NegativeTwoPhaseFlash.hpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/functions/NegativeTwoPhaseFlash.hpp index be61c18688d..96b2bdf5de4 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/functions/NegativeTwoPhaseFlash.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/functions/NegativeTwoPhaseFlash.hpp @@ -32,15 +32,12 @@ namespace geos namespace constitutive { - -using namespace multifluid; - namespace compositional { struct NegativeTwoPhaseFlash { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; public: /** diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/models/LohrenzBrayClarkViscosityImpl.hpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/models/LohrenzBrayClarkViscosityImpl.hpp index 77b624b50a2..cb87558e693 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/models/LohrenzBrayClarkViscosityImpl.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/models/LohrenzBrayClarkViscosityImpl.hpp @@ -136,7 +136,7 @@ void LohrenzBrayClarkViscosityUpdate::computePhaseDiluteViscosity_HerningZippere real64 & phaseViscosity, arraySlice1d< real64, USD2 > const & dPhaseViscosity ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; GEOS_UNUSED_VAR( temperature ); real64 A = 0.0; @@ -175,7 +175,7 @@ void LohrenzBrayClarkViscosityUpdate::computePhaseDiluteViscosity_Wilke( integer real64 & phaseViscosity, arraySlice1d< real64, USD2 > const & dPhaseViscosity ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; GEOS_UNUSED_VAR( temperature ); // compute the "phi" interaction matrix (and its temperature derivatives) @@ -256,7 +256,7 @@ void LohrenzBrayClarkViscosityUpdate::computePhaseDiluteViscosity_Brokaw( intege real64 & phaseViscosity, arraySlice1d< real64, USD2 > const & dPhaseViscosity ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; GEOS_UNUSED_VAR( temperature ); // Compute the "phi" interaction matrix (constant, as only function of molecular weights) @@ -324,7 +324,7 @@ void LohrenzBrayClarkViscosityUpdate::computePhaseViscosity_LohrenzBrayClark( in real64 & phaseViscosity, arraySlice1d< real64, USD2 > const & dPhaseViscosity ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // Compute phase pseudo properties via Kay's mixing rule real64 phaseCriticalPressure = 0.0; real64 phaseCriticalTemperature = 0.0; diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/models/NegativeTwoPhaseFlashModel.hpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/models/NegativeTwoPhaseFlashModel.hpp index 32300637aea..ec5c1423f4d 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/models/NegativeTwoPhaseFlashModel.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/models/NegativeTwoPhaseFlashModel.hpp @@ -42,8 +42,8 @@ class NegativeTwoPhaseFlashModelUpdate final : public FunctionBaseUpdate { public: - using PhaseProp = MultiFluidVar< real64, 3, multifluid::LAYOUT_PHASE, multifluid::LAYOUT_PHASE_DC >; - using PhaseComp = MultiFluidVar< real64, 4, multifluid::LAYOUT_PHASE_COMP, multifluid::LAYOUT_PHASE_COMP_DC >; + using PhaseProp = MultiFluidVar< real64, 3, constitutive::multifluid::LAYOUT_PHASE, constitutive::multifluid::LAYOUT_PHASE_DC >; + using PhaseComp = MultiFluidVar< real64, 4, constitutive::multifluid::LAYOUT_PHASE_COMP, constitutive::multifluid::LAYOUT_PHASE_COMP_DC >; NegativeTwoPhaseFlashModelUpdate( integer const numComponents, integer const liquidIndex, diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp index 5f8ff2f2597..4c36e18cdb1 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp @@ -32,8 +32,6 @@ namespace geos { -using namespace constitutive; - /** * @class ReactiveFluidDriver * @@ -114,7 +112,8 @@ class ReactiveFluidDriver : public TaskBase enum columnKeys { TIME, PRES, TEMP }; ///< Enumeration of "input" column keys for readability - static constexpr real64 m_baselineTol = MultiFluidConstants::baselineTolerance; ///< Comparison tolerance for baseline results + static constexpr real64 m_baselineTol = constitutive::MultiFluidConstants::baselineTolerance; ///< Comparison tolerance for baseline + ///< results }; } /* namespace geos */ diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveMultiFluid.hpp b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveMultiFluid.hpp index 4fd8f6c9fb3..35c629ef71d 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveMultiFluid.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveMultiFluid.hpp @@ -189,13 +189,13 @@ class ReactiveMultiFluid : public MultiFluidBase std::unique_ptr< chemicalReactions::KineticReactions > m_kineticReactions; - array2d< real64, multifluid::LAYOUT_FLUID > m_primarySpeciesConcentration; + array2d< real64, constitutive::multifluid::LAYOUT_FLUID > m_primarySpeciesConcentration; - array2d< real64, multifluid::LAYOUT_FLUID > m_secondarySpeciesConcentration; + array2d< real64, constitutive::multifluid::LAYOUT_FLUID > m_secondarySpeciesConcentration; - array2d< real64, multifluid::LAYOUT_FLUID > m_primarySpeciesTotalConcentration; + array2d< real64, constitutive::multifluid::LAYOUT_FLUID > m_primarySpeciesTotalConcentration; - array2d< real64, multifluid::LAYOUT_FLUID > m_kineticReactionRates; + array2d< real64, constitutive::multifluid::LAYOUT_FLUID > m_kineticReactionRates; }; inline void diff --git a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyBakerRelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyBakerRelativePermeability.hpp index 584dffca25a..210a1f8b9e8 100644 --- a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyBakerRelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyBakerRelativePermeability.hpp @@ -40,9 +40,9 @@ class BrooksCoreyBakerRelativePermeabilityUpdate final : public RelativePermeabi real64 const volFracScale, arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : RelativePermeabilityBaseUpdate( phaseTypes, phaseOrder, phaseRelPerm, @@ -58,9 +58,9 @@ class BrooksCoreyBakerRelativePermeabilityUpdate final : public RelativePermeabi GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -164,9 +164,9 @@ GEOS_HOST_DEVICE inline void BrooksCoreyBakerRelativePermeabilityUpdate:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyRelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyRelativePermeability.hpp index 38908ea028a..f1b382deeeb 100644 --- a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyRelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyRelativePermeability.hpp @@ -37,9 +37,9 @@ class BrooksCoreyRelativePermeabilityUpdate final : public RelativePermeabilityB real64 const volFracScale, arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : RelativePermeabilityBaseUpdate( phaseTypes, phaseOrder, phaseRelPerm, @@ -53,9 +53,9 @@ class BrooksCoreyRelativePermeabilityUpdate final : public RelativePermeabilityB GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -125,9 +125,9 @@ GEOS_HOST_DEVICE inline void BrooksCoreyRelativePermeabilityUpdate:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyStone2RelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyStone2RelativePermeability.hpp index a73d7894d54..6f60e69fcbe 100644 --- a/src/coreComponents/constitutive/relativePermeability/BrooksCoreyStone2RelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/BrooksCoreyStone2RelativePermeability.hpp @@ -40,9 +40,9 @@ class BrooksCoreyStone2RelativePermeabilityUpdate final : public RelativePermeab real64 const volFracScale, arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : RelativePermeabilityBaseUpdate( phaseTypes, phaseOrder, phaseRelPerm, @@ -58,9 +58,9 @@ class BrooksCoreyStone2RelativePermeabilityUpdate final : public RelativePermeab GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -162,9 +162,9 @@ GEOS_HOST_DEVICE inline void BrooksCoreyStone2RelativePermeabilityUpdate:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityBase.hpp b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityBase.hpp index 00f8f9a5be1..86bf7c44e58 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityBase.hpp +++ b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityBase.hpp @@ -58,7 +58,7 @@ class RelativePermeabilityBaseUpdate */ GEOS_HOST_DEVICE - arrayView3d< real64 const, relperm::USD_RELPERM > relperm() const + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > relperm() const { return m_phaseRelPerm; } /** @@ -87,9 +87,9 @@ class RelativePermeabilityBaseUpdate RelativePermeabilityBaseUpdate( arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : m_phaseTypes( phaseTypes ), m_phaseOrder( phaseOrder ), m_phaseRelPerm( phaseRelPerm ), @@ -99,10 +99,10 @@ class RelativePermeabilityBaseUpdate arrayView1d< integer const > m_phaseTypes; arrayView1d< integer const > m_phaseOrder; - arrayView3d< real64, relperm::USD_RELPERM > m_phaseRelPerm; - arrayView4d< real64, relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; + arrayView3d< real64, constitutive::relperm::USD_RELPERM > m_phaseRelPerm; + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; - arrayView3d< real64, relperm::USD_RELPERM > m_phaseTrappedVolFrac; + arrayView3d< real64, constitutive::relperm::USD_RELPERM > m_phaseTrappedVolFrac; private: GEOS_HOST_DEVICE @@ -157,10 +157,10 @@ class RelativePermeabilityBase : public ConstitutiveBase arrayView1d< string const > phaseNames() const { return m_phaseNames; } - arrayView3d< real64 const, relperm::USD_RELPERM > phaseTrappedVolFraction() const { return m_phaseTrappedVolFrac; } + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > phaseTrappedVolFraction() const { return m_phaseTrappedVolFrac; } - arrayView3d< real64 const, relperm::USD_RELPERM > phaseRelPerm() const { return m_phaseRelPerm; } - arrayView4d< real64 const, relperm::USD_RELPERM_DS > dPhaseRelPerm_dPhaseVolFraction() const { return m_dPhaseRelPerm_dPhaseVolFrac; } + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > phaseRelPerm() const { return m_phaseRelPerm; } + arrayView4d< real64 const, constitutive::relperm::USD_RELPERM_DS > dPhaseRelPerm_dPhaseVolFraction() const { return m_dPhaseRelPerm_dPhaseVolFrac; } arrayView1d< integer const > getPhaseOrder() const { return m_phaseOrder; } virtual arrayView1d< real64 const > getPhaseMinVolumeFraction() const = 0; @@ -213,10 +213,10 @@ class RelativePermeabilityBase : public ConstitutiveBase protected: // output quantities - array3d< real64, relperm::LAYOUT_RELPERM > m_phaseRelPerm; - array3d< real64, relperm::LAYOUT_RELPERM > m_phaseRelPerm_n; - array4d< real64, relperm::LAYOUT_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; - array3d< real64, relperm::LAYOUT_RELPERM > m_phaseTrappedVolFrac; + array3d< real64, constitutive::relperm::LAYOUT_RELPERM > m_phaseRelPerm; + array3d< real64, constitutive::relperm::LAYOUT_RELPERM > m_phaseRelPerm_n; + array4d< real64, constitutive::relperm::LAYOUT_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; + array3d< real64, constitutive::relperm::LAYOUT_RELPERM > m_phaseTrappedVolFrac; }; diff --git a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityInterpolators.hpp b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityInterpolators.hpp index 2b91a498afb..0b4f49bb9f1 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityInterpolators.hpp +++ b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilityInterpolators.hpp @@ -60,7 +60,7 @@ struct Baker real64 const & goRelPerm, real64 const & dGoRelPerm_dOilVolFrac, real64 & threePhaseRelPerm, - arraySlice1d< real64, relperm::USD_RELPERM_DS - 3 > const & dThreePhaseRelPerm_dVolFrac ) + arraySlice1d< real64, constitutive::relperm::USD_RELPERM_DS - 3 > const & dThreePhaseRelPerm_dVolFrac ) { using PT = RelativePermeabilityBase::PhaseType; integer const ipWater = phaseOrder[PT::WATER]; @@ -148,7 +148,7 @@ struct Stone2 real64 const & gRelPerm, real64 const & dGRelPerm_dGasVolFrac, real64 & threePhaseRelPerm, - arraySlice1d< real64, relperm::USD_RELPERM_DS - 3 > const & dThreePhaseRelPerm_dVolFrac ) + arraySlice1d< real64, constitutive::relperm::USD_RELPERM_DS - 3 > const & dThreePhaseRelPerm_dVolFrac ) { using PT = RelativePermeabilityBase::PhaseType; diff --git a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilitySelector.hpp b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilitySelector.hpp index 4f4f1622661..6329538cda5 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelativePermeabilitySelector.hpp +++ b/src/coreComponents/constitutive/relativePermeability/RelativePermeabilitySelector.hpp @@ -51,7 +51,7 @@ void constitutiveUpdatePassThru( RelativePermeabilityBase const & relPerm, BrooksCoreyBakerRelativePermeability, BrooksCoreyStone2RelativePermeability, TableRelativePermeability, - TableRelativePermeabilityHysteresis, + constitutive::TableRelativePermeabilityHysteresis, VanGenuchtenBakerRelativePermeability, VanGenuchtenStone2RelativePermeability >::execute( relPerm, std::forward< LAMBDA >( lambda ) ); } @@ -64,7 +64,7 @@ void constitutiveUpdatePassThru( RelativePermeabilityBase & relPerm, BrooksCoreyBakerRelativePermeability, BrooksCoreyStone2RelativePermeability, TableRelativePermeability, - TableRelativePermeabilityHysteresis, + constitutive::TableRelativePermeabilityHysteresis, VanGenuchtenBakerRelativePermeability, VanGenuchtenStone2RelativePermeability >::execute( relPerm, std::forward< LAMBDA >( lambda ) ); } diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp b/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp index a6fe4f06212..f361beaf00c 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp +++ b/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp @@ -24,11 +24,10 @@ namespace geos { -using namespace constitutive; - //specific to Hysteresis template< typename RELPERM_TYPE > -std::enable_if_t< std::is_same< TableRelativePermeabilityHysteresis, RELPERM_TYPE >::value, void > +std::enable_if_t< std::is_same< constitutive::TableRelativePermeabilityHysteresis, + RELPERM_TYPE >::value, void > RelpermDriver::runTest( RELPERM_TYPE & relperm, const arrayView2d< real64 > & table ) { @@ -37,7 +36,7 @@ RelpermDriver::runTest( RELPERM_TYPE & relperm, // create kernel wrapper - typename TableRelativePermeabilityHysteresis::KernelWrapper const kernelWrapper = relperm.createKernelWrapper(); + typename constitutive::TableRelativePermeabilityHysteresis::KernelWrapper const kernelWrapper = relperm.createKernelWrapper(); // set saturation to user specified feed // it is more convenient to provide input in molar, so perform molar to mass conversion here @@ -91,15 +90,15 @@ RelpermDriver::runTest( RELPERM_TYPE & relperm, arrayView2d< real64 const, compflow::USD_PHASE > const saturation = saturationValues.toViewConst(); - auto const & phaseHasHysteresis = relperm.template getReference< array1d< integer > >( TableRelativePermeabilityHysteresis::viewKeyStruct::phaseHasHysteresisString()); + auto const & phaseHasHysteresis = relperm.template getReference< array1d< integer > >( constitutive::TableRelativePermeabilityHysteresis::viewKeyStruct::phaseHasHysteresisString()); arrayView2d< real64, compflow::USD_PHASE > phaseMaxHistoricalVolFraction = relperm.template getField< fields::relperm::phaseMaxHistoricalVolFraction >().reference(); arrayView2d< real64, compflow::USD_PHASE > phaseMinHistoricalVolFraction = relperm.template getField< fields::relperm::phaseMinHistoricalVolFraction >().reference(); arrayView1d< real64 > const drainagePhaseMinVolFraction = relperm.template getReference< array1d< real64 > >( - TableRelativePermeabilityHysteresis::viewKeyStruct::drainagePhaseMinVolumeFractionString()); + constitutive::TableRelativePermeabilityHysteresis::viewKeyStruct::drainagePhaseMinVolumeFractionString()); arrayView1d< real64 > const drainagePhaseMaxVolFraction = relperm.template getReference< array1d< real64 > >( - TableRelativePermeabilityHysteresis::viewKeyStruct::drainagePhaseMaxVolumeFractionString()); + constitutive::TableRelativePermeabilityHysteresis::viewKeyStruct::drainagePhaseMaxVolumeFractionString()); //setting for drainage { @@ -165,7 +164,7 @@ RelpermDriver::runTest( RELPERM_TYPE & relperm, } template< typename RELPERM_TYPE > -std::enable_if_t< !std::is_same< TableRelativePermeabilityHysteresis, RELPERM_TYPE >::value, void > +std::enable_if_t< !std::is_same< constitutive::TableRelativePermeabilityHysteresis, RELPERM_TYPE >::value, void > RelpermDriver::runTest( RELPERM_TYPE & relperm, const arrayView2d< real64 > & table ) { diff --git a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeability.hpp index 81ebbe2d5a0..7d7be256a4a 100644 --- a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeability.hpp @@ -73,31 +73,31 @@ class TableRelativePermeability : public RelativePermeabilityBase arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, ThreePhaseInterpolator const & threePhaseInterpolator, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ); + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ); GEOS_HOST_DEVICE void computeTwoPhase( integer const ipWetting, integer const ipNonWetting, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE void computeThreePhase( integer const ipWetting, integer const ipInter, integer const ipNonWetting, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -190,8 +190,8 @@ TableRelativePermeability::KernelWrapper:: computeTwoPhase( integer const ipWetting, integer const ipNonWetting, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { using TPT = TableRelativePermeability::TwoPhasePairPhaseType; @@ -216,8 +216,8 @@ TableRelativePermeability::KernelWrapper:: integer const ipInter, integer const ipNonWetting, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { real64 interRelPerm_wi = 0; // oil rel perm using two-phase gas-oil data real64 dInterRelPerm_wi_dInterVolFrac = 0; // derivative w.r.t to So @@ -295,9 +295,9 @@ GEOS_HOST_DEVICE inline void TableRelativePermeability::KernelWrapper:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.hpp b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.hpp index 9b50ca2fdf4..97a50d598b9 100644 --- a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.hpp +++ b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.hpp @@ -135,9 +135,9 @@ class TableRelativePermeabilityHysteresis : public RelativePermeabilityBase real64 const & waterOilRelPermMaxValue, arrayView2d< real64 const, compflow::USD_PHASE > const & phaseMinHistoricalVolFraction, arrayView2d< real64 const, compflow::USD_PHASE > const & phaseMaxHistoricalVolFraction, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac ); + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac ); /** * @brief Function updating the relperm (and derivative) for a phase using the drainage table @@ -256,10 +256,10 @@ class TableRelativePermeabilityHysteresis : public RelativePermeabilityBase arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, arraySlice2d< real64, - relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; /** * @brief Function updating all the phase relperms (and derivatives) for three-phase flow @@ -281,10 +281,10 @@ class TableRelativePermeabilityHysteresis : public RelativePermeabilityBase arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, arraySlice2d< real64, - relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; /** * @brief Main function updating all the phase relperms (and derivatives) @@ -298,9 +298,9 @@ class TableRelativePermeabilityHysteresis : public RelativePermeabilityBase void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -780,12 +780,12 @@ TableRelativePermeabilityHysteresis::KernelWrapper:: arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { - using TPT = TableRelativePermeabilityHysteresis::TwoPhasePairPhaseType; - using IPT = TableRelativePermeabilityHysteresis::ImbibitionPhasePairPhaseType; + using TPT = constitutive::TableRelativePermeabilityHysteresis::TwoPhasePairPhaseType; + using IPT = constitutive::TableRelativePermeabilityHysteresis::ImbibitionPhasePairPhaseType; // ---------- wetting rel perm if( !m_phaseHasHysteresis[IPT::WETTING] || @@ -870,17 +870,17 @@ TableRelativePermeabilityHysteresis::KernelWrapper:: arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { real64 interRelPerm_wi = 0; // oil rel perm using two-phase gas-oil data real64 dInterRelPerm_wi_dInterVolFrac = 0; // derivative w.r.t to So real64 interRelPerm_nwi = 0; // oil rel perm using two-phase gas-oil data real64 dInterRelPerm_nwi_dInterVolFrac = 0; // derivative w.r.t to So - using TPT = TableRelativePermeabilityHysteresis::ThreePhasePairPhaseType; - using IPT = TableRelativePermeabilityHysteresis::ImbibitionPhasePairPhaseType; + using TPT = constitutive::TableRelativePermeabilityHysteresis::ThreePhasePairPhaseType; + using IPT = constitutive::TableRelativePermeabilityHysteresis::ImbibitionPhasePairPhaseType; // 1) Wetting and intermediate phase relative permeabilities using two-phase wetting-intermediate data @@ -1013,9 +1013,9 @@ TableRelativePermeabilityHysteresis::KernelWrapper:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMaxHistoricalVolFraction, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseMinHistoricalVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ) { val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/VanGenuchtenBakerRelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/VanGenuchtenBakerRelativePermeability.hpp index 2ac9e4ce0b6..18c30499a01 100644 --- a/src/coreComponents/constitutive/relativePermeability/VanGenuchtenBakerRelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/VanGenuchtenBakerRelativePermeability.hpp @@ -40,9 +40,9 @@ class VanGenuchtenBakerRelativePermeabilityUpdate final : public RelativePermeab real64 const volFracScale, arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : RelativePermeabilityBaseUpdate( phaseTypes, phaseOrder, phaseRelPerm, @@ -58,9 +58,9 @@ class VanGenuchtenBakerRelativePermeabilityUpdate final : public RelativePermeab GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -162,9 +162,9 @@ GEOS_HOST_DEVICE inline void VanGenuchtenBakerRelativePermeabilityUpdate:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/relativePermeability/VanGenuchtenStone2RelativePermeability.hpp b/src/coreComponents/constitutive/relativePermeability/VanGenuchtenStone2RelativePermeability.hpp index 2753175bfd7..46a95e5b212 100644 --- a/src/coreComponents/constitutive/relativePermeability/VanGenuchtenStone2RelativePermeability.hpp +++ b/src/coreComponents/constitutive/relativePermeability/VanGenuchtenStone2RelativePermeability.hpp @@ -40,9 +40,9 @@ class VanGenuchtenStone2RelativePermeabilityUpdate final : public RelativePermea real64 const volFracScale, arrayView1d< integer const > const & phaseTypes, arrayView1d< integer const > const & phaseOrder, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64, relperm::USD_RELPERM > const & phaseTrappedVolFrac ) + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac ) : RelativePermeabilityBaseUpdate( phaseTypes, phaseOrder, phaseRelPerm, @@ -58,9 +58,9 @@ class VanGenuchtenStone2RelativePermeabilityUpdate final : public RelativePermea GEOS_HOST_DEVICE void compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const; GEOS_HOST_DEVICE virtual void update( localIndex const k, @@ -163,9 +163,9 @@ GEOS_HOST_DEVICE inline void VanGenuchtenStone2RelativePermeabilityUpdate:: compute( arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFraction, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, - arraySlice1d< real64, relperm::USD_RELPERM - 2 > const & phaseRelPerm, - arraySlice2d< real64, relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseTrappedVolFrac, + arraySlice1d< real64, constitutive::relperm::USD_RELPERM - 2 > const & phaseRelPerm, + arraySlice2d< real64, constitutive::relperm::USD_RELPERM_DS - 2 > const & dPhaseRelPerm_dPhaseVolFrac ) const { LvArray::forValuesInSlice( dPhaseRelPerm_dPhaseVolFrac, []( real64 & val ){ val = 0.0; } ); diff --git a/src/coreComponents/constitutive/solid/DamageSpectral.hpp b/src/coreComponents/constitutive/solid/DamageSpectral.hpp index 10439797fed..1bd6c35d30e 100644 --- a/src/coreComponents/constitutive/solid/DamageSpectral.hpp +++ b/src/coreComponents/constitutive/solid/DamageSpectral.hpp @@ -29,8 +29,6 @@ #define QUADRATIC_DISSIPATION 0 -using namespace LvArray; - namespace geos { namespace constitutive diff --git a/src/coreComponents/constitutive/solid/TriaxialDriver.hpp b/src/coreComponents/constitutive/solid/TriaxialDriver.hpp index 73e4957a13a..4ebe6251dbd 100644 --- a/src/coreComponents/constitutive/solid/TriaxialDriver.hpp +++ b/src/coreComponents/constitutive/solid/TriaxialDriver.hpp @@ -32,8 +32,6 @@ namespace geos { -using namespace constitutive; - /** * @class TriaxialDriver * diff --git a/src/coreComponents/fieldSpecification/AquiferBoundaryCondition.hpp b/src/coreComponents/fieldSpecification/AquiferBoundaryCondition.hpp index 0e7a21f9603..ea0186e7082 100644 --- a/src/coreComponents/fieldSpecification/AquiferBoundaryCondition.hpp +++ b/src/coreComponents/fieldSpecification/AquiferBoundaryCondition.hpp @@ -118,7 +118,7 @@ class AquiferBoundaryCondition : public FieldSpecificationBase }; - /// @copydoc FieldSpecificationBase(string const &, Group *) + /// @copydoc FieldSpecificationBase(string const &, dataRepository::Group *) AquiferBoundaryCondition( string const & name, Group * parent ); /// deleted default constructor diff --git a/src/coreComponents/fieldSpecification/EquilibriumInitialCondition.hpp b/src/coreComponents/fieldSpecification/EquilibriumInitialCondition.hpp index f9e53715558..d91baca73ae 100644 --- a/src/coreComponents/fieldSpecification/EquilibriumInitialCondition.hpp +++ b/src/coreComponents/fieldSpecification/EquilibriumInitialCondition.hpp @@ -34,7 +34,7 @@ class EquilibriumInitialCondition : public FieldSpecificationBase { public: - /// @copydoc FieldSpecificationBase(string const &, Group *) + /// @copydoc FieldSpecificationBase(string const &, dataRepository::Group *) EquilibriumInitialCondition( string const & name, Group * parent ); /// deleted default constructor diff --git a/src/coreComponents/fieldSpecification/TractionBoundaryCondition.hpp b/src/coreComponents/fieldSpecification/TractionBoundaryCondition.hpp index e1ba3890d7c..605b9666c5c 100644 --- a/src/coreComponents/fieldSpecification/TractionBoundaryCondition.hpp +++ b/src/coreComponents/fieldSpecification/TractionBoundaryCondition.hpp @@ -36,7 +36,7 @@ class TableFunction; class TractionBoundaryCondition : public FieldSpecificationBase { public: - /// @copydoc FieldSpecificationBase(string const &, Group *) + /// @copydoc FieldSpecificationBase(string const &, dataRepository::Group *) TractionBoundaryCondition( string const & name, Group * parent ); /// deleted default constructor diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index a99528b0057..cc913d66d56 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -23,6 +23,8 @@ namespace geos { +using namespace dataRepository; + TimeHistoryOutput::TimeHistoryOutput( string const & name, Group * const parent ): OutputBase( name, parent ), diff --git a/src/coreComponents/fileIO/timeHistory/HistoryCollection.hpp b/src/coreComponents/fileIO/timeHistory/HistoryCollection.hpp index 67264b16051..1de883c9176 100644 --- a/src/coreComponents/fileIO/timeHistory/HistoryCollection.hpp +++ b/src/coreComponents/fileIO/timeHistory/HistoryCollection.hpp @@ -26,8 +26,6 @@ namespace geos { -using namespace dataRepository; - /** * @class HistoryCollection * diff --git a/src/coreComponents/fileIO/timeHistory/PackCollection.cpp b/src/coreComponents/fileIO/timeHistory/PackCollection.cpp index 14b06f61a0b..383a3d223a0 100644 --- a/src/coreComponents/fileIO/timeHistory/PackCollection.cpp +++ b/src/coreComponents/fileIO/timeHistory/PackCollection.cpp @@ -17,6 +17,9 @@ namespace geos { + +using namespace dataRepository; + PackCollection::PackCollection ( string const & name, Group * parent ) : HistoryCollectionBase( name, parent ) , m_setsIndices( ) diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp index b28cbdd405b..2392a89874b 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp @@ -46,20 +46,20 @@ ExternalMeshGeneratorBase::ExternalMeshGeneratorBase( string const & name, setInputFlag( InputFlags::OPTIONAL ). setDescription( "Volumic fields to be imported from the external mesh file" ); - registerWrapper( viewKeyStruct::volumicFieldsInGEOSXString(), &m_volumicFieldsInGEOSX ). + registerWrapper( viewKeyStruct::volumicFieldsInGEOSString(), &m_volumicFieldsInGEOS ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Names of the volumic fields in GEOSX to import into" ); + setDescription( "Names of the volumic fields in GEOS to import into" ); registerWrapper( viewKeyStruct::surfacicFieldsToImportString(), &m_surfacicFieldsToImport ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Surfacic fields to be imported from the external mesh file" ); - registerWrapper( viewKeyStruct::surfacicFieldsInGEOSXString(), &m_surfacicFieldsInGEOSX ). + registerWrapper( viewKeyStruct::surfacicFieldsInGEOSString(), &m_surfacicFieldsInGEOS ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Names of the surfacic fields in GEOSX to import into" ); + setDescription( "Names of the surfacic fields in GEOS to import into" ); } void ExternalMeshGeneratorBase::postInputInitialization() @@ -73,8 +73,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() " must contain the same number of values.", InputError ); }; - checkSizes( m_volumicFieldsToImport, m_volumicFieldsInGEOSX, viewKeyStruct::volumicFieldsToImportString(), viewKeyStruct::volumicFieldsInGEOSXString() ); - checkSizes( m_surfacicFieldsToImport, m_surfacicFieldsInGEOSX, viewKeyStruct::surfacicFieldsToImportString(), viewKeyStruct::surfacicFieldsInGEOSXString() ); + checkSizes( m_volumicFieldsToImport, m_volumicFieldsInGEOS, viewKeyStruct::volumicFieldsToImportString(), viewKeyStruct::volumicFieldsInGEOSString() ); + checkSizes( m_surfacicFieldsToImport, m_surfacicFieldsInGEOS, viewKeyStruct::surfacicFieldsToImportString(), viewKeyStruct::surfacicFieldsInGEOSString() ); auto const checkDuplicates = [this]( arrayView1d< string const > v, string const & key ) { @@ -86,8 +86,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() "' already present in list of fields to import.", InputError ); }; - checkDuplicates( m_volumicFieldsInGEOSX, viewKeyStruct::volumicFieldsInGEOSXString() ); - checkDuplicates( m_surfacicFieldsInGEOSX, viewKeyStruct::surfacicFieldsInGEOSXString() ); + checkDuplicates( m_volumicFieldsInGEOS, viewKeyStruct::volumicFieldsInGEOSString() ); + checkDuplicates( m_surfacicFieldsInGEOS, viewKeyStruct::surfacicFieldsInGEOSString() ); // Building the fields mapping from the two separated input/output vectors. auto const buildMapping = [&]( arrayView1d< string const > from, @@ -101,8 +101,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() return mapping; }; - MeshGeneratorBase::m_volumicFields = buildMapping( m_volumicFieldsToImport.toViewConst(), m_volumicFieldsInGEOSX.toViewConst() ); - MeshGeneratorBase::m_surfacicFields = buildMapping( m_surfacicFieldsToImport.toViewConst(), m_surfacicFieldsInGEOSX.toViewConst() ); + MeshGeneratorBase::m_volumicFields = buildMapping( m_volumicFieldsToImport.toViewConst(), m_volumicFieldsInGEOS.toViewConst() ); + MeshGeneratorBase::m_surfacicFields = buildMapping( m_surfacicFieldsToImport.toViewConst(), m_surfacicFieldsInGEOS.toViewConst() ); } } // namespace geos diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp index fe918574461..84ccc63eb69 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp @@ -49,9 +49,9 @@ class ExternalMeshGeneratorBase : public MeshGeneratorBase constexpr static char const * scaleString() { return "scale"; } constexpr static char const * translateString() { return "translate"; } constexpr static char const * volumicFieldsToImportString() { return "fieldsToImport"; } - constexpr static char const * volumicFieldsInGEOSXString() { return "fieldNamesInGEOSX"; } + constexpr static char const * volumicFieldsInGEOSString() { return "fieldNamesInGEOS"; } constexpr static char const * surfacicFieldsToImportString() { return "surfacicFieldsToImport"; } - constexpr static char const * surfacicFieldsInGEOSXString() { return "surfacicFieldsInGEOSX"; } + constexpr static char const * surfacicFieldsInGEOSString() { return "surfacicFieldsInGEOS"; } }; /// @endcond @@ -66,17 +66,17 @@ class ExternalMeshGeneratorBase : public MeshGeneratorBase /// Scale factor that will be applied to the point coordinates (after translation) R1Tensor m_scale; - /// Names of the fields to be copied from an external reader into GEOSX data structure + /// Names of the fields to be copied from an external reader into GEOS data structure array1d< string > m_volumicFieldsToImport; - /// String array of the GEOSX user declared volumic fields - array1d< string > m_volumicFieldsInGEOSX; + /// String array of the GEOS user declared volumic fields + array1d< string > m_volumicFieldsInGEOS; - /// Names of the surfacic fields to be copied from an external reader into GEOSX data structure + /// Names of the surfacic fields to be copied from an external reader into GEOS data structure array1d< string > m_surfacicFieldsToImport; - /// String array of the GEOSX user declared surfacic fields - array1d< string > m_surfacicFieldsInGEOSX; + /// String array of the GEOS user declared surfacic fields + array1d< string > m_surfacicFieldsInGEOS; }; } // namespace geos diff --git a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp index b7f8fbf2e2b..2c802fb332d 100644 --- a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp @@ -114,22 +114,22 @@ class MeshGeneratorBase : public dataRepository::Group virtual void freeResources() {} /** - * @brief Get the name mapping between mesh volumic field names and internal GEOSX volumic field names. + * @brief Get the name mapping between mesh volumic field names and internal GEOS volumic field names. * @return The string to string mapping of field names. */ std::map< string, string > const & getVolumicFieldsMapping() const { return m_volumicFields; } /** - * @brief Get the name mapping between mesh surfacic field names and internal GEOSX surfacic field names. + * @brief Get the name mapping between mesh surfacic field names and internal GEOS surfacic field names. * @return The string to string mapping of field names. */ std::map< string, string > const & getSurfacicFieldsMapping() const { return m_surfacicFields; } protected: - /// Mapping from volumic field source to GEOSX field. + /// Mapping from volumic field source to GEOS field. std::map< string, string > m_volumicFields; - /// Mapping from surfacic field source to GEOSX field. + /// Mapping from surfacic field source to GEOS field. std::map< string, string > m_surfacicFields; private: diff --git a/src/coreComponents/mesh/generators/VTKUtilities.cpp b/src/coreComponents/mesh/generators/VTKUtilities.cpp index a2cfae5da17..ac36adf2c21 100644 --- a/src/coreComponents/mesh/generators/VTKUtilities.cpp +++ b/src/coreComponents/mesh/generators/VTKUtilities.cpp @@ -72,6 +72,7 @@ namespace geos { +using namespace dataRepository; namespace vtk { diff --git a/src/coreComponents/mesh/generators/VTKUtilities.hpp b/src/coreComponents/mesh/generators/VTKUtilities.hpp index fc05b8fb6ae..ecab1c26c5d 100644 --- a/src/coreComponents/mesh/generators/VTKUtilities.hpp +++ b/src/coreComponents/mesh/generators/VTKUtilities.hpp @@ -33,9 +33,6 @@ namespace geos { - -using namespace dataRepository; - namespace vtk { @@ -222,7 +219,7 @@ string buildCellBlockName( ElementType const type, int const regionId ); */ void importMaterialField( std::vector< vtkIdType > const & cellIds, vtkDataArray * vtkArray, - WrapperBase & wrapper ); + dataRepository::WrapperBase & wrapper ); /** * @brief Imports 1d and 2d arrays from @p vtkArray to @p wrapper, only for @p cellIds @@ -232,7 +229,7 @@ void importMaterialField( std::vector< vtkIdType > const & cellIds, */ void importRegularField( std::vector< vtkIdType > const & cellIds, vtkDataArray * vtkArray, - WrapperBase & wrapper ); + dataRepository::WrapperBase & wrapper ); /** * @brief Imports 1d and 2d arrays from @p vtkArray to @p wrapper, for all the elements/cells of the provided wrapper. @@ -240,7 +237,7 @@ void importRegularField( std::vector< vtkIdType > const & cellIds, * @param wrapper The destination. */ void importRegularField( vtkDataArray * vtkArray, - WrapperBase & wrapper ); + dataRepository::WrapperBase & wrapper ); } // namespace vtk diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsALMBubbleKernels.hpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsALMBubbleKernels.hpp index 3235bca00c6..9dc020a428a 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsALMBubbleKernels.hpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsALMBubbleKernels.hpp @@ -323,7 +323,7 @@ class ALMBubbleKernels : LvArray::tensorOps::Rij_eq_AikBkj< nBubbleUdof, nBubbleUdof, 6 >( Abb_gauss, matBD, strainBubbleMatrix ); // transp(B)DBb - tensorOps::transpose< nUdof, nBubbleUdof >( Aub_gauss, Abu_gauss ); + LvArray::tensorOps::transpose< nUdof, nBubbleUdof >( Aub_gauss, Abu_gauss ); // multiply by determinant and add to element matrix LvArray::tensorOps::scaledAdd< nBubbleUdof, nBubbleUdof >( stack.localAbb, Abb_gauss, -detJ ); diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp index d601ccdf50d..b04c2037384 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp @@ -25,7 +25,6 @@ namespace geos { -using namespace constitutive; class SolidMechanicsEmbeddedFractures : public ContactSolverBase { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.cpp index fe0b452865e..ca60225e582 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.cpp @@ -29,6 +29,7 @@ namespace geos { +using namespace constitutive; namespace compositionalMultiphaseHybridFVMKernels { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.hpp index b0a12568c7a..e043807a798 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVMKernels.hpp @@ -41,9 +41,6 @@ namespace geos namespace compositionalMultiphaseHybridFVMKernels { -using namespace constitutive; - - // struct to specify local and neighbor derivatives struct Pos { @@ -90,13 +87,13 @@ struct UpwindingHelper static void upwindViscousCoefficient( localIndex const (&localIds)[ 3 ], localIndex const (&neighborIds)[ 3 ], - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, ElementViewConst< arrayView1d< globalIndex const > > const & elemDofNumber, real64 const & oneSidedVolFlux, real64 ( &upwPhaseViscCoef )[ NP ][ NC ], @@ -134,15 +131,15 @@ struct UpwindingHelper upwindBuoyancyCoefficient( localIndex const (&localIds)[ 3 ], localIndex const (&neighborIds)[ 3 ], real64 const & transGravCoef, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseMassDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseMassDens, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, real64 ( &phaseGravTerm )[ NP ][ NP-1 ], real64 ( &dPhaseGravTerm_dPres )[ NP ][ NP-1 ][ 2 ], real64 ( &dPhaseGravTerm_dCompDens )[ NP ][ NP-1 ][ 2 ][ NC ], @@ -170,8 +167,8 @@ struct UpwindingHelper computePhaseGravTerm( localIndex const (&localIds)[ 3 ], localIndex const (&neighborIds)[ 3 ], real64 const & transGravCoef, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseMassDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseMassDens, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, real64 ( &phaseGravTerm )[ NP ][ NP-1 ], real64 ( &dPhaseGravTerm_dPres )[ NP ][ NP-1 ][ 2 ], @@ -286,8 +283,8 @@ struct AssemblerKernelHelper arraySlice1d< localIndex const > const & elemToFaces, real64 const & elemPres, real64 const & elemGravCoef, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & elemPhaseMassDens, - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const & dElemPhaseMassDens, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & elemPhaseMassDens, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const & dElemPhaseMassDens, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & elemPhaseMob, arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const & dElemPhaseMob, arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const & dElemCompFrac_dCompDens, @@ -337,15 +334,15 @@ struct AssemblerKernelHelper arraySlice1d< localIndex const > const & elemToFaces, real64 const & elemGravCoef, integer const useTotalMassEquation, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseMassDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseMassDens, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, ElementViewConst< arrayView1d< globalIndex const > > const & elemDofNumber, arraySlice2d< real64 const > const & transMatrixGrav, real64 const (&oneSidedVolFlux)[ NF ], @@ -525,15 +522,15 @@ struct AssemblerKernel real64 const & elemPres, real64 const & elemGravCoef, const integer useTotalMassEquation, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseMassDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseMassDens, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, ElementViewConst< arrayView1d< globalIndex const > > const & elemDofNumber, integer const elemGhostRank, globalIndex const rankOffset, @@ -566,7 +563,7 @@ struct FluxKernel fields::flow::dGlobalCompFraction_dGlobalCompDensity >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseDensity, fields::multifluid::dPhaseDensity, fields::multifluid::phaseMassDensity, @@ -629,12 +626,12 @@ struct FluxKernel ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseMob, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, ElementViewConst< arrayView1d< globalIndex const > > const & elemDofNumber, globalIndex const rankOffset, real64 const lengthTolerance, @@ -672,8 +669,8 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: * @param[in] relperm the relperm model */ PhaseMobilityKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) : Base(), m_phaseVolFrac( subRegion.getField< fields::flow::phaseVolumeFraction >() ), m_dPhaseVolFrac( subRegion.getField< fields::flow::dPhaseVolumeFraction >() ), @@ -697,13 +694,13 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: void compute( localIndex const ei, FUNC && phaseMobilityKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; - arraySlice1d< real64 const, relperm::USD_RELPERM - 2 > const phaseRelPerm = m_phaseRelPerm[ei][0]; - arraySlice2d< real64 const, relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; + arraySlice1d< real64 const, constitutive::relperm::USD_RELPERM - 2 > const phaseRelPerm = m_phaseRelPerm[ei][0]; + arraySlice2d< real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const dPhaseVolFrac = m_dPhaseVolFrac[ei]; arraySlice1d< real64, compflow::USD_PHASE - 1 > const phaseMob = m_phaseMob[ei]; @@ -778,12 +775,12 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: arrayView3d< real64 const, compflow::USD_COMP_DC > m_dCompFrac_dCompDens; /// Views on the phase viscosities - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseVisc; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseVisc; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseVisc; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseVisc; /// Views on the phase relative permeabilities - arrayView3d< real64 const, relperm::USD_RELPERM > m_phaseRelPerm; - arrayView4d< real64 const, relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > m_phaseRelPerm; + arrayView4d< real64 const, constitutive::relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; // outputs @@ -814,8 +811,8 @@ class PhaseMobilityKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) { if( numPhase == 2 ) { @@ -976,7 +973,7 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 1 > ElementViewConst< arrayView2d< real64 const > > const m_porosity_n; /// View on total mass/molar density at the previous converged time step - ElementViewConst< arrayView2d< real64 const, multifluid::USD_FLUID > > const m_totalDens_n; + ElementViewConst< arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > > const m_totalDens_n; }; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/DissipationCompositionalMultiphaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/DissipationCompositionalMultiphaseFVMKernels.hpp index 10b42f0e79a..3453ec47f30 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/DissipationCompositionalMultiphaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/DissipationCompositionalMultiphaseFVMKernels.hpp @@ -30,8 +30,6 @@ namespace geos namespace dissipationCompositionalMultiphaseFVMKernels { -using namespace constitutive; - static constexpr integer newtonContinuationCutoffIteration = 5; static constexpr real64 initialDirectionalCoef = 100; static constexpr real64 multiplierDirectionalCoef = 1000; @@ -85,9 +83,9 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne fields::elementVolume >; using PorosityAccessors = - StencilMaterialAccessors< PorosityBase, fields::porosity::porosity_n >; + StencilMaterialAccessors< constitutive::PorosityBase, fields::porosity::porosity_n >; - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; /** * @brief Constructor for the kernel interface diff --git a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseBaseKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseBaseKernels.hpp index 108e5a9261a..02b8c7f6bf7 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseBaseKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseBaseKernels.hpp @@ -41,8 +41,6 @@ namespace geos namespace isothermalCompositionalMultiphaseBaseKernels { -using namespace constitutive; - static constexpr real64 minDensForDivision = 1e-10; enum class ElementBasedAssemblyKernelFlags @@ -273,7 +271,7 @@ class PhaseVolumeFractionKernel : public PropertyKernelBase< NUM_COMP > * @param[in] fluid the fluid model */ PhaseVolumeFractionKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) : Base(), m_phaseVolFrac( subRegion.getField< fields::flow::phaseVolumeFraction >() ), m_dPhaseVolFrac( subRegion.getField< fields::flow::dPhaseVolumeFraction >() ), @@ -296,14 +294,14 @@ class PhaseVolumeFractionKernel : public PropertyKernelBase< NUM_COMP > real64 compute( localIndex const ei, FUNC && phaseVolFractionKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; arraySlice1d< real64 const, compflow::USD_COMP - 1 > const compDens = m_compDens[ei]; arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseFrac = m_phaseFrac[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseFrac = m_dPhaseFrac[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseFrac = m_phaseFrac[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseFrac = m_dPhaseFrac[ei][0]; arraySlice1d< real64, compflow::USD_PHASE - 1 > const phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64, compflow::USD_PHASE_DC - 1 > const dPhaseVolFrac = m_dPhaseVolFrac[ei]; @@ -414,12 +412,12 @@ class PhaseVolumeFractionKernel : public PropertyKernelBase< NUM_COMP > arrayView3d< real64 const, compflow::USD_COMP_DC > m_dCompFrac_dCompDens; /// Views on phase fractions - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseFrac; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseFrac; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseFrac; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseFrac; /// Views on phase densities - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseDens; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseDens; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseDens; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseDens; }; @@ -443,7 +441,7 @@ class PhaseVolumeFractionKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) { real64 maxDeltaPhaseVolFrac = 0.0; if( numPhase == 2 ) @@ -578,8 +576,8 @@ class ElementBasedAssemblyKernel globalIndex const rankOffset, string const dofKey, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs, BitFlags< ElementBasedAssemblyKernelFlags > const kernelFlags ) @@ -702,7 +700,7 @@ class ElementBasedAssemblyKernel } else { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // construct the slices for variables accessed multiple times arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; @@ -710,11 +708,11 @@ class ElementBasedAssemblyKernel arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > dPhaseVolFrac = m_dPhaseVolFrac[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseDens = m_phaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseDens = m_phaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > phaseCompFrac = m_phaseCompFrac[ei][0]; - arraySlice3d< real64 const, multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac = m_dPhaseCompFrac[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > phaseCompFrac = m_phaseCompFrac[ei][0]; + arraySlice3d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac = m_dPhaseCompFrac[ei][0]; // temporary work arrays real64 dPhaseAmount_dC[numComp]{}; @@ -791,7 +789,7 @@ class ElementBasedAssemblyKernel StackVariables & stack, FUNC && phaseVolFractionSumKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > dPhaseVolFrac = m_dPhaseVolFrac[ei]; @@ -916,12 +914,12 @@ class ElementBasedAssemblyKernel arrayView3d< real64 const, compflow::USD_PHASE_DC > const m_dPhaseVolFrac; /// Views on the phase densities - arrayView3d< real64 const, multifluid::USD_PHASE > const m_phaseDens; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > const m_dPhaseDens; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const m_phaseDens; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > const m_dPhaseDens; /// Views on the phase component fraction - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > const m_phaseCompFrac; - arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > const m_dPhaseCompFrac; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > const m_phaseCompFrac; + arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > const m_dPhaseCompFrac; // View on component densities arrayView2d< real64 const, compflow::USD_COMP > m_compDens; @@ -966,8 +964,8 @@ class ElementBasedAssemblyKernelFactory integer const useSimpleAccumulation, string const dofKey, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) { @@ -1805,8 +1803,8 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 1 > arrayView1d< localIndex const > const & ghostRank, integer const numComponents, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, real64 const minNormalizer ) : Base( rankOffset, localResidual, @@ -1884,7 +1882,7 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 1 > arrayView2d< real64 const > const m_porosity_n; /// View on total mass/molar density at the previous converged time step - arrayView2d< real64 const, multifluid::USD_FLUID > const m_totalDens_n; + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > const m_totalDens_n; }; @@ -1917,8 +1915,8 @@ class ResidualNormKernelFactory string const dofKey, arrayView1d< real64 const > const & localResidual, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, real64 const minNormalizer, real64 (& residualNorm)[1], real64 (& residualNormalizer)[1] ) @@ -1969,11 +1967,11 @@ struct StatisticsKernel arrayView1d< real64 const > const & temp, arrayView1d< real64 const > const & refPorosity, arrayView2d< real64 const > const & porosity, - arrayView3d< real64 const, multifluid::USD_PHASE > const & phaseDensity, - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > const & phaseCompFraction, + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const & phaseDensity, + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > const & phaseCompFraction, arrayView2d< real64 const, compflow::USD_PHASE > const & phaseVolFrac, - arrayView3d< real64 const, relperm::USD_RELPERM > const & phaseTrappedVolFrac, - arrayView3d< real64 const, relperm::USD_RELPERM > const & phaseRelperm, + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > const & phaseTrappedVolFrac, + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > const & phaseRelperm, real64 & minPres, real64 & avgPresNumerator, real64 & maxPres, @@ -2128,14 +2126,14 @@ struct HydrostaticPressureKernel { // fluid properties at this elevation StackArray< real64, 2, constitutive::MultiFluidBase::MAX_NUM_COMPONENTS, compflow::LAYOUT_COMP > compFrac( 1, numComps ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseFrac( 1, 1, numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseDens( 1, 1, numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseMassDens( 1, 1, numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseVisc( 1, 1, numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseEnthalpy( 1, 1, numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > phaseInternalEnergy( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseFrac( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseDens( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseMassDens( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseVisc( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseEnthalpy( 1, 1, numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > phaseInternalEnergy( 1, 1, numPhases ); StackArray< real64, 4, constitutive::MultiFluidBase::MAX_NUM_PHASES *constitutive::MultiFluidBase::MAX_NUM_COMPONENTS, - multifluid::LAYOUT_PHASE_COMP > phaseCompFrac( 1, 1, numPhases, numComps ); + constitutive::multifluid::LAYOUT_PHASE_COMP > phaseCompFrac( 1, 1, numPhases, numComps ); real64 totalDens = 0.0; bool isSinglePhaseFlow = true; @@ -2156,18 +2154,18 @@ struct HydrostaticPressureKernel // Step 3: compute the mass density at this elevation using the guess, and update pressure - MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, - pres0, - temp, - compFrac[0], - phaseFrac[0][0], - phaseDens[0][0], - phaseMassDens[0][0], - phaseVisc[0][0], - phaseEnthalpy[0][0], - phaseInternalEnergy[0][0], - phaseCompFrac[0][0], - totalDens ); + constitutive::MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, + pres0, + temp, + compFrac[0], + phaseFrac[0][0], + phaseDens[0][0], + phaseMassDens[0][0], + phaseVisc[0][0], + phaseEnthalpy[0][0], + phaseInternalEnergy[0][0], + phaseCompFrac[0][0], + totalDens ); pres1 = refPres - 0.5 * ( refPhaseMassDens[ipInit] + phaseMassDens[0][0][ipInit] ) * gravCoef; // Step 4: fixed-point iteration until convergence @@ -2202,18 +2200,18 @@ struct HydrostaticPressureKernel } // compute the mass density at this elevation using the previous pressure, and compute the new pressure - MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, - pres0, - temp, - compFrac[0], - phaseFrac[0][0], - phaseDens[0][0], - phaseMassDens[0][0], - phaseVisc[0][0], - phaseEnthalpy[0][0], - phaseInternalEnergy[0][0], - phaseCompFrac[0][0], - totalDens ); + constitutive::MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, + pres0, + temp, + compFrac[0], + phaseFrac[0][0], + phaseDens[0][0], + phaseMassDens[0][0], + phaseVisc[0][0], + phaseEnthalpy[0][0], + phaseInternalEnergy[0][0], + phaseCompFrac[0][0], + totalDens ); pres1 = refPres - 0.5 * ( refPhaseMassDens[ipInit] + phaseMassDens[0][0][ipInit] ) * gravCoef; } @@ -2265,13 +2263,13 @@ struct HydrostaticPressureKernel // datum fluid properties array2d< real64, compflow::LAYOUT_COMP > datumCompFrac( 1, numComps ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseFrac( 1, 1, numPhases ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseDens( 1, 1, numPhases ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseMassDens( 1, 1, numPhases ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseVisc( 1, 1, numPhases ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseEnthalpy( 1, 1, numPhases ); - array3d< real64, multifluid::LAYOUT_PHASE > datumPhaseInternalEnergy( 1, 1, numPhases ); - array4d< real64, multifluid::LAYOUT_PHASE_COMP > datumPhaseCompFrac( 1, 1, numPhases, numComps ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseFrac( 1, 1, numPhases ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseDens( 1, 1, numPhases ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseMassDens( 1, 1, numPhases ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseVisc( 1, 1, numPhases ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseEnthalpy( 1, 1, numPhases ); + array3d< real64, constitutive::multifluid::LAYOUT_PHASE > datumPhaseInternalEnergy( 1, 1, numPhases ); + array4d< real64, constitutive::multifluid::LAYOUT_PHASE_COMP > datumPhaseCompFrac( 1, 1, numPhases, numComps ); real64 datumTotalDens = 0.0; real64 const datumTemp = tempTableWrapper.compute( &datumElevation ); @@ -2279,18 +2277,18 @@ struct HydrostaticPressureKernel { datumCompFrac[0][ic] = compFracTableWrappers[ic].compute( &datumElevation ); } - MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, - datumPres, - datumTemp, - datumCompFrac[0], - datumPhaseFrac[0][0], - datumPhaseDens[0][0], - datumPhaseMassDens[0][0], - datumPhaseVisc[0][0], - datumPhaseEnthalpy[0][0], - datumPhaseInternalEnergy[0][0], - datumPhaseCompFrac[0][0], - datumTotalDens ); + constitutive::MultiFluidBase::KernelWrapper::computeValues( fluidWrapper, + datumPres, + datumTemp, + datumCompFrac[0], + datumPhaseFrac[0][0], + datumPhaseDens[0][0], + datumPhaseMassDens[0][0], + datumPhaseVisc[0][0], + datumPhaseEnthalpy[0][0], + datumPhaseInternalEnergy[0][0], + datumPhaseCompFrac[0][0], + datumTotalDens ); // Step 2: find the closest elevation to datumElevation diff --git a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.cpp b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.cpp index 53e0e77be7a..c26187ed8ae 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.cpp @@ -28,6 +28,7 @@ namespace geos { +using namespace constitutive; namespace isothermalCompositionalMultiphaseFVMKernels { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.hpp index e873db36651..43b6ca1c277 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.hpp @@ -56,8 +56,6 @@ namespace geos namespace isothermalCompositionalMultiphaseFVMKernels { -using namespace constitutive; - enum class FaceBasedAssemblyKernelFlags { /// Flag to specify whether capillary pressure is used or not @@ -101,8 +99,8 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: * @param[in] relperm the relperm model */ PhaseMobilityKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) : Base(), m_phaseVolFrac( subRegion.getField< fields::flow::phaseVolumeFraction >() ), m_dPhaseVolFrac( subRegion.getField< fields::flow::dPhaseVolumeFraction >() ), @@ -128,15 +126,15 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: void compute( localIndex const ei, FUNC && phaseMobilityKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; - arraySlice1d< real64 const, relperm::USD_RELPERM - 2 > const phaseRelPerm = m_phaseRelPerm[ei][0]; - arraySlice2d< real64 const, relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; + arraySlice1d< real64 const, constitutive::relperm::USD_RELPERM - 2 > const phaseRelPerm = m_phaseRelPerm[ei][0]; + arraySlice2d< real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const dPhaseVolFrac = m_dPhaseVolFrac[ei]; arraySlice1d< real64, compflow::USD_PHASE - 1 > const phaseMob = m_phaseMob[ei]; @@ -216,16 +214,16 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseBaseKernels: arrayView3d< real64 const, compflow::USD_COMP_DC > m_dCompFrac_dCompDens; /// Views on the phase densities - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseDens; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseDens; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseDens; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseDens; /// Views on the phase viscosities - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseVisc; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseVisc; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseVisc; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseVisc; /// Views on the phase relative permeabilities - arrayView3d< real64 const, relperm::USD_RELPERM > m_phaseRelPerm; - arrayView4d< real64 const, relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > m_phaseRelPerm; + arrayView4d< real64 const, constitutive::relperm::USD_RELPERM_DS > m_dPhaseRelPerm_dPhaseVolFrac; // outputs @@ -256,8 +254,8 @@ class PhaseMobilityKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) { if( numPhase == 2 ) { @@ -312,7 +310,7 @@ class FaceBasedAssemblyKernelBase fields::flow::phaseMobility, fields::flow::dPhaseMobility >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseDensity, fields::multifluid::dPhaseDensity, fields::multifluid::phaseMassDensity, @@ -321,12 +319,12 @@ class FaceBasedAssemblyKernelBase fields::multifluid::dPhaseCompFraction >; using CapPressureAccessors = - StencilMaterialAccessors< CapillaryPressureBase, + StencilMaterialAccessors< constitutive::CapillaryPressureBase, fields::cappres::phaseCapPressure, fields::cappres::dPhaseCapPressure_dPhaseVolFraction >; using PermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::dPerm_dPressure >; @@ -380,8 +378,8 @@ class FaceBasedAssemblyKernelBase ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const m_dPhaseVolFrac; /// Views on phase component fractions - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const m_phaseCompFrac; - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const m_dPhaseCompFrac; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac; + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const m_dPhaseCompFrac; // Residual and jacobian @@ -826,12 +824,12 @@ class FaceBasedAssemblyKernel : public FaceBasedAssemblyKernelBase ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const m_dPhaseMob; /// Views on phase mass densities - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const m_phaseMassDens; - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const m_dPhaseMassDens; + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseMassDens; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const m_dPhaseMassDens; /// Views on phase capillary pressure - ElementViewConst< arrayView3d< real64 const, cappres::USD_CAPPRES > > const m_phaseCapPressure; - ElementViewConst< arrayView4d< real64 const, cappres::USD_CAPPRES_DS > > const m_dPhaseCapPressure_dPhaseVolFrac; + ElementViewConst< arrayView3d< real64 const, constitutive::cappres::USD_CAPPRES > > const m_phaseCapPressure; + ElementViewConst< arrayView4d< real64 const, constitutive::cappres::USD_CAPPRES_DS > > const m_dPhaseCapPressure_dPhaseVolFrac; // Stencil information @@ -959,17 +957,17 @@ class DiffusionDispersionFaceBasedAssemblyKernel : public FaceBasedAssemblyKerne using AbstractBase::m_kernelFlags; using DiffusionAccessors = - StencilMaterialAccessors< DiffusionBase, + StencilMaterialAccessors< constitutive::DiffusionBase, fields::diffusion::diffusivity, fields::diffusion::dDiffusivity_dTemperature, fields::diffusion::phaseDiffusivityMultiplier >; using DispersionAccessors = - StencilMaterialAccessors< DispersionBase, + StencilMaterialAccessors< constitutive::DispersionBase, fields::dispersion::dispersivity >; using PorosityAccessors = - StencilMaterialAccessors< PorosityBase, + StencilMaterialAccessors< constitutive::PorosityBase, fields::porosity::referencePorosity >; /** @@ -1127,7 +1125,7 @@ class DiffusionDispersionFaceBasedAssemblyKernel : public FaceBasedAssemblyKerne StackVariables & stack, FUNC && diffusionFluxKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // first, compute the transmissibilities at this face m_stencilWrapper.computeWeights( iconn, @@ -1260,7 +1258,7 @@ class DiffusionDispersionFaceBasedAssemblyKernel : public FaceBasedAssemblyKerne StackVariables & stack, FUNC && dispersionFluxKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // first, compute the transmissibilities at this face // note that the dispersion tensor is lagged in iteration @@ -1389,7 +1387,7 @@ class DiffusionDispersionFaceBasedAssemblyKernel : public FaceBasedAssemblyKerne real64 (& dCompFracGrad_dP)[numFluxSupportPoints], real64 (& dCompFracGrad_dC)[numFluxSupportPoints][numComp] ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; real64 dCompFrac_dC[numComp]{}; @@ -1548,8 +1546,8 @@ class DiffusionDispersionFaceBasedAssemblyKernel : public FaceBasedAssemblyKerne ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const m_phaseVolFrac; /// Views on phase densities - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const m_phaseDens; - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const m_dPhaseDens; + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseDens; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const m_dPhaseDens; /// Views on diffusivity ElementViewConst< arrayView3d< real64 const > > const m_diffusivity; @@ -1831,7 +1829,7 @@ class DirichletFaceBasedAssemblyKernel : public FaceBasedAssemblyKernel< NUM_COM StackVariables & stack, FUNC && compFluxKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; using Order = BoundaryStencil::Order; localIndex const er = m_seri( iconn, Order::ELEM ); @@ -1852,28 +1850,28 @@ class DirichletFaceBasedAssemblyKernel : public FaceBasedAssemblyKernel< NUM_COM // This is needed to get the phase mass density and the phase comp fraction at the face // Because we approximate the face mobility using the total element mobility - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseFrac( 1, 1, m_numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseDens( 1, 1, m_numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseMassDens( 1, 1, m_numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseVisc( 1, 1, m_numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseEnthalpy( 1, 1, m_numPhases ); - StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, multifluid::LAYOUT_PHASE > facePhaseInternalEnergy( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseFrac( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseDens( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseMassDens( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseVisc( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseEnthalpy( 1, 1, m_numPhases ); + StackArray< real64, 3, constitutive::MultiFluidBase::MAX_NUM_PHASES, constitutive::multifluid::LAYOUT_PHASE > facePhaseInternalEnergy( 1, 1, m_numPhases ); StackArray< real64, 4, constitutive::MultiFluidBase::MAX_NUM_PHASES * NUM_COMP, - multifluid::LAYOUT_PHASE_COMP > facePhaseCompFrac( 1, 1, m_numPhases, NUM_COMP ); + constitutive::multifluid::LAYOUT_PHASE_COMP > facePhaseCompFrac( 1, 1, m_numPhases, NUM_COMP ); real64 faceTotalDens = 0.0; - MultiFluidBase::KernelWrapper::computeValues( m_fluidWrapper, - m_facePres[kf], - m_faceTemp[kf], - m_faceCompFrac[kf], - facePhaseFrac[0][0], - facePhaseDens[0][0], - facePhaseMassDens[0][0], - facePhaseVisc[0][0], - facePhaseEnthalpy[0][0], - facePhaseInternalEnergy[0][0], - facePhaseCompFrac[0][0], - faceTotalDens ); + constitutive::MultiFluidBase::KernelWrapper::computeValues( m_fluidWrapper, + m_facePres[kf], + m_faceTemp[kf], + m_faceCompFrac[kf], + facePhaseFrac[0][0], + facePhaseDens[0][0], + facePhaseMassDens[0][0], + facePhaseVisc[0][0], + facePhaseEnthalpy[0][0], + facePhaseInternalEnergy[0][0], + facePhaseCompFrac[0][0], + faceTotalDens ); // Step 3: loop over phases, compute and upwind phase flux and sum contributions to each component's flux @@ -1952,9 +1950,9 @@ class DirichletFaceBasedAssemblyKernel : public FaceBasedAssemblyKernel< NUM_COM } // slice some constitutive arrays to avoid too much indexing in component loop - arraySlice1d< real64 const, multifluid::USD_PHASE_COMP-3 > phaseCompFracSub = + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE_COMP-3 > phaseCompFracSub = m_phaseCompFrac[er][esr][ei][0][ip]; - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP_DC-3 > dPhaseCompFracSub = + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC-3 > dPhaseCompFracSub = m_dPhaseCompFrac[er][esr][ei][0][ip]; // compute component fluxes and derivatives using element composition @@ -2120,7 +2118,7 @@ class DirichletFaceBasedAssemblyKernelFactory FaceManager const & faceManager, ElementRegionManager const & elemManager, BoundaryStencilWrapper const & stencilWrapper, - MultiFluidBase & fluidBase, + constitutive::MultiFluidBase & fluidBase, real64 const dt, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) @@ -2185,20 +2183,20 @@ struct CFLFluxKernel fields::flow::componentOutflux >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseViscosity, fields::multifluid::phaseDensity, fields::multifluid::phaseMassDensity, fields::multifluid::phaseCompFraction >; using PermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::dPerm_dPressure >; using RelPermAccessors = - StencilMaterialAccessors< RelativePermeabilityBase, fields::relperm::phaseRelPerm >; + StencilMaterialAccessors< constitutive::RelativePermeabilityBase, fields::relperm::phaseRelPerm >; template< integer NC, localIndex NUM_ELEMS, localIndex maxStencilSize > GEOS_HOST_DEVICE @@ -2214,11 +2212,11 @@ struct CFLFluxKernel ElementViewConst< arrayView1d< real64 const > > const & pres, ElementViewConst< arrayView1d< real64 const > > const & gravCoef, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseVolFrac, - ElementViewConst< arrayView3d< real64 const, relperm::USD_RELPERM > > const & phaseRelPerm, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseVisc, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > > const & phaseRelPerm, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseVisc, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, ElementView< arrayView2d< real64, compflow::USD_PHASE > > const & phaseOutflux, ElementView< arrayView2d< real64, compflow::USD_COMP > > const & compOutflux ); @@ -2232,11 +2230,11 @@ struct CFLFluxKernel ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseVolFrac, ElementViewConst< arrayView3d< real64 const > > const & permeability, ElementViewConst< arrayView3d< real64 const > > const & dPerm_dPres, - ElementViewConst< arrayView3d< real64 const, relperm::USD_RELPERM > > const & phaseRelPerm, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseVisc, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseMassDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > > const & phaseRelPerm, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseVisc, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseMassDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, ElementView< arrayView2d< real64, compflow::USD_PHASE > > const & phaseOutflux, ElementView< arrayView2d< real64, compflow::USD_COMP > > const & compOutflux ); }; @@ -2258,9 +2256,9 @@ struct CFLKernel static void computePhaseCFL( real64 const poreVol, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac, - arraySlice1d< real64 const, relperm::USD_RELPERM - 2 > phaseRelPerm, - arraySlice2d< real64 const, relperm::USD_RELPERM_DS - 2 > dPhaseRelPerm_dPhaseVolFrac, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseVisc, + arraySlice1d< real64 const, constitutive::relperm::USD_RELPERM - 2 > phaseRelPerm, + arraySlice2d< real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > dPhaseRelPerm_dPhaseVolFrac, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseVisc, arraySlice1d< real64 const, compflow::USD_PHASE- 1 > phaseOutflux, real64 & phaseCFLNumber ); @@ -2282,9 +2280,9 @@ struct CFLKernel arrayView2d< real64 const, compflow::USD_COMP > const & compDens, arrayView2d< real64 const, compflow::USD_COMP > const & compFrac, arrayView2d< real64 const, compflow::USD_PHASE > const & phaseVolFrac, - arrayView3d< real64 const, relperm::USD_RELPERM > const & phaseRelPerm, - arrayView4d< real64 const, relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, - arrayView3d< real64 const, multifluid::USD_PHASE > const & phaseVisc, + arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > const & phaseRelPerm, + arrayView4d< real64 const, constitutive::relperm::USD_RELPERM_DS > const & dPhaseRelPerm_dPhaseVolFrac, + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const & phaseVisc, arrayView2d< real64 const, compflow::USD_PHASE > const & phaseOutflux, arrayView2d< real64 const, compflow::USD_COMP > const & compOutflux, arrayView1d< real64 > const & phaseCFLNumber, @@ -2321,7 +2319,7 @@ struct AquiferBCKernel fields::flow::dGlobalCompFraction_dGlobalCompDensity >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseDensity, fields::multifluid::dPhaseDensity, fields::multifluid::phaseCompFraction, @@ -2338,12 +2336,12 @@ struct AquiferBCKernel real64 const dAquiferVolFlux_dPres, real64 const aquiferWaterPhaseDens, arrayView1d< real64 const > const & aquiferWaterPhaseCompFrac, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseDens, - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > dPhaseDens, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseDens, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > dPhaseDens, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac, arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > dPhaseVolFrac, - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > phaseCompFrac, - arraySlice3d< real64 const, multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > phaseCompFrac, + arraySlice3d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac, arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > dCompFrac_dCompDens, real64 const dt, real64 ( &localFlux )[NC], @@ -2368,10 +2366,10 @@ struct AquiferBCKernel ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & phaseVolFrac, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dPhaseVolFrac, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dCompFrac_dCompDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & phaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dPhaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & phaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & phaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dPhaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & phaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dPhaseCompFrac, real64 const timeAtBeginningOfStep, real64 const dt, CRSMatrixView< real64, globalIndex const > const & localMatrix, diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBLKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBLKernels.hpp index 6cb7be8bd40..ac7d0e583b6 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBLKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBLKernels.hpp @@ -40,8 +40,6 @@ namespace geos namespace reactiveCompositionalMultiphaseOBLKernels { -using namespace constitutive; - static constexpr real64 minValueForDivision = 1e-10; @@ -643,7 +641,7 @@ class FaceBasedAssemblyKernelBase fields::flow::OBLOperatorDerivatives >; using PermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::dPerm_dPressure >; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.hpp index cc7f9bb3a03..6a726ed5757 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.hpp @@ -416,7 +416,7 @@ class SinglePhaseBase : public FlowSolverBase * * This function enables derived solvers to substitute SingleFluidBase for a different, * unrelated fluid class, and customize property extraction. For example, it is used by - * SinglePhaseProppantBase to allow using SlurryFluidBase, which does not inherit from + * SinglePhaseProppantBase to allow using constitutive::SlurryFluidBase, which does not inherit from * SingleFluidBase currently (but this design may need to be revised). */ virtual FluidPropViews getFluidProperties( constitutive::ConstitutiveBase const & fluid ) const; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVMKernels.hpp index fe0474e4cfd..d2b6f0db263 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVMKernels.hpp @@ -43,7 +43,6 @@ namespace geos namespace singlePhaseFVMKernels { -using namespace constitutive; /******************************** FaceBasedAssemblyKernelBase ********************************/ @@ -75,22 +74,22 @@ class FaceBasedAssemblyKernelBase fields::flow::dMobility_dPressure >; using SinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::density, fields::singlefluid::dDensity_dPressure >; using SlurryFluidAccessors = - StencilMaterialAccessors< SlurryFluidBase, + StencilMaterialAccessors< constitutive::SlurryFluidBase, fields::singlefluid::density, fields::singlefluid::dDensity_dPressure >; using PermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::dPerm_dPressure >; using ProppantPermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::dPerm_dPressure, fields::permeability::dPerm_dDispJump, @@ -779,7 +778,7 @@ class DirichletFaceBasedAssemblyKernel : public FaceBasedAssemblyKernel< NUM_EQN // Get flow quantities on the elem/face real64 faceDens, faceVisc; - SingleFluidBaseUpdate::computeValues( m_fluidWrapper, m_facePres[kf], faceDens, faceVisc ); + constitutive::SingleFluidBaseUpdate::computeValues( m_fluidWrapper, m_facePres[kf], faceDens, faceVisc ); mobility[Order::ELEM] = m_mob[er][esr][ei]; singlePhaseBaseKernels::MobilityKernel::compute( faceDens, faceVisc, mobility[Order::FACE] ); @@ -899,7 +898,7 @@ class DirichletFaceBasedAssemblyKernelFactory FaceManager const & faceManager, ElementRegionManager const & elemManager, BoundaryStencilWrapper const & stencilWrapper, - SingleFluidBase & fluidBase, + constitutive::SingleFluidBase & fluidBase, real64 const & dt, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StabilizedCompositionalMultiphaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/StabilizedCompositionalMultiphaseFVMKernels.hpp index 0e484bf1902..30b8b288c56 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StabilizedCompositionalMultiphaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StabilizedCompositionalMultiphaseFVMKernels.hpp @@ -28,9 +28,6 @@ namespace geos namespace stabilizedCompositionalMultiphaseFVMKernels { -using namespace constitutive; - - /******************************** FaceBasedAssemblyKernel ********************************/ /** @@ -67,12 +64,12 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne fields::flow::pressure_n >; using StabMultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseDensity_n, fields::multifluid::phaseCompFraction_n >; using RelPermAccessors = - StencilMaterialAccessors< RelativePermeabilityBase, fields::relperm::phaseRelPerm_n >; + StencilMaterialAccessors< constitutive::RelativePermeabilityBase, fields::relperm::phaseRelPerm_n >; using AbstractBase::m_dt; using AbstractBase::m_numPhases; @@ -288,9 +285,9 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne /// Views on flow properties at the previous converged time step ElementViewConst< arrayView1d< real64 const > > const m_pres_n; - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const m_phaseDens_n; - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const m_phaseCompFrac_n; - ElementViewConst< arrayView3d< real64 const, relperm::USD_RELPERM > > const m_phaseRelPerm_n; + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseDens_n; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac_n; + ElementViewConst< arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > > const m_phaseRelPerm_n; /// Views on the macroelement indices and stab constant ElementViewConst< arrayView1d< integer const > > const m_macroElementIndex; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StabilizedSinglePhaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/StabilizedSinglePhaseFVMKernels.hpp index 272b27d8227..c2be6462655 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StabilizedSinglePhaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StabilizedSinglePhaseFVMKernels.hpp @@ -28,8 +28,6 @@ namespace geos namespace stabilizedSinglePhaseFVMKernels { -using namespace constitutive; - /******************************** FaceBasedAssemblyKernel ********************************/ @@ -59,7 +57,7 @@ class FaceBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAssemblyK fields::flow::pressure_n >; using StabSinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::density_n >; using AbstractBase::m_dt; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseBaseKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseBaseKernels.hpp index 9f67629fb94..5bf8be65aaf 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseBaseKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseBaseKernels.hpp @@ -30,8 +30,6 @@ namespace geos namespace thermalCompositionalMultiphaseBaseKernels { -using namespace constitutive; - /******************************** PhaseVolumeFractionKernel ********************************/ @@ -57,7 +55,7 @@ class PhaseVolumeFractionKernel : public isothermalCompositionalMultiphaseBaseKe * @param[in] fluid the fluid model */ PhaseVolumeFractionKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) : Base( subRegion, fluid ) {} @@ -68,10 +66,10 @@ class PhaseVolumeFractionKernel : public isothermalCompositionalMultiphaseBaseKe GEOS_HOST_DEVICE real64 compute( localIndex const ei ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseFrac = m_dPhaseFrac[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseFrac = m_dPhaseFrac[ei][0]; arraySlice2d< real64, compflow::USD_PHASE_DC - 1 > const dPhaseVolFrac = m_dPhaseVolFrac[ei]; @@ -110,7 +108,7 @@ class PhaseVolumeFractionKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) { real64 maxDeltaPhaseVolFrac = 0.0; if( numPhase == 2 ) @@ -187,8 +185,8 @@ class ElementBasedAssemblyKernel : public isothermalCompositionalMultiphaseBaseK globalIndex const rankOffset, string const dofKey, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs, BitFlags< isothermalCompositionalMultiphaseBaseKernels::ElementBasedAssemblyKernelFlags > const kernelFlags ) @@ -267,7 +265,7 @@ class ElementBasedAssemblyKernel : public isothermalCompositionalMultiphaseBaseK void computeAccumulation( localIndex const ei, StackVariables & stack ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // start with old time step value stack.localResidual[numEqn-1] = -m_energy_n[ei]; @@ -288,12 +286,12 @@ class ElementBasedAssemblyKernel : public isothermalCompositionalMultiphaseBaseK arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > dPhaseVolFrac = m_dPhaseVolFrac[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseDens = m_phaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > phaseCompFrac = m_phaseCompFrac[ei][0]; - arraySlice3d< real64 const, multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac = m_dPhaseCompFrac[ei][0]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseInternalEnergy = m_phaseInternalEnergy[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > dPhaseInternalEnergy = m_dPhaseInternalEnergy[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseDens = m_phaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > phaseCompFrac = m_phaseCompFrac[ei][0]; + arraySlice3d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > dPhaseCompFrac = m_dPhaseCompFrac[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseInternalEnergy = m_phaseInternalEnergy[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > dPhaseInternalEnergy = m_dPhaseInternalEnergy[ei][0]; // Step 1: assemble the derivatives of the component mass balance equations with respect to temperature @@ -348,7 +346,7 @@ class ElementBasedAssemblyKernel : public isothermalCompositionalMultiphaseBaseK void computeVolumeBalance( localIndex const ei, StackVariables & stack ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; Base::computeVolumeBalance( ei, stack, [&] ( real64 const & oneMinusPhaseVolFraction ) { @@ -384,8 +382,8 @@ class ElementBasedAssemblyKernel : public isothermalCompositionalMultiphaseBaseK arrayView2d< real64 const > const m_dPoro_dTemp; /// Views on phase internal energy - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseInternalEnergy; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseInternalEnergy; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseInternalEnergy; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseInternalEnergy; /// Views on rock internal energy arrayView2d< real64 const > m_rockInternalEnergy; @@ -424,8 +422,8 @@ class ElementBasedAssemblyKernelFactory integer const useTotalMassEquation, string const dofKey, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) { @@ -855,9 +853,9 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 2 > integer const numComponents, integer const numPhases, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, - SolidInternalEnergy const & solidInternalEnergy, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, + constitutive::SolidInternalEnergy const & solidInternalEnergy, real64 const minNormalizer ) : Base( rankOffset, localResidual, @@ -972,9 +970,9 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 2 > /// View on phase properties at the previous converged time step arrayView2d< real64 const, compflow::USD_PHASE > const m_phaseVolFrac_n; - arrayView2d< real64 const, multifluid::USD_FLUID > const m_totalDens_n; - arrayView3d< real64 const, multifluid::USD_PHASE > const m_phaseDens_n; - arrayView3d< real64 const, multifluid::USD_PHASE > const m_phaseInternalEnergy_n; + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > const m_totalDens_n; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const m_phaseDens_n; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const m_phaseInternalEnergy_n; /// View on solid properties at the previous converged time step arrayView2d< real64 const > const m_solidInternalEnergy_n; @@ -1013,9 +1011,9 @@ class ResidualNormKernelFactory string const & dofKey, arrayView1d< real64 const > const & localResidual, ElementSubRegionBase const & subRegion, - MultiFluidBase const & fluid, - CoupledSolidBase const & solid, - SolidInternalEnergy const & solidInternalEnergy, + constitutive::MultiFluidBase const & fluid, + constitutive::CoupledSolidBase const & solid, + constitutive::SolidInternalEnergy const & solidInternalEnergy, real64 const minNormalizer, real64 (& residualNorm)[2], real64 (& residualNormalizer)[2] ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseFVMKernels.hpp index 8b9de7e2650..795aaad63cb 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ThermalCompositionalMultiphaseFVMKernels.hpp @@ -31,8 +31,6 @@ namespace geos namespace thermalCompositionalMultiphaseFVMKernels { -using namespace constitutive; - /******************************** PhaseMobilityKernel ********************************/ /** @@ -63,8 +61,8 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseFVMKernels:: * @param[in] relperm the relperm model */ PhaseMobilityKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) : Base( subRegion, fluid, relperm ) {} @@ -76,13 +74,13 @@ class PhaseMobilityKernel : public isothermalCompositionalMultiphaseFVMKernels:: inline void compute( localIndex const ei ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; - arraySlice2d< real64 const, relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseDens = m_phaseDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseDens = m_dPhaseDens[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const phaseVisc = m_phaseVisc[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const dPhaseVisc = m_dPhaseVisc[ei][0]; + arraySlice2d< real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const dPhaseVolFrac = m_dPhaseVolFrac[ei]; Base::compute( ei, [&] ( localIndex const ip, @@ -125,8 +123,8 @@ class PhaseMobilityKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid, - RelativePermeabilityBase const & relperm ) + constitutive::MultiFluidBase const & fluid, + constitutive::RelativePermeabilityBase const & relperm ) { if( numPhase == 2 ) { @@ -213,12 +211,12 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne StencilAccessors< fields::flow::temperature >; using ThermalMultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseEnthalpy, fields::multifluid::dPhaseEnthalpy >; using ThermalConductivityAccessors = - StencilMaterialAccessors< MultiPhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::MultiPhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; // for now, we treat thermal conductivity explicitly @@ -305,7 +303,7 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne void computeFlux( localIndex const iconn, StackVariables & stack ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // *********************************************** // First, we call the base computeFlux to compute: @@ -416,9 +414,9 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne // Step 3.2: compute the derivative of component flux wrt temperature // slice some constitutive arrays to avoid too much indexing in component loop - arraySlice1d< real64 const, multifluid::USD_PHASE_COMP - 3 > phaseCompFracSub = + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 3 > phaseCompFracSub = m_phaseCompFrac[er_up][esr_up][ei_up][0][ip]; - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP_DC - 3 > dPhaseCompFracSub = + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 3 > dPhaseCompFracSub = m_dPhaseCompFrac[er_up][esr_up][ei_up][0][ip]; for( integer ic = 0; ic < numComp; ++ic ) @@ -588,8 +586,8 @@ class FaceBasedAssemblyKernel : public isothermalCompositionalMultiphaseFVMKerne ElementViewConst< arrayView1d< real64 const > > const m_temp; /// Views on phase enthalpies - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const m_phaseEnthalpy; - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const m_dPhaseEnthalpy; + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseEnthalpy; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const m_dPhaseEnthalpy; /// View on thermal conductivity ElementViewConst< arrayView3d< real64 const > > const m_thermalConductivity; @@ -784,7 +782,7 @@ class DiffusionDispersionFaceBasedAssemblyKernel : void computeDiffusionFlux( localIndex const iconn, StackVariables & stack ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // *********************************************** // First, we call the base computeFlux to compute the diffusionFlux and its derivatives (including derivatives wrt temperature), @@ -856,7 +854,7 @@ class DiffusionDispersionFaceBasedAssemblyKernel : void computeDispersionFlux( localIndex const iconn, StackVariables & stack ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // *********************************************** // First, we call the base computeFlux to compute the dispersionFlux and its derivatives (including derivatives wrt temperature), @@ -1046,12 +1044,12 @@ class DirichletFaceBasedAssemblyKernel : public isothermalCompositionalMultiphas StencilAccessors< fields::flow::temperature >; using ThermalMultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseEnthalpy, fields::multifluid::dPhaseEnthalpy >; using ThermalConductivityAccessors = - StencilMaterialAccessors< MultiPhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::MultiPhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; // for now, we treat thermal conductivity explicitly @@ -1160,7 +1158,7 @@ class DirichletFaceBasedAssemblyKernel : public isothermalCompositionalMultiphas StackVariables & stack ) const { using Order = BoundaryStencil::Order; - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; // *********************************************** // First, we call the base computeFlux to compute: @@ -1177,8 +1175,8 @@ class DirichletFaceBasedAssemblyKernel : public isothermalCompositionalMultiphas localIndex const kf, real64 const f, // potGrad times trans real64 const facePhaseMob, - arraySlice1d< const real64, multifluid::USD_PHASE - 2 > const & facePhaseEnthalpy, - arraySlice2d< const real64, multifluid::USD_PHASE_COMP-2 > const & facePhaseCompFrac, + arraySlice1d< const real64, constitutive::multifluid::USD_PHASE - 2 > const & facePhaseEnthalpy, + arraySlice2d< const real64, constitutive::multifluid::USD_PHASE_COMP-2 > const & facePhaseCompFrac, real64 const phaseFlux, real64 const dPhaseFlux_dP, real64 const (&dPhaseFlux_dC)[numComp] ) @@ -1211,9 +1209,9 @@ class DirichletFaceBasedAssemblyKernel : public isothermalCompositionalMultiphas // Step 3.2.a: compute the derivative of component flux wrt temperature // slice some constitutive arrays to avoid too much indexing in component loop - arraySlice1d< real64 const, multifluid::USD_PHASE_COMP - 3 > phaseCompFracSub = + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 3 > phaseCompFracSub = m_phaseCompFrac[er][esr][ei][0][ip]; - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP_DC - 3 > dPhaseCompFracSub = + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 3 > dPhaseCompFracSub = m_dPhaseCompFrac[er][esr][ei][0][ip]; for( integer ic = 0; ic < numComp; ++ic ) @@ -1346,8 +1344,8 @@ class DirichletFaceBasedAssemblyKernel : public isothermalCompositionalMultiphas ElementViewConst< arrayView1d< real64 const > > const m_temp; /// Views on phase enthalpies - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const m_phaseEnthalpy; - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const m_dPhaseEnthalpy; + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseEnthalpy; + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const m_dPhaseEnthalpy; /// View on thermal conductivity ElementViewConst< arrayView3d< real64 const > > const m_thermalConductivity; @@ -1390,7 +1388,7 @@ class DirichletFaceBasedAssemblyKernelFactory FaceManager const & faceManager, ElementRegionManager const & elemManager, STENCILWRAPPER const & stencilWrapper, - MultiFluidBase & fluidBase, + constitutive::MultiFluidBase & fluidBase, real64 const dt, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ThermalSinglePhaseFVMKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/ThermalSinglePhaseFVMKernels.hpp index d1759b86120..0ccb49617ac 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ThermalSinglePhaseFVMKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ThermalSinglePhaseFVMKernels.hpp @@ -30,8 +30,6 @@ namespace geos namespace thermalSinglePhaseFVMKernels { -using namespace constitutive; - /******************************** FaceBasedAssemblyKernel ********************************/ /** @@ -83,14 +81,14 @@ class FaceBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAssemblyK fields::flow::dMobility_dTemperature >; using ThermalSinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::dDensity_dTemperature, fields::singlefluid::enthalpy, fields::singlefluid::dEnthalpy_dPressure, fields::singlefluid::dEnthalpy_dTemperature >; using ThermalConductivityAccessors = - StencilMaterialAccessors< SinglePhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::SinglePhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; /** @@ -533,14 +531,14 @@ class DirichletFaceBasedAssemblyKernel : public singlePhaseFVMKernels::Dirichlet fields::flow::dMobility_dTemperature >; using ThermalSinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::dDensity_dTemperature, fields::singlefluid::enthalpy, fields::singlefluid::dEnthalpy_dPressure, fields::singlefluid::dEnthalpy_dTemperature >; using ThermalConductivityAccessors = - StencilMaterialAccessors< SinglePhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::SinglePhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; /** @@ -778,7 +776,7 @@ class DirichletFaceBasedAssemblyKernelFactory FaceManager const & faceManager, ElementRegionManager const & elemManager, BoundaryStencilWrapper const & stencilWrapper, - SingleFluidBase & fluidBase, + constitutive::SingleFluidBase & fluidBase, real64 const & dt, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransportKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransportKernels.hpp index 7ff85e5ac44..75769763fed 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransportKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransportKernels.hpp @@ -40,8 +40,6 @@ namespace geos namespace proppantTransportKernels { -using namespace constitutive; - /******************************** FluidUpdateKernel ********************************/ struct FluidUpdateKernel @@ -191,7 +189,7 @@ struct FluxKernel fields::elementAperture >; using ParticleFluidAccessors = - StencilMaterialAccessors< ParticleFluidBase, + StencilMaterialAccessors< constitutive::ParticleFluidBase, fields::particlefluid::settlingFactor, fields::particlefluid::dSettlingFactor_dPressure, fields::particlefluid::dSettlingFactor_dProppantConcentration, @@ -200,7 +198,7 @@ struct FluxKernel fields::particlefluid::dCollisionFactor_dProppantConcentration >; using SlurryFluidAccessors = - StencilMaterialAccessors< SlurryFluidBase, + StencilMaterialAccessors< constitutive::SlurryFluidBase, fields::singlefluid::density, fields::singlefluid::dDensity_dPressure, fields::slurryfluid::dDensity_dProppantConcentration, @@ -217,12 +215,12 @@ struct FluxKernel fields::slurryfluid::dFluidDensity_dComponentConcentration >; using CellBasedFluxSlurryFluidAccessors = - StencilMaterialAccessors< SlurryFluidBase, + StencilMaterialAccessors< constitutive::SlurryFluidBase, fields::singlefluid::density, fields::singlefluid::viscosity >; using PermeabilityAccessors = - StencilMaterialAccessors< PermeabilityBase, + StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::permeability, fields::permeability::permeabilityMultiplier >; @@ -362,10 +360,10 @@ struct ProppantPackVolumeKernel fields::proppant::isProppantBoundary >; using ParticleFluidAccessors = - StencilMaterialAccessors< ParticleFluidBase, fields::particlefluid::settlingFactor >; + StencilMaterialAccessors< constitutive::ParticleFluidBase, fields::particlefluid::settlingFactor >; using SlurryFluidAccessors = - StencilMaterialAccessors< SlurryFluidBase, + StencilMaterialAccessors< constitutive::SlurryFluidBase, fields::singlefluid::density, fields::slurryfluid::fluidDensity, fields::slurryfluid::fluidViscosity >; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.cpp index 809751a6b8c..5f25f370274 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.cpp @@ -26,6 +26,7 @@ namespace geos { +using namespace constitutive; namespace compositionalMultiphaseWellKernels { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp index 9b00a436c37..48de11b7987 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp @@ -43,8 +43,6 @@ namespace geos namespace compositionalMultiphaseWellKernels { -using namespace constitutive; - static constexpr real64 minDensForDivision = 1e-10; // tag to access well and reservoir elements in perforation rates computation @@ -242,7 +240,7 @@ struct PerforationKernel fields::flow::dGlobalCompFraction_dGlobalCompDensity >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseDensity, fields::multifluid::dPhaseDensity, fields::multifluid::phaseViscosity, @@ -251,7 +249,7 @@ struct PerforationKernel fields::multifluid::dPhaseCompFraction >; using RelPermAccessors = - StencilMaterialAccessors< RelativePermeabilityBase, + StencilMaterialAccessors< constitutive::RelativePermeabilityBase, fields::relperm::phaseRelPerm, fields::relperm::dPhaseRelPerm_dPhaseVolFraction >; @@ -276,14 +274,14 @@ struct PerforationKernel arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & resPhaseVolFrac, arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const & dResPhaseVolFrac, arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const & dResCompFrac_dCompDens, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & resPhaseDens, - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const & dResPhaseDens, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & resPhaseVisc, - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const & dResPhaseVisc, - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > const & resPhaseCompFrac, - arraySlice3d< real64 const, multifluid::USD_PHASE_COMP_DC - 2 > const & dResPhaseCompFrac, - arraySlice1d< real64 const, relperm::USD_RELPERM - 2 > const & resPhaseRelPerm, - arraySlice2d< real64 const, relperm::USD_RELPERM_DS - 2 > const & dResPhaseRelPerm_dPhaseVolFrac, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & resPhaseDens, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const & dResPhaseDens, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & resPhaseVisc, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const & dResPhaseVisc, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > const & resPhaseCompFrac, + arraySlice3d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > const & dResPhaseCompFrac, + arraySlice1d< real64 const, constitutive::relperm::USD_RELPERM - 2 > const & resPhaseRelPerm, + arraySlice2d< real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > const & dResPhaseRelPerm_dPhaseVolFrac, real64 const & wellElemGravCoef, real64 const & wellElemPres, arraySlice1d< real64 const, compflow::USD_COMP - 1 > const & wellElemCompDens, @@ -306,14 +304,14 @@ struct PerforationKernel ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & resPhaseVolFrac, ElementViewConst< arrayView3d< real64 const, compflow::USD_PHASE_DC > > const & dResPhaseVolFrac_dComp, ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const & dResCompFrac_dCompDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & resPhaseDens, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dResPhaseDens, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & resPhaseVisc, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_DC > > const & dResPhaseVisc, - ElementViewConst< arrayView4d< real64 const, multifluid::USD_PHASE_COMP > > const & resPhaseCompFrac, - ElementViewConst< arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > > const & dResPhaseCompFrac, - ElementViewConst< arrayView3d< real64 const, relperm::USD_RELPERM > > const & resPhaseRelPerm, - ElementViewConst< arrayView4d< real64 const, relperm::USD_RELPERM_DS > > const & dResPhaseRelPerm_dPhaseVolFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & resPhaseDens, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dResPhaseDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & resPhaseVisc, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > > const & dResPhaseVisc, + ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const & resPhaseCompFrac, + ElementViewConst< arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > > const & dResPhaseCompFrac, + ElementViewConst< arrayView3d< real64 const, constitutive::relperm::USD_RELPERM > > const & resPhaseRelPerm, + ElementViewConst< arrayView4d< real64 const, constitutive::relperm::USD_RELPERM_DS > > const & dResPhaseRelPerm_dPhaseVolFrac, arrayView1d< real64 const > const & wellElemGravCoef, arrayView1d< real64 const > const & wellElemPres, arrayView2d< real64 const, compflow::USD_COMP > const & wellElemCompDens, @@ -351,13 +349,13 @@ struct AccumulationKernel arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFrac, arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > const & dPhaseVolFrac, arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > const & dCompFrac_dCompDens, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & phaseDens, - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > const & dPhaseDens, - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > const & phaseCompFrac, - arraySlice3d< real64 const, multifluid::USD_PHASE_COMP_DC - 2 > const & dPhaseCompFrac, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & phaseDens, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > const & dPhaseDens, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > const & phaseCompFrac, + arraySlice3d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > const & dPhaseCompFrac, arraySlice1d< real64 const, compflow::USD_PHASE - 1 > const & phaseVolFrac_n, - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > const & phaseDens_n, - arraySlice2d< real64 const, multifluid::USD_PHASE_COMP - 2 > const & phaseCompFrac_n, + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > const & phaseDens_n, + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP - 2 > const & phaseCompFrac_n, real64 ( &localAccum )[NC], real64 ( &localAccumJacobian )[NC][NC + 1] ); @@ -373,13 +371,13 @@ struct AccumulationKernel arrayView2d< real64 const, compflow::USD_PHASE > const & wellElemPhaseVolFrac, arrayView3d< real64 const, compflow::USD_PHASE_DC > const & dWellElemPhaseVolFrac, arrayView3d< real64 const, compflow::USD_COMP_DC > const & dWellElemCompFrac_dCompDens, - arrayView3d< real64 const, multifluid::USD_PHASE > const & wellElemPhaseDens, - arrayView4d< real64 const, multifluid::USD_PHASE_DC > const & dWellElemPhaseDens, - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > const & wellElemPhaseCompFrac, - arrayView5d< real64 const, multifluid::USD_PHASE_COMP_DC > const & dWellElemPhaseCompFrac, + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const & wellElemPhaseDens, + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > const & dWellElemPhaseDens, + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > const & wellElemPhaseCompFrac, + arrayView5d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC > const & dWellElemPhaseCompFrac, arrayView2d< real64 const, compflow::USD_PHASE > const & wellElemPhaseVolFrac_n, - arrayView3d< real64 const, multifluid::USD_PHASE > const & wellElemPhaseDens_n, - arrayView4d< real64 const, multifluid::USD_PHASE_COMP > const & wellElemPhaseCompFrac_n, + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const & wellElemPhaseDens_n, + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > const & wellElemPhaseCompFrac_n, CRSMatrixView< real64, globalIndex const > const & localMatrix, arrayView1d< real64 > const & localRhs ); @@ -431,7 +429,7 @@ struct PresTempCompFracInitializationKernel fields::flow::phaseVolumeFraction >; using MultiFluidAccessors = - StencilMaterialAccessors< MultiFluidBase, + StencilMaterialAccessors< constitutive::MultiFluidBase, fields::multifluid::phaseMassDensity >; @@ -457,7 +455,7 @@ struct PresTempCompFracInitializationKernel ElementViewConst< arrayView1d< real64 const > > const & resTemp, ElementViewConst< arrayView2d< real64 const, compflow::USD_COMP > > const & resCompDens, ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const & resPhaseVolFrac, - ElementViewConst< arrayView3d< real64 const, multifluid::USD_PHASE > > const & resPhaseMassDens, + ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const & resPhaseMassDens, arrayView1d< localIndex const > const & resElementRegion, arrayView1d< localIndex const > const & resElementSubRegion, arrayView1d< localIndex const > const & resElementIndex, @@ -478,7 +476,7 @@ struct CompDensInitializationKernel launch( localIndex const subRegionSize, integer const numComponents, arrayView2d< real64 const, compflow::USD_COMP > const & wellElemCompFrac, - arrayView2d< real64 const, multifluid::USD_FLUID > const & wellElemTotalDens, + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > const & wellElemTotalDens, arrayView2d< real64, compflow::USD_COMP > const & wellElemCompDens ); }; @@ -493,8 +491,8 @@ struct RateInitializationKernel integer const targetPhaseIndex, WellControls const & wellControls, real64 const & currentTime, - arrayView3d< real64 const, multifluid::USD_PHASE > const & phaseDens, - arrayView2d< real64 const, multifluid::USD_FLUID > const & totalDens, + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const & phaseDens, + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > const & totalDens, arrayView1d< real64 > const & connRate ); }; @@ -525,7 +523,7 @@ class TotalMassDensityKernel : public isothermalCompositionalMultiphaseBaseKerne * @param[in] fluid the fluid model */ TotalMassDensityKernel( ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) : Base(), m_phaseVolFrac( subRegion.getField< fields::well::phaseVolumeFraction >() ), m_dPhaseVolFrac( subRegion.getField< fields::well::dPhaseVolumeFraction >() ), @@ -549,13 +547,13 @@ class TotalMassDensityKernel : public isothermalCompositionalMultiphaseBaseKerne void compute( localIndex const ei, FUNC && totalMassDensityKernelOp = NoOpFunc{} ) const { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; arraySlice1d< real64 const, compflow::USD_PHASE - 1 > phaseVolFrac = m_phaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_PHASE_DC - 1 > dPhaseVolFrac = m_dPhaseVolFrac[ei]; arraySlice2d< real64 const, compflow::USD_COMP_DC - 1 > dCompFrac_dCompDens = m_dCompFrac_dCompDens[ei]; - arraySlice1d< real64 const, multifluid::USD_PHASE - 2 > phaseMassDens = m_phaseMassDens[ei][0]; - arraySlice2d< real64 const, multifluid::USD_PHASE_DC - 2 > dPhaseMassDens = m_dPhaseMassDens[ei][0]; + arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE - 2 > phaseMassDens = m_phaseMassDens[ei][0]; + arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > dPhaseMassDens = m_dPhaseMassDens[ei][0]; real64 & totalMassDens = m_totalMassDens[ei]; real64 & dTotalMassDens_dPres = m_dTotalMassDens_dPres[ei]; arraySlice1d< real64, compflow::USD_FLUID_DC - 1 > dTotalMassDens_dCompDens = m_dTotalMassDens_dCompDens[ei]; @@ -596,8 +594,8 @@ class TotalMassDensityKernel : public isothermalCompositionalMultiphaseBaseKerne arrayView3d< real64 const, compflow::USD_COMP_DC > m_dCompFrac_dCompDens; /// Views on phase mass densities - arrayView3d< real64 const, multifluid::USD_PHASE > m_phaseMassDens; - arrayView4d< real64 const, multifluid::USD_PHASE_DC > m_dPhaseMassDens; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseMassDens; + arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_DC > m_dPhaseMassDens; // outputs @@ -628,7 +626,7 @@ class TotalMassDensityKernelFactory createAndLaunch( integer const numComp, integer const numPhase, ObjectManagerBase & subRegion, - MultiFluidBase const & fluid ) + constitutive::MultiFluidBase const & fluid ) { if( numPhase == 2 ) { @@ -675,7 +673,7 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 1 > integer const numDof, integer const targetPhaseIndex, WellElementSubRegion const & subRegion, - MultiFluidBase const & fluid, + constitutive::MultiFluidBase const & fluid, WellControls const & wellControls, real64 const timeAtEndOfStep, real64 const dt, @@ -851,8 +849,8 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 1 > arrayView1d< real64 const > const m_volume; /// View on phase/total density at the previous converged time step - arrayView3d< real64 const, multifluid::USD_PHASE > const m_phaseDens_n; - arrayView2d< real64 const, multifluid::USD_FLUID > const m_totalDens_n; + arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > const m_phaseDens_n; + arrayView2d< real64 const, constitutive::multifluid::USD_FLUID > const m_totalDens_n; }; @@ -888,7 +886,7 @@ class ResidualNormKernelFactory string const & dofKey, arrayView1d< real64 const > const & localResidual, WellElementSubRegion const & subRegion, - MultiFluidBase const & fluid, + constitutive::MultiFluidBase const & fluid, WellControls const & wellControls, real64 const timeAtEndOfStep, real64 const dt, diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsSolver.hpp index bf6446aa0a6..0197591a1c8 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsSolver.hpp @@ -50,10 +50,6 @@ ENUM_STRINGS( StabilizationType, "Local" ); } -using namespace stabilization; -using namespace fields; -using namespace constitutive; -using namespace dataRepository; template< typename FLOW_SOLVER, typename MECHANICS_SOLVER = SolidMechanicsLagrangianFEM > class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER > @@ -99,9 +95,9 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER this->registerWrapper( viewKeyStruct::stabilizationTypeString(), &m_stabilizationType ). setInputFlag( dataRepository::InputFlags::OPTIONAL ). setDescription( "StabilizationType. Options are:\n" + - toString( StabilizationType::None ) + "- Add no stabilization to mass equation \n" + - toString( StabilizationType::Global ) + "- Add jump stabilization to all faces \n" + - toString( StabilizationType::Local ) + "- Add jump stabilization on interior of macro elements" ); + toString( stabilization::StabilizationType::None ) + "- Add no stabilization to mass equation \n" + + toString( stabilization::StabilizationType::Global ) + "- Add jump stabilization to all faces \n" + + toString( stabilization::StabilizationType::Local ) + "- Add jump stabilization on interior of macro elements" ); this->registerWrapper( viewKeyStruct::stabilizationRegionNamesString(), &m_stabilizationRegionNames ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). @@ -129,12 +125,12 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER if( dynamic_cast< SurfaceElementSubRegion * >( &subRegion ) ) { subRegion.registerWrapper< string >( viewKeyStruct::hydraulicApertureRelationNameString() ). - setPlotLevel( PlotLevel::NOPLOT ). - setRestartFlags( RestartFlags::NO_WRITE ). + setPlotLevel( dataRepository::PlotLevel::NOPLOT ). + setRestartFlags( dataRepository::RestartFlags::NO_WRITE ). setSizedFromParent( 0 ); string & hydraulicApertureModelName = subRegion.getReference< string >( viewKeyStruct::hydraulicApertureRelationNameString() ); - hydraulicApertureModelName = SolverBase::getConstitutiveName< HydraulicApertureBase >( subRegion ); + hydraulicApertureModelName = SolverBase::getConstitutiveName< constitutive::HydraulicApertureBase >( subRegion ); GEOS_ERROR_IF( hydraulicApertureModelName.empty(), GEOS_FMT( "{}: HydraulicApertureBase model not found on subregion {}", this->getDataContext(), subRegion.getDataContext() ) ); } @@ -145,7 +141,7 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER { Base::initializePreSubGroups(); - GEOS_THROW_IF( m_stabilizationType == StabilizationType::Local, + GEOS_THROW_IF( m_stabilizationType == stabilization::StabilizationType::Local, this->getWrapperDataContext( viewKeyStruct::stabilizationTypeString() ) << ": Local stabilization has been temporarily disabled", InputError ); @@ -197,7 +193,7 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER flowSolver()->enableFixedStressPoromechanicsUpdate(); } - if( m_stabilizationType == StabilizationType::Global || m_stabilizationType == StabilizationType::Local ) + if( m_stabilizationType == stabilization::StabilizationType::Global || m_stabilizationType == stabilization::StabilizationType::Local ) { flowSolver()->enableJumpStabilization(); } @@ -230,7 +226,7 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER subRegion.registerField< fields::poromechanics::bulkDensity >( this->getName() ); } - if( m_stabilizationType == StabilizationType::Global || m_stabilizationType == StabilizationType::Local ) + if( m_stabilizationType == stabilization::StabilizationType::Global || m_stabilizationType == stabilization::StabilizationType::Local ) { subRegion.registerField< fields::flow::macroElementIndex >( this->getName()); subRegion.registerField< fields::flow::elementStabConstant >( this->getName()); @@ -245,7 +241,7 @@ class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER { flowSolver()->setKeepFlowVariablesConstantDuringInitStep( m_performStressInitialization ); - if( this->m_stabilizationType == StabilizationType::Global || this->m_stabilizationType == StabilizationType::Local ) + if( this->m_stabilizationType == stabilization::StabilizationType::Global || this->m_stabilizationType == stabilization::StabilizationType::Local ) { this->updateStabilizationParameters( domain ); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp index c11d8bab189..d2c9d984348 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp @@ -39,6 +39,7 @@ namespace geos using namespace constitutive; using namespace dataRepository; using namespace fields; +using namespace stabilization; template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > SinglePhasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::SinglePhasePoromechanics( const string & name, diff --git a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp index 11cc0032051..5b1ecfc36f4 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsConformingFractures.hpp @@ -29,9 +29,6 @@ namespace geos namespace singlePhasePoromechanicsConformingFracturesKernels { -using namespace fluxKernelsHelper; -using namespace constitutive; - template< integer NUM_EQN, integer NUM_DOF > class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAssemblyKernel< NUM_EQN, NUM_DOF, SurfaceElementStencilWrapper > { @@ -51,7 +48,7 @@ class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAsse using SinglePhaseFlowAccessors = AbstractBase::SinglePhaseFlowAccessors; using SinglePhaseFluidAccessors = AbstractBase::SinglePhaseFluidAccessors; using PermeabilityAccessors = AbstractBase::PermeabilityAccessors; - using FracturePermeabilityAccessors = StencilMaterialAccessors< PermeabilityBase, + using FracturePermeabilityAccessors = StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::dPerm_dDispJump >; using AbstractBase::m_dt; @@ -193,21 +190,21 @@ class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAsse localIndex const subRegionIndex[2] = {m_sesri[iconn][k[0]], m_sesri[iconn][k[1]]}; localIndex const elementIndex[2] = {m_sei[iconn][k[0]], m_sei[iconn][k[1]]}; - computeSinglePhaseFlux( regionIndex, subRegionIndex, elementIndex, - trans, - dTrans, - m_pres, - m_gravCoef, - m_dens, - m_dDens_dPres, - m_mob, - m_dMob_dPres, - alpha, - mobility, - potGrad, - fluxVal, - dFlux_dP, - dFlux_dTrans ); + fluxKernelsHelper::computeSinglePhaseFlux( regionIndex, subRegionIndex, elementIndex, + trans, + dTrans, + m_pres, + m_gravCoef, + m_dens, + m_dDens_dPres, + m_mob, + m_dMob_dPres, + alpha, + mobility, + potGrad, + fluxVal, + dFlux_dP, + dFlux_dTrans ); // populate local flux vector and derivatives stack.localFlux[k[0]* numDof] += m_dt * fluxVal; diff --git a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsEmbeddedFractures.hpp b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsEmbeddedFractures.hpp index 421fbb99ea9..40067909e6b 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsEmbeddedFractures.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsEmbeddedFractures.hpp @@ -29,9 +29,6 @@ namespace geos namespace singlePhasePoromechanicsEmbeddedFracturesKernels { -using namespace fluxKernelsHelper; -using namespace constitutive; - template< integer NUM_EQN, integer NUM_DOF > class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAssemblyKernel< NUM_EQN, NUM_DOF, SurfaceElementStencilWrapper > { @@ -51,7 +48,7 @@ class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAsse using SinglePhaseFlowAccessors = AbstractBase::SinglePhaseFlowAccessors; using SinglePhaseFluidAccessors = AbstractBase::SinglePhaseFluidAccessors; using PermeabilityAccessors = AbstractBase::PermeabilityAccessors; - using FracturePermeabilityAccessors = StencilMaterialAccessors< PermeabilityBase, + using FracturePermeabilityAccessors = StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::dPerm_dDispJump >; using AbstractBase::m_dt; using AbstractBase::m_rankOffset; @@ -183,21 +180,21 @@ class ConnectorBasedAssemblyKernel : public singlePhaseFVMKernels::FaceBasedAsse real64 mobility = 0.0; real64 potGrad = 0.0; - computeSinglePhaseFlux( regionIndex, subRegionIndex, elementIndex, - trans, - dTrans, - m_pres, - m_gravCoef, - m_dens, - m_dDens_dPres, - m_mob, - m_dMob_dPres, - alpha, - mobility, - potGrad, - fluxVal, - dFlux_dP, - dFlux_dTrans ); + fluxKernelsHelper::computeSinglePhaseFlux( regionIndex, subRegionIndex, elementIndex, + trans, + dTrans, + m_pres, + m_gravCoef, + m_dens, + m_dDens_dPres, + m_mob, + m_dMob_dPres, + alpha, + mobility, + potGrad, + fluxVal, + dFlux_dP, + dFlux_dTrans ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp index 99d5dca2107..3cf7cb0a08d 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsConformingFractures.hpp @@ -28,9 +28,6 @@ namespace geos namespace thermalSinglePhasePoromechanicsConformingFracturesKernels { -using namespace fluxKernelsHelper; -using namespace constitutive; - template< integer NUM_EQN, integer NUM_DOF > class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsConformingFracturesKernels::ConnectorBasedAssemblyKernel< NUM_EQN, NUM_DOF > { @@ -50,7 +47,7 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsConformingFr using SinglePhaseFlowAccessors = SinglePhaseFVMAbstractBase::SinglePhaseFlowAccessors; using SinglePhaseFluidAccessors = SinglePhaseFVMAbstractBase::SinglePhaseFluidAccessors; using PermeabilityAccessors = SinglePhaseFVMAbstractBase::PermeabilityAccessors; - using FracturePermeabilityAccessors = StencilMaterialAccessors< PermeabilityBase, + using FracturePermeabilityAccessors = StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::dPerm_dDispJump >; using SinglePhaseFVMAbstractBase::m_dt; using SinglePhaseFVMAbstractBase::m_rankOffset; @@ -78,14 +75,14 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsConformingFr fields::flow::dMobility_dTemperature >; using ThermalSinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::dDensity_dTemperature, fields::singlefluid::enthalpy, fields::singlefluid::dEnthalpy_dPressure, fields::singlefluid::dEnthalpy_dTemperature >; using ThermalConductivityAccessors = - StencilMaterialAccessors< SinglePhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::SinglePhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; @@ -208,25 +205,25 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsConformingFr real64 trans[2] = {stack.transmissibility[0][0], stack.transmissibility[0][1]}; real64 dMassFlux_dT[2]{}; - computeEnthalpyFlux( seri, sesri, sei, - trans, - m_enthalpy, - m_dEnthalpy_dPres, - m_dEnthalpy_dTemp, - m_gravCoef, - m_dDens_dTemp, - m_dMob_dTemp, - alpha, - mobility, - potGrad, - massFlux, - dMassFlux_dTrans, - dMassFlux_dP, - dMassFlux_dT, - stack.energyFlux, - stack.dEnergyFlux_dTrans, - stack.dEnergyFlux_dP, - stack.dEnergyFlux_dT ); + fluxKernelsHelper::computeEnthalpyFlux( seri, sesri, sei, + trans, + m_enthalpy, + m_dEnthalpy_dPres, + m_dEnthalpy_dTemp, + m_gravCoef, + m_dDens_dTemp, + m_dMob_dTemp, + alpha, + mobility, + potGrad, + massFlux, + dMassFlux_dTrans, + dMassFlux_dP, + dMassFlux_dT, + stack.energyFlux, + stack.dEnergyFlux_dTrans, + stack.dEnergyFlux_dP, + stack.dEnergyFlux_dT ); // add dMassFlux_dT to localFluxJacobian for( integer ke = 0; ke < 2; ++ke ) @@ -263,7 +260,7 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsConformingFr localIndex const sei[2] = {m_sei( iconn, k[0] ), m_sei( iconn, k[1] )}; // Step 2: compute temperature difference at the interface - computeConductiveFlux( seri, sesri, sei, m_temp, thermalTrans, stack.energyFlux, stack.dEnergyFlux_dT ); + fluxKernelsHelper::computeConductiveFlux( seri, sesri, sei, m_temp, thermalTrans, stack.energyFlux, stack.dEnergyFlux_dT ); // add energyFlux and its derivatives to localFlux and localFluxJacobian stack.localFlux[k[0]*numEqn + numEqn - 1] += m_dt * stack.energyFlux; diff --git a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp index 645e03b8088..1f099e4aac4 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/ThermalSinglePhasePoromechanicsEmbeddedFractures.hpp @@ -28,9 +28,6 @@ namespace geos namespace thermalSinglePhasePoromechanicsEmbeddedFracturesKernels { -using namespace fluxKernelsHelper; -using namespace constitutive; - template< integer NUM_EQN, integer NUM_DOF > class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsEmbeddedFracturesKernels::ConnectorBasedAssemblyKernel< NUM_EQN, NUM_DOF > { @@ -50,7 +47,7 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsEmbeddedFrac using SinglePhaseFlowAccessors = SinglePhaseFVMAbstractBase::SinglePhaseFlowAccessors; using SinglePhaseFluidAccessors = SinglePhaseFVMAbstractBase::SinglePhaseFluidAccessors; using PermeabilityAccessors = SinglePhaseFVMAbstractBase::PermeabilityAccessors; - using FracturePermeabilityAccessors = StencilMaterialAccessors< PermeabilityBase, + using FracturePermeabilityAccessors = StencilMaterialAccessors< constitutive::PermeabilityBase, fields::permeability::dPerm_dDispJump >; using SinglePhaseFVMAbstractBase::m_dt; using SinglePhaseFVMAbstractBase::m_rankOffset; @@ -78,14 +75,14 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsEmbeddedFrac fields::flow::dMobility_dTemperature >; using ThermalSinglePhaseFluidAccessors = - StencilMaterialAccessors< SingleFluidBase, + StencilMaterialAccessors< constitutive::SingleFluidBase, fields::singlefluid::dDensity_dTemperature, fields::singlefluid::enthalpy, fields::singlefluid::dEnthalpy_dPressure, fields::singlefluid::dEnthalpy_dTemperature >; using ThermalConductivityAccessors = - StencilMaterialAccessors< SinglePhaseThermalConductivityBase, + StencilMaterialAccessors< constitutive::SinglePhaseThermalConductivityBase, fields::thermalconductivity::effectiveConductivity >; @@ -207,25 +204,25 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsEmbeddedFrac real64 trans[2] = {stack.transmissibility[0][0], stack.transmissibility[0][1]}; real64 dMassFlux_dT[2]{}; - computeEnthalpyFlux( seri, sesri, sei, - trans, - m_enthalpy, - m_dEnthalpy_dPres, - m_dEnthalpy_dTemp, - m_gravCoef, - m_dDens_dTemp, - m_dMob_dTemp, - alpha, - mobility, - potGrad, - massFlux, - dMassFlux_dTrans, - dMassFlux_dP, - dMassFlux_dT, - stack.energyFlux, - stack.dEnergyFlux_dTrans, - stack.dEnergyFlux_dP, - stack.dEnergyFlux_dT ); + fluxKernelsHelper::computeEnthalpyFlux( seri, sesri, sei, + trans, + m_enthalpy, + m_dEnthalpy_dPres, + m_dEnthalpy_dTemp, + m_gravCoef, + m_dDens_dTemp, + m_dMob_dTemp, + alpha, + mobility, + potGrad, + massFlux, + dMassFlux_dTrans, + dMassFlux_dP, + dMassFlux_dT, + stack.energyFlux, + stack.dEnergyFlux_dTrans, + stack.dEnergyFlux_dP, + stack.dEnergyFlux_dT ); for( localIndex i=0; i < 3; i++ ) { @@ -274,7 +271,7 @@ class ConnectorBasedAssemblyKernel : public singlePhasePoromechanicsEmbeddedFrac localIndex const sei[2] = {m_sei( iconn, k[0] ), m_sei( iconn, k[1] )}; // Step 2: compute temperature difference at the interface - computeConductiveFlux( seri, sesri, sei, m_temp, thermalTrans, stack.energyFlux, stack.dEnergyFlux_dT ); + fluxKernelsHelper::computeConductiveFlux( seri, sesri, sei, m_temp, thermalTrans, stack.energyFlux, stack.dEnergyFlux_dT ); // add energyFlux and its derivatives to localFlux and localFluxJacobian stack.localFlux[k[0]*numEqn + numEqn - 1] += m_dt * stack.energyFlux; diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/kernels/surfaceGenerationKernels.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/kernels/surfaceGenerationKernels.hpp index ce08a428544..161dec93ac1 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/kernels/surfaceGenerationKernels.hpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/kernels/surfaceGenerationKernels.hpp @@ -32,8 +32,6 @@ namespace geos namespace surfaceGenerationKernels { -using namespace surfaceGenerationKernelsHelpers; - class NodalForceKernel { @@ -76,11 +74,11 @@ class NodalForceKernel { real64 const quadratureStress[6] = LVARRAY_TENSOROPS_INIT_LOCAL_6 ( m_stress[er][esr][m_solidMaterialFullIndex[er]][ei][q] ); real64 const dNdX[3] = LVARRAY_TENSOROPS_INIT_LOCAL_3 ( m_dNdX[er][esr][ei][q][targetNode] ); - computeNodalForce( quadratureStress, dNdX, m_detJ[er][esr][ei][q], force ); + surfaceGenerationKernelsHelpers::computeNodalForce( quadratureStress, dNdX, m_detJ[er][esr][ei][q], force ); } //wu40: the nodal force need to be weighted by Young's modulus and possion's ratio. - scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force ); + surfaceGenerationKernelsHelpers::scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force ); } protected: @@ -142,11 +140,11 @@ class PoroElasticNodalForceKernel : public NodalForceKernel /// TODO: make it work for the thermal case as well LvArray::tensorOps::symAddIdentity< 3 >( totalStress, -m_biotCoefficient[er][esr][m_porosityMaterialFullIndex[er]][ei] * m_pressure[er][esr][ei] ); - computeNodalForce( totalStress, dNdX, m_detJ[er][esr][ei][q], force ); + surfaceGenerationKernelsHelpers::computeNodalForce( totalStress, dNdX, m_detJ[er][esr][ei][q], force ); } //wu40: the nodal force need to be weighted by Young's modulus and possion's ratio. - scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force ); + surfaceGenerationKernelsHelpers::scaleNodalForce( m_bulkModulus[er][esr][m_solidMaterialFullIndex[er]][ei], m_shearModulus[er][esr][m_solidMaterialFullIndex[er]][ei], force ); } private: diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEMKernel.hpp index e4de8b7d4ed..48f446f5fb9 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEMKernel.hpp @@ -27,7 +27,6 @@ namespace geos { -using namespace fields; /// Namespace to contain the acoustic wave kernels. namespace acousticVTIWaveEquationSEMKernels @@ -442,13 +441,13 @@ class ExplicitAcousticVTISEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticvtifields::Pressure_p_n >() ), - m_q_n( nodeManager.getField< acousticvtifields::Pressure_q_n >() ), - m_stiffnessVector_p( nodeManager.getField< acousticvtifields::StiffnessVector_p >() ), - m_stiffnessVector_q( nodeManager.getField< acousticvtifields::StiffnessVector_q >() ), - m_epsilon( elementSubRegion.template getField< acousticvtifields::Epsilon >() ), - m_delta( elementSubRegion.template getField< acousticvtifields::Delta >() ), - m_vti_f( elementSubRegion.template getField< acousticvtifields::F >() ), + m_p_n( nodeManager.getField< fields::acousticvtifields::Pressure_p_n >() ), + m_q_n( nodeManager.getField< fields::acousticvtifields::Pressure_q_n >() ), + m_stiffnessVector_p( nodeManager.getField< fields::acousticvtifields::StiffnessVector_p >() ), + m_stiffnessVector_q( nodeManager.getField< fields::acousticvtifields::StiffnessVector_q >() ), + m_epsilon( elementSubRegion.template getField< fields::acousticvtifields::Epsilon >() ), + m_delta( elementSubRegion.template getField< fields::acousticvtifields::Delta >() ), + m_vti_f( elementSubRegion.template getField< fields::acousticvtifields::F >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp index 77e3c55098a..d9eab26fe72 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp @@ -790,13 +790,13 @@ real64 AcousticWaveEquationSEM::explicitStepForward( real64 const & time_n, if( m_enableLifo ) { // Need to tell LvArray data is on GPU to avoir HtoD copy - p_dt2.move( MemorySpace::cuda, false ); + p_dt2.move( LvArray::MemorySpace::cuda, false ); m_lifo->pushAsync( p_dt2 ); } else { GEOS_MARK_SCOPE ( DirectWrite ); - p_dt2.move( MemorySpace::host, false ); + p_dt2.move( LvArray::MemorySpace::host, false ); int const rank = MpiWrapper::commRank( MPI_COMM_GEOS ); std::string fileName = GEOS_FMT( "lifo/rank_{:05}/pressuredt2_{:06}_{:08}.dat", rank, m_shotIndex, cycleNumber ); int lastDirSeparator = fileName.find_last_of( "/\\" ); @@ -873,7 +873,7 @@ real64 AcousticWaveEquationSEM::explicitStepBackward( real64 const & time_n, getDataContext() << ": Could not open file "<< fileName << " for reading", InputError ); - p_dt2.move( MemorySpace::host, true ); + p_dt2.move( LvArray::MemorySpace::host, true ); wf.read( (char *)&p_dt2[0], p_dt2.size()*sizeof( real32 ) ); wf.close( ); remove( fileName.c_str() ); diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEMKernel.hpp index 2b877c499eb..773df753ca0 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEMKernel.hpp @@ -30,8 +30,6 @@ namespace geos { -using namespace fields; - /// Namespace to contain the acoustic wave kernels. namespace acousticWaveEquationSEMKernels { @@ -106,9 +104,9 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticfields::Pressure_n >() ), - m_stiffnessVector( nodeManager.getField< acousticfields::StiffnessVector >() ), - m_density( elementSubRegion.template getField< acousticfields::AcousticDensity >() ), + m_p_n( nodeManager.getField< fields::acousticfields::Pressure_n >() ), + m_stiffnessVector( nodeManager.getField< fields::acousticfields::StiffnessVector >() ), + m_density( elementSubRegion.template getField< fields::acousticfields::AcousticDensity >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/anisotropic/ElasticVTIWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/anisotropic/ElasticVTIWaveEquationSEMKernel.hpp index 21faecddff0..106afa53d02 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/anisotropic/ElasticVTIWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/anisotropic/ElasticVTIWaveEquationSEMKernel.hpp @@ -27,7 +27,7 @@ namespace geos { -using namespace fields; + /// Namespace to contain the elastic wave kernels. namespace elasticVTIWaveEquationSEMKernels { @@ -100,18 +100,18 @@ class ExplicitElasticVTISEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_ux_n( nodeManager.getField< elasticfields::Displacementx_n >() ), - m_uy_n( nodeManager.getField< elasticfields::Displacementy_n >() ), - m_uz_n( nodeManager.getField< elasticfields::Displacementz_n >() ), - m_stiffnessVectorx( nodeManager.getField< elasticfields::StiffnessVectorx >() ), - m_stiffnessVectory( nodeManager.getField< elasticfields::StiffnessVectory >() ), - m_stiffnessVectorz( nodeManager.getField< elasticfields::StiffnessVectorz >() ), - m_density( elementSubRegion.template getField< elasticfields::ElasticDensity >() ), - m_velocityVp( elementSubRegion.template getField< elasticfields::ElasticVelocityVp >() ), - m_velocityVs( elementSubRegion.template getField< elasticfields::ElasticVelocityVs >() ), - m_gamma( elementSubRegion.template getField< elasticvtifields::Gamma >()), - m_epsilon( elementSubRegion.template getField< elasticvtifields::Epsilon >()), - m_delta( elementSubRegion.template getField< elasticvtifields::Delta >()), + m_ux_n( nodeManager.getField< fields::elasticfields::Displacementx_n >() ), + m_uy_n( nodeManager.getField< fields::elasticfields::Displacementy_n >() ), + m_uz_n( nodeManager.getField< fields::elasticfields::Displacementz_n >() ), + m_stiffnessVectorx( nodeManager.getField< fields::elasticfields::StiffnessVectorx >() ), + m_stiffnessVectory( nodeManager.getField< fields::elasticfields::StiffnessVectory >() ), + m_stiffnessVectorz( nodeManager.getField< fields::elasticfields::StiffnessVectorz >() ), + m_density( elementSubRegion.template getField< fields::elasticfields::ElasticDensity >() ), + m_velocityVp( elementSubRegion.template getField< fields::elasticfields::ElasticVelocityVp >() ), + m_velocityVs( elementSubRegion.template getField< fields::elasticfields::ElasticVelocityVs >() ), + m_gamma( elementSubRegion.template getField< fields::elasticvtifields::Gamma >()), + m_epsilon( elementSubRegion.template getField< fields::elasticvtifields::Epsilon >()), + m_delta( elementSubRegion.template getField< fields::elasticvtifields::Delta >()), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEMKernel.hpp index a919d84f8c6..bdfe2482575 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEMKernel.hpp @@ -26,7 +26,7 @@ namespace geos { -using namespace fields; + /// Namespace to contain the elastic wave kernels. namespace elasticWaveEquationSEMKernels { @@ -51,7 +51,7 @@ namespace elasticWaveEquationSEMKernels template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, - typename SX = elasticfields::StiffnessVectorx, typename SY = elasticfields::StiffnessVectory, typename SZ = elasticfields::StiffnessVectorz > + typename SX = fields::elasticfields::StiffnessVectorx, typename SY = fields::elasticfields::StiffnessVectory, typename SZ = fields::elasticfields::StiffnessVectorz > class ExplicitElasticSEMBase : public finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, @@ -100,15 +100,15 @@ class ExplicitElasticSEMBase : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_ux_n( nodeManager.getField< elasticfields::Displacementx_n >() ), - m_uy_n( nodeManager.getField< elasticfields::Displacementy_n >() ), - m_uz_n( nodeManager.getField< elasticfields::Displacementz_n >() ), + m_ux_n( nodeManager.getField< fields::elasticfields::Displacementx_n >() ), + m_uy_n( nodeManager.getField< fields::elasticfields::Displacementy_n >() ), + m_uz_n( nodeManager.getField< fields::elasticfields::Displacementz_n >() ), m_stiffnessVectorx( nodeManager.getField< SX >() ), m_stiffnessVectory( nodeManager.getField< SY >() ), m_stiffnessVectorz( nodeManager.getField< SZ >() ), - m_density( elementSubRegion.template getField< elasticfields::ElasticDensity >() ), - m_velocityVp( elementSubRegion.template getField< elasticfields::ElasticVelocityVp >() ), - m_velocityVs( elementSubRegion.template getField< elasticfields::ElasticVelocityVs >() ), + m_density( elementSubRegion.template getField< fields::elasticfields::ElasticDensity >() ), + m_velocityVp( elementSubRegion.template getField< fields::elasticfields::ElasticVelocityVp >() ), + m_velocityVs( elementSubRegion.template getField< fields::elasticfields::ElasticVelocityVs >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); @@ -273,9 +273,9 @@ template< typename SUBREGION_TYPE, class ExplicitElasticAttenuativeSEM : public ExplicitElasticSEMBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, - elasticfields::StiffnessVectorAx, - elasticfields::StiffnessVectorAy, - elasticfields::StiffnessVectorAz > + fields::elasticfields::StiffnessVectorAx, + fields::elasticfields::StiffnessVectorAy, + fields::elasticfields::StiffnessVectorAz > { public: @@ -283,9 +283,9 @@ class ExplicitElasticAttenuativeSEM : public ExplicitElasticSEMBase< SUBREGION_T using Base = ExplicitElasticSEMBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, - elasticfields::StiffnessVectorAx, - elasticfields::StiffnessVectorAy, - elasticfields::StiffnessVectorAz >; + fields::elasticfields::StiffnessVectorAx, + fields::elasticfields::StiffnessVectorAy, + fields::elasticfields::StiffnessVectorAz >; //***************************************************************************** /** @@ -313,8 +313,8 @@ class ExplicitElasticAttenuativeSEM : public ExplicitElasticSEMBase< SUBREGION_T finiteElementSpace, inputConstitutiveType, dt ), - m_qualityFactorP( elementSubRegion.template getField< elasticfields::ElasticQualityFactorP >() ), - m_qualityFactorS( elementSubRegion.template getField< elasticfields::ElasticQualityFactorS >() ) + m_qualityFactorP( elementSubRegion.template getField< fields::elasticfields::ElasticQualityFactorP >() ), + m_qualityFactorS( elementSubRegion.template getField< fields::elasticfields::ElasticQualityFactorS >() ) {} /** diff --git a/src/coreComponents/schema/docs/VTKMesh.rst b/src/coreComponents/schema/docs/VTKMesh.rst index 688b0d98319..3c6616c3087 100644 --- a/src/coreComponents/schema/docs/VTKMesh.rst +++ b/src/coreComponents/schema/docs/VTKMesh.rst @@ -4,7 +4,7 @@ Name Type Default Description ====================== ======================== ========= ============================================================================================================================================================================================================================================================================================================================================================================================================================================================================ faceBlocks groupNameRef_array {} For multi-block files, names of the face mesh block. -fieldNamesInGEOSX groupNameRef_array {} Names of the volumic fields in GEOSX to import into +fieldNamesInGEOS groupNameRef_array {} Names of the volumic fields in GEOS to import into fieldsToImport groupNameRef_array {} Volumic fields to be imported from the external mesh file file path required Path to the mesh file logLevel integer 0 Log level @@ -15,7 +15,7 @@ partitionMethod geos_vtk_PartitionMethod parmetis Method (library) used partitionRefinement integer 1 Number of partitioning refinement iterations (defaults to 1, recommended value).A value of 0 disables graph partitioning and keeps simple kd-tree partitions (not recommended). Values higher than 1 may lead to slightly improved partitioning, but yield diminishing returns. regionAttribute groupNameRef attribute Name of the VTK cell attribute to use as region marker scale R1Tensor {1,1,1} Scale the coordinates of the vertices by given scale factors (after translation) -surfacicFieldsInGEOSX groupNameRef_array {} Names of the surfacic fields in GEOSX to import into +surfacicFieldsInGEOS groupNameRef_array {} Names of the surfacic fields in GEOS to import into surfacicFieldsToImport groupNameRef_array {} Surfacic fields to be imported from the external mesh file translate R1Tensor {0,0,0} Translate the coordinates of the vertices by a given vector (prior to scaling) useGlobalIds integer 0 Controls the use of global IDs in the input file for cells and points. If set to 0 (default value), the GlobalId arrays in the input mesh are used if available, and generated otherwise. If set to a negative value, the GlobalId arrays in the input mesh are not used, and generated global Ids are automatically generated. If set to a positive value, the GlobalId arrays in the input mesh are used and required, and the simulation aborts if they are not available diff --git a/src/coreComponents/unitTests/constitutiveTests/MultiFluidTest.hpp b/src/coreComponents/unitTests/constitutiveTests/MultiFluidTest.hpp index 5817d6ea7be..943e5d5b985 100644 --- a/src/coreComponents/unitTests/constitutiveTests/MultiFluidTest.hpp +++ b/src/coreComponents/unitTests/constitutiveTests/MultiFluidTest.hpp @@ -25,9 +25,6 @@ #include "constitutive/fluid/multifluid/MultiFluidFields.hpp" #include "constitutive/fluid/multifluid/MultiFluidSelector.hpp" -using namespace geos::dataRepository; -using namespace geos::constitutive; -using namespace geos::constitutive::multifluid; namespace geos { @@ -105,7 +102,7 @@ struct MultiFluidTestData }; template< typename FLUID_TYPE, integer NUM_PHASE, integer NUM_COMP > -class MultiFluidTest : public ConstitutiveTestBase< MultiFluidBase > +class MultiFluidTest : public ConstitutiveTestBase< constitutive::MultiFluidBase > { public: static constexpr integer numPhase = NUM_PHASE; @@ -116,16 +113,16 @@ class MultiFluidTest : public ConstitutiveTestBase< MultiFluidBase > MultiFluidTest() = default; ~MultiFluidTest() override = default; - MultiFluidBase & getFluid() const { return *m_model; } + constitutive::MultiFluidBase & getFluid() const { return *m_model; } - Group & getParent() { return m_parent; } + dataRepository::Group & getParent() { return m_parent; } void testValuesAgainstPreviousImplementation( typename FLUID_TYPE::KernelWrapper const & wrapper, MultiFluidTestData< NUM_PHASE, NUM_COMP > const & testData, real64 const relTol ) const; - void testNumericalDerivatives( MultiFluidBase & fluid, - Group * parent, + void testNumericalDerivatives( constitutive::MultiFluidBase & fluid, + dataRepository::Group * parent, MultiFluidTestData< NUM_PHASE, NUM_COMP > const & testData, real64 const perturbParameter, real64 const relTol, @@ -133,7 +130,7 @@ class MultiFluidTest : public ConstitutiveTestBase< MultiFluidBase > protected: - virtual void resetFluid( MultiFluidBase & fluid ) const + virtual void resetFluid( constitutive::MultiFluidBase & fluid ) const { GEOS_UNUSED_VAR( fluid ); } @@ -155,14 +152,14 @@ class MultiFluidTest : public ConstitutiveTestBase< MultiFluidBase > template< typename FLUID_TYPE, integer NUM_PHASE, integer NUM_COMP > void MultiFluidTest< FLUID_TYPE, NUM_PHASE, NUM_COMP >:: -testNumericalDerivatives( MultiFluidBase & fluid, - Group * parent, +testNumericalDerivatives( constitutive::MultiFluidBase & fluid, + dataRepository::Group * parent, MultiFluidTestData< NUM_PHASE, NUM_COMP > const & testData, real64 const perturbParameter, real64 const relTol, real64 const absTol ) { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const NC = fluid.numFluidComponents(); integer const NP = fluid.numFluidPhases(); @@ -178,13 +175,13 @@ testNumericalDerivatives( MultiFluidBase & fluid, } arraySlice1d< real64 const, compflow::USD_COMP - 1 > const composition = compositionValues[0]; - auto const & components = fluid.getReference< string_array >( MultiFluidBase::viewKeyStruct::componentNamesString() ); - auto const & phases = fluid.getReference< string_array >( MultiFluidBase::viewKeyStruct::phaseNamesString() ); + auto const & components = fluid.getReference< string_array >( constitutive::MultiFluidBase::viewKeyStruct::componentNamesString() ); + auto const & phases = fluid.getReference< string_array >( constitutive::MultiFluidBase::viewKeyStruct::phaseNamesString() ); // create a clone of the fluid to run updates on string const fluidCopyName = fluid.getName() + "Copy"; - std::unique_ptr< ConstitutiveBase > fluidCopyPtr = fluid.deliverClone( fluidCopyName, parent ); - MultiFluidBase & fluidCopy = dynamicCast< MultiFluidBase & >( *fluidCopyPtr ); + std::unique_ptr< constitutive::ConstitutiveBase > fluidCopyPtr = fluid.deliverClone( fluidCopyName, parent ); + constitutive::MultiFluidBase & fluidCopy = dynamicCast< constitutive::MultiFluidBase & >( *fluidCopyPtr ); fluid.allocateConstitutiveData( fluid.getParent(), 1 ); fluidCopy.allocateConstitutiveData( fluid.getParent(), 1 ); @@ -193,37 +190,37 @@ testNumericalDerivatives( MultiFluidBase & fluid, #define GET_FLUID_DATA( FLUID, TRAIT ) \ FLUID.getReference< TRAIT::type >( TRAIT::key() )[0][0] - MultiFluidVarSlice< real64, 1, USD_PHASE - 2, USD_PHASE_DC - 2 > phaseFrac { + constitutive::MultiFluidVarSlice< real64, 1, constitutive::multifluid::USD_PHASE - 2, constitutive::multifluid::USD_PHASE_DC - 2 > phaseFrac { GET_FLUID_DATA( fluid, fields::multifluid::phaseFraction ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseFraction ) }; - MultiFluidVarSlice< real64, 1, USD_PHASE - 2, USD_PHASE_DC - 2 > phaseDens { + constitutive::MultiFluidVarSlice< real64, 1, constitutive::multifluid::USD_PHASE - 2, constitutive::multifluid::USD_PHASE_DC - 2 > phaseDens { GET_FLUID_DATA( fluid, fields::multifluid::phaseDensity ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseDensity ) }; - MultiFluidVarSlice< real64, 1, USD_PHASE - 2, USD_PHASE_DC - 2 > phaseVisc { + constitutive::MultiFluidVarSlice< real64, 1, constitutive::multifluid::USD_PHASE - 2, constitutive::multifluid::USD_PHASE_DC - 2 > phaseVisc { GET_FLUID_DATA( fluid, fields::multifluid::phaseViscosity ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseViscosity ) }; - MultiFluidVarSlice< real64, 1, USD_PHASE - 2, USD_PHASE_DC - 2 > phaseEnthalpy { + constitutive::MultiFluidVarSlice< real64, 1, constitutive::multifluid::USD_PHASE - 2, constitutive::multifluid::USD_PHASE_DC - 2 > phaseEnthalpy { GET_FLUID_DATA( fluid, fields::multifluid::phaseEnthalpy ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseEnthalpy ) }; - MultiFluidVarSlice< real64, 1, USD_PHASE - 2, USD_PHASE_DC - 2 > phaseInternalEnergy { + constitutive::MultiFluidVarSlice< real64, 1, constitutive::multifluid::USD_PHASE - 2, constitutive::multifluid::USD_PHASE_DC - 2 > phaseInternalEnergy { GET_FLUID_DATA( fluid, fields::multifluid::phaseInternalEnergy ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseInternalEnergy ) }; - MultiFluidVarSlice< real64, 2, USD_PHASE_COMP - 2, USD_PHASE_COMP_DC - 2 > phaseCompFrac { + constitutive::MultiFluidVarSlice< real64, 2, constitutive::multifluid::USD_PHASE_COMP - 2, constitutive::multifluid::USD_PHASE_COMP_DC - 2 > phaseCompFrac { GET_FLUID_DATA( fluid, fields::multifluid::phaseCompFraction ), GET_FLUID_DATA( fluid, fields::multifluid::dPhaseCompFraction ) }; - MultiFluidVarSlice< real64, 0, USD_FLUID - 2, USD_FLUID_DC - 2 > totalDens { + constitutive::MultiFluidVarSlice< real64, 0, constitutive::multifluid::USD_FLUID - 2, constitutive::multifluid::USD_FLUID_DC - 2 > totalDens { GET_FLUID_DATA( fluid, fields::multifluid::totalDensity ), GET_FLUID_DATA( fluid, fields::multifluid::dTotalDensity ) }; @@ -409,22 +406,22 @@ void MultiFluidTest< FLUID_TYPE, NUM_PHASE, NUM_COMP >::testValuesAgainstPreviou } arraySlice1d< real64 const, compflow::USD_COMP - 1 > const composition = compositionValues[0]; - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseFraction( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseFraction( 1, 1, numPhase, numDof ); - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseDensity( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseDensity( 1, 1, numPhase, numDof ); - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseMassDensity( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseMassDensity( 1, 1, numPhase, numDof ); - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseViscosity( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseViscosity( 1, 1, numPhase, numDof ); - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseEnthalpy( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseEnthalpy( 1, 1, numPhase, numDof ); - StackArray< real64, 3, numPhase, LAYOUT_PHASE > phaseInternalEnergy( 1, 1, numPhase ); - StackArray< real64, 4, numDof *numPhase, LAYOUT_PHASE_DC > dPhaseInternalEnergy( 1, 1, numPhase, numDof ); - StackArray< real64, 4, numComp *numPhase, LAYOUT_PHASE_COMP > phaseCompFraction( 1, 1, numPhase, numComp ); - StackArray< real64, 5, numDof *numComp *numPhase, LAYOUT_PHASE_COMP_DC > dPhaseCompFraction( 1, 1, numPhase, numComp, numDof ); - StackArray< real64, 2, 1, LAYOUT_FLUID > totalDensity( 1, 1 ); - StackArray< real64, 3, numDof, LAYOUT_FLUID_DC > dTotalDensity( 1, 1, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseFraction( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseFraction( 1, 1, numPhase, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseDensity( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseDensity( 1, 1, numPhase, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseMassDensity( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseMassDensity( 1, 1, numPhase, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseViscosity( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseViscosity( 1, 1, numPhase, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseEnthalpy( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseEnthalpy( 1, 1, numPhase, numDof ); + StackArray< real64, 3, numPhase, constitutive::multifluid::LAYOUT_PHASE > phaseInternalEnergy( 1, 1, numPhase ); + StackArray< real64, 4, numDof *numPhase, constitutive::multifluid::LAYOUT_PHASE_DC > dPhaseInternalEnergy( 1, 1, numPhase, numDof ); + StackArray< real64, 4, numComp *numPhase, constitutive::multifluid::LAYOUT_PHASE_COMP > phaseCompFraction( 1, 1, numPhase, numComp ); + StackArray< real64, 5, numDof *numComp *numPhase, constitutive::multifluid::LAYOUT_PHASE_COMP_DC > dPhaseCompFraction( 1, 1, numPhase, numComp, numDof ); + StackArray< real64, 2, 1, constitutive::multifluid::LAYOUT_FLUID > totalDensity( 1, 1 ); + StackArray< real64, 3, numDof, constitutive::multifluid::LAYOUT_FLUID_DC > dTotalDensity( 1, 1, numDof ); wrapper.compute( testData.pressure, testData.temperature, diff --git a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCO2Brine.cpp b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCO2Brine.cpp index 5df07a14155..bc017852419 100644 --- a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCO2Brine.cpp +++ b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCO2Brine.cpp @@ -24,6 +24,7 @@ using namespace geos; using namespace geos::testing; +using namespace geos::dataRepository; using namespace geos::constitutive; enum class BrineModelType : int {Phillips, Ezrokhi}; diff --git a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCompositionalMultiphasePVTPackage.cpp b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCompositionalMultiphasePVTPackage.cpp index fe6c9453352..76c0ebd5b1e 100644 --- a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCompositionalMultiphasePVTPackage.cpp +++ b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidCompositionalMultiphasePVTPackage.cpp @@ -23,6 +23,7 @@ using namespace geos; using namespace geos::testing; +using namespace geos::dataRepository; using namespace geos::constitutive; namespace geos diff --git a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidDeadOil.cpp b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidDeadOil.cpp index 7921e3ec313..3b1059e79cd 100644 --- a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidDeadOil.cpp +++ b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidDeadOil.cpp @@ -23,6 +23,7 @@ using namespace geos; using namespace geos::testing; +using namespace geos::dataRepository; using namespace geos::constitutive; static constexpr char const * pvdgTableContent = "# Pg(Pa) Bg(m3/sm3) Visc(Pa.s)\n" diff --git a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidLiveOil.cpp b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidLiveOil.cpp index f62078f4d39..c8896524a14 100644 --- a/src/coreComponents/unitTests/constitutiveTests/testMultiFluidLiveOil.cpp +++ b/src/coreComponents/unitTests/constitutiveTests/testMultiFluidLiveOil.cpp @@ -23,6 +23,7 @@ using namespace geos; using namespace geos::testing; +using namespace geos::dataRepository; using namespace geos::constitutive; static constexpr char const * pvdgTableContent = "# Pg(Pa) Bg(m3/sm3) Visc(Pa.s)\n" diff --git a/src/coreComponents/unitTests/fluidFlowTests/testCompFlowUtils.hpp b/src/coreComponents/unitTests/fluidFlowTests/testCompFlowUtils.hpp index 595420857a2..4759403391b 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testCompFlowUtils.hpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testCompFlowUtils.hpp @@ -33,9 +33,6 @@ namespace geos namespace testing { -using namespace geos::constitutive; -using namespace geos::constitutive::multifluid; - inline void fillNumericalJacobian( arrayView1d< real64 const > const & residual, arrayView1d< real64 const > const & residualOrig, @@ -114,7 +111,7 @@ void testCompositionNumericalDerivatives( CompositionalMultiphaseFVM & solver, SCOPED_TRACE( subRegion.getParent().getParent().getName() + "/" + subRegion.getName() ); string const & fluidName = subRegion.getReference< string >( CompositionalMultiphaseBase::viewKeyStruct::fluidNamesString() ); - MultiFluidBase const & fluid = subRegion.getConstitutiveModel< MultiFluidBase >( fluidName ); + constitutive::MultiFluidBase const & fluid = subRegion.getConstitutiveModel< constitutive::MultiFluidBase >( fluidName ); arrayView1d< string const > const & components = fluid.componentNames(); arrayView2d< real64, compflow::USD_COMP > const compDens = @@ -181,7 +178,7 @@ void testPhaseVolumeFractionNumericalDerivatives( CompositionalMultiphaseFVM & s real64 const perturbParameter, real64 const relTol ) { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numComp = solver.numFluidComponents(); integer const numPhase = solver.numFluidPhases(); @@ -199,7 +196,7 @@ void testPhaseVolumeFractionNumericalDerivatives( CompositionalMultiphaseFVM & s SCOPED_TRACE( subRegion.getParent().getParent().getName() + "/" + subRegion.getName() ); string const & fluidName = subRegion.getReference< string >( CompositionalMultiphaseFVM::viewKeyStruct::fluidNamesString() ); - MultiFluidBase const & fluid = subRegion.getConstitutiveModel< MultiFluidBase >( fluidName ); + constitutive::MultiFluidBase const & fluid = subRegion.getConstitutiveModel< constitutive::MultiFluidBase >( fluidName ); arrayView1d< string const > const & components = fluid.componentNames(); arrayView1d< string const > const & phases = fluid.phaseNames(); @@ -346,7 +343,7 @@ void testPhaseMobilityNumericalDerivatives( CompositionalMultiphaseFVM & solver, real64 const perturbParameter, real64 const relTol ) { - using Deriv = multifluid::DerivativeOffset; + using Deriv = constitutive::multifluid::DerivativeOffset; integer const numComp = solver.numFluidComponents(); integer const numPhase = solver.numFluidPhases(); @@ -364,7 +361,7 @@ void testPhaseMobilityNumericalDerivatives( CompositionalMultiphaseFVM & solver, SCOPED_TRACE( subRegion.getParent().getParent().getName() + "/" + subRegion.getName() ); string const & fluidName = subRegion.getReference< string >( CompositionalMultiphaseFVM::viewKeyStruct::fluidNamesString() ); - MultiFluidBase const & fluid = subRegion.getConstitutiveModel< MultiFluidBase >( fluidName ); + constitutive::MultiFluidBase const & fluid = subRegion.getConstitutiveModel< constitutive::MultiFluidBase >( fluidName ); arrayView1d< string const > const & components = fluid.componentNames(); arrayView1d< string const > const & phases = fluid.phaseNames(); diff --git a/src/coreComponents/unitTests/fluidFlowTests/testSingleFlowUtils.hpp b/src/coreComponents/unitTests/fluidFlowTests/testSingleFlowUtils.hpp index 115e6ef2d2a..fc0c28d223e 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testSingleFlowUtils.hpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testSingleFlowUtils.hpp @@ -33,8 +33,6 @@ namespace geos namespace testing { -using namespace geos::constitutive; - void fillNumericalJacobian( arrayView1d< real64 const > const & residual, arrayView1d< real64 const > const & residualOrig, globalIndex const dofIndex, diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/DruckerPrager/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/DruckerPrager/Example.rst index 7eec2c3f25c..e02f57bc2b7 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/DruckerPrager/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/DruckerPrager/Example.rst @@ -121,4 +121,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ExtendedDruckerPrager/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ExtendedDruckerPrager/Example.rst index ceaf5963b8d..4c51b85d703 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ExtendedDruckerPrager/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ExtendedDruckerPrager/Example.rst @@ -126,4 +126,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ModifiedCamClay/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ModifiedCamClay/Example.rst index b9c3d9a3a09..48760a4f70d 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ModifiedCamClay/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ModifiedCamClay/Example.rst @@ -97,4 +97,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoDruckerPrager/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoDruckerPrager/Example.rst index ed576585670..323cef2e2fd 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoDruckerPrager/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoDruckerPrager/Example.rst @@ -112,4 +112,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoExtendedDruckerPrager/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoExtendedDruckerPrager/Example.rst index 35c9cef1313..88fba339887 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoExtendedDruckerPrager/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoExtendedDruckerPrager/Example.rst @@ -112,4 +112,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoModifiedCamClay/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoModifiedCamClay/Example.rst index 8972eed2f22..964ffbcbb2c 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoModifiedCamClay/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/viscoplasticity/ViscoModifiedCamClay/Example.rst @@ -103,4 +103,4 @@ To go further **Feedback on this example** -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. diff --git a/src/docs/sphinx/advancedExamples/validationStudies/wellboreProblems/casedContactElasticWellbore/Example.rst b/src/docs/sphinx/advancedExamples/validationStudies/wellboreProblems/casedContactElasticWellbore/Example.rst index 0fa899e49b3..7db478cad33 100644 --- a/src/docs/sphinx/advancedExamples/validationStudies/wellboreProblems/casedContactElasticWellbore/Example.rst +++ b/src/docs/sphinx/advancedExamples/validationStudies/wellboreProblems/casedContactElasticWellbore/Example.rst @@ -149,4 +149,4 @@ To go further **Feedback on this example** This concludes the cased wellbore example. -For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_. +For any feedback on this example, please submit a `GitHub issue on the project's GitHub page `_.