-
Notifications
You must be signed in to change notification settings - Fork 101
feat: Add reference thermal conductivity #3959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
07da0dc
66fc294
0c3212e
ebe53a0
88e907d
b8e7357
1946e48
c1c238d
7e6ed1e
1e1f2c0
b260905
8513525
b89d2a5
f29ff61
0e69780
ab42f1d
0e26b5b
b881d54
77e542a
d2f92f2
19e5288
d4852dc
809c0ef
7a8e07f
2cdc31e
901fe5b
c2da3eb
b9a4e48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| mesh_1d.vtr filter=lfs diff=lfs merge=lfs -text |
| 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 | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
|
||||||||||||||||||||||||||||||||
| initializeState( parent.size()); |
Copilot
AI
Apr 14, 2026
There was a problem hiding this comment.
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.
| 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]; | |
| } |
There was a problem hiding this comment.
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").