Deterministic Inversion Input
Methodology
The SHEMAT-Suite provides an approach for deterministic Bayesian inversion for parameter estimation. Its specialty is that derivatives of the forward model, which are required for producing the Jacobian matrix, are calculated by Automatic Differentiation (AD) instead of numerical differentiation (divided differences). AD produces exact results free of any truncation error. The inverse problem is solved by a fundamental Gauss-Newton iteration scheme. The approach and methodology is explained in detail in Rath et al. (2006).
Compilation
Deterministic Inversion for parameters is available in SHEMAT-Suite when
compiling with the ad
-mode flag instead of fw
or sm
(note that you might have to checkout the respective code-branch that contains the AD-code-files). Take a look here for a general documentation of SHEMAT-Suite compilation.
Input file adaptions
For inverse simulations, the SHEMAT-Suite input file has to be adapted and extended by some entries specifying the inverse problem and measurement data.
1. Set runmode 2 or 3.
# runmode
2
2. Give measurement data
# data, records=1
20.3 0.5 50 1 20 2 1
!<value> <error> <i-index> <j-index> <k-index> <variable-flag> <flag>
The variable-flag defines for which variable the measured value is given: 1=head, 2=temperature, 3=concentration.
3. Specify inversion options
3.1 Options for parameter optimization
# errors
0.0 0.0 0.0 6.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 6.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
# errors
defines the uncertainty range of the 17 parameters. Each
entry stands for a property (one of 17) of a unit. Each row represents
the according unit. In the example above, log(permeability) would range
over 6 magnitudes.
# enable unit
0 1
Property | Meaning |
---|---|
0 | not activated for inversion |
1 | activated for inversion |
Analogue to # enable unit
there is the command
# enable property
1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Property | Meaning |
---|---|
0 | not activated for inversion |
1 | activated for inversion, linear |
2 | activated for inversion, logarithmic |
So in this example, porosity and permeability of unit 2 of 2 are enabled for inversion, with porosity varying linearly and permeability logarithmically.
3.2 Options for boundary condition optimization
Another option is to invert for boundary conditions. We distinguish between stationary boundary conditions and time-dependent boundary conditions. The following keywords specify the according options:
# bcerrors, records=1
1 0.005 temp
!<bc-unit> <error> <pv-type>
Property | Values/Meaning |
---|---|
bc-unit | Specifies the bcindex that is defined at the respective bc-input (Boundary condition section) |
pv-type | head / temp / conc |
a) for stationary boundary conditions
# optimize bc, records=1
1 1 temp
!<bc-unit> <1 (lin)/2 (log)> <pv-type>
b) for time-dependent boundary conditions
# optimize tp, records=1
1 2 al
!<tp entry index> <bc index number> <alpha-beta keyword: al/be>
Here the bc-index needs to be associated with a unit number and defines the dependency to the tp period table (where to find the tp-entry). The bc index number is specified for each boundary condition under the respective bc-keyword in the input file.
4. Specify inversion control:
# inverse
1 !<regularization type>*
20 0.0001 1.0 !<max number of iterations> <break-off criterion> <time weighting>**
0 0 !<covariance-matrix output: 0/1> <resolution-matrix output: 0/1>
1 !<output frequency: every nth iteration>
*Currently, regularization type is not used in the code.
**Time weighting can range between 0.0 (fully explicit) and 1.0 (fully implicit).
Example model
An example model for deterministic inversion with SHEMAT-Suite is provided in the SHEMAT-Suite_Models GitLab repository: ad_const_TemperatureInversion.