Example 5e: Deformation of a beam under gravity

This is example demonstrates the use of gravity by showing the deformation of a cantilever beam under gravity.


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 
#The geometry being subjected to gravity load is a cuboid 60mm long,(x-direction) 40X40 mm in y,z directions
fem def node;r;beam;example
fem def elem;r;beam;example
fem def fibre;r;beam;example
fem def elem;r;beam;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. 
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
fem solv inc 0.5 iter 100
fem solv inc 0.5 iter 100
#**************************************************************
#
#view the deformed state on the gx window
fem def wind on xz;c
fem draw line
fem draw line def dot

Additional testing commands:

fem list stress




Files used by this example are:

Name                     Modified     Size

example_5e.com 31-Mar-2005 2.2k BiCubicHerm.ipbase 17-Apr-2004 1.5k BiLinear.ipbase 17-Apr-2004 1.1k TriCubicHerm.ipbase 17-Apr-2004 1.9k TriLinearPress.ipbase 17-Apr-2004 1.4k beam.ipelem 17-Apr-2004 7.0k beam.ipelfb 17-Apr-2004 4.2k beam.ipfibr 17-Apr-2004 69k beam.ipnode 17-Apr-2004 80k gravity.ipinit 17-Apr-2004 3.0k mechanics.ipequa 02-May-2004 2.0k memory.ippara 17-Apr-2004 5.9k modif_newton.ipsolv 16-Aug-2010 2.4k modif_newton.ipsolv.old 13-Apr-2007 2.2k neo_hookean.ipmate 17-Apr-2004 2.2k test_output.com 17-Apr-2004 19

Download the entire example:

Name                  Modified     Size

examples_5_5e.tar.gz 16-Aug-2014 119k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:08:40 201612
cm-debugSuccessSat Mar 5 01:26:23 201694
mips-irix
cmSuccessSun Aug 19 03:04:42 2007100
cm-debugSuccessWed Aug 8 04:36:47 2007686
cm-debug-clear-mallocSuccessSat Aug 11 05:38:01 2007698
cm-debug-clear-malloc7SuccessMon Aug 13 03:47:36 2007692
cm64SuccessSun Aug 19 03:11:23 2007101
cm64-debugSuccessTue Aug 21 04:44:03 2007807
cm64-debug-clear-mallocSuccessTue Feb 1 10:04:32 2005358
rs6000-aix
cmSuccessWed Mar 4 01:14:53 200912
cm-debugSuccessMon Mar 2 01:50:07 2009237
cm64SuccessWed Mar 4 01:15:40 200913
cm64-debugSuccessTue Mar 3 01:52:39 2009233
x86_64-linux
cmSuccessSun Mar 6 00:01:27 20166
cm-debugSuccessSat Mar 5 00:05:53 201637

Testing status by file:


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

Input last modified: Fri Aug 15 11:59:11 2014


CMISS Help / Examples / 5 / 5e