[[s, t, v, l, h] for t in TG for v in var for l in len_scale for s in S for h in hurst] ) RES = os.path.join("..", "..", "results") # ogs configuration task_root = os.path.abspath(os.path.join(RES, "eGRF_TPL_2D")) pcs_type_flow = "GROUNDWATER_FLOW" var_name_flow = "HEAD" # generate a model for each core (prevent writing conflicts) cstr = "core{:04}".format(rank) model = OGS(task_root=os.path.join(task_root, cstr), task_id="model") # spatio-temporal configuration # define the time stepping: 2 h with 32 steps and increasing stepsize time = specialrange(0, 7200, 32, typ="cub") # radial discretization: 1000 m with 100 steps and increasing stepsize rad = specialrange(0, 1000, 100, typ="cub") # 64 angles for discretization angles = 64 # generate mesh and gli model.msh.generate("radial", dim=2, angles=angles, rad=rad) model.gli.generate("radial", dim=2, angles=angles, rad_out=rad[-1]) # add the pumping well model.gli.add_points(points=[0.0, 0.0, 0.0], names="pwell") # --------------generate different ogs input settings------------------------ # model.pcs.add_block( # set the process type PCS_TYPE=pcs_type_flow, NUM_TYPE="NEW"
plt.close("all") plt.style.use('default') mpl.rc("text", usetex=True) mpl.rc('lines', linewidth=3.5) fig = plt.figure(figsize=[5, 4]) ax = fig.add_subplot(1, 1, 1) # parameter lists to generate the para_set (single one) TG = 1e-4 # mu = log(TG) var = 1.0**2 len_scale = 10 hurst = 0.5 # radial discretization: 1000 m with 100 steps and increasing stepsize rad = specialrange(0, 1000, 100, typ="cub") # 64 angles for discretization angles = 64 msh = MSH() msh.generate("radial", dim=2, angles=angles, rad=rad) seed = 1001 # init cov model (truncated power law with gaussian modes) cov = gs.TPLGaussian(dim=2, var=var, len_scale=len_scale, hurst=hurst) # init spatial random field class srf = gs.SRF(cov, mean=np.log(TG), upscaling="coarse_graining") # generate new transmissivity field srf.mesh(msh, seed=seed, point_volumes=msh.volumes_flat) triang = tri.Triangulation(srf.pos[0], srf.pos[1]) field = srf.field.ravel()
# -*- coding: utf-8 -*- import anaflow as ana from ogs5py import OGS, specialrange, generate_time from matplotlib import pyplot as plt # discretization and parameters time = specialrange(0, 3600, 50, typ="cub") rad = specialrange(0, 1000, 100, typ="cub") obs = rad[21] angles = 32 storage = 1e-3 transmissivity = 1e-4 rate = -1e-3 # model setup model = OGS(task_root="pump_test", task_id="model") model.pcs.add_block( # set the process type PCS_TYPE="GROUNDWATER_FLOW", NUM_TYPE="NEW") # generate a radial mesh and geometry ("boundary" polyline) model.msh.generate("radial", dim=2, rad=rad, angles=angles) model.gli.generate("radial", dim=2, rad_out=rad[-1], angles=angles) model.gli.add_points([0.0, 0.0, 0.0], "pwell") model.gli.add_points([obs, 0.0, 0.0], "owell") model.bc.add_block( # boundary condition PCS_TYPE="GROUNDWATER_FLOW", PRIMARY_VARIABLE="HEAD", GEO_TYPE=["POLYLINE", "boundary"], DIS_TYPE=["CONSTANT", 0.0], ) model.ic.add_block( # initial condition PCS_TYPE="GROUNDWATER_FLOW", PRIMARY_VARIABLE="HEAD",