PIPER  1.0.1
Preparation of the HBM & Metadata

Introduction

The followings steps are typically required to import a Finite Element Human Body model (HBM) in the PIPER application:

  • Step 1: check that a format rules file (.pfr) exists for the considered finite element format (if not, see Multi Finite Element Format Parser to define a new one). This is required to parse the finite element files.
  • Step 2: prepare the Finite Element Human Body Model. Typically, the preparation consists in creating groups of finite element entities corresponding to anatomical or PIPER components. For example, the user could create a group of all FE parts constituting the femur. These are stored in the native finite element format.
  • Step 3: define model metadata in the description model file (Preparing the model and metadata). Typically, groups prepared in the previous step are associated to PIPER entities (.pmr file).

Step 2 and Step 3 are detailed after the summary table below.

Summary of files needed to import a FE HBM and build the internal representation of the HBM (PIPER model)

Contents Format Defined
Rules to parse the FE format (1) .pfr (XML based) once per FE format
Groups corresponding to anatomical or PIPER components native FE format once per HBM
Association between PIPER components and FE groups/entities.pmr (XML based) once per HBM

(1) available pfr files are stored in the Piper/bin directory


Preparing the model and metadata

The Model description file (xml based format with extension .pmr) is defined to:

If groups or FE entity are created specifically to be associated with these PIPER components, it is suggested to store them in separate include files of the FE format (see the example of the child model).

Structure of the model description file

A typical overall structure of a model description file (.pmr) is shown below, with detailed descriptions of the components in the following subsections. The pmr file of the PIPER child model can also be used as an example.

1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE format_description SYSTEM "ModelRules.dtd">
3 
4 <-- Root element of the description document -->
5 <model_description>
6 
7  <-- model units (required) -->
8  <units length="mm" mass="kg" age="year" />
9  <-- source file or source directory (required) -->
10  <source>model_01_separator.dyn</source>
11  <-- source format rule file (required) -->
12  <format_rules format="LSDyna_separator">../formatrules/Formatrules_LSDyna_Separator.pfr</format_rules>
13 
14 
15  <-- define entity: repeat for each entity in the model -->
16  <entity name="entityname">
17  ...
18  </entity>
19 
20  <-- define landmark: repeat for each landmark in the model -->
21  <landmarks name="landmarkname" type="landmark type">
22  ...
23  </landmarks>
24 
25  <-- define a set control point: repeat for each joint in the model -->
26  <controlPoint name="control_point_0" role="source">
27  ...
28  </controlPoint>
29 
30  <-- define joint: repeat for each joint in the model -->
31  <joint name="jointname">
32  ...
33  </joint>
34 
35  <contact name="contactname" type="sliding">
36  ...
37  </contact>
38 
39  <-- define parameter: repeat for each parameter in the model -->
40  <parameter name="parametername">
41  ...
42  </parameter>
43 
44 </model_description>

"model units" element

Length units: m, dm, cm, mm
Mass unit: kg, dg, cg, mg
Age unit: year, month

1 <-- model units (required) -->
2 <units length="mm" mass="kg" age="year" />

"source" element

The path of the main file to be imported to create the piper HBM need to be specified as follow. The path can be absolute or relative:

1 <-- source file or source directory (required) -->
2 <source>model_01_separator.dyn</source>

"Format" element

For the LSDyna and pamCrash FE formats, format rule files are provided with PIPER application, so only format name is required. The following format names are available;

  • LSDyna_fix: for FE files in LSDyna fix (or block) format
    1 <-- source format rule file (required) -->
    2 <format_rules format="LSDyna_fix"/>
  • LSDyna_separator: for FE files in LSDyna format with comma separator
    1 <-- source format rule file (required) -->
    2 <format_rules format="LSDyna_separator"/>
  • PamCrash: for FE files in pamcrash format
    1 <-- source format rule file (required) -->
    2 <format_rules format="PamCrash"/>

If format rules required for parsing is not one of those provided with PIPER application, the format rule path (relative or absolute) can be specified:

1 <-- source format rule file (required) -->
2 <format_rules format="myFormatName">../myformatrules/Formatrules_myformat.pfr</format_rules>

"FE component identification" element

Depending on the FE format of the input Human Body model, a FE component (nodes, groups, material...) is associated with an unique identifier which can be an integer or a name. To specify which FE component is involved in a association, the "keyword" element is used as follows (example considering LS-Dyna format and Pamcrash format):

1 <-- FE component identified by an integer identifier (example for LS Dyna format): -->
2 <keyword kw="*SET_SOLID">
3  <id>10</id>
4 </keyword>
5 <-- FE component identified by a name (example for Pam-Crash format) -->
6 <keyword kw="GROUP">
7  <name>femur</name>
8 </keyword>

