Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
07da0dc
feat: Add reference thermal conductivity
dkachuma Feb 3, 2026
66fc294
Update reference temperature
dkachuma Feb 3, 2026
0c3212e
Fix ats file
dkachuma Feb 3, 2026
ebe53a0
Rebaseline
dkachuma Feb 3, 2026
88e907d
Capture local variable for kernel launch
dkachuma Feb 3, 2026
b8e7357
Update schema
dkachuma Feb 4, 2026
1946e48
Initialise thermal conductivity
dkachuma Feb 4, 2026
c1c238d
Fix CUDA compilation error
dkachuma Feb 4, 2026
7e6ed1e
Add thermal conductivity to embedded fracture solver
dkachuma Feb 4, 2026
1e1f2c0
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Feb 9, 2026
b260905
Rebaseline
dkachuma Feb 9, 2026
8513525
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Feb 9, 2026
b89d2a5
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Mar 19, 2026
f29ff61
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Mar 27, 2026
0e69780
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 7, 2026
ab42f1d
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 7, 2026
0e26b5b
Restore baseline notes
dkachuma Apr 7, 2026
b881d54
Rebaseline
dkachuma Apr 8, 2026
77e542a
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 8, 2026
d2f92f2
Update baseline path in integrated tests configuration
dkachuma Apr 9, 2026
19e5288
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 9, 2026
d4852dc
Rebaseline
dkachuma Apr 9, 2026
809c0ef
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 9, 2026
7a8e07f
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 10, 2026
2cdc31e
Rebaseline
dkachuma Apr 10, 2026
901fe5b
Merge branch 'develop' into dkachuma/reference-thermal-conductivity
dkachuma Apr 13, 2026
c2da3eb
Rebaseline
dkachuma Apr 14, 2026
b9a4e48
Merge origin/develop into dkachuma/reference-thermal-conductivity
Copilot Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .integrated_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baselines:
bucket: geosx
baseline: integratedTests/baseline_integratedTests-pr4021-16339-bb862da
baseline: integratedTests/baseline_integratedTests-pr3959-16333-901fe5b

allow_fail:
all: ''
Expand Down
4 changes: 3 additions & 1 deletion BASELINE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ PR #4021 (2026-04-14) <https://storage.googleapis.com/geosx/integratedTests/base
=====================
Add Young Modulus & Poisson import from VTK mesh

PR #3959 (2026-04-10) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3959-16333-901fe5b.tar.gz>
Add reference thermal conductivity

PR #3883 (2026-04-10) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3883-16299-3037085.tar.gz>
=====================
Move PVT Driver tests from unit tests to integrated tests

PR #4007 (2026-04-03) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr4007-16213-67a3002.tar.gz>
Expand Down
1 change: 1 addition & 0 deletions inputFiles/singlePhaseWell/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mesh_1d.vtr filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions inputFiles/singlePhaseWell/mesh_1d.vtr
Git LFS file not shown
7 changes: 7 additions & 0 deletions inputFiles/singlePhaseWell/singlePhaseWell.ats
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ decks = [
partitions=((1, 1, 1), (2, 2, 2)),
restart_step=5,
check_step=10,
restartcheck_params=RestartcheckParameters(**restartcheck_params)),
TestDeck(
name="thermal_compressible_single_phase_wells_1d",
description='Thermal well test (1D, thermal, 1 wells)',
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

Minor grammar in the test description: "1 wells" should be singular ("1 well").

Suggested change
description='Thermal well test (1D, thermal, 1 wells)',
description='Thermal well test (1D, thermal, 1 well)',

Copilot uses AI. Check for mistakes.
partitions=((1, 1, 1),),
restart_step=10,
check_step=10,
restartcheck_params=RestartcheckParameters(**restartcheck_params))
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
<?xml version="1.0"?>
<Problem>
<Solvers>
<SinglePhaseReservoir
name="RESERVOIR.SOLVER"
flowSolverName="FLOW.SOLVER"
wellSolverName="WELL.SOLVER"
logLevel="1"
initialDt="86400"
targetRegions="{ RESERVOIR, WELL }">
<NonlinearSolverParameters
newtonTol="1.0e-4"
maxAllowedResidualNorm="1e12"
newtonMaxIter="25" />
<LinearSolverParameters
solverType="fgmres"
preconditionerType="mgr"
krylovTol="1e-4"
krylovAdaptiveTol="1"
krylovWeakestTol="1e-4"
logLevel="1" />
</SinglePhaseReservoir>

