Contributed UDPs and UDFs
template
UDPRIM template -
purpose:
serve as a template for creation of new UDPs
as an example, it creates a sphere centered at the origin
input Bodys:
-none-
input arguments (specified as name/value pairs):
radius radius of sphere [default 1]
output arguments:
-none-
usage notes:
the radius must be positive
analytic sensitivities are not supported
contributed by:
John Dannenhoffer john@geocentrictech.com
train1
UDPRIM train1 -
purpose:
serve as a template for UDP developer training
it creates either:
a straight WireBody aligned with a coordinate axis
a rectangular SheetBody parallel to a coordinate plane
a brick SolidBody
input Bodys:
-none-
input arguments (specified as name/value pairs):
lenx length in x direction [default 0]
leny length in y direction [default 0]
lenz length in z direction [default 0]
center location of the center (3 values) [default 0]
output arguments:
@@area surface area (for SheetBody and SolidBody)
[default 0]
@@volume volume (for SolidBody) [default 0]
usage notes:
lenx, leny, and lenz must be non-negative scalars
if lenx=leny=lenz=0
an error is raised
elseif lenx=leny=0
a WireBody parallel to the Z-axis is generated
elseif leny=lenz=0
a WireBody parallel to the X-axis is generated
elseif lenz=lenx=0
a WireBody parallel to the Y-axis is generated
elseif lenx=0
a SheetBody parallel to the YZ-plane is generated
elseif leny=0
a SheetBody parallel to the ZX-plane is generated
elseif lenz=0
a SheetBody parallel to the XY-plane is generated
else
a SolidBody is generated
if center has three values
the Body is centered at the specified location
else
the Body is centered at the origin
analytic sensitivities are computed
contributed by:
John Dannenhoffer john@geocentrictech.com
train2
UDPRIM train2 Body
purpose:
serve as a template for creation of new UDFs
as an example, modifies attributes on the input Body
input Bodys:
one SolidBody, SheetBody, or WireBody
input arguments (specified as name/value pairs):
filename name of file with directives
output arguments:
nskip number of skipped directives
usage notes:
the directives are in the form:
FACE attrName (deletes attrName on Faces)
FACE attrName attrValue (overwrites attrName on Faces)
EDGE attrName (deletes attrName on Edges)
EDGE attrName attrValue (overwrites attrName on Edges)
NODE attrName (deletes attrName on Nodes)
NODE attrName attrValue (overwrites attrName on Nodes)
# signifies a comment (can be used anywhere)
@ inserts Face, Edge, or Node number into attrValue
the directive can either be in UPPERACE or lowercase
error messages are printed, but otherwise ignored
analytic sensitivities are not supported
contributed by:
John Dannenhoffer john@geocentrictech.com