Skip to content

Commit 2d40255

Browse files
authored
feat: Input error when a box does not select anything (#3808)
When a box (usually a user-defined volume) is not selected and the deck does not involve a SurfaceGenerator, the simulation is stopped and output a detailed error. The user can precise this error state by adding a errorSetMode in the targeted FieldSpecification wrapper with "silent|warning|error". Also update the example on 5 units tests where the box defined didn't include the targeted mesh. Edited the Thermal Leaky Well example. The smoke version of this was not implementing the boundary conditions correctly.
1 parent fd319c2 commit 2d40255

27 files changed

+699
-465
lines changed

.integrated_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
baselines:
22
bucket: geosx
3-
baseline: integratedTests/baseline_integratedTests-pr3193-14118-8ee1c34
3+
baseline: integratedTests/baseline_integratedTests-pr3808-14160-03c20b2
44

55
allow_fail:
66
all: ''

BASELINE_NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This file is designed to track changes to the integrated test baselines.
66
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.
77
These notes should be in reverse-chronological order, and use the following time format: (YYYY-MM-DD).
88

9+
PR #3808 (2025-10-10) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3808-14160-03c20b2.tar.gz>
10+
=====================
11+
Add errorSetMode for the FiedSpecification
12+
913
PR #3193 (2025-10-10) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3193-14118-8ee1c34.tar.gz>
1014
=====================
1115
Enable geothermal gradient in HydrostaticEquilibrium for single-phase flow.
@@ -81,7 +85,6 @@ Add hydrofrac verification cases for leak-off.
8185
PR #3587 (2025-09-08) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3587-13389-99ac8e4.tar.gz>
8286
=====================
8387
Perforation status option. Updates for schema changes and well quantities not being compute if well is closed
84-
8588
PR #3788 (2025-09-07) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3788-13372-e0a1d67.tar.gz>
8689
=====================
8790
Updating txt files for class09_pb3_hystRelperm.
Lines changed: 49 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,33 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<Problem>
4-
5-
<!-- SPHINX_SOLVER -->
6-
<Solvers>
7-
<CompositionalMultiphaseFVM
8-
name="compflow"
9-
logLevel="1"
10-
discretization="fluidTPFA"
11-
temperature="307.15"
12-
initialDt="1"
13-
targetRelativePressureChangeInTimeStep="1"
14-
targetPhaseVolFractionChangeInTimeStep="1"
15-
useMass="1"
16-
targetRegions="{ aquiferTop, aquiferBottom, injectionWell, leakyWell }">
17-
<NonlinearSolverParameters
18-
newtonTol="1.0e-3"
19-
newtonMaxIter="20"
20-
timeStepIncreaseIterLimit="0.5"
21-
timeStepDecreaseIterLimit="0.9"
22-
maxTimeStepCuts="5"
23-
lineSearchAction="Attempt"/>
24-
<LinearSolverParameters
25-
directParallel="0"/>
26-
</CompositionalMultiphaseFVM>
27-
</Solvers>
28-
<!-- SPHINX_SOLVER_END -->
294

305
<Events
31-
maxTime="8.64e6">
6+
maxTime="8.64e5">
327
<PeriodicEvent
338
name="outputs"
34-
timeFrequency="8.64e6"
9+
timeFrequency="8.64e5"
3510
target="/Outputs/vtkOutput"/>
11+
<PeriodicEvent
12+
name="statistics"
13+
timeFrequency="4.32e5"
14+
target="/Tasks/compflowStatistics"/>
3615
<PeriodicEvent
3716
name="timeHistoryOutput"
38-
timeFrequency="4.32e6"
17+
timeFrequency="4.32e5"
3918
target="/Outputs/timeHistoryOutput"/>
4019
<PeriodicEvent
4120
name="timeHistoryCollection"
42-
timeFrequency="4.32e6"
21+
timeFrequency="4.32e5"
4322
target="/Tasks/compOutfluxCollection"/>
44-
<PeriodicEvent
45-
name="solverApplications1"
46-
beginTime="0"
47-
endTime="1e5"
48-
target="/Solvers/compflow"/>
49-
<PeriodicEvent
50-
name="solverApplications2"
51-
beginTime="1e5"
52-
forceDt="1e5"
53-
target="/Solvers/compflow"/>
5423
<PeriodicEvent
5524
name="restarts"
56-
timeFrequency="4.32e6"
25+
timeFrequency="4.32e5"
5726
targetExactTimestep="0"
5827
target="/Outputs/restartOutput"/>
5928
<PeriodicEvent
60-
name="statistics"
61-
forceDt="1e6"
62-
target="/Tasks/compflowStatistics"/>
29+
name="solverApplications"
30+
target="/Solvers/compflow"/>
6331
</Events>
6432

6533
<NumericalMethods>
@@ -100,7 +68,32 @@
10068
materialList="{ }"/>
10169
</ElementRegions>
10270
<!-- SPHINX_ELEMENT_REGIONS_END -->
103-
71+
72+
<Geometry>
73+
<Box
74+
name="source"
75+
xMin="{ 99.85, -0.15, -801 }"
76+
xMax="{ 100.15, 0.15, -769 }"/>
77+
78+
<Box
79+
name="west"
80+
xMin="{ -500.01, -500.01, -801 }"
81+
xMax="{ -499.99, 500.01, -639 }"/>
82+
<Box
83+
name="east"
84+
xMin="{ 499.99, -500.01, -801 }"
85+
xMax="{ 500.01, 500.01, -639 }"/>
86+
<Box
87+
name="north"
88+
xMin="{ -500.01, -500.01, -801 }"
89+
xMax="{ 500.01, -499.99, -639 }"/>
90+
<Box
91+
name="south"
92+
xMin="{ -500.01, 499.99, -801 }"
93+
xMax="{ 500.01, 500.01, -639 }"/>
94+
95+
</Geometry>
96+
10497
<Constitutive>
10598

10699
<!-- SPHINX_FLUID -->
@@ -172,123 +165,36 @@
172165
name="sourceTerm"
173166
objectPath="ElementRegions/injectionWell"
174167
component="0"
175-
scale="-0.0887"
168+
scale="-8.87"
176169
setNames="{ source }"/>
177170
<!-- SPHINX_SOURCE_BC_END -->
178171

179172
<!-- SPHINX_DIRICHLET_BC -->
180173
<FieldSpecification
181-
name="bcPressureAquiferBottom"
182-
objectPath="ElementRegions/aquiferBottom"
183-
setNames="{ east, west, south, north }"
174+
name="bcPressure"
175+
objectPath="faceManager"
176+
setNames="{ east, west, south, north }"
184177
fieldName="pressure"
185178
functionName="pressureFunction"
186179
scale="1"/>
187180
<FieldSpecification
188-
name="bcTemperatureAquiferBottom"
189-
objectPath="ElementRegions/aquiferBottom"
181+
name="bcTemperature"
182+
objectPath="faceManager"
190183
setNames="{ east, west, south, north }"
191184
fieldName="temperature"
192185
functionName="initTempTable"
193186
scale="1"/>
194187
<FieldSpecification
195-
name="bcCompositionCO2AquiferBottom"
188+
name="bcCompositionCO2"
196189
setNames="{ east, west, south, north }"
197-
objectPath="ElementRegions/aquiferBottom"
190+
objectPath="faceManager"
198191
fieldName="globalCompFraction"
199192
component="0"
200193
scale="0.000001"/>
201194
<FieldSpecification
202-
name="bcCompositionWaterAquiferBottom"
195+
name="bcCompositionWater"
203196
setNames="{ east, west, south, north }"
204-
objectPath="ElementRegions/aquiferBottom"
205-
fieldName="globalCompFraction"
206-
component="1"
207-
scale="0.999999"/>
208-
209-
<FieldSpecification
210-
name="bcPressureAquiferTop"
211-
objectPath="ElementRegions/aquiferTop"
212-
setNames="{ east, west, south, north }"
213-
fieldName="pressure"
214-
functionName="pressureFunction"
215-
scale="1"/>
216-
<FieldSpecification
217-
name="bcTemperatureAquiferTop"
218-
objectPath="ElementRegions/aquiferTop"
219-
setNames="{ east, west, south, north }"
220-
fieldName="temperature"
221-
functionName="initTempTable"
222-
scale="1"/>
223-
<FieldSpecification
224-
name="bcCompositionCO2AquiferTop"
225-
setNames="{ east, west, south, north }"
226-
objectPath="ElementRegions/aquiferTop"
227-
fieldName="globalCompFraction"
228-
component="0"
229-
scale="0.000001"/>
230-
<FieldSpecification
231-
name="bcCompositionWaterAquiferTop"
232-
setNames="{ east, west, south, north }"
233-
objectPath="ElementRegions/aquiferTop"
234-
fieldName="globalCompFraction"
235-
component="1"
236-
scale="0.999999"/>
237-
238-
<FieldSpecification
239-
name="bcPressureLeakyWell"
240-
objectPath="ElementRegions/leakyWell"
241-
setNames="{ east, west, south, north }"
242-
fieldName="pressure"
243-
functionName="pressureFunction"
244-
scale="1"/>
245-
<FieldSpecification
246-
name="bcTemperatureLeakyWell"
247-
objectPath="ElementRegions/leakyWell"
248-
setNames="{ east, west, south, north }"
249-
fieldName="temperature"
250-
functionName="initTempTable"
251-
scale="1"/>
252-
<FieldSpecification
253-
name="bcCompositionCO2LeakyWell"
254-
setNames="{ east, west, south, north }"
255-
objectPath="ElementRegions/leakyWell"
256-
fieldName="globalCompFraction"
257-
component="0"
258-
scale="0.000001"/>
259-
<FieldSpecification
260-
name="bcCompositionWaterLeakyWell"
261-
setNames="{ east, west, south, north }"
262-
objectPath="ElementRegions/leakyWell"
263-
fieldName="globalCompFraction"
264-
component="1"
265-
scale="0.999999"/>
266-
267-
<FieldSpecification
268-
name="bcPressureInjectionWell"
269-
objectPath="ElementRegions/injectionWell"
270-
setNames="{ east, west, south, north }"
271-
fieldName="pressure"
272-
functionName="pressureFunction"
273-
scale="1"/>
274-
<FieldSpecification
275-
name="bcTemperatureInjectionWell"
276-
objectPath="ElementRegions/injectionWell"
277-
setNames="{ east, west, south, north }"
278-
fieldName="temperature"
279-
functionName="initTempTable"
280-
scale="1"/>
281-
<FieldSpecification
282-
name="bcCompositionCO2InjectionWell"
283-
setNames="{ east, west, south, north }"
284-
objectPath="ElementRegions/injectionWell"
285-
fieldName="globalCompFraction"
286-
component="0"
287-
scale="0.000001"/>
288-
<FieldSpecification
289-
name="bcCompositionWaterInjectionWell"
290-
setNames="{ east, west, south, north }"
291-
objectPath="ElementRegions/injectionWell"
197+
objectPath="faceManager"
292198
fieldName="globalCompFraction"
293199
component="1"
294200
scale="0.999999"/>
@@ -326,13 +232,13 @@
326232

327233
<TableFunction
328234
name="pressureFunction"
329-
inputVarNames="{ elementCenter }"
235+
inputVarNames="{ faceCenter }"
330236
coordinateFiles="{ xlin.geos, ylin.geos, zlin.geos}"
331237
voxelFile="pressure.geos"
332238
interpolation="linear" />
333239
<TableFunction
334240
name="temperatureFunction"
335-
inputVarNames="{ elementCenter }"
241+
inputVarNames="{ faceCenter }"
336242
coordinateFiles="{ xlin.geos, ylin.geos, zlin.geos}"
337243
voxelFile="temperature.geos"
338244
interpolation="linear" />

inputFiles/compositionalMultiphaseFlow/benchmarks/thermalLeakyWell/thermalLeakyWell_benchmark.xml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,34 @@
44

55
<Included>
66
<File
7-
name="./thermalLeakyWell_base_iterative.xml"/>
7+
name="./thermalLeakyWell_base.xml"/>
88
</Included>
99

10+
<!-- SPHINX_SOLVER -->
11+
<Solvers>
12+
<CompositionalMultiphaseFVM
13+
name="compflow"
14+
logLevel="1"
15+
discretization="fluidTPFA"
16+
temperature="307.15"
17+
initialDt="1"
18+
useMass="1"
19+
targetRegions="{ aquiferTop, aquiferBottom, injectionWell, leakyWell }">
20+
<NonlinearSolverParameters
21+
newtonTol="1.0e-3"
22+
newtonMaxIter="20"
23+
timeStepIncreaseIterLimit="0.5"
24+
timeStepDecreaseIterLimit="0.9"
25+
maxTimeStepCuts="5"
26+
lineSearchAction="Attempt"/>
27+
<LinearSolverParameters
28+
solverType="fgmres"
29+
preconditionerType="mgr"
30+
krylovTol="1e-4"/>
31+
</CompositionalMultiphaseFVM>
32+
</Solvers>
33+
<!-- SPHINX_SOLVER_END -->
34+
1035
<!-- SPHINX_MESH -->
1136
<Mesh>
1237
<InternalMesh
@@ -29,30 +54,5 @@
2954
aquiferTop02, aquiferTop12, aquiferTop22, aquiferTop32, aquiferTop42 }"/>
3055
</Mesh>
3156
<!-- SPHINX_MESH_END -->
32-
33-
<Geometry>
34-
<Box
35-
name="source"
36-
xMin="{ 99.85, -0.15, -801 }"
37-
xMax="{ 100.15, 0.15, -769 }"/>
3857

39-
<Box
40-
name="west"
41-
xMin="{ -500.01, -500.01, -801 }"
42-
xMax="{ -489.99, 500.01, -639 }"/>
43-
<Box
44-
name="east"
45-
xMin="{ 489.99, -500.01, -801 }"
46-
xMax="{ 500.01, 500.01, -639 }"/>
47-
<Box
48-
name="north"
49-
xMin="{ -500.01, -500.01, -801 }"
50-
xMax="{ 500.01, -489.99, -639 }"/>
51-
<Box
52-
name="south"
53-
xMin="{ -500.01, 489.99, -801 }"
54-
xMax="{ 500.01, 500.01, -639 }"/>
55-
56-
</Geometry>
57-
5858
</Problem>

0 commit comments

Comments
 (0)