Skip to content

Commit

Permalink
update mpd in example
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 21, 2019
1 parent 4a9c9d2 commit 109fa15
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions examples/02_pump_test_het_3D.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import numpy as np
from ogs5py import OGS, MPD, by_id, show_vtk
from ogs5py import OGS, by_id, show_vtk
from gstools import SRF, Gaussian

# covariance model for conductivity field
Expand All @@ -15,14 +15,13 @@
"radial", dim=3, angles=64, rad=np.arange(101), z_arr=-np.arange(11)
)
cond = np.exp(srf.mesh(model.msh))
mpd = MPD(model.task_id)
mpd.add_block(
model.mpd.add() # add distributed medium properties
model.mpd.add_block( # edit recent mpd file
MSH_TYPE="GROUNDWATER_FLOW",
MMP_TYPE="PERMEABILITY",
DIS_TYPE="ELEMENT",
DATA=by_id(cond),
)
model.add_mpd(mpd)
for srf in model.gli.SURFACE_NAMES: # set boundary condition
model.bc.add_block(
PCS_TYPE="GROUNDWATER_FLOW",
Expand All @@ -39,7 +38,7 @@
model.mmp.add_block( # permeability, storage and porosity
GEOMETRY_DIMENSION=3,
STORAGE=[1, 1.0e-4],
PERMEABILITY_DISTRIBUTION=model.task_id + ".mpd",
PERMEABILITY_DISTRIBUTION=model.mpd.name,
POROSITY=0.2,
)
model.num.add_block( # numerical solver
Expand All @@ -55,8 +54,8 @@
model.pcs.add_block( # set the process type
PCS_TYPE="GROUNDWATER_FLOW", NUM_TYPE="NEW", TIM_TYPE="STEADY"
)
# model.write_input()
# success = model.run_model()
model.write_input()
success = model.run_model()

model.msh.show(show_cell_data={"Conductivity": cond}, log_scale=True)
files = model.output_files(pcs="GROUNDWATER_FLOW", typ="VTK")
Expand Down

0 comments on commit 109fa15

Please sign in to comment.