Skip to content

Commit 2f8aae7

Browse files
committed
test(well): check well intersection feature for InternalWell andVtkmesh
1 parent 8d93e5f commit 2f8aae7

File tree

7 files changed

+111
-1
lines changed

7 files changed

+111
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
3+
#SBATCH --job-name="geos"
4+
#SBATCH --ntasks=8
5+
#SBATCH --nodes=1
6+
#SBATCH --time=3:00:00
7+
#SBATCH --partition=p4_general
8+
##SBATCH --exclusive
9+
#SBATCH --output=job_GEOS_P4_%j.out
10+
#SBATCH --error=job_GEOS_P4_%j.err
11+
##SBATCH --mem=734GB
12+
13+
# do not change
14+
ulimit -s unlimited
15+
ulimit -c unlimited
16+
17+
# loading of the module
18+
module purge
19+
module use /workrd/SCR/NUM/GEOS_environment/p4/modulefiles/app
20+
module load geos/develop_3bf12d2/pangea4-gcc12.1-hpcxompi2.17.1-onemkl2023.2.0-Release-2024-06-20-10-05
21+
22+
export HDF5_USE_FILE_LOCKING=FALSE
23+
export OMP_NUM_THREADS=1
24+
25+
#----- Set standard Output and standrard error base file name. -----
26+
OUT_NAME=job_GEOS_P4_${SLURM_JOBID}
27+
28+
srun --mpi=pmix_v3 --hint=nomultithread \
29+
-n ${SLURM_NTASKS} geos \
30+
-o modelA \
31+
-i simulationA.xml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FlashModel CO2Solubility 1e5 1.5e8 5e4 283.15 383.15 1 0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
polylineNodeCoords="{ { 800, 1450, 395.646 },
9999
{ 800, 1450, -200.0 },
100100
{ 800, 1450, 0.0 },
101-
{ 800, 1450, -554.354 } }"
101+
{ 800, 1450, -554.354 } }"
102102
polylineSegmentConn="{ { 0, 2 }, { 2, 1 }, { 1, 3 } }"
103103
radius="0.050"
104104
numElementsPerSegment="5">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DensityFun SpanWagnerCO2Density 1e5 1.5e8 5e4 283.15 383.15 1
2+
ViscosityFun FenghourCO2Viscosity 1e5 1.5e8 5e4 283.15 383.15 1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DensityFun PhillipsBrineDensity 1e5 1.5e8 5e4 283.15 383.15 1 0
2+
ViscosityFun PhillipsBrineViscosity 0
586 Bytes
Binary file not shown.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
3+
# SPDX-FileContributor: Lucas Givord - Kitware
4+
from trame.app import get_server
5+
from trame_client.utils.testing import enable_testing
6+
from geos_trame.app.core import GeosTrame
7+
8+
9+
def test_internal_well_intersection():
10+
11+
server = enable_testing( get_server( client_type="vue3" ), "message" )
12+
file_name = "geos-trame/tests/data/geosDeck/geosDeck.xml"
13+
14+
app = GeosTrame( server, file_name )
15+
app.state.ready()
16+
17+
app.deckInspector.state.object_state = [ "Problem/Mesh/0/VTKMesh/0", True ]
18+
app.deckInspector.state.flush()
19+
20+
app.deckInspector.state.object_state = [
21+
"Problem/Mesh/0/VTKMesh/0/InternalWell/0",
22+
True,
23+
]
24+
app.deckInspector.state.flush()
25+
26+
app.deckInspector.state.object_state = [
27+
"Problem/Mesh/0/VTKMesh/0/InternalWell/0/Perforation/0",
28+
True,
29+
]
30+
app.deckInspector.state.flush()
31+
32+
app.deckInspector.state.object_state = [
33+
"Problem/Mesh/0/VTKMesh/0/InternalWell/0/Perforation/1",
34+
True,
35+
]
36+
app.deckInspector.state.flush()
37+
38+
assert app.deckViewer.well_engine.get_number_of_wells() == 1
39+
assert len( app.deckViewer._perforations ) == 2
40+
41+
42+
def test_vtk_well_intersection():
43+
44+
server = enable_testing( get_server( client_type="vue3" ), "message" )
45+
file_name = "geos-trame/tests/data/geosDeck/geosDeck.xml"
46+
47+
app = GeosTrame( server, file_name )
48+
app.state.ready()
49+
50+
app.deckInspector.state.object_state = [ "Problem/Mesh/0/VTKMesh/0", True ]
51+
app.deckInspector.state.flush()
52+
53+
app.deckInspector.state.object_state = [ "Problem/Mesh/0/VTKMesh/0/VTKWell/0", True ]
54+
app.deckInspector.state.flush()
55+
56+
app.deckInspector.state.object_state = [
57+
"Problem/Mesh/0/VTKMesh/0/VTKWell/0/Perforation/0",
58+
True,
59+
]
60+
app.deckInspector.state.flush()
61+
62+
app.deckInspector.state.object_state = [
63+
"Problem/Mesh/0/VTKMesh/0/VTKWell/0/Perforation/1",
64+
True,
65+
]
66+
app.deckInspector.state.flush()
67+
68+
assert app.deckViewer.well_engine.get_number_of_wells() == 1
69+
assert len( app.deckViewer._perforations ) == 2
70+
71+
app.deckInspector.state.object_state = [ "Problem/Mesh/0/VTKMesh/0/VTKWell/0", False ]
72+
app.deckInspector.state.flush()
73+
74+
assert app.deckViewer.well_engine.get_number_of_wells() == 0

0 commit comments

Comments
 (0)