*function()
Starts a function block.
Syntax
*function (name, variables)
Type
HyperMesh Template Command
Inputs
- name
- The name of the function. Names should not begin with HM_ (these are reserved for use by HyperMesh).
- variables
- The variables to be returned to HyperMesh (variable1 - variable20). The number of variables depends on the function. Functions can be used by HyperMesh to calculate information needed in some panels.
Example
Obtain material data utilized for time step calculations for Abaqus shell and solid elements:
//variable1 = Young's modulus for the material
//variable2 = Poisson's ratio for the material
//variable3 = mass density for the material
*function("MATERIAL_DATA",variable1,variable2,variable3)
*materials("")
*format()
*variableset(variable1,0)
*variableset(variable2,0)
*if([$UseElasticCard == 1])
*if([$ElasticTypeEnumField <= 1]) //ISOTROPIC
*variableset(variable1,[@attributearrayvalue($Young,1)])
*variableset(variable2,[@attributearrayvalue($Poiss,1)])
*endif()
*if([$ElasticTypeEnumField == 2]) //ENGINEERING CONSTANTS
*variableset(variable1,[@attributearrayvalue($E1,1)])
*variableset(variable1,[variable1+@attributearrayvalue($E2,1)])
*variableset(variable1,[variable1+@attributearrayvalue($E3,1)])
*variableset(variable1,[variable1/3.0])
*variableset(variable2,[@attributearrayvalue($Nu12,1)])
*variableset(variable2,[variable2+@attributearrayvalue($Nu13,1)])
*variableset(variable2,[variable2+@attributearrayvalue($Nu23,1)])
*variableset(variable2,[variable2/3.0])
*endif()
*if([$ElasticTypeEnumField == 3]) //LAMINA
*variableset(variable1,[@attributearrayvalue($EL1,1)])
*variableset(variable1,[variable1+@attributearrayvalue($EL2,1)])
*variableset(variable1,[variable1/2.0])
*variableset(variable2,[@attributearrayvalue($NuL12,1)])
*endif()
*if([$ElasticTypeEnumField == 4 || $ElasticTypeEnumField == 5]) //ORTHOTROPIC and ANISOTROPIC
*variableset(variable1,[@attributearrayvalue($D1111,1)])
*variableset(variable1,[variable1+@attributearrayvalue($D2222,1)])
*variableset(variable1,[variable1+@attributearrayvalue($D3333,1)])
*variableset(variable1,[variable1/3.0])
*endif()
*endif()
*variableset(variable3,0)
*if([$UseDensityCard == 1])
*variableset(variable3,[@attributearrayvalue($Density,1)])
*endif()
*output()
*return()