@@ -41,71 +41,69 @@ You can find the documentation under [geostat-framework.readthedocs.io][doc_link
41
41
42
42
In the following a simple transient pumping test is simulated on a radial symmetric mesh.
43
43
The point output at the observation well is plotted afterwards.
44
+ For more details on this example, see: [ Tutorial 1] [ tut1_link ]
44
45
45
46
``` python
46
- from ogs5py import OGS
47
+ from ogs5py import OGS , specialrange, generate_time
47
48
from matplotlib import pyplot as plt
48
49
50
+ # discretization and parameters
51
+ time = specialrange(0 , 3600 , 50 , typ = " cub" )
52
+ rad = specialrange(0 , 1000 , 100 , typ = " cub" )
53
+ obs = rad[21 ]
54
+ angles = 32
55
+ storage = 1e-3
56
+ transmissivity = 1e-4
57
+ rate = - 1e-3
58
+ # model setup
49
59
model = OGS(task_root = " pump_test" , task_id = " model" )
50
-
51
- # generate a radial mesh
52
- model.msh.generate(" radial" , dim = 2 , rad = range (51 ))
53
- # generate a radial outer boundary
54
- model.gli.generate(" radial" , dim = 2 , rad_out = 50 .)
55
- model.gli.add_points([0 ., 0 ., 0 .], " pwell" )
56
- model.gli.add_points([1 ., 0 ., 0 .], " owell" )
60
+ # generate a radial mesh and geometry ("boundary" polyline)
61
+ model.msh.generate(" radial" , dim = 2 , rad = rad, angles = angles)
62
+ model.gli.generate(" radial" , dim = 2 , rad_out = rad[- 1 ], angles = angles)
63
+ model.gli.add_points([0.0 , 0.0 , 0.0 ], " pwell" )
64
+ model.gli.add_points([obs, 0.0 , 0.0 ], " owell" )
57
65
model.bc.add_block( # boundary condition
58
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
59
- PRIMARY_VARIABLE = ' HEAD' ,
60
- GEO_TYPE = [' POLYLINE' , " boundary" ],
61
- DIS_TYPE = [' CONSTANT' , 0.0 ],
66
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
67
+ PRIMARY_VARIABLE = " HEAD" ,
68
+ GEO_TYPE = [" POLYLINE" , " boundary" ],
69
+ DIS_TYPE = [" CONSTANT" , 0.0 ],
62
70
)
63
71
model.st.add_block( # source term
64
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
65
- PRIMARY_VARIABLE = ' HEAD' ,
66
- GEO_TYPE = [' POINT' , " pwell" ],
67
- DIS_TYPE = [' CONSTANT_NEUMANN' , - 1.0e-04 ],
72
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
73
+ PRIMARY_VARIABLE = " HEAD" ,
74
+ GEO_TYPE = [" POINT" , " pwell" ],
75
+ DIS_TYPE = [" CONSTANT_NEUMANN" , rate ],
68
76
)
69
77
model.ic.add_block( # initial condition
70
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
71
- PRIMARY_VARIABLE = ' HEAD' ,
72
- GEO_TYPE = ' DOMAIN' ,
73
- DIS_TYPE = [' CONSTANT' , 0.0 ],
78
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
79
+ PRIMARY_VARIABLE = " HEAD" ,
80
+ GEO_TYPE = " DOMAIN" ,
81
+ DIS_TYPE = [" CONSTANT" , 0.0 ],
74
82
)
75
83
model.mmp.add_block( # medium properties
76
84
GEOMETRY_DIMENSION = 2 ,
77
- STORAGE = [1 , 1.0e-04 ],
78
- PERMEABILITY_TENSOR = [' ISOTROPIC' , 1.0e-4 ],
85
+ STORAGE = [1 , storage ],
86
+ PERMEABILITY_TENSOR = [" ISOTROPIC" , transmissivity ],
79
87
)
80
88
model.num.add_block( # numerical solver
81
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
82
- LINEAR_SOLVER = [2 , 5 , 1.0e -14 , 1000 , 1.0 , 100 , 4 ],
89
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
90
+ LINEAR_SOLVER = [2 , 5 , 1e -14 , 1000 , 1.0 , 100 , 4 ],
83
91
)
84
92
model.out.add_block( # point observation
85
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
86
- NOD_VALUES = ' HEAD' ,
87
- GEO_TYPE = [' POINT' , " owell" ],
88
- DAT_TYPE = ' TECPLOT' ,
89
- TIM_TYPE = [' STEPS' , 1 ],
93
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
94
+ NOD_VALUES = " HEAD" ,
95
+ GEO_TYPE = [" POINT" , " owell" ],
96
+ DAT_TYPE = " TECPLOT" ,
90
97
)
91
98
model.pcs.add_block( # set the process type
92
- PCS_TYPE = ' GROUNDWATER_FLOW' , NUM_TYPE = ' NEW'
99
+ PCS_TYPE = " GROUNDWATER_FLOW" , NUM_TYPE = " NEW"
93
100
)
94
101
model.tim.add_block( # set the timesteps
95
- PCS_TYPE = ' GROUNDWATER_FLOW' ,
96
- TIME_START = 0 ,
97
- TIME_END = 600 ,
98
- TIME_STEPS = [[10 , 30 ], [5 , 60 ]],
102
+ PCS_TYPE = " GROUNDWATER_FLOW" ,
103
+ ** generate_time(time)
99
104
)
100
105
model.write_input()
101
- success = model.run_model()
102
-
103
- point = model.readtec_point(pcs = ' GROUNDWATER_FLOW' )
104
- time = point[' owell' ][" TIME" ]
105
- head = point[' owell' ][" HEAD" ]
106
-
107
- plt.plot(time, head)
108
- plt.show()
106
+ model.run_model()
109
107
```
110
108
111
109
<p align =" center " >
@@ -172,3 +170,4 @@ This project is based on [OGSPY][ogspy_link].
172
170
[ gpl_link ] : https://github.com/GeoStat-Framework/ogs5py/blob/master/LICENSE
173
171
[ ogs5_link ] : https://www.opengeosys.org/ogs-5/
174
172
[ doc_link ] : https://geostat-framework.readthedocs.io/projects/ogs5py/en/latest/
173
+ [ tut1_link ] : https://geostat-framework.readthedocs.io/projects/ogs5py/en/latest/tutorial_01_pump.html
0 commit comments