<SinglePhaseFVM
name="FLOW.SOLVER"
discretization="FLUID.TPFA"
targetRegions="{ RESERVOIR }"
temperature="380.15"
isThermal="1"
logLevel="2" />
<SinglePhaseWell
name="WELL.SOLVER"
logLevel="1"
isThermal="1"
targetRegions="{ WELL }">
<WellControls
name="WELL.CONTROL"
type="injector"
control="totalVolRate"
referenceElevation="-200"
useSurfaceConditions="1"
surfacePressure="101325.0"
surfaceTemperature="283.15"
injectionTemperature="293.15"
initialPressureCoefficient="0"
injectionStream="{1.0}"
targetBHP="1e10"
enableCrossflow="0"
targetTotalRateTableName="RATE" />
</SinglePhaseWell>
</Solvers>

<NumericalMethods>
<FiniteVolume>
<TwoPointFluxApproximation
name="FLUID.TPFA" />
</FiniteVolume>
</NumericalMethods>

<Mesh>
<VTKMesh
name="GLOBAL"
file="mesh_1d.vtr"
fieldNamesInGEOS="{ THERMAL.COND_referenceThermalConductivity }"
fieldsToImport="{ CONDUCTIVITY }"
logLevel="5">
<InternalWell
name="well.INJECTOR"
wellRegionName="WELL"
wellControlsName="WELL.CONTROL"
polylineNodeCoords="{
{ 6440.37, 0.0, -200 },
{ 6440.37, 0.0, -300 }
}"
polylineSegmentConn="{ { 0, 1 } }"
radius="0.19"
numElementsPerSegment="1">
<Perforation
name="WELL.PERF.1"
distanceFromHead="75.0" />
</InternalWell>
</VTKMesh>
</Mesh>

<ElementRegions>
<CellElementRegion
name="RESERVOIR"
cellBlocks="{ hexahedra }"
materialList="{ FLUID, ROCK, THERMAL.COND }" />
<WellElementRegion
name="WELL" materialList="{ FLUID }" />
</ElementRegions>

<Constitutive>
<ThermalCompressibleSinglePhaseFluid
name="FLUID"
defaultDensity="1032.26544679"
defaultViscosity="0.0002634"
referencePressure="40810068.4183"
referenceDensity="1032.26544679"
compressibility="0.00037130e-5"
referenceViscosity="0.0002634"
referenceTemperature="380.15"
thermalExpansionCoeff="3e-4"
viscosibility="0.0"
specificHeatCapacity="4180.0"
referenceInternalEnergy="0.001" />

<NullModel
name="NULL.SOLID" />

<SinglePhaseThermalConductivity
name="THERMAL.COND"
defaultThermalConductivityComponents="{ 0.68337, 0.68337, 0.68337 }"
thermalConductivityGradientComponents="{ -1.2e-5, -1.2e-5, -1.5e-5 }"
referenceTemperature="380.15" />

<SolidInternalEnergy
name="ROCK.ENERGY"
referenceVolumetricHeatCapacity="2.07e6"
referenceTemperature="273.0"
referenceInternalEnergy="0.0" />

<CompressibleSolidConstantPermeability
name="ROCK"
solidModelName="NULL.SOLID"
porosityModelName="ROCK.POROSITY"
permeabilityModelName="ROCK.PERMEABILITY"
solidInternalEnergyModelName="ROCK.ENERGY" />

<PressurePorosity
name="ROCK.POROSITY"
defaultReferencePorosity="0.3"
referencePressure="40800000.0000"
compressibility="4.0950e-14" />

<ConstantPermeability
name="ROCK.PERMEABILITY"
permeabilityComponents="{ 9.869233e-14, 9.869233e-14, 9.869233e-14}" />

</Constitutive>

<FieldSpecifications>
<FieldSpecification
name="INITIAL.PRESSURE"
setNames="{ all }"
objectPath="ElementRegions/RESERVOIR"
fieldName="pressure"
scale="169.12e5"
initialCondition="1" />
<FieldSpecification
name="INITIAL.TEMPERATURE"
setNames="{ all }"
objectPath="ElementRegions/RESERVOIR"
fieldName="temperature"
scale="380.15"
initialCondition="1" />
</FieldSpecifications>

<Functions>
<TableFunction
name="RATE"
interpolation="lower"
inputVarNames="{ time }"
coordinates="{ 0.0, 2592000, 86400000}"
values="{ 0.0, 2.911949431, 2.911949431 }" />

</Functions>

<Tasks>
<SinglePhaseStatistics
name="STATISTICS"
flowSolverName="FLOW.SOLVER"
logLevel="1"
writeCSV="1" />
</Tasks>

<Outputs>
<VTK
name="VTK" />
<Restart
name="RESTART"/>
</Outputs>

