Example 723: Nonlinear material parameter optimisation with foward solving

This example demonstrates nonlinear optimisation of material parameters by solving the forward problem


The comfile run by this example is as follows:

#Example 723
# This example demonstrates nonlinear optimisation 
# of material parameters by solving the forward problem
#
# This command file is used by the optimiser to solve the 
# forward problem for each objective evaluation


$TRUE = 1;  # Initialise logicals
$FALSE = 0;

if($RESOLVE ne "TRUE") 
{ 
  # Don't need to redo these commands when 
  # resolving during optimisation
  fem define parameters;r;shear;example;
  fem define coordinates;r;shear;example;

  fem def base;r;linear;example;
  fem def ;add base;r;lagr;example;
}

fem def node;r;shear_specimen_ref;example;
fem def elem;r;shear_ref;example;
fem def fibre;r;shear_ref;example;
fem def elem;r;shear_ref;example fibre;

fem group nodes 1,3,5,7 as LEFT;
fem group nodes 2,4,6,8 as RIGHT;
fem group nodes 1,2,5,6 as BOTTOM;
fem group nodes 3,4,7,8 as TOP;
fem group nodes 1,2,3,4 as BACK;
fem group nodes 5,6,7,8 as FRONT;

# Refinement cannot be done during in 
# the optimisation run. Refine mesh
# and write it out before the optimisation
# run e.g.
#
# (new nodes and elements will automatically
#  be added to the correct groups)
#
#fem refine xi 3;
#fem def node;w;shear_specimen_ref;
#fem def elem;w;shear_ref;
#fem def fibre;w;shear_ref; 
#fem def elem;w;shear_ref fibre;

#fem export nodes;shear;example as cube;
#fem export element;shear;example as cube;

fem def equa;r;shear;example;

fem def mate;r;guiccione_can_mid;example;

if($RESOLVE eq "TRUE") 
{ 
  # Need to update the material parameters 
  # to those being evaluated by the optimiser
  fem update optimisation
}

fem def init;r;shear_NF;example;

fem def solve;r;shear;example;

fem solve increment 0 error 0.01;

fem solve increment 0.2 iter 30 error 0.01;
if($RESOLVE eq "TRUE") 
{
  # Evaluate residuals & load residual vector - 10%
  fem evaluate reaction nodes FRONT direction 1 residual 1
  fem evaluate reaction nodes FRONT direction 2 residual 2
  fem evaluate reaction nodes FRONT direction 3 residual 3
}


fem solve increment 0.2 iter 30 error 0.01;
if($RESOLVE eq "TRUE") 
{
  # Evaluate residuals & load residual vector - 20% shear
  fem evaluate reaction nodes FRONT direction 1 residual 4
  fem evaluate reaction nodes FRONT direction 2 residual 5
  fem evaluate reaction nodes FRONT direction 3 residual 6
}

fem solve increment 0.2 iter 30 error 0.01;
if($RESOLVE eq "TRUE") 
{
  # Evaluate residuals & load residual vector - 30% shear
  fem evaluate reaction nodes FRONT direction 1 residual 7
  fem evaluate reaction nodes FRONT direction 2 residual 8
  fem evaluate reaction nodes FRONT direction 3 residual 9
}

fem solve increment 0.2 iter 30 error 0.01;
if($RESOLVE eq "TRUE") 
{
  # Evaluate residuals & load residual vector - 40% shear
  fem evaluate reaction nodes FRONT direction 1 residual 10
  fem evaluate reaction nodes FRONT direction 2 residual 11
  fem evaluate reaction nodes FRONT direction 3 residual 12
}

fem solve increment 0.2 iter 30 error 0.01;
if($RESOLVE eq "TRUE") 
{
  # Evaluate residuals & load residual vector - 50% shear
  fem evaluate reaction nodes FRONT direction 1 residual 13
  fem evaluate reaction nodes FRONT direction 2 residual 14
  fem evaluate reaction nodes FRONT direction 3 residual 15
}


if($RESOLVE eq "TRUE") 
{
  $ITERATION=$ITERATION + 1;
  print "\033[0;30;43m                    Iteration = ${ITERATION}                  \033[0m\n"; 
} 

