Create Models
Models are created in hmmodlib by using the functions HMMOD_nodeadd(), HMMOD_elementadd(), and HMMOD_elementaddnode(). HMMOD_nodeadd() is called once for each node in the model, HMMOD_elementadd() is called once for each element, and HMMOD_elementaddnode() is called once for every node on every element.
- id
- ID of the node.
- x, y, z
- x, y, and z location.
- value
- The value is used as a temporary storage area for one result. Often, the value is set by an averaging routine, and once set, can be transferred to hmreslib or compared with the maximum result.
- maximum
- The maximum is used as a temporary storage area for one result. It is used to store the maximum value at a node, and once set, can be transferred to hmreslib.
- displacement
- Storage for one displacement (x, y, z).
- results
- An array of user-defined size that stores results at the node. This component of the node structure exists at every layer defined in the model.
- counter
- A counter used during averaging.
- active
- An activity flag used to determine if the results at a node should be averaged or transferred to hmreslib. If the active flag is set to a nonzero value, then the averaging routines use the node when averaging is performed, and the results at the node are transferred to hmreslib when requested. If the activity flag is set to zero, the node is ignored in both the aforementioned cases.
- uservalue
- Storage for a user-defined value.
- id
- ID of the element.
- config
- The configuration of the element.
- type
- The type of the element. This is used only if the model is written.
- nodes
- The nodes associated with an element.
- numberofnodes
- The number of nodes associated with an element.
- value
- The value is used as a temporary storage area for one result. Often, the value is set by an averaging routine, and once set, can be transferred to hmreslib or compared with the maximum.
- maximum
- The maximum is used as a temporary storage area for one result. It is used to store the maximum value on an element, and once set, can be transferred to hmreslib.
- centroidal
- An array of user-defined size that stores results at the centroid of the element. This component of the element structure exists at every layer defined in the model.
- integration pt
- An array of user-defined size that stores results at the integration points of an element. This component of the element structure exists at every layer defined in the model.
- node on elem
- An array of user-defined size that stores results at the node of the element. This component of the element structure exists at every layer defined in the model.
- # of int pts
- The number of integration points for the element.
- counter
- A counter used during averaging.
- active
- An activity flag used to determine if the results at an element should be averaged or transferred to hmreslib. If the active flag is set to a nonzero value, then the averaging routines use the element when averaging is performed, and the results at the element are transferred to hmreslib when requested. If the activity flag is set to zero, the element is ignored in both the aforementioned cases.
- uservalue
- Storage for a user-defined value.
After the model is created, it can be written to disk in HyperMesh ASCII format by calling the function HMMOD_writemodel().