diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index 77bf2821028..b13e8df8d83 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -413,26 +413,11 @@ void CompositionalMultiphaseWell::validateFluidModel( } } - void CompositionalMultiphaseWell::validateWellConstraints( real64 const & time_n, - real64 const & GEOS_UNUSED_PARAM( dt ), + real64 const & dt, WellElementSubRegion const & subRegion ) { - GEOS_UNUSED_VAR( time_n ); - - if( !useSurfaceConditions() ) - { - bool const useSegmentValues = referenceReservoirRegion().empty(); - - static bool firstNoRefRegionMsg = true; - if( useSegmentValues && firstNoRefRegionMsg ) - { - GEOS_WARNING( WellControls::viewKeyStruct::referenceReservoirRegionString() << - " not set: well constraint fluid property calculations will use top segement pressure and temp ", - getDataContext() ); - firstNoRefRegionMsg = false; - } - } + WellControls::validateWellConstraints( time_n, dt, subRegion ); string const & fluidName = subRegion.getReference< string >( viewKeyStruct::fluidNamesString()); MultiFluidBase const & fluid = subRegion.getConstitutiveModel< MultiFluidBase >( fluidName ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.hpp index de23fec8bfc..05ac08b0e34 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.hpp @@ -400,9 +400,9 @@ class CompositionalMultiphaseWell : public WellControls * @param subRegion the well subRegion * @param elemManager the element manager */ - virtual void validateWellConstraints( real64 const & time_n, - real64 const & dt, - WellElementSubRegion const & subRegion ) override; + void validateWellConstraints( real64 const & time_n, + real64 const & dt, + WellElementSubRegion const & subRegion ) override; /** * @brief Create well separator diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index 7b50cd11d1c..b6f807af1ee 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -188,28 +188,6 @@ string SinglePhaseWell::resElementDofName() const return SinglePhaseBase::viewKeyStruct::elemDofFieldString(); } -void SinglePhaseWell::validateWellConstraints( real64 const & time_n, - real64 const & GEOS_UNUSED_PARAM( dt ), - WellElementSubRegion const & subRegion ) -{ - GEOS_UNUSED_VAR( time_n ); - GEOS_UNUSED_VAR( subRegion ); - - if( useSurfaceConditions() ) - { - bool const useSegmentValues = referenceReservoirRegion().empty(); - - static bool firstNoRefRegionMsg = true; - if( useSegmentValues && firstNoRefRegionMsg ) - { - GEOS_WARNING( WellControls::viewKeyStruct::referenceReservoirRegionString() << - " not set: well constraint fluid property calculations will use top segement pressure and temp ", - getDataContext() ); - firstNoRefRegionMsg = false; - } - } -} - void SinglePhaseWell::initializeWellPostInitialConditionsPreSubGroups( WellElementSubRegion & subRegion ) { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.hpp index 12d1697db8d..d6f835bfcf1 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.hpp @@ -335,19 +335,6 @@ class SinglePhaseWell : public WellControls ReferenceConditions getReferenceConditions( WellElementSubRegion const & subRegion ); - /** - * @brief Make sure that the well constraints are compatible - * @param time_n the time at the beginning of the time step - * @param dt the time step dt - * @param subRegion the well subRegion - */ - virtual void validateWellConstraints( real64 const & time_n, - real64 const & dt, - WellElementSubRegion const & subRegion - ) override; - - - /** * @brief Create well separator */ diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index c55bcd2c2b7..477aad32534 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -248,6 +248,25 @@ void WellControls::registerWellDataOnMesh( WellElementSubRegion & subRegion ) } } +void WellControls::validateWellConstraints( real64 const & GEOS_UNUSED_PARAM( time_n ), + real64 const & GEOS_UNUSED_PARAM( dt ), + WellElementSubRegion const & GEOS_UNUSED_PARAM( subRegion )) +{ + if( !useSurfaceConditions() ) + { + bool const useSegmentValues = referenceReservoirRegion().empty(); + + static bool firstNoRefRegionMsg = true; + if( useSegmentValues && firstNoRefRegionMsg ) + { + GEOS_WARNING( WellControls::viewKeyStruct::referenceReservoirRegionString() << + " not set: well constraint fluid property calculations will use the top segment pressure and temperature", + getDataContext() ); + firstNoRefRegionMsg = false; + } + } +} + void WellControls::updateNumDofPerElement() { localIndex const numFlowComponents = numFluidComponents(); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.hpp index afadd22a724..e32dfcf51cc 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.hpp @@ -148,9 +148,15 @@ class WellControls : public dataRepository::Group */ /**@{*/ + /** + * @brief Make sure that the well constraints are compatible + * @param time_n the time at the beginning of the time step + * @param dt the time step dt + * @param subRegion the well subRegion + */ virtual void validateWellConstraints( real64 const & time_n, real64 const & dt, - WellElementSubRegion const & subRegion ) = 0; + WellElementSubRegion const & subRegion ); virtual bool isCompositional() const = 0; /**