In the first example, the FE component corresponding to the keyword *SET_SOLID (a group of solid elements in LS-Dyna) with an identifier equal to 10 is selected and used for the association rule. In the second one, the FE component corresponding to the keyword GROUP (a group in Pam-Crash) with an identifier name equal to groupname is selected and used for the association rule.

"entity" element

Entities are typically used to describe anatomical entities such as bones, skin, ligaments, etc. The list of available anatomical entities is provided in Appendix: List of entities .

The "entity" element defines association between group(s) of elements (or group(s) of part) in the FE Human Body Model and a Entity identified by name .

Example of "entity" element, the "entity" named Entity_1 is associated with FE components identified by:

  • the keyword "kw_for_group_of_element3d" and Id 10 and 101
  • the keyword "kw_for_group_of_element2D" and Id 5
1 <entity name="Entity_1">
2  <keyword kw="kw_for_group_of_element3d">
3  <id>10 101</id>
4  </keyword>
5  <keyword kw="kw_for_group_of_element2D">
6  <id>5</id>
7  </keyword>
8 </entity>

Model preparation for entities

The user has to first define group(s) of elements or a group(s) of parts in the Finite Element Model using their finite element pre-processor. All elements composing the anatomical entity must be included. For example, if the femur is modelled with 3d element for trabecular bone with an overlay of 2D elements for cortical bone, group(s) must include all 3D and 2D elements.

If 2D elements are included in the entity definition, normal orientation and topology must be carefully checked (the envelope should be closed, manifold, oriented coherently with normals pointing out). If this is not the case, the user can either modify their HBM or, as a workaround, add a part composed with null elements respecting these criteria to describe the outside boundary of the entity. The PIPER child model is an example of model with properly oriented normals.

If the original Finite Element format allows defining a group name, association between group and entity can be made in "auto" mode if the group name correspond to an entity name following PIPER dictionary.

To be able to use the auto mode, the group name must be parsed in the description of the rule to parse keyword corresponded to group in the considered FE format (Multi Finite Element Format Parser).

Example of "entity" element with "auto" mode: In this example, two FE group components identified by the keyword "kw_for_group_of_element3d" and ids 10 and 101 are considered and the name defined for each group is used to identified Entity to be associated with. If the group name identified by keyword "kw_for_group_of_element3d" and ids 10 is Left_femur, then this group is associated with Entity left femur.

1 <entity name="auto">
2  <keyword kw="kw_for_group_of_element3d">
3  <id>10 101</id>
4  </keyword>
5 </entity>

"joint" element

Joints are typically used to articulate two bones with a robotic joint (which can match an anatomical convention or not).

To define a joint between two piper components, a frame is associated with each entity involved. This can be achieved using the "setFrame" element that identify the proper FE frame component using the "keyword" element. The "setDof" element is defined to specify degrees of freedom of the joint (relatively to frame defined for entity_1 of the frame).

Example 1:

1 <joint name="Joint_1">
2  <entity_1 name="Entiyname1">
3  <setFrame>
4  <keyword kw="kw_frame">
5  <id>60010</id>
6  </keyword>
7  </setFrame>
8  </entity_1>
9  <entity_2 name="Entiyname2">
10  <setFrame>
11  <keyword kw="kw_frame">
12  <id>5050</id>
13  </keyword>
14  </setFrame>
15  </entity_2>
16  <setDof>0 0 0 1 0 1</setDof>
17 </joint>

In the example, a Joint named Joint_1 is defined between entity Entiyname1 and Entiyname2. Frame defined in the keyword "kw_frame" with id equal to 60010 is associated with Entiyname1 and Frame defined in the keyword "kw_frame" with id equal to 5050 is associated with Entiyname2. The degree of freedom of the joint are rotation relative to the X axis of the Entiyname1 frame and rotation relative to the Z axis of the Entiyname1 frame.

The global frame axis of the FE model can be used to define a joint frame (see example 2)
. Example 2:

1 <joint name="Joint_1">
2  <entity_1 name="Entiyname1">
3  <setFrame type="global">
4  <keyword kw="*NODE">
5  <id>2056046</id>
6  </keyword>
7  </setFrame>
8  </entity_1>
9  <entity_2 name="Entiyname2">
10  <setFrame type="global">
11  <keyword kw="*NODE">
12  <id>2056046</id>
13  </keyword>
14  </setFrame>
15  </entity_2>
16  <setDof>0 0 0 1 0 1</setDof>
17 </joint>

