Functions to Access User Properties and Materials
Store and Restore Functions for User Subroutines
Argument | Description |
---|---|
mid | Material identifier (Starter input number) |
pid | Property identifier |
fun_id | Function identifier |
sens_id | Sensor identifier |
imat | Material number (internal Radioss material index) |
iprop | Property number |
ifunc | Function number |
isens | Sensor number |
mat_index | Material index in user property buffer |
prop_index | Property index in user property buffer |
func_index | Function index in user material or property buffer |
KFUNC=29 | Parameter, indicates access to function buffer in user property |
KMAT=31 | Parameter, indicates access to material buffer in user property |
KFUNC=33 | Parameter, indicates access to property buffer in user property |
KTABLE | Parameter, indicates access to property buffer in user property |
Storage Functions
integer ierror = SET_U_PNU (integer func_index, integer fun_id, KFUNC)
integer ierror = SET_U_PNU (integer func_index, integer fun_id, KTABLE)
integer ierror = SET_U_PNU (integer mat_index, integer mid, KMAT)
integer ierror = SET_U_PNU (integer prop_index, integer pid, KPROP)
The user property may relate to other properties, materials, or functions. The above
routine stores relative property, material, and function identifiers in current user
property. These identifiers are indexed independently for each category and are
specified by func_index
, mat_index
, or
prop_index
, respectively. The access to different property
buffers is distinguished by parameter values KFUNC,
KMAT, KPROP, and
KTABLE.
ierror
= 0, if there is no error.
If the index is larger than the maximum, it returns:
ierror = maximum allowed index value
This is called
in Radioss Starter. ierror = SET_U_PNU(2, 5, KFUNC) |
Stores a Radioss function described by ID=5 as a second function in current property. |
ierror = SET_U_PNU(2, 5, KTABLE) |
Stores a Radioss table described by ID=5 as a second table in current property. |
ierror = SET_U_PNU(1, 3, KMAT)
|
Stores a Radioss material property MID=3 as a first material in current property. |
ierror = SET_U_PNU(2, 2,KPROP) |
Stores property PID = 2 as second property referenced by current property. |
integer ierror = SET_U_GEO(integer value_index, float
value ) |
Stores a value in current user property buffer at a position
referenced by value_index .If the index is
larger than the maximum, it returns:
This
is called in Radioss
Starter. |
Restore Funtions for User Properties, Materials, and Functions
float value = GET_U_GEO(integer
value_index, integer iprop) |
Returns a parameter value stored in property buffer
iprop at the position specified by
value_index . It is called in Radioss Engine and Starter initialization
routines. |
integer iprop = GET_U_P(integer
prop_id) |
Translates property ID into property number. Use this function only in Radioss Starter and store the result in user array. |
integer jprop = GET_U_PNU(integer
prop_index, integer iprop,
KPROP) |
Retrieves an internal number of a property
jprop referred by another user property
iprop at the position specified by
prop_index . This is a reverse function to
SET_U_PNU function. |
integer pid = GET_U_PID(integer
iprop) |
Obtains PID from property number iprop . This
is a reverse function to GET_U_P . |
|
Returns a material parameter value stored in
material imat at the position specified by
integer value_index .
If
the material is referenced by a user
property
|
integer mid = GET_U_MID(integer
imat) |
Obtains mid from known material number
imat . This is a reverse function to
GET_U_M. |
integer y = GET_U_FUNC(integer ifunc,
float x, float dydx) |
Returns interpolated value of function
ifunc , corresponding to abscissa
x .
Integer
|
integer ifunc = GET_U_NUMFUN(integer
fun_id) |
Restores the function number from function identifier. |
integer fun_id = GET_U_FID(integer
ifunc) |
Restores the function ID from function number. If a
function is referenced by a user property
iprop or by user material
imat , its internal number may be also
obtained using following
functions.
|
Storage and Retrieval Procedures for Functions and Tables Example
- Direct Access via Function or Table ID
- Engine:
ifunc = GET_U_NUMFUN(fun_id) y = GET_U_FUNC(ifunc, x, dydx) itable = GET_U_NUMTABLE(table_id) CALL GET_TABLE_VALUE(itable, x, xdim, y)
Function and table IDs must be stored in Starter in a user buffer to be available in Engine subroutine. This is the simplest way to access Radioss functions and tables but may be costly, if the model contains a large number of functions or tables. This is recommended only for small Radioss models.
- Direct Access via Function Number
- Starter:
ifunc = GET_U_NUMFUN(fun_id) itable = GET_U_NUMTABLE(table_id)
Engine:y = GET_U_FUNC(ifunc, x, dydx) CALL GET_TABLE_VALUE(itable, x, xdim, y)
The function number is retrieved once in Starter and stored in user buffer. The Engine subroutine can access the function directly by its number.
- Function Access via User Property or User Material Index
- Starter:
ifunc = GET_U_PNU(prop_index, iprop, KFUNC), or ifunc = GET_U_MNU(mat_index, imat, KFUNC) itable = GET_U_PNU(prop_index, iprop, KTABLE
Engine:y = GET_U_FUNC(ifunc, x, dydx) CALL GET_TABLE_VALUE(itable, x, xdim, y)
Prop_index
ormat_index
are independent for each user property (iprop
orimat
) and numerated from one to a maximum number of functions in related property. Engine routines access the function values directly by its stored number. This is the recommended manner for use with large Radioss models if an old Radioss version is used.The function number is restored in Starter using internal function indexes in user property or material.Note: Inside user material lawsitable
can be stored in UPARAM array.Note: The same principles apply to user property or material with the exception that storing property or material numbers is possible only in Starter initialization routines, not in lecture routines. For more details, see the user property examples.
Access Function | User Routine | ||||||
---|---|---|---|---|---|---|---|
userwis | userwi | lecgxx | rinixx | ruserxx | lecsen_usrx | user_sensx | |
set_u_geo | x | ||||||
set_u_pnu | x | ||||||
set_u_sens_value | x | x | x | ||||
set_u_sens_ipar | x | ||||||
set_u_sens_fpar | x | ||||||
set_u_sens_acti | x | x | x | ||||
get_u_geo | x | x | x | x | x | x | |
get_u_mat | x | x | x | x | x | x | x |
get_u_pnu | x | x | x | x | x | x | |
get_u_mnu | x | x | x | x | x | x | x |
get_u_pid | x | x | x | x | x | x | |
get_u_mid | x | x | x | x | x | x | x |
get_u_m | x | x | x | x | x | x | x |
get_u_p | x | x | x | x | x | x | |
get_u_func | x | x | x | x | x | x | x |
get_table_value* | x | x | x | x | x | x | x |
get_table_value_dydx | x | x | x | x | x | x | x |
get_u_numfun | x | x | x | x | x | x | x |
get_u_numtable* | x | x | x | x | x | x | x |
get_u_skew | x | x | x | x | x | x | x |
get_u_skew_num | x | x | x | x | x | x | x |
get_u_sens_ipar | x | x | x | ||||
get_u_sens_ipar | x | x | x | ||||
get_u_numsens | x | x | x | ||||
get_u_idsens | x | x | x | ||||
get_u_sens_value | x | x | x | ||||
get_u_sens_acti | x | x | x | ||||
get_u_numacc | x | x | x | ||||
get_u_accel | x | x | x | ||||
get_u_numnod | x | x | x | ||||
get_u_nod_x | x | x | x | ||||
get_u_nod_d | x | x | x | ||||
get_u_nod_v | x | x | x | ||||
get_u_nod_a | |||||||
get_u_time | |||||||
get_u_cycle | |||||||
get_u_numtable
and
get_table_value
. For this, the Fortran module
INTERFACE_UTABLE_MOD
is needed, which is included either in
your library or in your user module package (for Windows).