Skip to content

Commit 907fb3f

Browse files
tjb-ltkpaveltomin
andauthored
fix: Feature/byer3/mass inj constraint fix (#3495)
Co-authored-by: Pavel Tomin <paveltomin@users.noreply.github.com>
1 parent a8a57c7 commit 907fb3f

File tree

11 files changed

+540
-15
lines changed

11 files changed

+540
-15
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-pr3384-9542-4e0f693
3+
baseline: integratedTests/baseline_integratedTests-pr3495-9552-257c87e
44
allow_fail:
55
all: ''
66
streak: ''

BASELINE_NOTES.md

Lines changed: 4 additions & 0 deletions
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 #3495 (2024-01-08)
10+
=====================
11+
Add missing logic to support switching from fixed mass rate injection rate constraint to max injection pressure.
12+
913
PR #3384 (2024-01-07)
1014
=====================
1115
Added plastic strain output.

inputFiles/compositionalMultiphaseWell/compositionalMultiphaseWell.ats

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ decks = [
7676
partitions=[(1, 1, 1), (2, 2, 1)],
7777
restart_step=12,
7878
check_step=25,
79+
restartcheck_params=RestartcheckParameters(**restartcheck_params)),
80+
TestDeck(
81+
name="isothm_mass_inj_table",
82+
description=
83+
"Isothermal mass injection constraint testing control switching",
84+
partitions=[(1, 1, 1), (1, 2, 1)],
85+
restart_step=24,
86+
check_step=28,
87+
restartcheck_params=RestartcheckParameters(**restartcheck_params)),
88+
TestDeck(
89+
name="isothm_vol_inj_table",
90+
description=
91+
"Isothermal vol injection constraint testing control switching, should have same results as isothm_mass_inj_table.xml",
92+
partitions=[(1, 1, 1), (1, 2, 1)],
93+
restart_step=24,
94+
check_step=28,
7995
restartcheck_params=RestartcheckParameters(**restartcheck_params))
8096
]
8197

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
<?xml version="1.0" ?>
2+
3+
<Problem>
4+
<Solvers>
5+
<CompositionalMultiphaseReservoir
6+
name="coupledFlowAndWells"
7+
flowSolverName="compflow"
8+
wellSolverName="compositionalMultiphaseWell"
9+
logLevel="4"
10+
initialDt="1e2"
11+
targetRegions="{ region, injwell }">
12+
<NonlinearSolverParameters
13+
logLevel="4"
14+
newtonTol="1.0e-3"
15+
timeStepDecreaseIterLimit="0.41"
16+
newtonMaxIter="40"
17+
lineSearchAction="None"/>
18+
<LinearSolverParameters
19+
logLevel="4"
20+
solverType="fgmres"
21+
krylovTol="1e-4"/>
22+
</CompositionalMultiphaseReservoir>
23+
24+
<CompositionalMultiphaseFVM
25+
name="compflow"
26+
logLevel="4"
27+
discretization="fluidTPFA"
28+
temperature="368.15"
29+
useMass="1"
30+
initialDt="1e2"
31+
maxCompFractionChange="0.5"
32+
targetRegions="{ region }">
33+
</CompositionalMultiphaseFVM>
34+
35+
<CompositionalMultiphaseWell
36+
name="compositionalMultiphaseWell"
37+
targetRegions="{ injwell }"
38+
writeCSV="1"
39+
logLevel="1"
40+
useMass="1">
41+
<WellControls
42+
name="WC_CO2_INJ"
43+
logLevel="2"
44+
type="injector"
45+
control="massRate"
46+
referenceElevation="-0.01"
47+
enableCrossflow="0"
48+
useSurfaceConditions="1"
49+
surfacePressure="1.45e7"
50+
surfaceTemperature="300.15"
51+
targetTotalRate="15"
52+
targetBHPTableName="totalBHPTable"
53+
targetMassRateTableName="totalMassRateTable"
54+
injectionTemperature="300.15"
55+
injectionStream="{ 1.0, 0.000 }"/>
56+
</CompositionalMultiphaseWell>
57+
</Solvers>
58+
59+
<Mesh>
60+
<InternalMesh
61+
name="mesh1"
62+
elementTypes="{ C3D8 }"
63+
xCoords="{ 0, 2000 }"
64+
yCoords="{ 0, 2000 }"
65+
zCoords="{ 0, 2000 }"
66+
nx="{ 1 }"
67+
ny="{ 4 }"
68+
nz="{ 1 }"
69+
cellBlockNames="{ cb }">
70+
<InternalWell
71+
name="inj1"
72+
wellRegionName="injwell"
73+
wellControlsName="WC_CO2_INJ"
74+
logLevel="1"
75+
polylineNodeCoords="{ { 50.0, 30.0, 51.01 },
76+
{ 50.0, 1450.0, 51.00 } }"
77+
polylineSegmentConn="{ { 0, 1 } }"
78+
radius="0.1"
79+
numElementsPerSegment="2">
80+
<Perforation
81+
name="injector1_perf3"
82+
distanceFromHead="171.93"/>
83+
<Perforation
84+
name="injector1_perf17"
85+
distanceFromHead="1334.738"/>
86+
87+
</InternalWell>
88+
</InternalMesh>
89+
90+
</Mesh>
91+
92+
<Geometry>
93+
<Box
94+
name="sink"
95+
xMin="{ 89.99, 89.99, -0.01 }"
96+
xMax="{ 101.01, 101.01, 1.01 }"/>
97+
98+
99+
</Geometry>
100+
101+
<Events
102+
maxTime="2.5e5">
103+
<PeriodicEvent
104+
name="outputs"
105+
timeFrequency="2.5e4"
106+
target="/Outputs/vtkOutput"/>
107+
108+
<PeriodicEvent
109+
name="solverApplications"
110+
maxEventDt="2.5e4"
111+
target="/Solvers/coupledFlowAndWells"/>
112+
113+
<PeriodicEvent
114+
name="restarts"
115+
timeFrequency="2.5e4"
116+
target="/Outputs/sidreRestart"/>
117+
</Events>
118+
119+
<Functions>
120+
<TableFunction
121+
name="totalBHPTable"
122+
inputVarNames="{time}"
123+
coordinates="{ 0 , 300, 10000, 50000, 75000, 125000}"
124+
values="{ 1.45e7, 1.0e7, 1.45e7, 1.45e7, 1.45e7, 1.45e7 }"
125+
interpolation="lower"/>
126+
<TableFunction
127+
name="totalMassRateTable"
128+
inputVarNames="{time}"
129+
coordinates="{ 0 , 300, 50000, 75000, 100000, 125000}"
130+
values="{ 0, 900, 940, 980., 800, 1200 }"
131+
interpolation="lower"/>
132+
</Functions>
133+
134+
<NumericalMethods>
135+
<FiniteVolume>
136+
<TwoPointFluxApproximation
137+
name="fluidTPFA"/>
138+
</FiniteVolume>
139+
</NumericalMethods>
140+
141+
<ElementRegions>
142+
<CellElementRegion
143+
name="region"
144+
cellBlocks="{ cb }"
145+
materialList="{ fluid, rock, relperm }"/>
146+
<WellElementRegion
147+
name="injwell"
148+
materialList="{ fluid, relperm }"/>
149+
</ElementRegions>
150+
151+
<Constitutive>
152+
153+
<CompressibleSolidConstantPermeability
154+
name="rock"
155+
solidModelName="nullSolid"
156+
porosityModelName="rockPorosity"
157+
permeabilityModelName="rockPerm"/>
158+
<NullModel
159+
name="nullSolid"/>
160+
<PressurePorosity
161+
name="rockPorosity"
162+
defaultReferencePorosity="0.2"
163+
referencePressure="0.0"
164+
compressibility="1.0e-9"/>
165+
<ConstantPermeability
166+
name="rockPerm"
167+
permeabilityComponents="{ 1.0e-13, 1.0e-13, 1.0e-13 }"/>
168+
169+
<CO2BrinePhillipsFluid
170+
name="fluid"
171+
logLevel="1"
172+
phaseNames="{ gas, water }"
173+
componentNames="{ co2, water }"
174+
componentMolarWeight="{ 44e-3, 18e-3 }"
175+
phasePVTParaFiles="{ pvtgas.txt, pvtliquid.txt }"
176+
flashModelParaFile="co2flash.txt"/>
177+
178+
<BrooksCoreyRelativePermeability
179+
name="relperm"
180+
phaseNames="{ gas, water }"
181+
phaseMinVolumeFraction="{ 0.0, 0.0 }"
182+
phaseRelPermExponent="{ 1.5, 1.5 }"
183+
phaseRelPermMaxValue="{ 0.9, 0.9 }"/>
184+
185+
</Constitutive>
186+
187+
<FieldSpecifications>
188+
189+
<FieldSpecification
190+
name="initialPressure"
191+
initialCondition="1"
192+
setNames="{ all }"
193+
objectPath="ElementRegions/region/cb"
194+
fieldName="pressure"
195+
scale="9e6"/>
196+
<FieldSpecification
197+
name="initialTemperature"
198+
initialCondition="1"
199+
setNames="{ all }"
200+
objectPath="ElementRegions/region/cb"
201+
fieldName="temperature"
202+
scale="368.15"/>
203+
<FieldSpecification
204+
name="initialComposition_co2"
205+
initialCondition="1"
206+
setNames="{ all }"
207+
objectPath="ElementRegions/region/cb"
208+
fieldName="globalCompFraction"
209+
component="0"
210+
scale="0.005"/>
211+
<FieldSpecification
212+
name="initialComposition_water"
213+
initialCondition="1"
214+
setNames="{ all }"
215+
objectPath="ElementRegions/region/cb"
216+
fieldName="globalCompFraction"
217+
component="1"
218+
scale="0.995"/>
219+
220+
</FieldSpecifications>
221+
222+
<Outputs>
223+
<VTK
224+
name="vtkOutput"/>
225+
226+
<Restart
227+
name="sidreRestart"/>
228+
</Outputs>
229+
</Problem>

0 commit comments

Comments
 (0)