Skip to content

Conversation

npillardou
Copy link
Contributor

@npillardou npillardou commented Jun 28, 2024

The purpose of this PR is to add the geothermal gradient capacities for single-phase flow.

At the moment the temperature VS Elevation is correlated with the composition VS Elevation, maybe this point could be extended to something that is independent of the composition:

<HydrostaticEquilibrium
  name="Initialisation"
  datumElevation="-3790"
  datumPressure="4.3e7"
  objectPath="ElementRegions"
  initialPhaseName="water"
  componentNames="{ co2, water }"
  componentFractionVsElevationTableNames="{ CO2VD, H2OVD }"
  temperatureVsElevationTableName="initTempTable" />  

Further work is needed to account for composition in the hydrostatic pressure kernel, as it is done in CompositionalMultiphaseFlow.

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

❌ Patch coverage is 17.47573% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.27%. Comparing base (e3d5c72) to head (9d84a71).

Files with missing lines Patch % Lines
...s/singlePhase/ThermalHydrostaticPressureKernel.hpp 0.00% 61 Missing ⚠️
...constitutive/fluid/singlefluid/SingleFluidBase.hpp 0.00% 13 Missing ⚠️
...nents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp 60.71% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3193      +/-   ##
===========================================
- Coverage    58.31%   58.27%   -0.05%     
===========================================
  Files         1319     1320       +1     
  Lines       114626   114715      +89     
===========================================
+ Hits         66846    66852       +6     
- Misses       47780    47863      +83     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paveltomin
Copy link
Collaborator

@npillardou are you planning to finish this PR or it can be closed?

@herve-gross
Copy link
Contributor

@dkachuma and @jhuang2601 please take a look

@npillardou
Copy link
Contributor Author

@npillardou are you planning to finish this PR or it can be closed?

Sorry @paveltomin I totally forgot to answer you. I should take some time to investigate a good implementation, maybe with the help of Jian and Dick.

@jhuang2601 jhuang2601 changed the title Geothermal Gradient for Single Phase flow feat: Geothermal Gradient for Single Phase flow Sep 24, 2025
@jhuang2601 jhuang2601 added the type: feature New feature or request label Sep 24, 2025
Copy link
Contributor

@jafranc jafranc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to make it consistent with this:

enum class ReturnType : integer
{
FAILED_TO_CONVERGE = 0,
DETECTED_MULTIPHASE_FLOW = 1,
SUCCESS = 2,
DETECTED_SINGLEPHASE_FLOW = 3,
PHASE_CORRECTION_NOT_NEEDED = 4
};

from #3795

Copy link
Contributor

@jafranc jafranc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@npillardou can you add an inputFile using it ?

@paveltomin paveltomin requested a review from wrtobin as a code owner October 7, 2025 23:06
GEOS_THROW_IF_NE_MSG( value, ExponentApproximationType::Linear,
GEOS_FMT( "{}: invalid model type in attribute '{}' (only linear currently supported)", getFullName(), attribute ),
InputError );
GEOS_THROW_IF( value != ExponentApproximationType::Linear && value != ExponentApproximationType::Full,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linear is not supported anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both linear and full are valid. If the value is not one of these, it throws an error.

paveltomin and others added 11 commits October 8, 2025 09:19
Removed default move assignment operator and its implementation from KernelWrapper.
Removed unnecessary blank line in KernelWrapper class.
Removed unnecessary blank line in KernelWrapper class.
forAll< parallelDevicePolicy< > >( targetSet.size(), [=] GEOS_HOST_DEVICE ( localIndex const i )
RAJA::ReduceMin< parallelHostReduce, real64 > minPressure( LvArray::NumericLimits< real64 >::max );

forAll< parallelHostPolicy >( targetSet.size(), [=] GEOS_HOST_DEVICE ( localIndex const i )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rrsettgast @klevzoff
changing this from parallelDevicePolicy to parallelHostPolicy seems to resolve that unit test failure

@paveltomin paveltomin merged commit 49c3a66 into develop Oct 10, 2025
25 of 26 checks passed
@paveltomin paveltomin deleted the feature/npillardou/singlePhaseGeothermalGradient branch October 10, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants