Tutorial Toolkit Function Descriptions > Fields > General
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
General
 
db_get_all_field_names
(object)
Description:
Gets all lbc object names from the database, in get all, get next method.
Input:
INTEGER
object
The object ID for the rows selected
Output:
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_get_all_field_names (p. 1287) in the MSC Acumen Toolkit - Code Example.
  
db_get_next_field_name
(id, name)
Description:
Gets all lbc object names from the database, in get all, get next method.
Input:
None.
Output:
INTEGER
id
The unique internal ID of the field in the database.
STRING
name[
The name of the field in the database.
INTEGER
<Return Value>
.
Error Conditions:
13000002
Unrecoverable database error
13000117
The query specified has completed
13000007
An unspecified database error occurred
Remarks:
Accesses all records for a specified object in the “field” table in the database.
Example:
See example for db_get_all_field_names, 524. See also db_get_next_field_name (p. 1297) in the MSC Acumen Toolkit - Code Example.
 
db_get_field_id
(name, id)
 
Description:
Gets a field id in the database.
Input:
STRING
name[]
The name of the field.
Output:
INTEGER
id
The unique internal ID identifying the field in the database.
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Gets a record in the “field” table.
Example:
See example for field_fem_const_eval, 537 or db_get_max_field, 530 or db_modify_field, 531. See also db_get_field_id (p. 1291) in the MSC Acumen Toolkit - Code Example.
 
db_get_field_attrs
(id, name, object, nvar, ivar1, ivar2, ivar3)
Description:
Gets a field in the database.
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
Output:
STRING
name[]
The name of the field.
INTEGER
object
0 = spatial; 1 = material; 2 = time
INTEGER
nvar
The number of functions used to define this field.
INTEGER
ivar1
Values 1-4
INTEGER
ivar2
Values 1-4
INTEGER
ivar3
Values 1-4
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Gets a record in the “field” table and one in either the “field_function” or “field_table” table in the database.
Example:
See example for db_get_all_field_names, 524. See also db_get_field_attrs (p. 1288) in the MSC Acumen Toolkit - Code Example.
 
fields_create_general_term
(field_name, term_field_id, term_type, term_id, length, general_term_string)
 
Description:
This function creates a term for a general field in the database. This function covers the contact LBCs definitions for ABAQUS also.
Input:
STRING
field_name[]
This value specifies the existing general field name.
INTEGER
term_field_id
This value specifies the term field id.
INTEGER
term_type
This value specifies the type of the term i.e. Function, Field & Independent Variable.
INTEGER
term_id
This value specifies the term identifiers.
INTEGER
length
String length of general_term_string.
STRING
general_term_string[length]
This string represents the term type of general field.
- For the function term type “Independent Variables”, the function term is selected from allready existed function expressions like ’RAD’, ‘UD’, ‘X’, ‘Y’, ‘Z’, ‘e’, ‘er’, ‘f’, ‘t’,’u’& ‘v’.
- For the function term type “P3 Functions”, user creates the function expression by using selected Arithmetic Operators.
In the case of ABAQUS “contact LBC” definition is:
general_term_string = "contact_lbc(20|12|13|14|15|16|19|20|21|22|23|24|25|26|27|28|29|30|31|33|35|1|1|1|1|2|3|3|2|0.2|0.|0.|0.|0.|0.|0.|0.|0.|0.|0.|0.)"
where
“|” is Field argument separator
general_data_count = 20
20 data variables ids
20 data values
|12 = LBC_VAR_CONTACT_TYPE
|13 = LBC_VAR_SLIDING_TYPE
|14 = LBC_VAR_SURFACE_BEHAVIOR
|15 = LBC_VAR_FRICTION_FORMULATION
|16 = LBC_VAR_PENETRATION_TYPE
|19 = LBC_VAR_MASTER_REGION_ID
|20 = LBC_VAR_SLAVE_REGION_ID
|21 = LBC_VAR_VISCOUS_DAMPING
|22 = LBC_VAR_FRICTION_COEF
|23 = LBC_VAR_SHEAR_STRESS_LIMIT
|24 = LBC_VAR_PRESS_ZERO_CLEAR
|25 = LBC_VAR_CLEAR_ZERO_PRESS
|26 = LBC_VAR_NEGATIVE_PRESSURE
|27 = LBC_VAR_OVER_CLOSURE
|28 = LBC_VAR_DAMPING_ZERO_CLEAR
|29 = LBC_VAR_CLEARANCE_ZERO_DAMP
|30 = LBC_VAR_FRAC_CLEARANCE
|31 = LBC_VAR_ADJUST_TOLERANCE
|33 = LBC_VAR_OUT_OF_PLANE_WIDTH
|35 = LBC_VAR_CROSS_SECT_AREA
 
 
|1 = “General” Contact Type
|1 = “Large” Sliding Type
|1 = “Hard” Surface Behavior
|1 = “Penalty” Friction Formulation
|2 = “One Sided” Penetration Type
|3 = Master Region Id
|3 = Slave Region Id
|2 = “Off” Viscous Damping
|0.2 = ““ Friction Coefficient (Databox Input)
|0. = Shear Stress Limit (Databox Input)
|0. = Pressure Zero Clearance
|0. = Clearance Zero Pressure
|0. = Negative Pressure
|0. = Over Closure
|0. = Damping Zero Clearance
|0. = Clearance Zero Damping
|0. = Frac Clearance
|0. = Adjust Tolerance (Databox Input)
|0. = Out of Plane Width
|0. = Cross Sectional Area
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
-1
This is an internal status condition. There is no corresponding status message in the message database.
Example:
Please see fields_create_general_term (p. 1305) in the MSC Acumen Toolkit - Code Example.
 
get_field_values_no_trans
( field_id, num_evals, eval_dim, field_dim, eval_points, field_values )
 
Description:
Return the values of the field ID for NPTS locations specified by POINTS in VALUES. NO transformation of the points is done.
Input:
INTEGER
field_id
Field ID.
INTEGER
num_evals
Number of points to be evaluated.
INTEGER
eval_dim
Number of coordinates defining POINTS.
INTEGER
field_dim
Dimensionality of field. (1 or 3).
REAL
eval_points
(num_evals,eval_dim)Values of the coordinates of the points.
Output:
REAL
field_values
(num_evals,eval_dim) Values of the fields.
INTEGER
<Return Value>
.See error returned.
Error Conditions:
30001401
Unable to allocate enough memory to evaluate the field.
30001402
No Evaluation method is defined for this field type.
Remarks:
For REALS, PCL ordering is needed.
Example:
Please see get_field_values_no_trans (p. 1316) in the MSC Acumen Toolkit - Code Example.
 
get_field_values
( field_id, num_evals, eval_dim, field_dim, eval_points, field_values )
Description:
Return the values of the field ID for NPTS locations specified by POINTS in VALUES. Transformation matrix for the specified CID.
Input:
INTEGER
field_id
Field ID.
INTEGER
num_evals
Number of points to be evaluated.
INTEGER
eval_dim
Number of coordinates defining POINTS.
INTEGER
field_dim
Dimensionality of field. (1 or 3).
REAL
eval_points
(num_evals,eval_dim)Values of the coordinates of the points.
Output:
REAL
field_values
(num_evals,field_dim) Values of the fields.
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
30001401
Unable to allocate enough memory to evaluate the field.
30001402
No Evaluation method is defined for this field type.
Remarks:
For REALS, PCL ordering is needed.
Example:
Please see get_field_values (p. 1314) in the MSC Acumen Toolkit - Code Example.
 
db_get_max_field
(id)
Description:
Gets the largest field id from the database.
Input:
None.
Output:
INTEGER
id
Highest field ID used.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000007
An unspecified database error occurred
Remarks:
Selects the largest field id from the database.
Example:
None.
 
fld_evl_get_maxnod_for_group
(gid, maxnod)
Description:
Calculate the maximum number of nodes for any element in group GID.
Input:
INTEGER
gid
Group id - 0 get all elems in model.
Output:
INTEGER
maxnod
Max number of nodes in any element.
INTEGER
<Return Value>
.0 if no error, else error code.
Error Conditions:
None.
Remarks:
None.
Example:
Please see fld_evl_get_maxnod_for_group (p. 1313) in the MSC Acumen Toolkit - Code Example.
 
db_modify_field
(id, name, object, type, etype, eid, extra_opt, cid_type, cid, defn_type, nvar, ivar1, ivar2, ivar3, fn1_size, fn2_size, fn3_size, fn1, fn2, fn3, lin_def, nxvals, nyvals, nzvals, xvals, yvals, zvals, vals)
 
Description:
Modifies a field in the database.
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
STRING
name[]
The name of the field to be modified.
INTEGER
object
0 = spatial; 1 = material; 2 = time
INTEGER
type
0 = scalar; 1 = vector
INTEGER
etype
he entity type.
INTEGER
eid
The entity ID.
INTEGER
extra_opt
The extrapolation option.
INTEGER
cid_type
0 = Real; 1 = Parametric
INTEGER
cid
The ID of the coordinate frame used to define this field.
INTEGER
defn_type
0 = Function; 1 = Table; 2 = Fem;
INTEGER
nvar
The number of functions used to define this field.
INTEGER
ivar1
Values 1-4
INTEGER
ivar2
Values 1-4
INTEGER
ivar3
Values 1-4
INTEGER
fn1_size
The size of the first function used to define this field.
INTEGER
fn2_size
The size of the second function used to define this field.
INTEGER
fn3_size
The size of the third function used to define this field.
STRING
fn1[fn1_size]
The first function that defines this field.
STRING
fn2[fn2_size]
The second function that defines this field.
STRING
fn3[fn3_size]
The third function that defines this field.
LOGICAL
lin_def
Flag indicating whether this was a linear definition.
INTEGER
nxvals
The number of x values for this field.
INTEGER
nyvals
The number of y values for this field.
INTEGER
nzvals
The number of z values for this field.
REAL
xvals(nxvals)
The x values for this field.
REAL
yvals(nyvals)
The y values for this field.
REAL
zvals(nzvals)
The z values for this field.
REAL
vals(nxvals, nyvals, nzvals)
The field values for this table field.
Output:
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Modifies a record in the “field” table and one in either the “field_function”, “field_fem” or “field_table” table in the database.
Example:
Please see db_modify_field (p. 1299) in the MSC Acumen Toolkit - Code Example.
 
db_delete_field
(id)
 
Description:
Deletes a field in the database.
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
Output:
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Deletes a record in the “field” table and one in either the “field_function” or “field_table” table in the database.
Example:
See example for db_get_max_field, 530. See also db_delete_field (p. 1284) in the MSC Acumen Toolkit - Code Example.
 
fld_cre_fem_res_sca
(fid, grpid, scalid)
Description:
Transform a scalar elem table to a lbc field table formatted for efficient use in a FEM field. The table will contain one entry per element in the group and will be sorted by element id.
Input:
INTEGER
fid
Field ID to be converted.
INTEGER
grpid
Group ID.
INTEGER
scalid
Scalar_elem_table ID referenced by the field.
Output:
INTEGER
<Return Value>
.0 success, otherwise an error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see fld_cre_fem_res_sca (p. 1310) in the MSC Acumen Toolkit - Code Example.
 
fld_cre_fem_res_vec
(fid, vecid, elmflg)
Description:
Transform a vector graphics table to a lbc field table.
Input:
INTEGER
fid
Field ID to be converted.
INTEGER
vecid
Ggraphics_vector_table ID referenced by the field.
Output:
INTEGER
elmflg
!=0 a field_res_elem table was created =0 a field_res_node table was created
INTEGER
<Return Value>
.0 success, otherwise an error
Error Conditions:
None.
Remarks:
None.
Example:
See example for fld_cre_fem_res_sca, 533. See also fld_cre_fem_res_vec (p. 1311) in the MSC Acumen Toolkit - Code Example.
 
db_delete_field_res
(id)
Description:
This function deletes the field_res_elm or the field_res_not table from a specified database field.
Input:
INTEGER
id
This value specifies the identifier of a field in the database.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Deletes a record in the “field_res_elem” table or “field_res_node” table in the database.
Example:
Please see db_delete_field_res (p. 1285) in the MSC Acumen Toolkit - Code Example.
 
field_create_field_lbc
(id, name, type, ent_type, nvals, eid, elem_face, elem_edge, node_pos, vals)
Description:
Create an LBC type field
Input:
INTEGER
id
Field ID ( ID nonzero, otherwise use next available field ID ).
STRING
name[31
Field name.
INTEGER
type
=1 scalar data, =3 vector data.
INTEGER
ent_type
Category - Nodal or Element.
INTEGER
nvals
INumber of points defining the field.
INTEGER
eid(nvals)
Ids of the elements/nodes.
INTEGER
elem_face(nvals)
Id of the element faces.
INTEGER
elem_edge(nvals)
Id of the element edges.
INTEGER
node_pos(nvals)
Id of nodal position ( for elem variable).
REAL
vals(nvals, type)
Values of the field
Output:
INTEGER
id
.Field ID returned.
INTEGER
<Return Value>
0 success, otherwise an error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see field_create_field_lbc (p. 1303) in the MSC Acumen Toolkit - Code Example.
 
db_get_field_lbc
(id, nvals, eid, elem_face, elem_edge, node_pos, vals)
 
Description:
Gets an lbc field from the database.
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
INTEGER
nvals
The number of values that the output arrays are dimensioned to handle.
Output:
INTEGER
nvals
The number of values that are in the output arrays.
INTEGER
eid(nvals)
The entity ID.
INTEGER
elem_face(nvals)
The elem face ID.
INTEGER
elem_edge(nvals)
The elem edge ID.
INTEGER
node_pos(nvals)
The node position.
REAL
vals(nvals, type)
The scalar, vector, or tensor values of the field.
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Gets a record in the “field” table and one in either the “field_res_elem” or “field_res_node” table in the database.
Example:
Please see db_get_field_lbc (p. 1292) in the MSC Acumen Toolkit - Code Example.
 
db_get_field_lbc_type
(id, type, object)
 
Description:
Gets a field type from the database
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
Output:
INTEGER
type
The type of the field.
INTEGER
object
0 = spatial; 1 = material; 2 = time
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Reads a record in the “field” table.
Example:
Please see db_get_field_lbc_type (p. 1295) in the MSC Acumen Toolkit - Code Example.
 
field_fem_const_eval
(gid, numint, nindep, intrpl, extrap, maxnod, cnst, eids, geoloc, offflg)
Description:
Evaluate a FEM type field at NUMINT points. If point is outside the range set the indices according to EXTRAP return the constraints.
Input:
INTEGER
gid
Group ID.
INTEGER
numint
Number of interpolents to be evaluated.
INTEGER
nindep
Number of independent variables.
REAL
intrpl(numint, nindep)
Locations of interpolents.
INTEGER
extrap
Extrapolation Option.
INTEGER
maxnod
Maximum # of nodes of any element in GID.
Output:
REAL
cnst(numint, maxnod)
Values of the constraints.
INTEGER
eids(numint)
Elem IDS corresponding to the constraints.
REAL
geoloc(numint, nindep)
Location of the interpolated points.
INTEGER
offflg(numint)
=1 GEOLOC(,i) not within GEOTOL of POINTS
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
None.
Remarks:
None.
Example:
Please see field_fem_const_eval (p. 1308) in the MSC Acumen Toolkit - Code Example.
 
db_get_field_dfem
(id, nvals, method, eid, elem_face, elem_edge, node_pos, nodeid, vals)
 
Description:
Gets an lbc field from the database.
Input:
INTEGER
id
The unique internal ID identifying the field in the database.
INTEGER
nvals
The number of values that the output arrays are present in the table.
Output:
INTEGER
nvals
The number of values that the output arrays are present in the table.
INTEGER
method(nvals)
The method used. 1 = vector 2 = nodeID
INTEGER
eid(nvals)
The entity id.
INTEGER
elem_face(nvals)
The elem face id.
INTEGER
elem_edge(nvals)
The elem edge id.
INTEGER
node_pos(nvals)
The node position.
INTEGER
nodeid(nvals)
The node ID if using method = 2
REAL
vals(nvals, type)
The scalar,vector, or tensor values of the field. If method = 1
INTEGER
<Return Value>
.Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error
Remarks:
Gets a record in the “field” table and one in either the “field_res_elem” or “field_res_node” table in the database.
Example:
Please see db_get_field_dfem (p. 1290) in the MSC Acumen Toolkit - Code Example.