From 07da0dcd4425012fd7f87c592937c2c5f734c62a Mon Sep 17 00:00:00 2001 From: dkachuma Date: Tue, 3 Feb 2026 12:10:01 -0600 Subject: [PATCH 1/9] feat: Add reference thermal conductivity --- inputFiles/singlePhaseWell/.gitattributes | 1 + inputFiles/singlePhaseWell/mesh_1d.vtr | 3 + .../singlePhaseWell/singlePhaseWell.ats | 7 + ...mal_compressible_single_phase_wells_1d.xml | 205 ++++++++++++++++++ .../SinglePhaseThermalConductivity.cpp | 35 ++- .../SinglePhaseThermalConductivity.hpp | 11 +- .../SinglePhaseThermalConductivityBase.cpp | 2 + .../SinglePhaseThermalConductivityBase.hpp | 12 +- .../ThermalConductivityFields.hpp | 8 + 9 files changed, 271 insertions(+), 13 deletions(-) create mode 100644 inputFiles/singlePhaseWell/.gitattributes create mode 100644 inputFiles/singlePhaseWell/mesh_1d.vtr create mode 100644 inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml diff --git a/inputFiles/singlePhaseWell/.gitattributes b/inputFiles/singlePhaseWell/.gitattributes new file mode 100644 index 00000000000..507ac808a4f --- /dev/null +++ b/inputFiles/singlePhaseWell/.gitattributes @@ -0,0 +1 @@ +mesh_1d.vtr filter=lfs diff=lfs merge=lfs -text diff --git a/inputFiles/singlePhaseWell/mesh_1d.vtr b/inputFiles/singlePhaseWell/mesh_1d.vtr new file mode 100644 index 00000000000..40f887362ab --- /dev/null +++ b/inputFiles/singlePhaseWell/mesh_1d.vtr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6df3056da5d3838b0ef835e2d73b56b1623a150b41deb1329c242b4e1a0cc18d +size 2110 diff --git a/inputFiles/singlePhaseWell/singlePhaseWell.ats b/inputFiles/singlePhaseWell/singlePhaseWell.ats index 1f3dd38018f..c99fa7073e1 100644 --- a/inputFiles/singlePhaseWell/singlePhaseWell.ats +++ b/inputFiles/singlePhaseWell/singlePhaseWell.ats @@ -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)', + partitions=((1, 1, 1)), + restart_step=2, + check_step=0, restartcheck_params=RestartcheckParameters(**restartcheck_params)) ] diff --git a/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml b/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml new file mode 100644 index 00000000000..dd884c3dad9 --- /dev/null +++ b/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp index 00d77439387..5fb08ae2865 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp @@ -46,11 +46,30 @@ 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 ); + + integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point + + arrayView3d< real64 > referenceThermalConductivity = m_referenceThermalConductivity.toView(); + + forAll< parallelDevicePolicy<> >( parent.size(), [=] GEOS_HOST_DEVICE ( localIndex const ei ) + { + for( localIndex q = 0; q < numQuad; ++q ) + { + referenceThermalConductivity[ei][q][0] = m_defaultThermalConductivityComponents[0]; + referenceThermalConductivity[ei][q][1] = m_defaultThermalConductivityComponents[1]; + referenceThermalConductivity[ei][q][2] = m_defaultThermalConductivityComponents[2]; + } + } ); +} + 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 ) @@ -58,9 +77,9 @@ void SinglePhaseThermalConductivity::initializeRockFluidState( arrayView2d< real // 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]; @@ -71,9 +90,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; @@ -84,9 +103,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++ ) { diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp index 2e65c26f48b..7c869e697f7 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp @@ -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 ) {} @@ -72,6 +74,8 @@ 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; @@ -85,7 +89,8 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase */ KernelWrapper createKernelWrapper() const { - return KernelWrapper( m_effectiveConductivity, + return KernelWrapper( m_referenceThermalConductivity, + m_effectiveConductivity, m_dEffectiveConductivity_dT ); } diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp index 240a3792df4..a06fa8f17a0 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp @@ -31,6 +31,7 @@ namespace constitutive SinglePhaseThermalConductivityBase::SinglePhaseThermalConductivityBase( string const & name, Group * const parent ) : ConstitutiveBase( name, parent ) { + registerField< fields::thermalconductivity::referenceThermalConductivity >( &m_referenceThermalConductivity ); registerField< fields::thermalconductivity::effectiveConductivity >( &m_effectiveConductivity ); registerField< fields::thermalconductivity::dEffectiveConductivity_dT >( &m_dEffectiveConductivity_dT ); } @@ -38,6 +39,7 @@ SinglePhaseThermalConductivityBase::SinglePhaseThermalConductivityBase( string c void SinglePhaseThermalConductivityBase::allocateConstitutiveData( Group & parent, localIndex const numPts ) { // NOTE: enforcing 1 quadrature point + m_referenceThermalConductivity.resize( 0, 1, 3 ); m_effectiveConductivity.resize( 0, 1, 3 ); m_dEffectiveConductivity_dT.resize( 0, 1, 3 ); diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp index 09444cd7e06..ad5dcd0ec97 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp @@ -57,12 +57,17 @@ class SinglePhaseThermalConductivityBaseUpdate * @brief Constructor for the class performing the thermal conductivity updates * @param effectiveConductivity the array of cell-wise effective conductivities in the subregion */ - SinglePhaseThermalConductivityBaseUpdate( arrayView3d< real64 > const & effectiveConductivity, + SinglePhaseThermalConductivityBaseUpdate( arrayView3d< real64 > const & referenceThermalConductivity, + arrayView3d< real64 > const & effectiveConductivity, arrayView3d< real64 > const & dEffectiveConductivity_dT ) - : m_effectiveConductivity( effectiveConductivity ), + : m_referenceThermalConductivity( referenceThermalConductivity ), + m_effectiveConductivity( effectiveConductivity ), m_dEffectiveConductivity_dT( dEffectiveConductivity_dT ) {} + /// View on the cell-wise reference conductivities + arrayView3d< real64 > m_referenceThermalConductivity; + /// View on the cell-wise effective conductivities arrayView3d< real64 > m_effectiveConductivity; @@ -147,6 +152,9 @@ class SinglePhaseThermalConductivityBase : public ConstitutiveBase protected: + /// cell-wise reference conductivities in the subregion + array3d< real64 > m_referenceThermalConductivity; + /// cell-wise effective conductivities in the subregion array3d< real64 > m_effectiveConductivity; diff --git a/src/coreComponents/constitutive/thermalConductivity/ThermalConductivityFields.hpp b/src/coreComponents/constitutive/thermalConductivity/ThermalConductivityFields.hpp index a04c1a2bffc..35302d1e321 100644 --- a/src/coreComponents/constitutive/thermalConductivity/ThermalConductivityFields.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/ThermalConductivityFields.hpp @@ -48,6 +48,14 @@ DECLARE_FIELD( dEffectiveConductivity_dT, WRITE_AND_READ, "Derivative of effective conductivity w.r.t. temperature" ); +DECLARE_FIELD( referenceThermalConductivity, + "referenceThermalConductivity", + array3d< real64 >, + 0, + LEVEL_0, + WRITE_AND_READ, + "Reference thermal conductivity" ); + DECLARE_FIELD( rockThermalConductivity, "rockThermalConductivity", array3d< real64 >, From 66fc29412ffaf768d6ded7f963b9403427459418 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Tue, 3 Feb 2026 12:22:49 -0600 Subject: [PATCH 2/9] Update reference temperature --- .../thermal_compressible_single_phase_wells_1d.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml b/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml index dd884c3dad9..a31832a2072 100644 --- a/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml +++ b/inputFiles/singlePhaseWell/thermal_compressible_single_phase_wells_1d.xml @@ -112,7 +112,8 @@ + thermalConductivityGradientComponents="{ -1.2e-5, -1.2e-5, -1.5e-5 }" + referenceTemperature="380.15" /> Date: Tue, 3 Feb 2026 13:21:10 -0600 Subject: [PATCH 3/9] Fix ats file --- inputFiles/singlePhaseWell/singlePhaseWell.ats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputFiles/singlePhaseWell/singlePhaseWell.ats b/inputFiles/singlePhaseWell/singlePhaseWell.ats index c99fa7073e1..6f3a9ebb343 100644 --- a/inputFiles/singlePhaseWell/singlePhaseWell.ats +++ b/inputFiles/singlePhaseWell/singlePhaseWell.ats @@ -61,7 +61,7 @@ decks = [ TestDeck( name="thermal_compressible_single_phase_wells_1d", description='Thermal well test (1D, thermal, 1 wells)', - partitions=((1, 1, 1)), + partitions=((1, 1, 1),), restart_step=2, check_step=0, restartcheck_params=RestartcheckParameters(**restartcheck_params)) From ebe53a079faf0a7d8281d03d63f4db98e22e927d Mon Sep 17 00:00:00 2001 From: dkachuma Date: Tue, 3 Feb 2026 14:59:12 -0600 Subject: [PATCH 4/9] Rebaseline --- .integrated_tests.yaml | 2 +- BASELINE_NOTES.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.integrated_tests.yaml b/.integrated_tests.yaml index cba1657ab23..ac11c7b5009 100644 --- a/.integrated_tests.yaml +++ b/.integrated_tests.yaml @@ -1,6 +1,6 @@ baselines: bucket: geosx - baseline: integratedTests/baseline_integratedTests-pr3940-15307-53de7ba + baseline: integratedTests/baseline_integratedTests-pr3959-15395-0c3212e allow_fail: all: '' diff --git a/BASELINE_NOTES.md b/BASELINE_NOTES.md index 621dd209242..0e45bc823dc 100644 --- a/BASELINE_NOTES.md +++ b/BASELINE_NOTES.md @@ -6,6 +6,10 @@ 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 #3959 (2026-02-03) +===================== +Addition of reference thermal conductivity for thermal single phase + PR #3940 (2026-01-27) ===================== Fix the transimissibility calculated between a cell and a surface element From 88e907df231ff16012f71ffcc1175c5f2657b886 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Tue, 3 Feb 2026 15:05:15 -0600 Subject: [PATCH 5/9] Capture local variable for kernel launch --- .../thermalConductivity/SinglePhaseThermalConductivity.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp index 5fb08ae2865..3af6157b83f 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp @@ -53,14 +53,15 @@ void SinglePhaseThermalConductivity::allocateConstitutiveData( Group & parent, l integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point arrayView3d< real64 > referenceThermalConductivity = m_referenceThermalConductivity.toView(); + R1Tensor const defaultThermalConductivityComponents = m_defaultThermalConductivityComponents; forAll< parallelDevicePolicy<> >( parent.size(), [=] GEOS_HOST_DEVICE ( localIndex const ei ) { for( localIndex q = 0; q < numQuad; ++q ) { - referenceThermalConductivity[ei][q][0] = m_defaultThermalConductivityComponents[0]; - referenceThermalConductivity[ei][q][1] = m_defaultThermalConductivityComponents[1]; - referenceThermalConductivity[ei][q][2] = m_defaultThermalConductivityComponents[2]; + referenceThermalConductivity[ei][q][0] = defaultThermalConductivityComponents[0]; + referenceThermalConductivity[ei][q][1] = defaultThermalConductivityComponents[1]; + referenceThermalConductivity[ei][q][2] = defaultThermalConductivityComponents[2]; } } ); } From b8e7357912f68abd17c8eb675570fb778220f030 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Wed, 4 Feb 2026 09:38:12 -0600 Subject: [PATCH 6/9] Update schema --- src/coreComponents/schema/schema.xsd.other | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index e77cc9d197a..1e2c85101fd 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -3215,6 +3215,8 @@ A field can represent a physical variable. (pressure, temperature, global compos + + From 1946e48d22300fa899420884a8f8029c186b7a9b Mon Sep 17 00:00:00 2001 From: dkachuma Date: Wed, 4 Feb 2026 11:19:55 -0600 Subject: [PATCH 7/9] Initialise thermal conductivity --- .integrated_tests.yaml | 2 +- .../SinglePhaseThermalConductivity.cpp | 38 ++++++++++++------- .../SinglePhaseThermalConductivity.hpp | 4 ++ .../SinglePhaseThermalConductivityBase.cpp | 3 ++ .../SinglePhaseThermalConductivityBase.hpp | 5 +++ .../surfaceGeneration/SurfaceGenerator.cpp | 9 +++++ 6 files changed, 47 insertions(+), 14 deletions(-) diff --git a/.integrated_tests.yaml b/.integrated_tests.yaml index ac11c7b5009..cba1657ab23 100644 --- a/.integrated_tests.yaml +++ b/.integrated_tests.yaml @@ -1,6 +1,6 @@ baselines: bucket: geosx - baseline: integratedTests/baseline_integratedTests-pr3959-15395-0c3212e + baseline: integratedTests/baseline_integratedTests-pr3940-15307-53de7ba allow_fail: all: '' diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp index 3af6157b83f..9ea5afdfbc1 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp @@ -50,20 +50,14 @@ void SinglePhaseThermalConductivity::allocateConstitutiveData( Group & parent, l { SinglePhaseThermalConductivityBase::allocateConstitutiveData( parent, numPts ); - integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point - - arrayView3d< real64 > referenceThermalConductivity = m_referenceThermalConductivity.toView(); - R1Tensor const defaultThermalConductivityComponents = m_defaultThermalConductivityComponents; + initializeState( parent.size()); +} - forAll< parallelDevicePolicy<> >( parent.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]; - } - } ); +void SinglePhaseThermalConductivity::initializeState() const +{ + SinglePhaseThermalConductivityBase::initializeState(); + localIndex const size = m_referenceThermalConductivity.size( 0 ); + initializeState( size ); } void SinglePhaseThermalConductivity::initializeRockFluidState( arrayView2d< real64 const > const & initialPorosity ) const @@ -134,6 +128,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]; + } + } ); +} + REGISTER_CATALOG_ENTRY( ConstitutiveBase, SinglePhaseThermalConductivity, string const &, Group * const ) } // namespace constitutive diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp index 7c869e697f7..333216afc48 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp @@ -80,6 +80,8 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase virtual void updateFromTemperature( arrayView1d< real64 const > const & temperature ) const override final; + virtual void initializeState() const override; + /// Type of kernel wrapper for in-kernel update using KernelWrapper = SinglePhaseThermalConductivityUpdate; @@ -105,6 +107,8 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase virtual void postInputInitialization() override; + void initializeState( localIndex const size ) const; + private: /// Default thermal conductivity components in the subRegion diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp index a06fa8f17a0..82dd3f86aee 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.cpp @@ -46,6 +46,9 @@ void SinglePhaseThermalConductivityBase::allocateConstitutiveData( Group & paren ConstitutiveBase::allocateConstitutiveData( parent, numPts ); } +void SinglePhaseThermalConductivityBase::initializeState() const +{} + } // namespace constitutive } // namespace geos diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp index ad5dcd0ec97..4a8dd518986 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp @@ -150,6 +150,11 @@ class SinglePhaseThermalConductivityBase : public ConstitutiveBase */ arrayView3d< real64 const > dEffectiveConductivity_dT() const { return m_dEffectiveConductivity_dT; } + /** + * @brief Initialize the thermal conductivity state + */ + virtual void initializeState() const; + protected: /// cell-wise reference conductivities in the subregion diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index 76a9fd032c4..0c723c53bf3 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -28,6 +28,7 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/SurfaceElementRegion.hpp" #include "mesh/utilities/ComputationalGeometry.hpp" +#include "constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp" @@ -552,6 +553,14 @@ real64 SurfaceGenerator::solverStep( real64 const & time_n, PermeabilityBase & permModel = getConstitutiveModel< PermeabilityBase >( fractureSubRegion, permModelName ); permModel.initializeState(); } + + string const thermalCondModelName = getConstitutiveName< SinglePhaseThermalConductivityBase >( fractureSubRegion ); + if( !thermalCondModelName.empty() ) + { + // if a thermal conductivity model exists we need to set the intial value to something meaningful + SinglePhaseThermalConductivityBase & thermalCondModel = getConstitutiveModel< SinglePhaseThermalConductivityBase >( fractureSubRegion, thermalCondModelName ); + thermalCondModel.initializeState(); + } } ); return rval; From c1c238dbc59218136c1d05746a875f8389865ca8 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Wed, 4 Feb 2026 11:29:30 -0600 Subject: [PATCH 8/9] Fix CUDA compilation error --- .../thermalConductivity/SinglePhaseThermalConductivity.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp index 333216afc48..81431564f81 100644 --- a/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp +++ b/src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp @@ -82,6 +82,8 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase virtual void initializeState() const override; + void initializeState( localIndex const size ) const; + /// Type of kernel wrapper for in-kernel update using KernelWrapper = SinglePhaseThermalConductivityUpdate; @@ -107,8 +109,6 @@ class SinglePhaseThermalConductivity : public SinglePhaseThermalConductivityBase virtual void postInputInitialization() override; - void initializeState( localIndex const size ) const; - private: /// Default thermal conductivity components in the subRegion From 7e6ed1ebdc782f3db2d1312ab57c26ac05c7f532 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Wed, 4 Feb 2026 14:32:55 -0600 Subject: [PATCH 9/9] Add thermal conductivity to embedded fracture solver --- .../surfaceGeneration/EmbeddedSurfaceGenerator.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp index 4af9efde608..6e5fed08e4f 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp @@ -28,6 +28,7 @@ #include "mesh/MeshFields.hpp" #include "mesh/utilities/ComputationalGeometry.hpp" #include "mesh/utilities/CIcomputationKernel.hpp" +#include "constitutive/thermalConductivity/SinglePhaseThermalConductivityBase.hpp" #include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp" #include "mesh/simpleGeometricObjects/GeometricObjectManager.hpp" #include "mesh/simpleGeometricObjects/Rectangle.hpp" @@ -283,6 +284,14 @@ real64 EmbeddedSurfaceGenerator::solverStep( real64 const & GEOS_UNUSED_PARAM( t gravityCoef[ ei ] = LvArray::tensorOps::AiBi< 3 >( elemCenter[ ei ], gravVector ); } ); } + + string const thermalCondModelName = getConstitutiveName< SinglePhaseThermalConductivityBase >( fractureSubRegion ); + if( !thermalCondModelName.empty() ) + { + // if a thermal conductivity model exists we need to set the intial value to something meaningful + SinglePhaseThermalConductivityBase & thermalCondModel = getConstitutiveModel< SinglePhaseThermalConductivityBase >( fractureSubRegion, thermalCondModelName ); + thermalCondModel.initializeState(); + } } ); return rval;