*SetField() - single field with user subroutine

Sets the properties of a single field with a user subroutine.

Syntax

*SetField(field_name, USER, 
                                   `solver_expression`) 
*Set(field_name.use_local_dll, TRUE|FALSE) 
*Set(field.local_dll, "string")

Arguments

field_name
The variable name of an existing field.
Data type: varname
USER
Set to USER for the field to be represented by a user subroutine.
solver_expression
A solver expression enclosed in back quotes to specify arguments for the user subroutine.
Data type: string
field_name.use_local_dll
Specifies if a user subroutine DLL is specific to the instance of one coupler entity.
Data type: boolean
field_name.local_dll
The path and filename for the user subroutine DLL to be used with an instance of the user defined coupler.
Data type: string

Example

*BeginMDL(model, "Field Model")
 *Body(b_0, "Body 0")
 *Body(b_1, "Body 1")
 *Point(p_0, "Point 0")
 *Point(p_1, "Point 1")
 *Point(p_2, "Point 2")
 *Vector(v_1, "Vector 1")
 *Vector(v_2, "Vector 2")
 *Field(fi_0, "Field 0 - Single", b_0, b_1, p_0)
 *SetField(fi_0, USER, `USER(300, 1, 2)`)
 *SetOrientation(fi_0, TWOAXES, XY, v_1, v_2)
 *SetOrientation(fi_0, TWOAXES, XY, p_1, p_2)
 *SetOrientation(fi_0, ONEAXIS, X, p_1)
 *SetOrientation(fi_0, ONEAXIS, X, v_1)
 *Set(fi_0.use_local_dll, TRUE)
 *Set(fi_0.local_dll, "c:/mypath/my_field_dll")
*EndMDL()

Context

*BeginMdl()

*DefineAnalysis()

*DefineSystem()