Example b17: Testing binary signal files.

Takes a binary history generated from example b361 and produces binary signal files.

The comfile run by this example is as follows:

# Example b17:
# 2D sheet with N98-HMT used for active tension calculation - testing
# reading and writing of binary signal files.

# 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 echo;

$FORMAT = "binary";

# Set the output directory
$output = ".";
if (! -d $output) {
    mkdir $output,0700;

# The two class definitions
$CELL = 2;

# Set up the geometry 4x4 elements, bicubic Hermite basis
fem define parameter;r;$example/emech;
##**fem define node;r;$example/emech-8x8-cubic;
fem define node;r;$example/emech-4x4-cubic;
# Need a bi-cubic Hermite for geometry and fibres and a bi-linear
# for grid-based FEM
fem define base;r;$example/emech-cubic-linear;
fem define element;r;$example/emech-4x4-cubic;
# Fibres varying from 10 deg to 90 deg and back to 10 deg - with
# cubic Hermite interpolation
fem define fibre;r;$example/emech-4x4-109010;
fem define element;r;$example/emech-4x4-cubic fibre;

# Need to calculate the undeformed nodal derivatives
fem update node derivative 1 linear;
fem update node derivative 2 linear;
fem update node derivative 3 linear;

# Node/element groups to set BCs
# - the corners group will be fixed in space
# - the fixed_y group will be fixed in the y-direction
fem group node external as bdy_nodes;
#fem group node 1,10,19,28,37,46,55,64,73 as corners
fem group node 1 as corners;
fem group node 5 as fixed_y;
fem group element 1..16 as ALL_ELEMENTS;

# Set up the finite elasticity
fem define equation;r;$example/mech-cubic class $MECHANICS lock;
fem define material;r;$example/mech-cubic class $MECHANICS;
# use the cellular HMT active tension
fem define active;r;$example/mech-cubic class $MECHANICS;
fem define initial;r;$example/mech-cubic class $MECHANICS;
# Define the Newton iterative solver
fem define solve;r;$example/newton class $MECHANICS;

# Set up the N98-HMT cellular modelling - used to calculate the active 
# tension and wavefront propagation
fem define grid;r;$example/cell-18x18 class $CELL;
fem update grid geometry;
fem update grid metric;
#fem group grid xi1=0 oneoff as stimulus1_site;
fem group grid grid 1,2,3,10,11,12,19,20,21 as stimulus1_site;
fem group grid xi1 low element 3,11 as stimulus2_site;
fem group grid element ALL_ELEMENTS as ALL_GRID_POINTS;
# Use N98-HMT with grid-based FEM
fem define equation;r;$example/cell-n98_hmt class $CELL;
fem define material;r;$example/cell-n98_hmt class $CELL;
fem define cell;r;$example/cell-n98_hmt class $CELL;
fem define material;r;$example/cell-n98_hmt cell class $CELL;
fem update grid material class $CELL;
fem define initial;r;$example/cell-n98_hmt class $CELL;
# use the Adams-Moulton integrator
fem define solve;r;$example/cell-hmt-implicit-adams class $CELL;

# Initialise the cell integration
fem solve class $CELL to 0;

# Tension index for grid (YQS) and Gauss (YG) variables
##fem inquire cell_variable Tension return_variables T_GRIDARRAY,T_GRIDIDX;
fem inquire cell_variable IsometricTension return_variables T_GRIDARRAY,T_GRIDIDX;
# Fibre extension ratio index for grid (YQS) and mechanics variables
fem inquire cell_variable ExtensionRatio return_variables L_GRIDARRAY,L_GRIDIDX;
# and previous fibre extension ratio index for grid (YQS) and mechanics variables
fem inquire cell_variable ExtensionRatioPrevious return_variables L_GRIDARRAY_PREV,L_GRIDIDX_PREV;
# [Ca]i index for grid (YQS)
fem inquire cell_variable Cai return_variables CAI_GRIDARRAY,CAI_GRIDIDX;
# Vm index for grid (YQS)
fem inquire cell_variable Vm return_variables VM_GRIDARRAY,VM_GRIDIDX;

# Compute the CMISS signal files from the history file
set echo;
fem evaluate electrode;$output/Vm history $example/cell-n98_hmt from grid yqs iy $VM_GRIDIDX $FORMAT class $CELL;
fem evaluate electrode;$output/cai history $example/cell-n98_hmt from grid yqs iy $CAI_GRIDIDX $FORMAT class $CELL;
fem evaluate electrode;$output/tension history $example/cell-n98_hmt from grid yqs iy $T_GRIDIDX $FORMAT class $CELL;
fem evaluate electrode;$output/extension_ratio history $example/cell-n98_hmt from grid yqs iy $L_GRIDIDX $FORMAT class $CELL;

# Export to UnEMAP signal files
fem define export;r;$example/cell-4x4;
fem export signal;$output/Vm electrode signal $output/Vm;
fem export signal;$output/cai electrode signal $output/cai;
fem export signal;$output/tension electrode signal $output/tension;
fem export signal;$output/extension_ratio electrode signal $output/extension_ratio;


Files used by this example are:

Name                            Modified     Size

example_b17.com 10-Oct-2002 4.5k cell-18x18.ipgrid 12-Sep-2003 545 cell-4x4.ipexpo 10-Oct-2002 660 cell-hmt-implicit-adams.ipsolv 13-Apr-2007 2.6k cell-n98_hmt.binhis 10-Oct-2002 375k cell-n98_hmt.ipcell 10-Oct-2002 11k cell-n98_hmt.ipequa 26-May-2003 1.3k cell-n98_hmt.ipinit 10-Oct-2002 237 cell-n98_hmt.ipmatc 29-Jan-2003 673 cell-n98_hmt.ipmate 10-Oct-2002 1.7k cell.ipexpo 10-Oct-2002 660 emech-4x4-109010.ipfibr 10-Oct-2002 7.1k emech-4x4-cubic.ipelem 10-Oct-2002 5.1k emech-4x4-cubic.ipelfb 10-Oct-2002 2.5k emech-4x4-cubic.ipnode 10-Oct-2002 15k emech-8x8-109010.ipfibr 10-Oct-2002 6.8k emech-8x8-cubic.ipelem 10-Oct-2002 20k emech-8x8-cubic.ipelfb 10-Oct-2002 9.7k emech-8x8-cubic.ipnode 10-Oct-2002 49k emech-cubic-linear.ipbase 10-Oct-2002 2.5k emech.ippara 12-Nov-2002 5.9k mech-cubic.ipacti 10-Oct-2002 253 mech-cubic.ipequa 02-May-2004 1.8k mech-cubic.ipinit 30-Dec-2002 1.6k mech-cubic.ipmate 30-Dec-2002 6.4k newton.ipsolv 16-Aug-2010 2.7k newton.ipsolv.old 13-Apr-2007 2.5k

Download the entire example:

Name                      Modified     Size

examples_b_b1_b17.tar.gz 17-Aug-2010 196k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:02:10 20160
cm-debugSuccessSat Mar 5 00:05:20 20161
cmSuccessSun Aug 19 01:34:41 20077
cm-debugSuccessWed Aug 15 01:33:23 200723
cm-debug-clear-mallocSuccessSat Aug 18 01:47:51 200749
cm-debug-clear-malloc7SuccessMon Aug 20 01:48:41 200740
cm64SuccessSun Aug 19 01:34:56 20078
cm64-debugSuccessTue Aug 21 01:32:43 200725
cm64-debug-clear-mallocSuccessThu Apr 1 11:10:23 200414
cmSuccessWed Mar 4 01:08:07 20091
cm-debugSuccessMon Mar 2 01:08:39 20095
cm64SuccessWed Mar 4 01:08:43 20091
cm64-debugSuccessTue Mar 3 01:13:21 20096
cmSuccessSun Mar 6 00:01:04 20160
cm-debugSuccessSat Mar 5 00:01:36 20161

Testing status by file:

Html last generated: Sun Mar 6 05:51:06 2016

Input last modified: Mon Aug 16 11:26:29 2010

CMISS Help / Examples / b / b1 / b17