# Tutorial 1: A pumping test

This is a minimal example on how to setup a pumping test with ogs5py. The result was plotted against the analytical solution.

In this example we use the `generate_time` function, to use an array of time points for the time stepping definition.

```model.tim.add_block(**generate_time(time))
```

is equivalent to:

```model.tim.add_block(
TIME_START=0,
TIME_END=time[-1],
TIME_STEPS=[
[1, time[0]],
[1, time[1]],
[1, time[2]],
# ...
],
)
```

The script:

```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")
angles = 32
storage = 1e-3
transmissivity = 1e-4
rate = -1e-3
# model setup
model.pcs.add_block(  # set the process type
PCS_TYPE="GROUNDWATER_FLOW", NUM_TYPE="NEW"
)
# generate a radial mesh and geometry ("boundary" polyline)
PCS_TYPE="GROUNDWATER_FLOW",
GEO_TYPE=["POLYLINE", "boundary"],
DIS_TYPE=["CONSTANT", 0.0],
)
PCS_TYPE="GROUNDWATER_FLOW",
GEO_TYPE="DOMAIN",
DIS_TYPE=["CONSTANT", 0.0],
)
PCS_TYPE="GROUNDWATER_FLOW",
GEO_TYPE=["POINT", "pwell"],
DIS_TYPE=["CONSTANT_NEUMANN", rate],
)
GEOMETRY_DIMENSION=2,
STORAGE=[1, storage],
PERMEABILITY_TENSOR=["ISOTROPIC", transmissivity],
)
PCS_TYPE="GROUNDWATER_FLOW",
LINEAR_SOLVER=[2, 5, 1e-14, 1000, 1.0, 100, 4]
)
PCS_TYPE="GROUNDWATER_FLOW",
GEO_TYPE=["POINT", "owell"],
DAT_TYPE="TECPLOT",
)
PCS_TYPE="GROUNDWATER_FLOW",
**generate_time(time)  # generate input from time-series
)
model.write_input()
success = model.run_model()
print("success:", success)
# observation
time = point["owell"]["TIME"]
# analytical solution
head_ana = ana.theis(time, obs, storage, transmissivity, rate=rate)
# comparisson plot