<Events maxTime="9504000">
<PeriodicEvent
name="SOLVER.APPLICATION"
target="/Solvers/RESERVOIR.SOLVER"
maxEventDt="864000" />
<PeriodicEvent
name="STATISTICS"
target="/Tasks/STATISTICS"
targetExactTimestep="1"
timeFrequency="864000" />
<PeriodicEvent
name="VTK"
target="/Outputs/VTK"
targetExactTimestep="1"
timeFrequency="864000" />
<PeriodicEvent
name="RESTART"
timeFrequency="1728000"
targetExactTimestep="1"
target="/Outputs/RESTART" />
</Events>
</Problem>
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,35 @@ SinglePhaseThermalConductivity::SinglePhaseThermalConductivity( string const & n
setDescription( "The reference temperature at which the conductivity components are equal to the default values" );
}

void SinglePhaseThermalConductivity::allocateConstitutiveData( Group & parent, localIndex const numPts )
{
SinglePhaseThermalConductivityBase::allocateConstitutiveData( parent, numPts );

initializeState( parent.size());
Comment on lines +52 to +53
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

allocateConstitutiveData() calls initializeState(parent.size()), which unconditionally fills referenceThermalConductivity. If this field is meant to be importable (VTK/restart/field spec), initializing unconditionally here can overwrite values depending on initialization/import order. Consider deferring initialization until after import, or making initialization conditional (only fill entries that are still unset).

Suggested change
initializeState( parent.size());

Copilot uses AI. Check for mistakes.
}

void SinglePhaseThermalConductivity::initializeState() const
{
SinglePhaseThermalConductivityBase::initializeState();
localIndex const size = m_referenceThermalConductivity.size( 0 );
initializeState( size );
}