In example, a Joint named Joint_1 is defined between entity Entiyname1 and Entiyname2. Frame defined in the keyword "kw_frame" and its orientation are identical to the global model frame (type="global"). The origin of the joint frame is defined by setting a node id. The degree of freedom of the joint are rotation relative to the X axis of the Entiyname1 frame and rotation relative to the Z axis of the Entiyname1 frame.

Model preparation for joint

When springs or 6 d.o.f. joints are already used in the FE model to articulate bones, it is suggested to use that definition as the basis for the joint entity.

"landmark" element

Landmarks are typically

The "landmark" element is used to associate FE groups of nodes and a Landmark identified by its name and type (point, barycenter, sphere). In the following example, a landmark with name Landmark_2 is defined by the group of node identified by the "keyword" element.

1 <landmarks name="Landmark_2" type="sphere">
2  <keyword kw="ground_node_keyword">
3  <id>10002</id>
4  </keyword>
5 </landmarks>

Prepare HBM Landmarks

To define a landmark, the user has to define a group of nodes in the Finite Element Human Body Model in the Finite Element Model using their finite element pre-processor. The node number can also be used directly if only one node is needed.

If the original Finite Element format allows to define a group name, association between group and landmark can be made in "auto" mode if the group name correspond to an landmark name following the AnatomyDB definition for landmarks. To be able to use the auto mode, the group name must be parsed in the description of the rule to parse keyword corresponded to group in the considered FE format ( see Multi Finite Element Format Parser).

Contact element

In order to describe a contact between entity1 and entity2, groups of nodes have to be defined to identify the contact region on both entities. In theory a contact is symmetric, but the way it is implemented in the Pre-Positioning Module it is not. entity1 shall be the entity which has its contact region always in contact.

Contacts are defined between groups of nodes. Their property includes a thickness parameter which can maintain the contact between the objects. An example of contact is provided below.

1 <contact name="Left_hip" type="sliding">
2  <thickness keep="true" />
3  <entity_contact_1 name="Pelvic_skeleton">
4  <setGroup>
5  <keyword kw="*SET_NODE_LIST_TITLE">
6  <id>9903818</id>
7  </keyword>
8  </setGroup>
9  </entity_contact_1>
10  <entity_contact_2 name="Left_femur">
11  <setGroup>
12  <keyword kw="*SET_NODE_LIST_TITLE">
13  <id>9901621</id>
14  </keyword>
15  </setGroup>
16  </entity_contact_2>
17 </contact>

"parameter" element

The parameter element is typically used for finite element parameters which are not described by nodes or elements (e.g. material properties, shell thickness).

The "hbm_parameter" element allows to gather parameters parsed with keyword format rules (PIPER Parameter operation) in a set. The parameternamesource corresponds to the name of the parameter defined in the rule to parse each keywords.

1 <hbm_parameter name="parametername" source="parameternamesource">
2  <keyword kw="kw1">
3  <id>7000014 7000016</id>
4  </keyword>
5  <keyword kw="kw2">
6  <id>7000015</id>
7  </keyword>
8 </hbm_parameter>

There is no specific model preparation for this element.

"Control Points" element

To define an ordered set of control points to be used as source control points in Kriging Module. Each set of control points must have a name (any unique string) and role ("source" or "target") attributes. There are several allowed formats for defining the coordinates of the control points, as shown on the example below: they can be defined either by a keyword or directly as a set of point coordinates, with or without IDs. Regardless of the coordinate definition, each set can also have a weight (Nugget) and a Skin/bone association parameters, as shown on the "control_points_2" set.

1 <controlPoint name="control_point_0" role="source">
2  <keyword kw="*NODE">
3  <id>5207268 33002334 33003064</id>
4  </keyword>
5 </controlPoint>
6 <controlPoint name="control_point_1" role="source">
7  <keyword kw="*NODE">
8  <id>6120127 5106751 5106946 35000357</id>
9  </keyword>
10 </controlPoint>
11 <controlPoint name="control_point_2" role="source">
12  <coord>
13  23 -43.3839 20.0958 225.346
14  24 -65.291 0 229.255
15  25 -21.7513 0 222.236
16  26 -43.3839 -20.0958 225.346
17  27 -26.8911 0 193.384
18  </coord>
19  <weight>-20 -20 -20 -45 -45</weight>
20  <as_bones>1 1 1 0 0</as_bones>
21  <as_skin> 0 0 0 1 1</as_skin>
22 </controlPoint>
23 <controlPoint name="control_point_3" role="target">
24  <coordfix>
25  -10 20 30
26  -20 30 40
27  -10 38 74
28  -20 12 11
29  -12 23 42
30  </coordfix>
31 </controlPoint>