Reference: Parametric Surface
Model ElementReference_ParamSurface defines a parametric surface element. A parametric surface is defined in terms of two free parameters: u and v. Referring to the image below, assume a surface S is defined with respect to a coordinate system OXYZ.
Description
Parametric surfaces may be open or closed. Let u be fixed to an arbitrary legal value Uo. If the curves f(Uo,v), g(Uo,v), and h(Uo,v) generated when v is varied from its minimum to maximum value are closed curves, then the surface is said to be closed in the v domain. Similarly, let v be fixed to an arbitrary legal value Vo. If the curves f(u,Vo), g(u,Vo), and h(u,Vo) - generated when u is varied from its minimum to maximum value - are closed curves, then the surface is said to be closed in u domain.
Parametric surfaces are used to model higher pair constraints in MotionSolve.
Only analytical representations of f(), g(), and h() are supported. These functions are defined in the user defined subroutine SURSUB. Construction of parametric surfaces from data points or import them from CAD packages is not supported at this time.
Reference_ParamSurface is only allowed to be defined on rigid bodies, not flex bodies.
Format
< Reference_ParamSurface
id = "integer"
[ label = "string" ]
is_u_closed = { "TRUE" | "FALSE" }
is_v_closed = { "TRUE" | "FALSE" }
u_start = "real"
u_end = "real"
v_start = "real"
v_end = "real"
type = "USERSUB"
{
usrsub_param_string = "USER( [[par_1][, ...][, par_n]] )"
usrsub_dll_name = "valid_path_name"
usrsub_fnc_name = "custom_fnc_name" >
|
script_name = valid_path_name
interpreter = "PYTHON" | "MATLAB"
usrsub_param_string = "USER( [[par_1 [, ...][,par_n]] )"
usrsub_fnc_name = "custom_fnc_name" >
}
</Reference_ParamSurface>
Attributes
- id
- Element identification number (integer>0). This number is unique among all Reference_ParamSurface elements.
- label
- The name of the Reference_ParamSurface element.
- type
- Must be USERSUB. USERSUB indicates that the surface properties are specified in a user defined subroutine, SURSUB. The parameters usrsub_param_string and usrsub_dll_name are used to provide more information about the user defined subroutine.
- usrsub_param_string
- The list of parameters that are passed from the data file to the user defined SURSUB. Use this keyword only when type = USERSUB is selected.
- usrsub_dll_name
- Specifies the path and name of the DLL or shared library containing the user subroutine. MotionSolve uses this information to load the user subroutine SURSUB in the DLL at run time.
- usrsub_fnc_name
- Specifies an alternative name for the user subroutine SURSUB.
- script_name
- Specifies the path and name of the user written script that contains the routine specified by usrsub_fnc_name.
- interpreter
- Specifies the interpreted language that the user script is written in. Valid choices are MATLAB or PYTHON.
- is_u_closed
- Select from TRUE or FALSE.
- is_v_closed
- Select from TRUE or FALSE.
If the surface is closed in the V parametric space, select TRUE.
If the surface is open in the V parametric space, select FALSE.
- u_start
- The minimum value of U. u_start < u_end.
- u_end
- The maximum value of U. u_start < u_end.
- v_start
- The minimum value of V. v_start < v_end.
- v_end
- The maximum value of V. v_start < v_end.
Example
The following example defines a cylindrical surface in parametric space. You could later define a point-to-surface constraint which requires that a point on one body be constrained to move on the cylindrical surface (shown below) defined on a second rigid body. The cylindrical surface is defined in parametric space as:
x = r * Cos(u)
y = r * Sin(u)
z = v
In this example, the parameter u defines the angle of rotation about the cylinder axis as one traverses along the cylindrical surface at a fixed value of v. The parameter v defines the movement along the axis of the cylinder.
Notice that the surface is open in both the u and v space.
Let the radius of the cylinder be 17 mm, and the length of the cylinder be 300 mm. Let the reference coordinate system for the surface be placed at the center of volume of the surface.
The statement defining the cylinder described above is:
<Reference_ParamSurface
id = "555"
is_u_closed = "FALSE"
is_v_closed = "FALSE"
u_start = "0"
u_end = "3.14159"
v_start = "-150."
v_end = "150"
usrsub_param_string = "USER(17,150)"
usrsub_dll_name = "/staff/gates/test/surface/surface.dll" >
</Reference_ParamSurface>
Comments
- Reference_ParamSurface may be used to define the following elements: Constraint_PTSF, Constraint_CVSF, and Constraint_SFSF.
- When defining surface-to-surface constraints, ensure that there is always a unique point of contact between the two surfaces.
- MotionSolve does not limit the parameters u and v to stay within the limits specified. If the simulation requires u and/or v to exceed their specified range, MotionSolve will allow that to happen.