This is a small example of a very realistic problem. It also demonstrates how our simple interface can be used in conjunction with other applications such as manipulating an ABAQUS calculation. This is one of the standard examples which comes with Z-mat.
The test used is from the ABAQUS verification problems (NT4XX28C: NAFEMS TEST T4, 2-Dimensional Heat Transfer w/ Convection [DC2D8]). This problem uses a film interface for convective heat transfer along a plate edge. The input file is copied to a new file named nt4xx28c.inp.tmpl and modified as follows:
*FILM SIDE,F2,0.0, ?Film1 TOP ,F3,0.0, ?Film2
Zebulon will attempt to find these coefficients using the optimizer.
Comparison will be made between the temperature at nodes 303,307,111,211
and "experimental values" generated using the original input file and
ABAQUS. Real problems would use thermocouple measurements of course.
The optimization command file defines convergence options for the optimizing algorithm (in this case Levenberg-Marquardt) the variables to be optimized, and the comparisons making up the function to minimize.
****optimize levenberg_marquardt
***convergence
perturb 0.01
lambda0 5.0
lambda_max 1.e20
iter 13
nu 5.0
fmin 1.e-6
gmin 1.e-6
***shell
./RUN
***files nt4xx28c.inp
***values
**format %.4e
Film1 10. min 5. max 1.e4
Film2 10. min 5. max 1.e4
***compare
g_file_file ../Experiment/nt4xx28c.test 1 2 nt4xx28c.test 1 2
****return
Note the variables Film1 and Film2 are
given initial values of 10. and have bounds of 5 and 1.e4.
The final (found) values were 358.904 and 977.656, while the
real values are 350. and 950. It should be noted that a low
convergence is given for this problem, and the values can be
obtained to 2 decimal places (with more cpu time).
The problem is run with a script RUN, and the comparison plot
is generated using a ABAQUS post batch file in PLT (see below).
------------------------------------------------------------
RUN
------------------------------------------------------------
#!/bin/sh
ZeBaBa -fg nt4xx28c
PLT nt4xx28c 2>&1 > /dev/null
cat nt4xx28c.test
exit 0
------------------------------------------------------------
PLT
------------------------------------------------------------
#!/bin/sh
cat << 'EOF' | sed 's/ProB/'"$1"'/g' > $1.jnl
RESTART,FILE=ProB.res
SHOW,RESTART
GRAPH AXES,Y DIGITS=8
PATH, VAR=TEMP,NAME=plot,NODE LIST
303,307,111,211
SET,XY PRINT FILE=ProB.tmp
SHOW,CURVE ATTRIBUTES
PRINT CURVE
plot
EOF
abaqus post job=$1 input=$1.jnl
awk '/^[^*]/ { print $0 }' $1.tmp > $1.test
rm -f $1.tmp