Example 5h: Identifying the undefomed state of a beam under gravity loading

This example demonstrates a technique of identifying the undeformed state, given a deformed state and the loading conditions for the undeformed state.


The comfile run by this example is as follows:

# If the example path is not set, default to current directory
if (!defined $example) {
    $example = "./";
}
# Drop off the trailing / in the example path
$chopped = chop $example;
if ($chopped ne "/") {
    $example .= $chopped;
}
#**************************************************************
#
# allocate memory for program arrays etc.
fem def para;r;memory;example
#**************************************************************
#
# Set up beam geometry
fem def coor 3,1
fem def base;r;TriCubicHerm;example #basis function for interpolation of 3d coords
fem def;add base;r;BiCubicHerm;example #for interpolation of coords on 2D surfaces
fem def;add base;r;TriLinearPress;example #interpolates hydrostatic pressure
fem def;add base;r;BiLinear;example 
##################################################################################################################################################
#NOTE
#
#The code to identify the undeformed from the deformed state currently works well when using geometry described with unit scale factors for the following reason
#When using non-unit scale factors, the forward problem calculates scale factors the first time when defining the undeformed state. These scale factors
#remain constant during the solution procedure. Therefore, if we use a deformed geometry with non-unit scale factors, the reverse problem does solve correctly
#but the nodal values determined during the procedure deviate slightly from the actual undeformed state values.
##################################################################################################################################################
# We load up the deformed state into memory. The deformed geometry is the initial guess at the undeformed geometry
fem def node;r;beam_def;example
fem def elem;r;beam_def;example
fem def fibre;r;beam_def;example
fem def elem;r;beam_def;example fibre
#
#group nodes that are against the wall for cantilever setup. Certain degrees of freedom for these nodes will be fixed in the ipinit file
#to simulate the cantilever setup
fem group node 1,6,11,16,21,26,31,36,41 as BACKNODES
fem def equa;r;mechanics;example #use 3D finite elasticity to simulate the deformation
#
#apart from the neo_hookean parameter, you need to give the density of the body..
#units for this model
#
# Density in gram per millimeter cubed 
# gravity m/(sec squared). 
# This means force is in mN. Therefore stress will be in kPa (kN/squared m)or (mN/squared mm)
# so neo-Hookean param is in kPa
fem def mate;r;neo_hookean;example 
#
#The gravity vector is set in the ipinit file. The initial conditions are those applied to the undeformed state.
#Once the initial conditions are defined, the first guess in the forward problem to the deformed state is the undeformed state.
#As the deformed is loaded into the undeformed state memory, the deformed state is correctly copied into the deformed geometry memory. 
fem def init;r;gravity;example
#
#Define the nonlinear equations solution algorithm to be used
#I have chosen modified newton with LU factorisation. The LU factorisation
# can be slow, but with modified newton, the total time taken can actually be reduced
fem def solv;r;modif_newton;example
#**************************************************************
#
# solve the problem for reference state
#During the solution procedure, the undeformed geometry parameters in memory are perturbed rather than the deformed geometry parameters. The stiffness
#matrix contains derivatives with respect to the undeformed geometry coordinates and the hydrostatic pressure variables for the deformed state. 

fem solv undeformed iter 100
#**************************************************************
#
#view the undeformed state on the gx window
fem def wind on xz;c
fem draw line #shows predicted undeformed state
fem draw line def dot 
fem export node;beam_inv as beam_inv offset 100
fem export elem;beam_inv as beam_inv offset_elem 100 offset_node 100
fem def node;w;beam_inv #writing out the predicted undeformed state

Additional testing commands:

fem list node solution




Files used by this example are:

Name                     Modified     Size

example_5h.com 05-Feb-2005 3.9k BiCubicHerm.ipbase 05-Feb-2005 1.5k BiLinear.ipbase 05-Feb-2005 1.1k TriCubicHerm.ipbase 05-Feb-2005 1.9k TriLinearPress.ipbase 05-Feb-2005 1.4k beam.exelem 05-Feb-2005 43k beam.exnode 05-Feb-2005 55k beam.ipelem 05-Feb-2005 7.0k beam.ipelfb 05-Feb-2005 4.2k beam.ipfibr 05-Feb-2005 69k beam.ipnode 05-Feb-2005 80k beam_def.exelem 05-Feb-2005 48k beam_def.exnode 05-Feb-2005 56k beam_def.ipelem 05-Feb-2005 7.0k beam_def.ipelfb 05-Feb-2005 4.7k beam_def.ipfibr 05-Feb-2005 70k beam_def.ipnode 05-Feb-2005 82k beam_inv.exelem 05-Feb-2005 43k beam_inv.exnode 05-Feb-2005 55k beam_inv.ipnode 05-Feb-2005 83k gravity.ipinit 05-Feb-2005 3.0k mechanics.ipequa 05-Feb-2005 2.0k memory.ippara 05-Feb-2005 5.9k modif_newton.ipsolv 16-Aug-2010 2.4k modif_newton.ipsolv.old 13-Apr-2007 2.2k neo_hookean.ipmate 05-Feb-2005 2.2k test_output.com 05-Feb-2005 26

Download the entire example:

Name                  Modified     Size

examples_5_5h.tar.gz 17-Aug-2010 90k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:07:49 201610
cm-debugSuccessSat Mar 5 01:19:32 201680
mips-irix
cmSuccessSun Aug 19 02:53:21 200779
cm-debugSuccessWed Aug 8 04:09:22 2007628
cm-debug-clear-mallocSuccessSat Aug 11 04:44:50 2007658
cm-debug-clear-malloc7SuccessMon Aug 20 04:08:31 2007640
cm64SuccessSun Aug 19 02:57:12 200784
cm64-debugSuccessFri Aug 17 03:16:51 2007728
rs6000-aix
cmSuccessWed Mar 4 01:14:23 200910
cm-debugSuccessMon Mar 2 01:39:57 2009216
cm64SuccessWed Mar 4 01:14:34 200911
cm64-debugSuccessTue Mar 3 01:49:14 2009210
x86_64-linux
cmSuccessSun Mar 6 00:01:22 20166
cm-debugSuccessSat Mar 5 00:05:37 201637

Testing status by file:


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

Input last modified: Mon Aug 16 11:19:16 2010


CMISS Help / Examples / 5 / 5h