void SinglePhaseThermalConductivity::initializeRockFluidState( arrayView2d< real64 const > const & initialPorosity ) const
{
arrayView3d< real64 const > referenceThermalConductivity = m_referenceThermalConductivity.toViewConst();
arrayView3d< real64 > dEffectiveConductivity_dT = m_dEffectiveConductivity_dT.toView();
arrayView3d< real64 > effectiveConductivity = m_effectiveConductivity.toView();
R1Tensor const defaultThermalConductivityComponents = m_defaultThermalConductivityComponents;
R1Tensor const thermalConductivityGradientComponents = m_thermalConductivityGradientComponents;

forAll< parallelDevicePolicy<> >( initialPorosity.size( 0 ), [=] GEOS_HOST_DEVICE ( localIndex const ei )
{
// NOTE: enforcing 1 quadrature point
for( localIndex q = 0; q < 1; ++q )
{
effectiveConductivity[ei][q][0] = defaultThermalConductivityComponents[0];
effectiveConductivity[ei][q][1] = defaultThermalConductivityComponents[1];
effectiveConductivity[ei][q][2] = defaultThermalConductivityComponents[2];
effectiveConductivity[ei][q][0] = referenceThermalConductivity[ei][q][0];
effectiveConductivity[ei][q][1] = referenceThermalConductivity[ei][q][1];
effectiveConductivity[ei][q][2] = referenceThermalConductivity[ei][q][2];

dEffectiveConductivity_dT[ei][q][0] = thermalConductivityGradientComponents[0];
dEffectiveConductivity_dT[ei][q][1] = thermalConductivityGradientComponents[1];
Expand All @@ -71,9 +85,9 @@ void SinglePhaseThermalConductivity::initializeRockFluidState( arrayView2d< real

void SinglePhaseThermalConductivity::updateFromTemperature( arrayView1d< real64 const > const & temperature ) const
{
arrayView3d< real64 const > referenceThermalConductivity = m_referenceThermalConductivity.toViewConst();
arrayView3d< real64 > dEffectiveConductivity_dT = m_dEffectiveConductivity_dT.toView();
arrayView3d< real64 > effectiveConductivity = m_effectiveConductivity.toView();
R1Tensor const defaultThermalConductivityComponents = m_defaultThermalConductivityComponents;
R1Tensor const thermalConductivityGradientComponents = m_thermalConductivityGradientComponents;
real64 const referenceTemperature = m_referenceTemperature;

Expand All @@ -84,9 +98,9 @@ void SinglePhaseThermalConductivity::updateFromTemperature( arrayView1d< real64

real64 const deltaTemperature = temperature[ei] - referenceTemperature;

effectiveConductivity[ei][q][0] = defaultThermalConductivityComponents[0] + thermalConductivityGradientComponents[0] * deltaTemperature;
effectiveConductivity[ei][q][1] = defaultThermalConductivityComponents[1] + thermalConductivityGradientComponents[1] * deltaTemperature;
effectiveConductivity[ei][q][2] = defaultThermalConductivityComponents[2] + thermalConductivityGradientComponents[2] * deltaTemperature;
effectiveConductivity[ei][q][0] = referenceThermalConductivity[ei][q][0] + thermalConductivityGradientComponents[0] * deltaTemperature;
effectiveConductivity[ei][q][1] = referenceThermalConductivity[ei][q][1] + thermalConductivityGradientComponents[1] * deltaTemperature;
effectiveConductivity[ei][q][2] = referenceThermalConductivity[ei][q][2] + thermalConductivityGradientComponents[2] * deltaTemperature;

for( localIndex i=0; i<=2; i++ )
{
Expand All @@ -113,6 +127,24 @@ void SinglePhaseThermalConductivity::postInputInitialization()

}

void SinglePhaseThermalConductivity::initializeState( localIndex const size ) const
{
integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point

arrayView3d< real64 > referenceThermalConductivity = m_referenceThermalConductivity.toView();
R1Tensor const defaultThermalConductivityComponents = m_defaultThermalConductivityComponents;

forAll< parallelDevicePolicy<> >( size, [=] GEOS_HOST_DEVICE ( localIndex const ei )
{
for( localIndex q = 0; q < numQuad; ++q )
{
referenceThermalConductivity[ei][q][0] = defaultThermalConductivityComponents[0];
referenceThermalConductivity[ei][q][1] = defaultThermalConductivityComponents[1];
referenceThermalConductivity[ei][q][2] = defaultThermalConductivityComponents[2];
Comment on lines +141 to +143
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

initializeState(size) currently overwrites referenceThermalConductivity for every element (no guard). Since SurfaceGenerator/EmbeddedSurfaceGenerator call initializeState() after creating fracture elements, this can clobber previously imported or previously set values. Consider only initializing entries that are still unset (e.g., <= 0, similar to ConstantPermeability::initializeState()), and/or initializing only the newly-added element range.

Suggested change
referenceThermalConductivity[ei][q][0] = defaultThermalConductivityComponents[0];
referenceThermalConductivity[ei][q][1] = defaultThermalConductivityComponents[1];
referenceThermalConductivity[ei][q][2] = defaultThermalConductivityComponents[2];
if( referenceThermalConductivity[ei][q][0] <= 0 )
{
referenceThermalConductivity[ei][q][0] = defaultThermalConductivityComponents[0];
}
if( referenceThermalConductivity[ei][q][1] <= 0 )
{
referenceThermalConductivity[ei][q][1] = defaultThermalConductivityComponents[1];
}
if( referenceThermalConductivity[ei][q][2] <= 0 )
{
referenceThermalConductivity[ei][q][2] = defaultThermalConductivityComponents[2];
}

Copilot uses AI. Check for mistakes.
}
} );
}

REGISTER_CATALOG_ENTRY( ConstitutiveBase, SinglePhaseThermalConductivity, string const &, Group * const )

} // namespace constitutive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ class SinglePhaseThermalConductivityUpdate : public SinglePhaseThermalConductivi
* @param effectiveConductivity the array of cell-wise effective conductivities in the subregion
* the subregion
*/
SinglePhaseThermalConductivityUpdate( arrayView3d< real64 > const & effectiveConductivity,
SinglePhaseThermalConductivityUpdate( arrayView3d< real64 > const & referenceThermalConductivity,
arrayView3d< real64 > const & effectiveConductivity,
arrayView3d< real64 > const & dEffectiveConductivity_dT )
: SinglePhaseThermalConductivityBaseUpdate( effectiveConductivity,
: SinglePhaseThermalConductivityBaseUpdate( referenceThermalConductivity,
effectiveConductivity,
dEffectiveConductivity_dT )
{}

Expand Down Expand Up @@ -72,10 +74,16 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase

virtual string getCatalogName() const override { return catalogName(); }

virtual void allocateConstitutiveData( Group & parent, localIndex const numPts ) override;

virtual void initializeRockFluidState( arrayView2d< real64 const > const & initialPorosity ) const override final;

virtual void updateFromTemperature( arrayView1d< real64 const > const & temperature ) const override final;

virtual void initializeState() const override;

void initializeState( localIndex const size ) const;

/// Type of kernel wrapper for in-kernel update
using KernelWrapper = SinglePhaseThermalConductivityUpdate;

Expand All @@ -85,7 +93,8 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase
*/
KernelWrapper createKernelWrapper() const
{
return KernelWrapper( m_effectiveConductivity,
return KernelWrapper( m_referenceThermalConductivity,
m_effectiveConductivity,
m_dEffectiveConductivity_dT );
}

Expand Down
Loading
Loading