if($RESOLVE ne "TRUE") 
{
  # Load the experimental data, force components in the 
  # x, y and z directions are in indecies 1, 2 and 3 
  # respectively
  fem define data;r;shear_NF;example;
  #
  # Create a vector of the experimental reactions
  # for use by the optimiser 
  fem update residual data point 1 index 1 residual 1
  fem update residual data point 1 index 2 residual 2
  fem update residual data point 1 index 3 residual 3
  #
  fem update residual data point 2 index 1 residual 4
  fem update residual data point 2 index 2 residual 5
  fem update residual data point 2 index 3 residual 6
  #
  fem update residual data point 3 index 1 residual 7
  fem update residual data point 3 index 2 residual 8
  fem update residual data point 3 index 3 residual 9
  #
  fem update residual data point 4 index 1 residual 10
  fem update residual data point 4 index 2 residual 11
  fem update residual data point 4 index 3 residual 12
  #
  fem update residual data point 5 index 1 residual 13
  fem update residual data point 5 index 2 residual 14
  fem update residual data point 5 index 3 residual 15

  $ITERATION = 1;
  $RESOLVE = "TRUE";
  fem define optimise;r;shear;example;           
  optimise; 
}


#fem export nodes;shear_def;example field as cube;
#fem export element;shear_def;example field as cube;



Additional testing commands:

#Testing example 723
FEM update material optimise;
FEM li material constitutive;

Files used by this example are:

Name                       Modified     Size

example_723.com 24-Oct-2003 4.6k guiccione_can_mid.ipmate 13-Oct-2003 2.8k junk 05-Jun-2003 63k lagr.ipbase 05-Jun-2003 1.1k linear.ipbase 05-Jun-2003 2.4k shear.exelem 05-Jun-2003 6.8k shear.exnode 05-Jun-2003 2.6k shear.ipbase 05-Jun-2003 5.6k shear.ipcoor 05-Jun-2003 570 shear.ipequa 02-May-2004 2.0k shear.ipopti 05-Jul-2005 1.5k shear.ippara 05-Jun-2003 5.9k shear.ipsolv 16-Aug-2010 2.7k shear.ipsolv.old 13-Apr-2007 2.5k shear_NF.ipdata 05-Jun-2003 117 shear_NF.ipinit 05-Jun-2003 1.7k shear_def.exelem 05-Jun-2003 6.8k shear_def.exnode 05-Jun-2003 2.6k shear_def.opresi 05-Jun-2003 0 shear_ref.ipelem 05-Jun-2003 802 shear_ref.ipelfb 05-Jun-2003 688 shear_ref.ipfibr 05-Jun-2003 2.8k shear_specimen_ref.ipnode 05-Jun-2003 3.0k test_output.com 05-Jun-2003 80

Download the entire example:

Name                      Modified     Size

examples_7_72_723.tar.gz 17-Aug-2010 16k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:26:21 201612
last breakThu Apr 7 00:45:00 201128
cm-debugFailureSun Mar 6 00:40:15 201625
last breakTue Feb 24 03:38:00 201524
last successMon Oct 13 01:14:00 2003190
mips-irix
cmFailureTue Aug 21 05:41:02 2007172
last breakThu Apr 13 03:48:00 2006182
last successSun Oct 12 02:03:00 2003686
cm-debugFailureTue Aug 21 05:05:23 2007427
last breakWed Apr 19 03:03:00 2006402
last successMon Oct 13 02:23:00 20031045
cm-debug-clear-mallocFailureTue Aug 21 04:24:21 2007534
last breakSat Apr 22 05:37:00 2006521
last successSun Oct 12 23:15:00 20031435
cm-debug-clear-malloc7FailureSun Aug 19 05:08:38 2007557
last breakMon Apr 17 04:07:00 2006524
cm64FailureTue Aug 21 05:50:38 2007178
last breakThu Apr 13 03:44:00 2006194
cm64-debugFailureFri Aug 17 04:56:52 2007425
last breakTue Apr 11 06:04:00 2006422
cm64-debug-clear-mallocFailureThu Aug 16 06:03:23 2007509
last breakSun Mar 19 01:49:00 2006524
rs6000-aix
cmFailureWed Mar 4 01:28:29 200922
last breakMon Aug 28 10:32:00 200620
last successSun Oct 19 02:30:00 2003366
cm-debugFailureWed Mar 4 01:36:57 200981
last breakThu Sep 13 02:09:00 200779
last successFri Oct 24 02:26:00 2003753
cm64FailureWed Mar 4 01:28:51 200922
last breakMon Aug 28 10:32:00 200621
cm64-debugFailureWed Mar 4 01:36:29 200973
last breakThu Sep 13 02:10:00 200771
x86_64-linux
cmFailureSun Mar 6 00:02:15 20167
last breakTue Aug 24 00:08:00 201016
cm-debugFailureSun Mar 6 00:03:44 201613
last breakThu Sep 27 00:49:00 201220

Testing status by file:


Html last generated: Sun Mar 6 05:50:31 2016

Input last modified: Mon Aug 16 11:21:50 2010


CMISS Help / Examples / 7 / 72 / 723