Element Setter/Getter Reference
Element Getter:
These functions allow the extraction of values of elements data. All these functions are part of scripting language and can not be found in the GUI.
Syntax:
value = getelem(<keywords>)
List of Keywords for Element Getter Function:
|
Output Value Type
|
Keyword
|
Input Value Type
|
Description
|
|
Array of Integer Numbers
|
"allid"
|
-
|
This function returns the list of all the element ID numbers available in the model. ID number is integer number greater than zero.
|
|
Array of Integer Numbers
|
"activeid"
|
-
|
This function returns the list of all the active element ID numbers available in the model. ID number is integer number greater than zero.
|
|
Array of Integer Numbers
|
"nodeid",elid
|
Element ID (elid)
|
This function returns the list of the node IDs for element with ID = elid
|
|
Single Integer Number
|
"numnode",elid
|
Element ID (elid)
|
This function returns the number of node of element with ID = elid
|
|
Single Integer Number
|
"numgauss",elid
|
Element ID (elid)
|
This function returns the number of gauss point of element with ID = elid
|
|
Array of Float Numbers [xpos,ypos]
|
"gausspointpos",elid,<gid>
|
Element ID (elid), Gauss Point ID (gid)
|
This function returns the position of the guss point with ID = gid. gid is integer number greater than zero.
|
|
Array of Float Numbers [exx,eyy,exy]
|
"strain",elid,<gid>
|
Element ID (elid), Gauss Point ID (gid)
|
This function returns the accumulated strain array [exx,eyy,exy] at gauss point with ID = gid of the element with ID = elid. Note: 3-Node Triangle and 6-Node Triangle have one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
|
Array of Float Numbers [sxx,syy,sxy,szz]
|
"stress",elid,<gid>
|
Element ID (elid), Gauss Point ID (gid)
|
This function returns the accumulated stress array [sxx,syy,sxy,szz] at gauss point with ID = gid of the element with ID = elid. Note: 3-Node Triangle and 6-Node Triangle have one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
|
Single Float Number
|
"pp",elid,<gid>
|
Element ID (elid)
|
This function returns the pore pressure of at gauss point with ID = gid of the element with ID = elid. Note: 3-Node Triangle and 6-Node Triangle have one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
|
Single Integer Number
|
"idatpoint",xp,yp
|
Point coordination [xp,yp]
|
This function returns the ID of the element that contains [xp,yp]
|
|
Single Float Number
|
"prop",str,elid,<gid>
|
str = {"density" or "shear" or "bulk" or "matid"} and Element ID (elid)
|
This function returns the property with name [str] at gauss point with ID = gid of the element with ID = elid. Note: 3-Node Triangle and 6-Node Triangle have one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
Example:
For instance the following command returns array of active elements (non-zero integer numbers):
ids = getelem("activeid")
Following command returns the stress array [sxx,syy,sxy,szz] at first gauss point of the element with id number 11.
stress = getelem("stress",11)
Following command returns the stress array [sxx,syy,sxy,szz] at third gauss point of the element with id number 11.
stress = getelem("stress",11,3)
Element Setter:
These functions allow the manipulation of elements data. All these functions are part of scripting language and can not be found in the GUI.
Syntax:
setelem(<keywords>)
List of Keywords for Element Setter Function:
|
Keyword
|
Description
|
|
"stress",elid,<gid>,sid,value
|
set the stress magnitude "value" at "gid" gauss point of the element "elid" and stress index "sid" (i.e. 1,2,3,4). "elid" and "sid" are integer numbers and "value" is float number. Note: 3-Node Triangle and 6-Node Triangle are one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
|
"pp",elid,<gid>,value
|
set the pore pressure magnitude "value" at "gid" gauss point of the element "elid". "elid" and "sid" are integer numbers and "value" is float number. Note: 3-Node Triangle and 6-Node Triangle are one and three gauss points respectively. If no gid value is specified gid=1 will be used as default.
|
Example:
For instance the following command set pore pressure at element with id 11 to 1E4:
setelem("pp",11,1E4)
Following command modifies the vertical stress (sid=2 for syy) at first gauss point of the element with id number 11.
setelem("stress",11,2,-1E6)
Following command modifies the vertical stress (sid=3 for sxy) at second gauss point of the element with id number 11.
setelem("stress",11,2,3,-1E6)