User-Defined Thermal Material
The MATUSHT Bulk Data Entry, in combination with the LOADLIB I/O Option Entry, allows for the definition of thermal material through user-defined external functions.
Write External Functions
subroutine usrmatht(idu, matID, ieuid,
Integration_Point, Layer, Simpson_Point,
Stater, State,
nState, drot, props, nprops, temp,
dtemp, kinc, dt, t_step, t_total, hgen, smat
userdata, ierr)
character*32000 userdata
integer*8 i, idu, matID, ieuid, nState, nprops, kinc, ierr
integer Integration_Point, Layer, Simpson_Point
double precision Stater(nState), State(nState)
double precision drot(3,3), rmat(nprops)
double precision etempmat, dtemp, dt, t_step, t_total
double precision hgen, smat(9)
initusr
subroutine:subroutine initusr(idu,nstate,cstate)
implicit none
integer idu,nstate
character*64 cstate(nstate)
The strings in the initusr
subroutine should always be declared as
follows: character*64 cstate(nstate)
The declaration
should always use 64-character size.cstate
variable can be assigned the label to
print in the user-defined results with 1
being the index for the
first variable in the example
below: cstate(1) = “Variable Name for State(1)”
Subroutine Arguments
Argument | Type | Input / Output | Description |
---|---|---|---|
idu |
integer | Input | This is defined via the USUBID parameter
on the MATUSHT Bulk Data Entry. This argument
can be used to define and choose between different types of
materials within the same user subroutine. optional use |
matID |
Integer | Input | Material ID. |
ieuid |
integer | Input | Element ID. |
|
Integer | Input | Gauss Integration Point. |
Layer |
Integer | Input | Laminate Layer. |
Simpson Point |
Integer | Input | Through-thickness Simpson Integration Point. |
drot(3,3) |
Double (table) | Input | Transformation matrix. |
props |
double (table) | Input | This table contains all the user-defined thermal material property information from the PROPERTY continuation line of the MATUSHT entry. |
nprops |
Integer | Input | This is the total number of thermal material properties defined on the PROPERTY continuation line of the MATUSHT entry. |
temp |
double | Input | This is the temperature at the end of the current increment. |
dtemp |
double | Input | This is the temperature increment of the current increment. |
kinc |
integer | Input | Current nonlinear increment. |
dt |
double | Input | Current time step increment |
t_step |
double | Input | Current subcase time of the current time step. |
t_total |
double | Input | Total time (if IC is used). This is effective when the IC case control entry of a nonlinear transient thermal subcase points to a previous nonlinear transient thermal subcase. |
Stater |
double (table) | Input | Table of State variables at the last converged time-step. They are constant between iterations of the same time step. |
State |
double (table) | Input/Output | Table of State variables at the current time-step. They are updated and passed between iterations of the same time-step. State variables are variables that can be requested as output in the H3D file. Any variable calculated within the solution process in the subroutine can be output by defining it as a state variable. |
nState |
integer | Input | Number of State Variables that the user requires in the
subroutine. See Stater for more
information. |
cstate |
string | Output | A character-based label from initusr
subroutine to OptiStruct. In the
usermaterial or smatusr
subroutines the state variables can be assigned user-defined
labels which can be displayed in the H3D
file when imported in HyperView. The
cstate variable provides the name for the
state variable declared in the subroutines to display in the
H3D file. |
hgen |
double (table) | Output | Generated heat. |
smat |
Double (table) | Output | Material matrix. These are calculated during the solution and
are output to OptiStruct. Format for
smat matrix is provided below.
|
userdata |
Character | Output | User-defined message that is output based on the value of
ierr argument. |
ierr |
Integer | Input/Output | Flag that activates/deactivates Output message for an
OptiStruct run from the user
subroutine.
|
Output
Regular Built-in OptiStruct output, like Grid
Temperatures, Element Fluxes, and so on can be requested for any thermal material
user-subroutine based model. Additionally, user-defined output can also be requested
via the State(*)
variable in the user-subroutine. The number of
such State(*)
variables should be identified on the
NDEPVAR field.
This State variable can be assigned to any output variable that is required to be output from the subroutine, and it can then be visualized in HyperView after loading the H3D file.
Build External Libraries for User-defined Materials
You can build shared libraries on Windows or Linux.
Refer to Build External Libraries for more information.