The functions associated with a Model object are the following.
*vis_ModelBegin - create an instance of a Model object vis_ModelEnd - destroy an instance of a Model object vis_ModelError - return Model object error flag
vis_ModelCheck - check model entities and objects vis_ModelCheckSProp - check model solution objects vis_ModelDelete - delete all set objects vis_ModelElemThickness - query for element thickness property vis_ModelSetObject - set pointers to attribute objects. GetObject - get pointers to attribute objects. vis_ModelSetHashTable - set pointers to HashTable objects. GetHashTable - get pointers to HashTable objects. vis_ModelSetList - set pointers to List objects. GetList - get pointers to List objects. vis_ModelGetInteger - get integer model checking information vis_ModelGetString - get model checking descriptive string vis_ModelPrint - print model to standard output vis_ModelWrite - write model to standard file formats
A ColorMap, GProp and/or Units object may also be registered using vis_ModelSetObject. The ColorMap object is used to relate color indices (such as the VIS_COLORID node and element associations) to actual RGB color components. The GProp object is used to define global properties. The Units object is used to define the units for physical quantities.
Node and element sets are entered into IdTran objects. The IdTran objects are, in turn, entered into HashTable objects with a user defined integer key. If there is a useful integer associated with the node or element set, this integer should be used as the HashTable key otherwise use keys starting from one. The HashTable objects of node and/or element sets are registered in the Model object using vis_ModelSetHashTable. For the HashTable of node sets the type argument in the vis_ModelSetHashTable function is VIS_IDTRAN_NODE, for element sets it is VIS_IDTRAN_ELEM.
Element edge and face sets are also entered into IdTran objects. These IdTran objects are, in turn, entered into a HashTable object This HashTable object is registerd in the Model object using vis_ModelSetHashTable with type argument VIS_IDTRAN_ELEMENT.
Element and material properties are entered into one or more EProp and MProp objects respectively. There should be an EProp object for each element property identifier and a MProp object for each material property identifier. The EProp objects are then entered into a HashTable object using the element property identifier as a key. The MProp objects are also entered into a HashTable object using the associated material property identifier as a key. The two HashTable objects containing the EProp and MProp objects are then registered in the Model object using vis_ModelSetHashTable.
Certain vector valued functions may be stored in one or more TCurve objects. These functions may represent relationships such as temperature dependent material properties or load factor time functions. The TCurve objects are entered into a HashTable object in a manner similar to EProp and MProp objects using an integer curve identifier as key. The HashTable object containing the TCurve objects is then registered in the Model object using vis_ModelSetHashTable.
Analytical surfaces may be stored in one or more ASurf objects. There should be an ASurf object for each analytical surface in the model. Each ASurf object is stored into a HashTable with an integer key. This HashTable, in turn, is stored in the Model object using vis_ModelSetHashTable with the key VIS_ASURF.
Some element properties, such as shell thickness, may be specified on an element by element basis using ElemDat objects. Each element property so defined is installed in a HashTable object using the property type as a key. Currently supported property types are as follows:
Node and elements sets may be entered into series of IdTran objects. These IdTran objects of node sets and element sets are entered into a HashTable object of node sets and a HashTable object of element sets using the set identifier as a key. A name associated with each set may be specified using the vis_IdTranSetName function. The node and element indices (not user id) are entered into the IdTran objects. Register these HashTable objects with the Model using vis_ModelSetHashTable.
Contact pairs may be entered into sets of CPair objects. The CPair objects are entered into a HashTable object using an integer key. Register this HashTable object with the Model using vis_ModelSetHashTable.
The properties of solution steps are entered into a sequence of SProp objects. The sequence of SProp objects are entered into a List object in the order in which the solution steps are to be performed. The first solution step is given identifier 1 in the List object, the second step identifier 2, etc. Register this List object with the Model using vis_ModelSetList. Any List object registered with the Model object can be queried using vis_ModelGetList.
The function, vis_ModelDelete is provided as a convenient mechanism for deleting all objects set in the Model object. This includes all attribute objects set using vis_ModelSetObject, all HashTable objects set using vis_ModelSetHashTable and the objects they in turn contain, and all List objects set using vis_ModelSetList and the objects they in turn contain.
The vis_ModelWrite function is provided to write the contents of the model object to industry standard file formats. An example of such a format is NASTRAN bulk data format.
The consistency of the entities and objects in the model object may be checked using vis_ModelCheck and vis_ModelCheckSProp. The vis_ModelCheck function checks all node and elements in the Connect object for the existence of references to other entities and objects. For example, all nodes are checked for a VIS_CSYSID coordinate system identifier association. If the identifier is positive, then the existence of the associated CoordSys object in the VIS_COORDSYS HashTable is checked. For elements, all referenced nodes, element properties, materials, coordinate systems, etc. are checked for existence. The vis_ModelCheckSProp checks a given SProp solution property object for the existence of all referenced objects.
Gap element property mapping.
Gap element ABAQUS ----------- ------ EPROP_UZERO EPROP_FZERO EPROP_KCLOSE > 0. *SURFACE BEHAVIOR, PRESSURE-OVERCLOSURE=TABULAR = 0. *SURFACE BEHAVIOR, PRESSURE-OVERCLOSURE=HARD EPROP_KOPEN EPROP_KTRANS EPROP_MUSY *FRICTION, ANISOTROPIC EPROP_MUSZ EPROP_MUKY EPROP_MUKZ EPROP_NOSEPARATION *SURFACE BEHAVIOR, NO SEPARATION EPROP_NOSLIP *FRICTION, ROUGHIf EPROP_KCLOSE > 0., then the EPROP_UZERO, EPROP_FZERO and EPROP_KOPEN properties are used to create a tabular pressure-overclosure definition under the *SURFACE BEHAVIOR keyword.
Gap element NASTRAN ----------- ------- EPROP_UZERO PGAP U0 EPROP_FZERO PGAP F0 EPROP_KCLOSE PGAP KA EPROP_KOPEN PGAP KB EPROP_KTRANS PGAP KT EPROP_MUSY PGAP MU1 EPROP_MUSZ != 0 PGAP MU2 (TMAX = -1.) EPROP_MUKY != 0 PGAP MU2 (TMAX = 0.) EPROP_MUKZ ignored EPROP_NOSEPARATION ignored EPROP_NOSLIP ignoredTable of Contents
*vis_ModelBegin - create an instance of a Model object
vis_Model *vis_ModelBegin ()
None
Destroy an instance of a Model object using
void vis_ModelEnd (vis_Model *model)
Return the current value of a Model object error flag using
Vint vis_ModelError (vis_Model *model)
vis_ModelCheck - check model entities and objects
void vis_ModelCheck (vis_Model *model, Vint *status)
model Pointer to Model object.
status Status flag of model check
Nodes are checked for the following associations.
Elements are checked for the existence of each node in their element connectivity as well as the following associations.
vis_ModelCheckSProp - check model solution objects
void vis_ModelCheckSProp (vis_Model *model, vis_SProp *sprop, Vint *status)
model Pointer to Model object. sprop Pointer to SProp object.
status Status flag of solution property check
vis_ModelGetInteger - get integer model checking information
void vis_ModelGetInteger (vis_Model *model, Vint type, Vint iparam[])
model Pointer to Model object. type Type of integer information to query =SYS_NODE Node index =SYS_ELEM Element index =VIS_MPROP Material identifier =VIS_EPROP Property identifier =VIS_ELEMDAT Element data identifier =VIS_TCURVE Curve identifier =VIS_COORDSYS Coordinate system identifier =VIS_RCASE Restraint case identifier =VIS_LCASE Load case identifier =VIS_ICASE Initial condition case identifier =VIS_MCASE Multipoint constraint case identifier =MODEL_NUMCHECKSTRING Number of check strings generated
iparam Returned integer information
The parameter MODEL_NUMCHECKSTRING returns the number of descriptive strings generated during the model checking process. Access the descriptive strings using vis_ModelGetString.
vis_ModelGetString - get model checking descriptive string
void vis_ModelGetString (vis_Model *model, Vint type, Vchar cparam[])
model Pointer to Model object. type Type of string information to query =MODEL_CHECKSTRING String 0 =MODEL_CHECKSTRING0 String 0 =MODEL_CHECKSTRING1 String 1 =MODEL_CHECKSTRING2 String 2 =MODEL_CHECKSTRING3 String 3 =MODEL_CHECKSTRING4 String 4
cparam Returned string information
vis_ModelDelete - delete all set objects
void vis_ModelDelete (vis_Model *model)
model Pointer to Model object.
None
vis_ModelElemThickness - query for element thickness property
void vis_ModelElemThickness (vis_Model *model, Vint index; Vdouble thickness[]);
model Pointer to Model object. index Element index
thickness Vector of element nodal thicknesses
vis_ModelSetObject - set pointers to attribute objects.
void vis_ModelSetObject (vis_Model *model, Vint objecttype, Vobject *object)
model Pointer to Model object. objecttype The name of the object type to be set. =VIS_CONNECT Connect object =VIS_COLORMAP ColorMap object =VIS_GRIDFUN GridFun object =VIS_GPROP GProp object =VIS_UNITS Units object object Pointer to the object to be set.
None
If the GridFun object is registered, it is used by the vis_ModelWrite function for basic finite model queries rather than the Connect object.
The ColorMap object is useful for associating actual RGB color components to the VIS_COLORID node and element associations.
The GProp object is useful for defining global properties.
The Units object is useful for defining the units of physical quantities.
Get object as an output argument using
void vis_ModelGetObject (vis_Model *model, Vint objecttype, Vobject **object)
vis_ModelSetHashTable - set pointers to HashTable objects.
void vis_ModelSetHashTable (vis_Model *model, Vint type, vsy_HashTable *hashtable)
model Pointer to Model object. type The name of the object type contained in the HashTable. =VIS_COORDSYS CoordSys objects =VIS_EPROP EProp objects =VIS_MPROP MProp objects =VIS_TCURVE TCurve objects =VIS_ELEMDAT ElemDat objects =VIS_IDTRAN_ELEM IdTran objects of element sets =VIS_IDTRAN_NODE IdTran objects of node sets =VIS_IDTRAN_ELEMENT IdTran objects of element entities =VIS_LCASE LCase objects =VIS_RCASE RCase objects =VIS_MCASE MCase objects =VIS_ICASE ICase objects =VIS_CPAIR CPair objects =VIS_ASURF ASurf objects hashtable Pointer to the HashTable to be set.
None
Get hashtable as an output argument using
void vis_ModelGetHashTable (vis_Model *model, Vint type, vsy_HashTable **hashtable)
vis_ModelSetList - set pointers to List objects.
void vis_ModelSetList (vis_Model *model, Vint type, vsy_List *list)
model Pointer to Model object. type The name of the object type contained in the List. =VIS_SPROP SProp objects list Pointer to the List to be set.
None
Get list as an output argument using
void vis_ModelGetList (vis_Model *model, Vint type, vsy_List **list)
vis_ModelPrint - print model to standard output
void vis_ModelPrint (vis_Model *model)
model Pointer to Model object.
None
vis_ModelWrite - write model to standard file formats
void vis_ModelWrite (vis_Model *model, Vint type, Vchar *path)
model Pointer to Model object. type File type =SYS_NASTRAN_BULKDATA Write to NASTRAN bulk data file =SYS_ABAQUS_INPUT Write to ABAQUS input file =SYS_ANSYS_INPUT Write to ANSYS input file =SYS_PATRAN_NEUTRAL Write to Patran neutral file =SYS_SDRC_UNIVERSAL Write to SDRC universal file =SYS_FLUENT_MESH Write to FLUENT (ASCII) mesh file =SYS_STL Write to ASCII STL file. path File path
None
The model entities supported at any one time may vary. Please contact Visual Kinematics for details.
The functions associated with a ElemChk object are the following.
*vis_ElemChkBegin - create an instance of a ElemChk object vis_ElemChkEnd - destroy an instance of a ElemChk object vis_ElemChkError - return ElemChk object error flag
vis_ElemChkAdapt - compute error estimates and mesh sizes vis_ElemChkData - compute shape data vis_ElemChkEnergy - compute strain energies vis_ElemChkFaceWeight - compute face based node weights vis_ElemChkNorm - compute normal and consistency vis_ElemChkRate - compute rate of change vis_ElemChkSetObject - set pointers to attribute objects. vis_ElemChkSetParami - set parameters for element checking vis_ElemChkSetParamd - set parameters for element checking vis_ElemChkSetType - set shape parameter type to compute
The most generally useful computation performed by ElemChk is the calculation of element shape data using vis_ElemChkData. These shape parameters, often termed "distortion" parameters, include element aspect ratio, taper, skew, total volume (Jacobian sum), etc. Element properties such as shell thickness, beam cross section, etc. are not included in the shape parameter calculation. The ElemChk module uses only element topology, connectivity and node coordinate location which are provided by the GridFun attribute object. Not all element shape parameters are computed for all element types, for example element aspect ratio is not meaningful for line elements. The calculation of the shape data is relatively costly so the exact set of parameters to be computed is specified using vis_ElemChkSetType. The definition of shape distortion parameters appears below.
Another important element check involves the proper alignment of the normals of surface elements such as shell elements. The function vis_ElemChkNorm computes the normal to a surface element at the centroid and checks the consistency of the element connectivity with that of all adjacent surface elements. This operation accesses element adjacency functions in the GridFun attribute object. This requires that if the GridFun is supported by an underlying Connect object, that the connection kernel, generated by calling vis_ConnectKernel, be present.
The maximum rate of change and absolute value of change of a scalar field at an element for all adjacent elements may be computed using vis_ElemChkRate. This function is useful for, among other things, computing the growth rate of element size. This may be performed by computing the element volume for each element using vis_ElemChkData and entering the scalar data into a State object. The vis_ElemChkRate may then be used to compute the growth rate of element size for each element. This operation accesses element adjacency functions in the GridFun attribute object. This requires that if the GridFun is supported by an underlying Connect object, that the connection kernel, generated by calling vis_ConnectKernel, be present.
Use the function vis_ElemChkAdapt to perform analysis error estimation and compute new element sizes based on h-mesh refinement. This function requires the strain energy and strain energy error for each element. The function vis_ElemChkEnergy may be used to compute the element strain energy and strain energy error from element node stress and strain. Use vis_ElemChkSetParamd to set the target error tolerance.
Use the function vis_ElemChkFaceWeight to compute face based node area weights. These values are useful for distributing load consistently to node attachments from distributing coupling constraints.
The ElemChk object calls the following grid functions set in the GridFun attribute object.
*vis_ElemChkBegin - create an instance of a ElemChk object
vis_ElemChk *vis_ElemChkBegin ()
None
Destroy an instance of a ElemChk object using
void vis_ElemChkEnd (vis_ElemChk *elemchk)
Return the current value of a ElemChk object error flag using
Vint vis_ElemChkError (vis_ElemChk *elemchk)
vis_ElemChkEnergy - compute strain energies
void vis_ElemChkEnergy (vis_ElemChk *elemchk, vis_State *stress, vis_State *strain, vis_Group *group, vis_State *setot, vis_State *seerr)
elemchk Pointer to ElemChk object. stress Element node State of stress strain Element node State of strain group Pointer to Group of elements or element faces. If NULL, then all elements are assumed.
setot Element State of strain energy seerr Element State of strain energy error
vis_ElemChkAdapt - compute error estimates and mesh sizes
void vis_ElemChkAdapt (vis_ElemChk *elemchk, vis_State *setot, vis_State *seerr, vis_Group *group, vis_State *esize)
elemchk Pointer to ElemChk object. setot Element State of strain energy seerr Element State of strain energy error group Pointer to Group of elements or element faces. If NULL, then all elements are assumed.
esize Element State of computed element sizes
vis_ElemChkData - compute shape data
void vis_ElemChkData (vis_ElemChk *elemchk, Vint index, Vfloat s[]) void vis_ElemChkDatadv (vis_ElemChk *elemchk, Vint index, Vdouble s[])
elemchk Pointer to ElemChk object. index Element number
s Array of computed shape parameters
vis_ElemChkNorm - compute normal and consistency
void vis_ElemChkNorm (vis_ElemChk *elemchk, vis_Group *group, Vint index, Vfloat vn[3], Vint *edgeflags) void vis_ElemChkNormdv (vis_ElemChk *elemchk, vis_Group *group, Vint index, Vdouble vn[3], Vint *edgeflags)
elemchk Pointer to ElemChk object. group Element group of adjacent elements, including index. If NULL, then all elements are assumed. index Element number
vn Element surface normal edgeflags Flag edge if adjacent element connectivity sense is improper.
vis_ElemChkFaceWeight - compute face based node weights
void vis_ElemChkFaceWeight (vis_ElemChk *elemchk, vis_Group *group, vis_State *nweight)
elemchk Pointer to ElemChk object. group Pointer to Group of element faces.
nweight Node State of computed node weights
vis_ElemChkRate - compute rate of change
void vis_ElemChkRate (vis_ElemChk *elemchk, vis_State *state, vis_Group *group, Vint index, Vfloat s[2]) void vis_ElemChkRatedv (vis_ElemChk *elemchk, vis_State *state, vis_Group *group, Vint index, Vdouble s[2])
elemchk Pointer to ElemChk object. state Pointer to a State object of element scalars. group Element group including index. If NULL, then all elements are assumed. index Element number
s Computed maximum rate of change and absolute value of change.
vis_ElemChkSetObject - set pointers to attribute objects.
void vis_ElemChkSetObject (vis_ElemChk *elemchk, Vint objecttype, Vobject *object)
elemchk Pointer to ElemChk object. objecttype The name of the object type to be set. =VIS_GRIDFUN GridFun object object Pointer to the object to be set.
None
vis_ElemChkSetParamd - set parameters for element checking
void vis_ElemChkSetParamd (vis_ElemChk *elemchk, Vint ptype, Vdouble dparam)
elemchk Pointer to ElemChk object. ptype Parameter type to set. =ELEMCHK_ADAPTTOL Error tolerance for adaptivity dparam Specifies the value that ptype will be set to.
none
vis_ElemChkSetParami - set parameters for element checking
void vis_ElemChkSetParami (vis_ElemChk *elemchk, Vint ptype, Vint iparam)
elemchk Pointer to ElemChk object. ptype Parameter type to set. =ELEMCHK_CHEAP Performs cheap shape computations iparam Specifies the integer value that ptype will be set to. =SYS_OFF Disable =SYS_ON Enable
none
vis_ElemChkSetType - set shape parameter type to compute
void vis_ElemChkSetType (vis_ElemChk *elemchk, Vint type, Vint flag)
elemchk Pointer to ElemChk object. type Parameter type to flag. =ELEMCHK_ALL All shape parameters =ELEMCHK_JACOBIAN_SUM Jacobian sum =ELEMCHK_JACOBIAN_RATIO Jacobian ratio =ELEMCHK_JACOBIAN_SMALL Smallest integration point Jacobian =ELEMCHK_JACOBIAN_NODAL Smallest corner node Jacobian =ELEMCHK_MIDSIDE_OFF maximum ratio of midside offset =ELEMCHK_ASPECT_RATIO Aspect ratio =ELEMCHK_FACE_TAPER Face taper =ELEMCHK_SKEW Skew =ELEMCHK_TWIST Twist =ELEMCHK_SUBTENDED_ANGLE Subtended angle =ELEMCHK_CIRCUM_RATIO Circumradius ratio =ELEMCHK_MIN_ANGLE Minimum angle between face edges =ELEMCHK_MAX_ANGLE Maximum angle between face edges =ELEMCHK_MIN_DIHEDANGLE Minimum dihedral angle between faces =ELEMCHK_MAX_DIHEDANGLE Maximum dihedral angle between faces =ELEMCHK_MIN_EDGELENGTH Minimum element edge length =ELEMCHK_MAX_EDGELENGTH Maximum element edge length =ELEMCHK_FACE_WARP Face warping =ELEMCHK_CG_X X coordinate of center of gravity =ELEMCHK_CG_Y Y coordinate of center of gravity =ELEMCHK_CG_Z Z coordinate of center of gravity =ELEMCHK_EDGEALT_RATIO Max edge, min altitude ratio =ELEMCHK_DIMENSION Spatial dimension =ELEMCHK_PORDER Polynomial order =ELEMCHK_H Effective edge length =ELEMCHK_HANDEDNESS Element edge/face handedness flag Enable or disable shape parameter =SYS_OFF Disable =SYS_ON Enable
none
The functions associated with a MassPrp object are the following.
*vis_MassPrpBegin - create an instance of a MassPrp object vis_MassPrpEnd - destroy an instance of a MassPrp object vis_MassPrpError - return MassPrp object error flag
vis_MassPrpSetObject - set pointers to attribute objects. vis_MassPrpCompute - compute mass properties vis_MassPrpPrincipal - compute principal moments of inertia
*vis_MassPrpBegin - create an instance of a MassPrp object
vis_MassPrp *vis_MassPrpBegin ()
None
Destroy an instance of a MassPrp object using
void vis_MassPrpEnd (vis_MassPrp *massprp)
Return the current value of a MassPrp object error flag using
Vint vis_MassPrpError (vis_MassPrp *massprp)
vis_MassPrpSetObject - set pointers to attribute objects.
void vis_MassPrpSetObject (vis_MassPrp *massprp, Vint objecttype, Vobject *object)
massprp Pointer to MassPrp object. objecttype The name of the object type to be set. =VIS_MODEL Model object object Pointer to the object to be set.
None
vis_MassPrpCompute - compute mass properties
void vis_MassPrpCompute (vis_MassPrp *massprp, vis_Group *group, Vfloat *vtot, Vfloat *mtot, Vfloat xcom[3], Vfloat mten[6])
massprp Pointer to MassPrp object. group Element group If NULL, then all elements are assumed.
vtot Total volume mtot Total mass xcom Location of center of mass mten Mass moment of inertia tensor about center of mass
vis_MassPrpPrincipal - compute principal moments of inertia
void vis_MassPrpPrincipal (vis_MassPrp *massprp, Vfloat mten[6], Vfloat mpri[3], Vfloat tm[3][3])
massprp Pointer to MassPrp object. mten Mass moment of inertia tensor
mpri Principal values tm Principal directions