Skip to content

Commit a27e10d

Browse files
committed
tests: change random arrays test data to small
1 parent 20b3853 commit a27e10d

File tree

5 files changed

+365
-3
lines changed

5 files changed

+365
-3
lines changed

geos-trame/tests/data/geosDeck/geosDeck.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<!-- Reuse singlePhaseFlow for the testing -->
6868
<VTKMesh
6969
name="SyntheticMesh"
70-
file="../singlePhaseFlow/synthetic_random_arrays.vtu"
70+
file="../singlePhaseFlow/synthetic.vtu"
7171
logLevel="1" >
7272

7373
<!-- Block to comment to deactivate external well definition -->
Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,363 @@
1+
<?xml version="1.0" ?>
2+
<?xml-model href="schema.xsd" ?>
3+
4+
<Problem>
5+
<Solvers>
6+
<CompositionalMultiphaseReservoir
7+
name="coupledFlowAndWells"
8+
flowSolverName="compositionalMultiphaseFlow"
9+
wellSolverName="compositionalMultiphaseWell"
10+
logLevel="1"
11+
initialDt="1e2"
12+
targetRegions="{ Reservoir, Caprock, Overburden, Underburden, Salt, wellRegion1, wellRegion2 }">
13+
<NonlinearSolverParameters
14+
newtonTol="1.0e-3"
15+
lineSearchAction="Attempt"
16+
maxTimeStepCuts="10"
17+
newtonMaxIter="20"/>
18+
<LinearSolverParameters
19+
solverType="fgmres"
20+
preconditionerType="mgr"
21+
krylovTol="1e-6"
22+
krylovAdaptiveTol="1"
23+
krylovWeakestTol="1e-2"/>
24+
</CompositionalMultiphaseReservoir>
25+
26+
<CompositionalMultiphaseFVM
27+
name="compositionalMultiphaseFlow"
28+
targetRegions="{ Reservoir, Caprock, Overburden, Underburden, Salt }"
29+
discretization="fluidTPFA"
30+
temperature="368.15"
31+
targetPhaseVolFractionChangeInTimeStep="0.07"
32+
maxCompFractionChange="0.2"
33+
logLevel="1"
34+
useMass="1"/>
35+
36+
<CompositionalMultiphaseWell
37+
name="compositionalMultiphaseWell"
38+
targetRegions="{ wellRegion1, wellRegion2 }"
39+
logLevel="1"
40+
useMass="1">
41+
<WellControls
42+
name="wellControls1"
43+
logLevel="1"
44+
type="injector"
45+
control="totalVolRate"
46+
referenceElevation="395.646"
47+
targetBHP="1e8"
48+
enableCrossflow="0"
49+
targetTotalRateTableName="totalRateTable"
50+
injectionTemperature="368.15"
51+
injectionStream="{ 0.995, 0.005 }"/>
52+
<WellControls
53+
name="wellControls2"
54+
logLevel="1"
55+
type="injector"
56+
control="totalVolRate"
57+
referenceElevation="395.646"
58+
targetBHP="1e8"
59+
enableCrossflow="0"
60+
targetTotalRateTableName="totalRateTable"
61+
injectionTemperature="368.15"
62+
injectionStream="{ 0.995, 0.005 }"/>
63+
</CompositionalMultiphaseWell>
64+
</Solvers>
65+
66+
<Mesh>
67+
<!-- Reuse singlePhaseFlow for the testing -->
68+
<VTKMesh
69+
name="SyntheticMesh"
70+
file="./small_random_arrays.vtu"
71+
logLevel="1" >
72+
73+
<!-- Block to comment to deactivate external well definition -->
74+
<VTKWell
75+
name="well_1"
76+
file="well_1.vtk"
77+
wellRegionName="wellRegion1"
78+
wellControlsName="wellControls1"
79+
radius="0.050"
80+
numElementsPerSegment="1">
81+
<Perforation
82+
name="well_1_perf_0"
83+
distanceFromHead="415.646"/>
84+
<Perforation
85+
name="well_1_perf_1"
86+
distanceFromHead="495.646"/>
87+
<Perforation
88+
name="well_1_perf_2"
89+
distanceFromHead="745.646"/>
90+
</VTKWell>
91+
<!-- End Block to comment to deactivate external well definition -->
92+
93+
<!-- Block to comment to deactivate internal well definition -->
94+
<InternalWell
95+
name="well_2"
96+
logLevel="2"
97+
wellRegionName="wellRegion2"
98+
wellControlsName="wellControls2"
99+
polylineNodeCoords="{ { 800, 1450, 395.646 },
100+
{ 800, 1450, -200.0 },
101+
{ 800, 1450, 0.0 },
102+
{ 800, 1450, -554.354 } }"
103+
polylineSegmentConn="{ { 0, 2 }, { 2, 1 }, { 1, 3 } }"
104+
radius="0.050"
105+
numElementsPerSegment="5">
106+
<Perforation
107+
name="well_3_perf_0"
108+
distanceFromHead="245.646"/>
109+
<Perforation
110+
name="well_3_perf_1"
111+
distanceFromHead="425.646"/>
112+
<Perforation
113+
name="well_3_perf_2"
114+
distanceFromHead="545.646"/>
115+
<Perforation
116+
name="well_3_perf_3"
117+
distanceFromHead="720.646"/>
118+
<Perforation
119+
name="well_3_perf_4"
120+
distanceFromHead="875.646"/>
121+
</InternalWell>
122+
<!-- End Block to comment to deactivate internal well definition -->
123+
</VTKMesh>
124+
</Mesh>
125+
126+
<!-- Block to comment to deactivate box definition -->
127+
<Geometry>
128+
<Box
129+
name="box_1"
130+
xMin="{ 1150, 700, 62 }"
131+
xMax="{ 1250, 800, 137 }"/>
132+
</Geometry>
133+
<!-- End Block to comment to deactivate box definition -->
134+
135+
<Events
136+
maxTime="5e8">
137+
<PeriodicEvent
138+
name="outputInjectionPeriod"
139+
timeFrequency="15768000"
140+
beginTime="0"
141+
endTime="1.6e8"
142+
target="/Outputs/vtkOutput"/>
143+
<PeriodicEvent
144+
name="outputPostInjectionPeriod"
145+
timeFrequency="31536000"
146+
beginTime="1.6e8"
147+
endTime="5e8"
148+
target="/Outputs/vtkOutput"/>
149+
150+
<PeriodicEvent
151+
name="statistics"
152+
timeFrequency="31536000"
153+
target="/Tasks/compflowStatistics"/>
154+
155+
<PeriodicEvent
156+
name="solverApplicationsInjectionPeriod"
157+
beginTime="0"
158+
endTime="1.6e8"
159+
maxEventDt="5e5"
160+
target="/Solvers/coupledFlowAndWells"/>
161+
<PeriodicEvent
162+
name="solverApplicationsPostInjectionPeriod1"
163+
beginTime="1.6e8"
164+
endTime="1.6001e8"
165+
maxEventDt="10000"
166+
target="/Solvers/coupledFlowAndWells"/>
167+
<PeriodicEvent
168+
name="solverApplicationsPostInjectionPeriod2"
169+
beginTime="1.6001e8"
170+
endTime="5e8"
171+
maxEventDt="5e6"
172+
target="/Solvers/coupledFlowAndWells"/>
173+
</Events>
174+
175+
<NumericalMethods>
176+
<FiniteVolume>
177+
<TwoPointFluxApproximation
178+
name="fluidTPFA"
179+
/>
180+
</FiniteVolume>
181+
</NumericalMethods>
182+
183+
<ElementRegions>
184+
185+
<CellElementRegion
186+
name="Reservoir"
187+
cellBlocks="{ 2_tetrahedra }"
188+
materialList="{ fluid, rock_reservoir, relperm }"/>
189+
190+
<CellElementRegion
191+
name="Caprock"
192+
cellBlocks="{ 4_tetrahedra}"
193+
materialList="{ fluid, rock_caprock, relperm }"/>
194+
195+
<CellElementRegion
196+
name="Overburden"
197+
cellBlocks="{ 3_tetrahedra }"
198+
materialList="{ fluid, rock_burden, relperm }"/>
199+
200+
<CellElementRegion
201+
name="Underburden"
202+
cellBlocks="{ 1_tetrahedra }"
203+
materialList="{ fluid, rock_burden, relperm }"/>
204+
205+
<CellElementRegion
206+
name="Salt"
207+
cellBlocks="{ 0_tetrahedra}"
208+
materialList="{ fluid, rock_salt, relperm }"/>
209+
210+
<WellElementRegion
211+
name="wellRegion1"
212+
materialList="{ fluid, relperm, rockPerm_burden }"/>
213+
<WellElementRegion
214+
name="wellRegion2"
215+
materialList="{ fluid, relperm, rockPerm_burden }" />
216+
217+
</ElementRegions>
218+
219+
<Constitutive>
220+
<CO2BrinePhillipsFluid
221+
name="fluid"
222+
phaseNames="{ gas, water }"
223+
componentNames="{ co2, water }"
224+
componentMolarWeight="{ 44e-3, 18e-3 }"
225+
phasePVTParaFiles="{ pvtgas.txt, pvtliquid.txt }"
226+
flashModelParaFile="co2flash.txt"/>
227+
228+
<CompressibleSolidConstantPermeability
229+
name="rock_burden"
230+
solidModelName="nullSolid"
231+
porosityModelName="rockPorosity_burden"
232+
permeabilityModelName="rockPerm_burden"/>
233+
234+
<CompressibleSolidConstantPermeability
235+
name="rock_salt"
236+
solidModelName="nullSolid"
237+
porosityModelName="rockPorosity_salt"
238+
permeabilityModelName="rockPerm_salt"/>
239+
240+
<CompressibleSolidConstantPermeability
241+
name="rock_reservoir"
242+
solidModelName="nullSolid"
243+
porosityModelName="rockPorosity_reservoir"
244+
permeabilityModelName="rockPerm_reservoir"/>
245+
246+
<CompressibleSolidConstantPermeability
247+
name="rock_caprock"
248+
solidModelName="nullSolid"
249+
porosityModelName="rockPorosity_caprock"
250+
permeabilityModelName="rockPerm_caprock"/>
251+
252+
<NullModel
253+
name="nullSolid"/>
254+
255+
<PressurePorosity
256+
name="rockPorosity_burden"
257+
defaultReferencePorosity="0.2"
258+
referencePressure="1.0e7"
259+
compressibility="4.5e-10"/>
260+
261+
<PressurePorosity
262+
name="rockPorosity_salt"
263+
defaultReferencePorosity="0.1"
264+
referencePressure="1.0e7"
265+
compressibility="4.5e-10"/>
266+
267+
<PressurePorosity
268+
name="rockPorosity_reservoir"
269+
defaultReferencePorosity="0.25"
270+
referencePressure="1.0e7"
271+
compressibility="4.5e-10"/>
272+
273+
<PressurePorosity
274+
name="rockPorosity_caprock"
275+
defaultReferencePorosity="0.15"
276+
referencePressure="1.0e7"
277+
compressibility="4.5e-10"/>
278+
279+
<BrooksCoreyRelativePermeability
280+
name="relperm"
281+
phaseNames="{ gas, water }"
282+
phaseMinVolumeFraction="{ 0.05, 0.30 }"
283+
phaseRelPermExponent="{ 2.0, 2.0 }"
284+
phaseRelPermMaxValue="{ 1.0, 1.0 }"/>
285+
286+
<ConstantPermeability
287+
name="rockPerm_burden"
288+
permeabilityComponents="{ 1.0e-14, 1.0e-14, 1.0e-14 }"/>
289+
290+
<ConstantPermeability
291+
name="rockPerm_salt"
292+
permeabilityComponents="{ 1.0e-18, 1.0e-18, 1.0e-18 }"/>
293+
294+
<ConstantPermeability
295+
name="rockPerm_reservoir"
296+
permeabilityComponents="{ 1.0e-11, 1.0e-11, 1.0e-11 }"/>
297+
298+
<ConstantPermeability
299+
name="rockPerm_caprock"
300+
permeabilityComponents="{ 1.0e-16, 1.0e-16, 1.0e-16 }"/>
301+
</Constitutive>
302+
303+
<FieldSpecifications>
304+
<FieldSpecification
305+
name="initialPressure"
306+
initialCondition="1"
307+
setNames="{ all }"
308+
objectPath="ElementRegions"
309+
fieldName="pressure"
310+
scale="1.25e7"/>
311+
312+
<FieldSpecification
313+
name="initialComposition_co2"
314+
initialCondition="1"
315+
setNames="{ all }"
316+
objectPath="ElementRegions"
317+
fieldName="globalCompFraction"
318+
component="0"
319+
scale="0.0"/>
320+
321+
<FieldSpecification
322+
name="initialComposition_water"
323+
initialCondition="1"
324+
setNames="{ all }"
325+
objectPath="ElementRegions"
326+
fieldName="globalCompFraction"
327+
component="1"
328+
scale="1.0"/>
329+
330+
<SourceFlux
331+
name="sourceFlux"
332+
objectPath="ElementRegions/Overburden"
333+
setNames="{ box_1 }"
334+
component="0"
335+
scale="-0.1"/>
336+
</FieldSpecifications>
337+
338+
<Outputs>
339+
<VTK
340+
name="vtkOutput"/>
341+
</Outputs>
342+
343+
<Tasks>
344+
345+
<CompositionalMultiphaseStatistics
346+
name="compflowStatistics"
347+
flowSolverName="compositionalMultiphaseFlow"
348+
logLevel="1"
349+
computeCFLNumbers="1"
350+
computeRegionStatistics="1"/>
351+
352+
</Tasks>
353+
354+
<Functions>
355+
<TableFunction
356+
name="totalRateTable"
357+
inputVarNames="{time}"
358+
interpolation="lower"
359+
coordinates="{ 0, 1.6e8, 5e8 }"
360+
values="{ 3e-2, 0, 0 }"/>
361+
</Functions>
362+
363+
</Problem>
Binary file not shown.
Binary file not shown.

geos-trame/tests/test_data_loader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515

1616
def test_data_loader( trame_server_layout: tuple[ Server, VAppLayout ], trame_state: State ) -> None:
1717
root_path = Path( __file__ ).parent.absolute().__str__()
18-
file_name = root_path + "/data/geosDeck/geosDeck.xml"
18+
file_name = root_path + "/data/geosDeck/geosDeck_small_data.xml"
1919

2020
geos_trame = GeosTrame( trame_server_layout[ 0 ], file_name )
2121

2222
geos_trame.data_loader.load_vtkmesh_from_id( "Problem/Mesh/0/VTKMesh/0" )
2323
ug: pv.UnstructuredGrid = geos_trame.data_loader.region_viewer.input
24-
assert ug.GetCellData().HasArray( "attribute" )
2524
assert ug.GetPointData().HasArray( "RandomPointScalars" )
2625
assert not ug.GetPointData().HasArray( "RandomPointVectors" )
2726
assert ug.GetPointData().HasArray( "RandomPointVectors_0" )

0 commit comments

Comments
 (0)