Location: Human Stomach Scaffold @ b24992e08081 / Readme.md

Author:
rjag008 <rjag008@auckland.ac.nz>
Date:
2018-06-07 14:22:45+12:00
Desc:
Updated Provenance workflow uri
Permanent Source URI:
https://models.cellml.org/workspace/516/rawfile/b24992e080818ebc5c9094afd2c38ec2d100cf0e/Readme.md

MeshType_3d_human_stomach scaffold history
==========================================
Date: 06 June 2018

Author: Jagir Hussan, Email: r.jagir@auckland.ac.nz

Affiliation: Auckland Bioengineering Institute, University of Auckland, New Zealand.

Dependency credits: Initial Stomach Mesh Kumar Mithraratne (p.mithraratne@auckland.ac.nz), and BodyParts3D/Anatomography (http://lifesciencedb.jp/bp3d/?lng=en)

Software and library versions:
------------------------------
**cmgui** version 3.0.1, Build: Windows, 18/09/2017 11:42:43

**zinc** version 3.1.2, Build Windows, VS9

**python** version 2.7.13, Anaconda custom 64 bit, AMD64 on win32

General Notes:
--------------
The initial mesh describing the stomach geometry was created by Kumar, based on the description of a human stomach geometry made available through BodyParts3D/Anatomography. The related files are *deforming_stomach.exelem* and *deforming_stomach_0.exnode*
It is a cubic hermite mesh, with **8** circumferential, **11** axial and **3** wall elements. The mesh has cross derivatives and was constructed using cm.

Modifications
-------------
The element number was changed to follow the right-handed orientation. The xi was along the axis, circumferential and wall directions. 
The cmgui script, *renumberStomach.cmgui* was used to renumber the nodes and elements of the mesh. The resulting *renumstomach.ex** files were combined to create the *finalstomach.ex2*.

A python script *LoadxiInvertedmesh.py* was created to manipulate, test various aspects of the mesh, and test the logic added to the scaffold. The method are encapsulated within a **class Stomach**.

The scaffold rendering logic requires scaffold meshes to be bounded by a unit cube with the mesh centroid at the origin. The coordinates of *finalstomach.ex2* was normalized to lie within this boundary. The code for this is in *Stomach.normalizeToUnitBoundingVolume*. 

The normalized mesh without faces is available in *normalizedStomach.exnode*.

Mesh generation
---------------
To enable users to generate meshes with different circumferential, axial and wall element configurations, the coordinate information from the source mesh is utilized.
The stomach has a tubular geometry and a tube topology is generated from the given element configurat
on. The tube can be cut open with a periodic boundary along the circumferential direction. This enables one to define a material coordinate on the tube. The coordinate extent is set 1.0 along x,y,z. The coordinate and fibres field from the source mesh are then mapped to this material coordinate. With this map, the nodal field values can be determined for any element discritization. 

Currently, the method does not compute the derivatives required, it rather relies on zinc's smoothing api to determine an appropriate set of derivatives to produce a smooth mesh. Though the resulting meshes are smooth, the deviate from the source geometry for course discretization.

An alternative would be to perform a nonlinear fitting to closely capture the source geometry, however, this is a time consuming operation and is not suitable for fast user experience.

Mesh refinement options
-----------------------
Users can refine the mesh by stating the number of elements they require along the circumferential, axial and wall directions. A minimum of 4 circumferential elements and 4 axial elements is necessary to capture the geometry and this is imposed. A ValueError is raised if this condition is not met.

Users can also refine along a row axial elements (latitude) and/or along a column of elements (longitude). They can also specify the xi value at which the elements should be split. However, this option is not made available via the scaffoldMarker UI.

An option to ensure that circumferential segment lengths of elements along a latitude are evenly distributed is provided. The option works by fitting a spline through the material coordinate based coordinate values. Then
1. Find the length of the spline,
2. Find the per element segment length, and
3. Partition the spline such that each segment is of the desired length and determine the coordinates

The derivatives for a smooth mesh are determined using the zinc's smoothing api