This example illustrates the implementation of elemental variation of material laws. The Mooney-Rivlin material law, defined by a CellML version of the model is used in the first element.Here is a PDF of the model equations. The Guccione material law, defined by a CellML version of the model is used in the second element.Here is a PDF of the model equations.The example simulates shearing of a two element cube in the xz plane.
NOTE: This example requires a CellML 1.0 enabled version of CMISS to run.
# Example showing how to use a cellml model ti implement passive mechanics # constitutive laws in different elements - Guccione and Mooney-Rivlin #******************************************************************************************************************************** # IMPORTANT NOTES ON ASSUMPTIONS AND UNDERLYING OPERATIONS #******************************************************************************************************************************** # It is assumed that the green-strain components used in the cellml model are taken from the following indices in the RCQS array # RCQS 3 - E11 comp 1 in CMISS # RCQS 4 - E12 comp 4 in CMISS # RCQS 5 - E13 comp 5 in CMISS # RCQS 6 - E22 comp 2 in CMISS # RCQS 7 - E23 comp 6 in CMISS # RCQS 8 - E33 comp 3 in CMISS #******************************************************************************************************************************** # It is assumed that once the cellml file has been evaluated for deviatoric components of stress, the resultant values are stored # in the following indices of the YQS array. They are then copied to the YG array # YQS 2 - Tdev11 - YG 1 # YQS 3 - Tdev12 - YG 2 # YQS 4 - Tdev13 - YG 3 # YQS 5 - Tdev22 - YG 4 # YQS 6 - Tdev23 - YG 5 # YQS 7 - Tdev33 - YG 6 #******************************************************************************************************************************** # CellML stores variables defined in the cellml file in alphanumeric order in the RCQS and YQS arrays. Also, upper case is given # higher precedence than lower case when storing in cell indices. So, E11 will be stored before c1. Therefore, make sure that # variable names are chosen so that they do not change the indices in which Eij are stored due to the assumption specified previously #******************************************************************************************************************************** # It is currently assumed that all cell problems are solved in class 2. #******************************************************************************************************************************** # IF ANY OF THE ABOVE CONSTRAINTS RESTRICT YOU IN SOLVING YOUR PROBLEM, THE CODE IN ZERE50 AND OPSTRE MUST BE ALTERED TO # GENERALISE WHICH ARRAYS ARE USED. #******************************************************************************************************************************** # # # 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; } #************************************************************** #Set up CMISS mechanics model # # fem def para;r;emech;example fem def coor 3,1 # Define 3 types of basis functions #read in trilinear basis function. Used for 3D geometry and grid interpolation # read in bilinear basis function. Used for 2D face interpolation # read in auxilary parameters. Used for elemental variation of hydrostatic pressure fem define bas;r;cube;example fem define node;r;2cube;example #read in nodal coordinates fem define elem;r;2cube;example #define 2 elements fem def fibre;d #default fibres. Only use fibres if material has preferential direction in terms of mechanical behaviour. ie. a degree of anisotropy fem def elem;d fibre # elemental description of fibre orientation fem def equa;r;mechanics;example lock #specify finite elasticity for 3D problem fem def mat;r;guccionePLUSmooneyCellML;example #choose gauss point stresses with grid point coupling to use CellML features fem def init;r;2cubesheared_cube;example #define xz plane shear boundary conditions fem def solv;d fem group elem 1 as ELEMONE fem group elem 2 as ELEMTWO #In this example we define displacements #************************************************************** # # #************************************************************** # # #************************************************************** #set up a finite difference grid for the cell problem in class 2 # # fem def grid;r;cubeVarying;example gauss class 2 #gauss qualifier ensures grid points line with Gauss points. Choose basis func 1 (trilinear) as grid interpolation fem update grid geometry #sets up the grid geometry #group the grid points in each element seperately fem group grid element ELEMONE as ONE_GRID_POINTS fem group grid element ELEMTWO as TWO_GRID_POINTS #define a cellml equation - see cellml.ipequa. The options chosen may seem wrong. #But the choices made allow us to use features that have been developed for cellular based modelling of cardiac electrical activation in CMISS, for our problem. fem def equa;r;cellmlVarying;example class 2 # set up conductivities- defaulted. Once again, stuff that we don't need for finite elasticity, but currently required to use features of electrical activation fem def mate;d class 2 #Define the cellml laws to be used in the ipcell file. specify which FILENAME.cml files to read in as material laws. #You have to save Tdev11...Tdev33 as they are going to be used in stress calculations. #Eij are spatially varying - obvious I hope, because strain at each gauss point can be different #material params of the constitutive laws are not spatially varying in this example #************************************************************************************************************* #IMPORTANT NOTE #The ipcell file asks whether you want to save the temporary files for each of the cellml files used #ENTER Y (for yes) OR THE CODE WILL NOT WORK ON IRIX. THIS IS A BUG FOR WHICH THE REASON HAS NOT BEEN FOUND YET #************************************************************************************************************* fem define cell;r;guccionePLUSmooney;example class 2 fem def mate;r;guccionePLUSmooney;example cell class 2# needed for spatially varying parameters (green strain components in this case) #no flux boundary condition etc for electrical activation problems defined in next command #Once again just default as we only need it to use some features otherwise inaccessible fem def init;d class 2 #The solve file below is needed for solving differential equations present in electromechanics models. #We need to read this in eventhough we are not using it for the completely passive deformation example #Do not worry about the options chosen in this file. #You can just default everything, its once again needed just to allow us to use features of electrical activation in CMISS fem def solv;r;cell-hmt-implicit-adams;example class 2 # Initialise solvers #runs the cellml time integration solver stuff once to initialise cellml solver things. The "0" class 2 to 0 says you have a 0 time step for the integration fem solve class 2 to 0; #to num it is to 0 sec #************************************************************** fem solve #solve mechanics problem
fem list stress at 1
Name Modified Size
example_5g2.com 27-Mar-2004 6.8k 2cube.ipelem 17-Feb-2004 802 2cube.ipelfb 13-Feb-2004 452 2cube.ipfibr 13-Feb-2004 1.4k 2cube.ipgrid 13-Feb-2004 684 2cube.ipnode 13-Feb-2004 3.0k 2cubesheared_cube.ipinit 13-Feb-2004 14k cell-hmt-implicit-adams.ipsolv 13-Apr-2007 2.6k cellml.ipequa 13-Feb-2004 1.5k cellmlVarying.ipequa 13-Feb-2004 1.5k cube.ipbase 13-Feb-2004 3.4k cubeVarying.ipgrid 13-Feb-2004 696 emech.ippara 16-Mar-2007 5.9k guccione.cml 13-Feb-2004 13k guccionePLUSmooney.ipcell 17-Feb-2004 5.4k guccionePLUSmooney.ipmatc 13-Feb-2004 4.2k guccionePLUSmooneyCellML.ipmate 13-Feb-2004 695 mechanics.ipequa 02-May-2004 2.0k mooney_rivlin.cml 13-Feb-2004 11k test_output.com 13-Feb-2004 21
Name Modified Size
examples_5_5g_5g2.tar.gz 14-Aug-2014 38k
Status | Tested | Real time (s) | |
i686-linux | |||
cm | Success | Sun Mar 6 00:02:03 2016 | 0 |
cm-debug | Success | Sat Mar 5 00:02:23 2016 | 1 |
mips-irix | |||
cm | Success | Sun Aug 19 01:39:17 2007 | 6 |
cm-debug | Success | Wed Aug 15 01:26:01 2007 | 15 |
cm-debug-clear-malloc | Success | Sat Aug 18 01:36:39 2007 | 14 |
cm-debug-clear-malloc7 | Success | Mon Aug 20 01:29:38 2007 | 19 |
cm64 | Success | Sun Aug 19 01:32:38 2007 | 10 |
cm64-debug | Success | Tue Aug 21 01:28:26 2007 | 15 |
cm64-debug-clear-malloc | Success | Tue Feb 1 09:45:43 2005 | 9 |
rs6000-aix | |||
cm | Success | Wed Mar 4 01:08:54 2009 | 2 |
cm-debug | Success | Mon Mar 2 01:07:21 2009 | 2 |
cm64 | Success | Wed Mar 4 01:08:54 2009 | 2 |
cm64-debug | Success | Tue Mar 3 01:12:14 2009 | 3 |
x86_64-linux | |||
cm | Success | Sun Mar 6 00:01:03 2016 | 0 |
cm-debug | Success | Sat Mar 5 00:01:14 2016 | 0 |
i686-linux | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
mips-irix | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
Success | cm-debug-clear-malloc: | cmiss_test.log.retain. | |
Success | cm-debug-clear-malloc7: | cmiss_test.log.retain. | |
Success | cm64: | cmiss_test.log.retain. | |
Success | cm64-debug: | cmiss_test.log.retain. | |
Success | cm64-debug-clear-malloc: | cmiss_test.log.retain. | |
rs6000-aix | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
Success | cm64: | cmiss_test.log.retain. | |
Success | cm64-debug: | cmiss_test.log.retain. | |
x86_64-linux | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. |
i686-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
mips-irix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug-clear-malloc: | ndiff test: no significant differences with generic answer. | |
rs6000-aix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
x86_64-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. |
Html last generated: Sun Mar 6 05:50:28 2016
Input last modified: Thu Aug 14 10:03:15 2014