Skip to content

Commit

Permalink
Update to ogs5py 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 22, 2019
1 parent d70a997 commit 3b90b95
Show file tree
Hide file tree
Showing 1,831 changed files with 3,966,895 additions and 26,362 deletions.
30 changes: 30 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) 2019, OpenGeoSys Community (http://www.opengeosys.org)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the OpenGeoSys Community.
4. Neither the name of the OpenGeoSys Community nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
5. Attribute the OpenGeoSys Community, preferably citing an appropriate
paper listed on the OpenGeoSys Community homepage:
http://www.opengeosys.org/papers

THIS SOFTWARE IS PROVIDED BY THE OpenGeoSys Community ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE OpenGeoSys Community BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 changes: 27 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
Welcome to the ogs5py benchmarks
================================

Purpose
-------
Most of the OGS5 benchmarks were rewritten into a ogs5py-script in this repository.

The following were skipped:

+ `HT_EOS` (folder) \*.bat files to copy stuff... uarg.. (maybe rewrite with ogs5py)
+ `bact_growth_new` #THERMAL in mfp
+ `HT_var_density_1D` $AREA in mmp
+ `thm_quad` $STORATIVITY in mmp
+ `viscosity_yaws` $AREA in mmp
+ `uc_pris` GLI not valid (SRF not present for VOLUME)
+ `brand_m1_l1` GLI not valid (TIN and Polylines at the same time[?])
+ `2d_h_us_line_Warrick` lonesome mmp
+ `model_1` $AREA in msh (not supported by ogs5py)

The following benchmarks have multiple sub keywords in some files, which is
not convertable to a ogs5py script at the moment. Therefore the following are skipped as well:

+ `lag2d` repeated NEIGHBOR (cct)
+ `decal` repeated NEIGHBOR (cct)
+ `2D1P_transport` repeated POROSITY (mmp)
+ `Nuklidtransport` repeated MASS_DISPERSION (mmp)
+ `cement2d` repeated KINETIC_GEM (gem)
+ `model_1` repeated DAT_TYPE (out)
+ `Leakage` repeated TIM_TYPE (out)
+ `CO2-FLOW` repeated DAT_TYPE (out)
+ `2pf_2pt` repeated SIMULATOR (pcs)


Generation
----------
# Welcome to the ogs5py benchmarks

<p align="center">
<img src="https://raw.githubusercontent.com/GeoStat-Framework/ogs5py/master/docs/source/pics/OGS.png" alt="ogs5py-LOGO" width="251px"/>
</p>

## Purpose

To get in touch with [``ogs5py``][ogs5_link], most of the OGS5 benchmarks were rewritten into a ogs5py-script in this repository.
These benchmarks can be seen as a smorgasbord to provide a starting point for your own ogs5py model.

You can clone this repository with:

git clone https://github.com/GeoStat-Framework/ogs5py_benchmarks.git

Or simply download it as a [zip-file][zip].

The original Benchmarks can be found here: https://github.com/ufz/ogs5-benchmarks


## Generation

The scripts were generated with the python script

gen_benchmark_scripts.py

You can run all generated scripts for testing with the python script

run_ogs5py_scripts.py


Created January 2019, Copyright Sebastian Müller 2019
Copyright Sebastian Müller 2019

[ogs5_link]: https://github.com/GeoStat-Framework/ogs5py
[zip]: https://github.com/GeoStat-Framework/ogs5py_benchmarks/archive/master.zip
4 changes: 2 additions & 2 deletions benchmarks/Anisotropy/moleculardiffusion/soil_layer.gli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|-------------- Written with ogs5py --------------|
|------------------ Written with ogs5py ------------------|
#POINTS
0 0.0 1.0 0.0 $NAME POINT0 $MD 0.05
1 0.0 0.0 0.0 $NAME POINT1 $MD 0.05
Expand Down Expand Up @@ -265,4 +265,4 @@
$POLYLINES
POLYLINE6
#STOP
|-- Written with ogs5py (0.6.1) on: 2019-01-22_19-37-18 --|
|-- Written with ogs5py (1.0.0.rc1) on: 2019-08-22_15-03-32 --|
2 changes: 1 addition & 1 deletion benchmarks/Anisotropy/moleculardiffusion/soil_layer.msh
Original file line number Diff line number Diff line change
Expand Up @@ -1153,4 +1153,4 @@
734 6 tri 324 162 161
735 6 tri 324 163 162
#STOP
|-- Written with ogs5py (0.6.1) on: 2019-01-22_19-37-18 --|
|-- Written with ogs5py (1.0.0.rc1) on: 2019-08-22_15-03-32 --|
76 changes: 38 additions & 38 deletions benchmarks/Anisotropy/moleculardiffusion/soil_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
task_id='soil_layer',
output_dir='out',
)
model.msh.read_file('soil_layer.msh')
model.gli.read_file('soil_layer.gli')
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='LIQUID_FLOW',
NUM_TYPE='NEW',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='MASS_TRANSPORT',
NUM_TYPE='NEW',
)
model.bc.add_block(
main_key='BOUNDARY_CONDITION',
PCS_TYPE='LIQUID_FLOW',
Expand Down Expand Up @@ -34,7 +46,6 @@
GEO_TYPE=['POLYLINE', 'POLYLINE11'],
DIS_TYPE=['CONSTANT', 1.0],
)
model.gli.read_file('soil_layer.gli')
model.ic.add_block(
main_key='INITIAL_CONDITION',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -56,19 +67,8 @@
GEO_TYPE=['POLYLINE', 'POLYLINE11'],
DIS_TYPE=['CONSTANT', 1.0],
)
model.mcp.add_block(
main_key='COMPONENT_PROPERTIES',
NAME='Tracer',
MOBILE=1,
TRANSPORT_PHASE=0,
DIFFUSION=[1, 6e-10],
)
model.mfp.add_block(
main_key='FLUID_PROPERTIES',
FLUID_TYPE='LIQUID',
PCS_TYPE='PRESSURE1',
DENSITY=[1, 1000.0],
VISCOSITY=[1, 0.001],
model.st.add_block(
main_key='SOURCE_TERM',
)
model.mmp.add_block(
main_key='MEDIUM_PROPERTIES',
Expand Down Expand Up @@ -154,7 +154,6 @@
MASS_DISPERSION=[1, 0.0, 0.0],
DENSITY=[1, 2000.0],
)
model.msh.read_file('soil_layer.msh')
model.msp.add_block(
main_key='SOLID_PROPERTIES',
DENSITY=[1, 2000.0],
Expand Down Expand Up @@ -239,6 +238,20 @@
[1, 0.00118799939],
],
)
model.mfp.add_block(
main_key='FLUID_PROPERTIES',
FLUID_TYPE='LIQUID',
PCS_TYPE='PRESSURE1',
DENSITY=[1, 1000.0],
VISCOSITY=[1, 0.001],
)
model.mcp.add_block(
main_key='COMPONENT_PROPERTIES',
NAME='Tracer',
MOBILE=1,
TRANSPORT_PHASE=0,
DIFFUSION=[1, 6e-10],
)
model.num.add_block(
main_key='NUMERICS',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -251,29 +264,6 @@
LINEAR_SOLVER=[2, 6, 1e-14, 1000, 0.5, 1, 2],
ELE_GAUSS_POINTS=3,
)
model.out.add_block(
main_key='OUTPUT',
NOD_VALUES=[
['PRESSURE1'],
['Tracer'],
],
GEO_TYPE='DOMAIN',
TIM_TYPE=['STEPS', 1],
DAT_TYPE='PVD',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='LIQUID_FLOW',
NUM_TYPE='NEW',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='MASS_TRANSPORT',
NUM_TYPE='NEW',
)
model.st.add_block(
main_key='SOURCE_TERM',
)
model.tim.add_block(
main_key='TIME_STEPPING',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -288,5 +278,15 @@
TIME_START=0.0,
TIME_END=300000000.0,
)
model.out.add_block(
main_key='OUTPUT',
NOD_VALUES=[
['PRESSURE1'],
['Tracer'],
],
GEO_TYPE='DOMAIN',
TIM_TYPE=['STEPS', 1],
DAT_TYPE='PVD',
)
model.write_input()
model.run_model()
4 changes: 2 additions & 2 deletions benchmarks/Anisotropy/permeability/soil_layer.gli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|-------------- Written with ogs5py --------------|
|------------------ Written with ogs5py ------------------|
#POINTS
0 0.0 1.0 0.0 $NAME POINT0 $MD 0.05
1 0.0 0.0 0.0 $NAME POINT1 $MD 0.05
Expand Down Expand Up @@ -265,4 +265,4 @@
$POLYLINES
POLYLINE6
#STOP
|-- Written with ogs5py (0.6.1) on: 2019-01-22_19-37-18 --|
|-- Written with ogs5py (1.0.0.rc1) on: 2019-08-22_15-03-32 --|
2 changes: 1 addition & 1 deletion benchmarks/Anisotropy/permeability/soil_layer.msh
Original file line number Diff line number Diff line change
Expand Up @@ -1153,4 +1153,4 @@
734 6 tri 324 162 161
735 6 tri 324 163 162
#STOP
|-- Written with ogs5py (0.6.1) on: 2019-01-22_19-37-18 --|
|-- Written with ogs5py (1.0.0.rc1) on: 2019-08-22_15-03-32 --|
76 changes: 38 additions & 38 deletions benchmarks/Anisotropy/permeability/soil_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
task_id='soil_layer',
output_dir='out',
)
model.msh.read_file('soil_layer.msh')
model.gli.read_file('soil_layer.gli')
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='LIQUID_FLOW',
NUM_TYPE='NEW',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='MASS_TRANSPORT',
NUM_TYPE='NEW',
)
model.bc.add_block(
main_key='BOUNDARY_CONDITION',
PCS_TYPE='LIQUID_FLOW',
Expand Down Expand Up @@ -34,7 +46,6 @@
GEO_TYPE=['POLYLINE', 'POLYLINE11'],
DIS_TYPE=['CONSTANT', 1.0],
)
model.gli.read_file('soil_layer.gli')
model.ic.add_block(
main_key='INITIAL_CONDITION',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -56,19 +67,8 @@
GEO_TYPE=['POLYLINE', 'POLYLINE11'],
DIS_TYPE=['CONSTANT', 1.0],
)
model.mcp.add_block(
main_key='COMPONENT_PROPERTIES',
NAME='Tracer',
MOBILE=1,
TRANSPORT_PHASE=0,
DIFFUSION=[1, 6e-10],
)
model.mfp.add_block(
main_key='FLUID_PROPERTIES',
FLUID_TYPE='LIQUID',
PCS_TYPE='PRESSURE1',
DENSITY=[1, 1000.0],
VISCOSITY=[1, 0.001],
model.st.add_block(
main_key='SOURCE_TERM',
)
model.mmp.add_block(
main_key='MEDIUM_PROPERTIES',
Expand Down Expand Up @@ -154,7 +154,6 @@
MASS_DISPERSION=[1, 0.0, 0.0],
DENSITY=[1, 2000.0],
)
model.msh.read_file('soil_layer.msh')
model.msp.add_block(
main_key='SOLID_PROPERTIES',
DENSITY=[1, 2000.0],
Expand Down Expand Up @@ -183,6 +182,20 @@
main_key='SOLID_PROPERTIES',
DENSITY=[1, 2000.0],
)
model.mfp.add_block(
main_key='FLUID_PROPERTIES',
FLUID_TYPE='LIQUID',
PCS_TYPE='PRESSURE1',
DENSITY=[1, 1000.0],
VISCOSITY=[1, 0.001],
)
model.mcp.add_block(
main_key='COMPONENT_PROPERTIES',
NAME='Tracer',
MOBILE=1,
TRANSPORT_PHASE=0,
DIFFUSION=[1, 6e-10],
)
model.num.add_block(
main_key='NUMERICS',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -195,29 +208,6 @@
LINEAR_SOLVER=[2, 6, 1e-14, 1000, 0.5, 1, 2],
ELE_GAUSS_POINTS=3,
)
model.out.add_block(
main_key='OUTPUT',
NOD_VALUES=[
['PRESSURE1'],
['Tracer'],
],
GEO_TYPE='DOMAIN',
TIM_TYPE=['STEPS', 1],
DAT_TYPE='PVD',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='LIQUID_FLOW',
NUM_TYPE='NEW',
)
model.pcs.add_block(
main_key='PROCESS',
PCS_TYPE='MASS_TRANSPORT',
NUM_TYPE='NEW',
)
model.st.add_block(
main_key='SOURCE_TERM',
)
model.tim.add_block(
main_key='TIME_STEPPING',
PCS_TYPE='LIQUID_FLOW',
Expand All @@ -232,5 +222,15 @@
TIME_START=0.0,
TIME_END=300000000.0,
)
model.out.add_block(
main_key='OUTPUT',
NOD_VALUES=[
['PRESSURE1'],
['Tracer'],
],
GEO_TYPE='DOMAIN',
TIM_TYPE=['STEPS', 1],
DAT_TYPE='PVD',
)
model.write_input()
model.run_model()
Loading

0 comments on commit 3b90b95

Please sign in to comment.