() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_arc_1()
#
# This session file creates a new database by
# name new.db. Two nodes and a bar element using
# the nodes are created. This function is then
# called to sweep the bar element through an arc.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_arc()
# has the following arguments:
#
# fem_sweep_arc_1
# ( sweep_elem_select,
# sweep_node_select,
# arc_angle,
# arc_coord_frame,
# axis_rotation,
# offset_angle,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_arc_angle[32]
STRING s_arc_coord_frame[32]
STRING s_axis_rotation[32]
STRING s_offset_angle[32]
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create 2 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 2 0][5 3 0]", sv_fem_nodes_created)
dump i_return_value
node_label( TRUE )
bar_elem_label( TRUE )
#---------------------------------------------------------------------
# Create a bar element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Bar", "Bar2", "1", "Standard", @
TRUE, "Node 1", "Node 2", "", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the bar element through an arc
#
s_sweep_elem_select = "2"
s_sweep_node_select = "3"
s_arc_angle = "45."
s_arc_coord_frame = "Coord 0"
s_axis_rotation = "Coord 0.3"
s_offset_angle = "0.0"
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_arc_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_arc_angle, @
s_arc_coord_frame, @
s_axis_rotation, @
s_offset_angle, @
i_flag , @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_cylinder_radial_1()
#
# This session file creates a new database by
# name new.db. Three nodes and a triangular
# element using the nodes are created. This
# function is then called to sweep the element
# along a cylindrical radius.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_cylinder_radial()
# has the following arguments:
#
# fem_sweep_cylinder_radial_1
# ( sweep_elem_select,
# sweep_node_select,
# cyl_coord_frame,
# axis_cylinder,
# radial_distance,
# offset_distance,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_cyl_coord_frame[32]
STRING s_axis_cylinder[32]
STRING s_radial_distance[32]
STRING s_offset_distance[32]
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create 3 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 2 0][1 3 0][5 3 0]", sv_fem_nodes_created)
dump i_return_value
dump sv_fem_nodes_created
node_label( TRUE )
tri_elem_label( TRUE )
#---------------------------------------------------------------------
# Create a triangular element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"Node 1", "Node 2", "Node 3", "", "", @
"", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the element along a cylindrical radius
#
s_sweep_elem_select = "2"
s_sweep_node_select = "4"
s_cyl_coord_frame = "Coord 0"
s_axis_cylinder = "{[0 0 1][1 0 1]}"
s_radial_distance = "2."
s_offset_distance = "1."
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_cylinder_radial_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_cyl_coord_frame, @
s_axis_cylinder, @
s_radial_distance, @
s_offset_distance, @
i_flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_extrude_1()
#
# This session file creates a new database by
# name new.db. Two nodes and a bar element using
# the nodes are created. This function is then
# called to sweep the element by extrude method.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_extrude()
# has the following arguments:
#
# fem_sweep_extrude_1
# ( sweep_elem_select,
# sweep_node_select,
# vector_coord_frame,
# vector_direction,
# extrusion_distance,
# offset_distance,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_vector_coord_frame[32]
STRING s_vector_direction[32]
STRING s_extrusion_distance[32]
STRING s_cyl_coord_frame[32]
STRING s_axis_cylinder[32]
STRING s_radial_distance[32]
STRING s_offset_distance[32]
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create 2 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 2 0][5 3 0]", sv_fem_nodes_created)
dump i_return_value
node_label( TRUE )
bar_elem_label( TRUE )
#---------------------------------------------------------------------
# Create a bar element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Bar", "Bar2", "1", "Standard", @
TRUE, "Node 1", "Node 2", "", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the element by extrude method
#
s_sweep_elem_select = "2"
s_sweep_node_select = "3"
s_vector_coord_frame = "Coord 0"
s_vector_direction = "<1 2 0>"
s_extrusion_distance = "2.5"
s_offset_distance = "1."
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_extrude_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_vector_coord_frame, @
s_vector_direction, @
s_extrusion_distance, @
s_offset_distance, @
i_true, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_glide_1()
#
# This session file creates a new database by
# name new.db. Two nodes and a bar element using
# the nodes are created. This function is then
# called to sweep the bar element by gliding
# along a curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_glide()
# has the following arguments:
#
# fem_sweep_glide_1
# ( sweep_elem_select,
# sweep_node_select,
# glide_coord_frame,
# glide_type,
# glide_curve,
# glide_beginning,
# glide_end,
# reverse_glide,
# offset_glide,
# glide_parameter,
# glide_pnts_parametric,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_glide_coord_frame[32]
STRING s_glide_type[32]
STRING s_glide_curve[32]
STRING s_glide_beginning[32]
STRING s_glide_end[32]
LOGICAL l_reverse_glide
LOGICAL l_offset_glide
LOGICAL l_glide_parameter
LOGICAL l_glide_pnts_parametric
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING sv_created_ids[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create a curve for gliding the element
i_return_value = @
sgm_const_curve_bspline @
( "1", "[2 2 0], [2 5 0], [0 3 0], @
[-2 5 0]", 4, TRUE, 1, FALSE, sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create 2 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 2 0][4 7 0]", sv_fem_nodes_created)
dump i_return_value
node_label( TRUE )
bar_elem_label( TRUE )
#---------------------------------------------------------------------
# Create a bar element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Bar", "Bar2", "1", "Standard", @
TRUE, "Node 1", "Node 2", "", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the bar element by gliding along a curve
#
s_sweep_elem_select = "2"
s_sweep_node_select = "3"
s_glide_coord_frame = "Coord 0"
s_glide_type = "fixed"
s_glide_curve = "Curve 1"
s_glide_beginning = "[2 2 0]"
s_glide_end = "[-2 5 0]"
l_reverse_glide = FALSE
l_offset_glide = FALSE
l_glide_parameter = FALSE
l_glide_pnts_parametric = FALSE
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "3"
i_return_value = @
fem_sweep_glide_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_glide_coord_frame, @
s_glide_type, @
s_glide_curve, @
s_glide_beginning, @
s_glide_end, @
l_reverse_glide, @
l_offset_glide, @
l_glide_parameter, @
l_glide_pnts_parametric, @
flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_glide_guide_1()
#
# This session file creates a new database by
# name new.db. Two nodes and a bar element using
# the nodes are created. This function is then
# called to sweep the bar element by glide-guide
# method.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_glide_guide()
# has the following arguments:
#
# fem_sweep_glide_guide_1
# ( sweep_elem_select,
# sweep_node_select,
# glide_coord_frame,
# glide_curve,
# glide_beginning,
# glide_end,
# reverse_glide,
# offset_glide,
# glide_parameter,
# glide_pnts_parametric,
# flag,
# entity_select,
# guide_curve,
# guide_beginning,
# guide_end,
# reverse_guide,
# offset_guide,
# guide_parameter,
# guide_pnts_parameter,
# preserve_guide_axis,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_glide_coord_frame[32]
STRING s_glide_curve[32]
STRING s_glide_beginning[32]
STRING s_glide_end[32]
LOGICAL l_reverse_glide
LOGICAL l_offset_glide
LOGICAL l_glide_parameter
LOGICAL l_glide_pnts_parametric
INTEGER i_flag
STRING s_entity_select[32]
STRING s_guide_curve[32]
STRING s_guide_beginning[32]
STRING s_guide_end[32]
LOGICAL l_reverse_guide
LOGICAL l_offset_guide
LOGICAL l_guide_parameter
LOGICAL l_guide_pnts_parameter
LOGICAL l_preserve_guide_axis
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING sv_created_ids[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create a circular arc for gliding the element
i_return_value = @
sgm_const_curve_2d_arcangles_v1 @
( "1", 3., 0., 90., "Coord 0.3", @
"[0 0 0]", TRUE, sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create another circular arc for guiding the element
i_return_value = @
sgm_const_curve_2d_arcangles_v1 @
( "2", 5., 0., 90., "Coord 0.3", @
"[0 2 0]", TRUE, sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create 2 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[3 0 0][5 2 0]", sv_fem_nodes_created)
dump i_return_value
node_label( TRUE )
bar_elem_label( TRUE )
#---------------------------------------------------------------------
# Create a bar element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Bar", "Bar2", "1", "Standard", @
TRUE, "Node 1", "Node 2", "", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the bar element by glide-guide method
#
s_sweep_elem_select = "2"
s_sweep_node_select = "3"
s_glide_coord_frame = "Coord 0"
s_glide_curve = "Curve 1"
s_glide_beginning = "[3 0 0]"
s_glide_end = "[0 3 0]"
l_reverse_glide = FALSE
l_offset_glide = FALSE
l_glide_parameter = FALSE
l_glide_pnts_parametric = FALSE
l_delete_parents = FALSE
s_entity_select = "Elem 1"
s_guide_curve = "Curve 2"
s_guide_beginning = "[5 2 0]"
s_guide_end = "[7 0 0]"
l_reverse_guide = FALSE
l_offset_guide = FALSE
l_guide_parameter = FALSE
l_guide_pnts_parameter = FALSE
l_preserve_guide_axis = FALSE
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "3"
i_return_value = @
fem_sweep_glide_guide_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_glide_coord_frame, @
s_glide_curve, @
s_glide_beginning, @
s_glide_end, @
l_reverse_glide, @
l_offset_glide, @
l_glide_parameter, @
l_glide_pnts_parametric, @
i_flag, @
s_entity_select, @
s_guide_curve, @
s_guide_beginning, @
s_guide_end, @
l_reverse_guide, @
l_offset_guide, @
l_guide_parameter, @
l_guide_pnts_parameter, @
l_preserve_guide_axis, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_loft_1()
#
# This session file creates a new database by
# name new.db. Six nodes and two triangular
# elements using the nodes are created. This
# function is then called to sweep the element
# by using the loft method.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_loft()
# has the following arguments:
#
# fem_sweep_loft_1
# ( sweep_elem_select,
# sweep_node_select,
# entity_select,
# top_elements,
# start_element,
# start_element_top,
# flag,
# auto_align,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_entity_select[32]
STRING s_top_elements[32]
STRING s_start_element[32]
STRING s_start_element_top[32]
INTEGER i_flag
LOGICAL l_auto_align
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create 6 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 4 0][8 4 0][2 8 0]", sv_fem_nodes_created)
dump i_return_value
dump sv_fem_nodes_created
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "4", @
"[2 0 6][8 0 6][2 0 10]", sv_fem_nodes_created)
dump i_return_value
dump sv_fem_nodes_created
node_label( TRUE )
tri_elem_label( TRUE )
i_return_value = @
ga_view_aa_set( -70., 75., 80.)
dump i_return_value
#---------------------------------------------------------------------
# Create two triangular elements using the nodes
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"Node 1", "Node 2", "Node 3", "", "", @
"", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "2", "Standard", TRUE, @
"Node 4", "Node 5", "Node 6", "", "", @
"", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the element by using the loft method
#
s_sweep_elem_select = "3"
s_sweep_node_select = "7"
s_entity_select = "Elem 1"
s_top_elements = "Elem 2"
s_start_element = ""
s_start_element_top = ""
l_delete_parents = FALSE
l_auto_align = TRUE
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "3"
i_return_value = @
fem_sweep_loft_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_entity_select, @
s_top_elements, @
s_start_element, @
s_start_element_top, @
i_flag, @
l_auto_align, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_normal_1()
#
# This session file creates a new database by
# name new.db. Three nodes and a triangular
# element using the nodes are created. This
# function is then called to sweep the element
# along the normal direction.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_normal()
# has the following arguments:
#
# fem_sweep_normal_1
# ( sweep_elem_select,
# sweep_node_select,
# normal_distance,
# offset_distance,
# reverse_normal,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_normal_distance[32]
STRING s_offset_distance[32]
LOGICAL l_reverse_normal
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING sv_fem_nodes_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create 3 nodes without associating with any geometry
i_return_value = @
fem_create_nodes @
( "Coord 0", "Coord 0", FALSE, "1", @
"[2 2 0][1 3 0][5 3 0]", sv_fem_nodes_created)
dump i_return_value
dump sv_fem_nodes_created
node_label( TRUE )
tri_elem_label( TRUE )
i_return_value = @
ga_view_aa_set( -67., 0., -34.)
dump i_return_value
#---------------------------------------------------------------------
# Create a triangular element using the 2 nodes
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"Node 1", "Node 2", "Node 3", "", "", @
"", "", "", s_fem_elements_created)
dump i_return_value
dump s_fem_elements_created
#---------------------------------------------------------------------
# Sweep the bar element along the normal
#
s_sweep_elem_select = "2"
s_sweep_node_select = "4"
s_normal_distance = "2."
s_offset_distance = "1."
l_reverse_normal = TRUE
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "3"
i_return_value = @
fem_sweep_normal @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_normal_distance, @
s_offset_distance, @
l_reverse_normal, @
i_flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
sys_free_string(sv_fem_nodes_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_sphere_angle_1()
#
# This session file creates a new database by
# name new.db. A triangular element is created.
# This function is then called to sweep the
# element along the spherical theta direction.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_sphere_angle()
# has the following arguments:
#
# fem_sweep_sphere_angle_1
# ( sweep_elem_select,
# sweep_node_select,
# sphere_coord_frame,
# axis_spherical,
# sweep_angle,
# angle_offset,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_sphere_coord_frame[32]
STRING s_axis_spherical[32]
STRING s_sweep_angle[32]
STRING s_angle_offset[32]
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create a triangular element
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"[2 2 0]", "[1 3 0]", "[5 3 0]", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
node_label( TRUE )
tri_elem_label( TRUE )
i_return_value = @
ga_view_aa_set( -67., 0., -34.)
dump i_return_value
#---------------------------------------------------------------------
# Sweep the element along a spherical theta direction
#
s_sweep_elem_select = "2"
s_sweep_node_select = "4"
s_sphere_coord_frame = "Coord 0"
s_axis_spherical = "Coord 0.3"
s_sweep_angle = "45."
s_angle_offset = "15."
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_sphere_angle_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_sphere_coord_frame, @
s_axis_spherical, @
s_sweep_angle, @
s_angle_offset, @
i_flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_sphere_radial_1()
#
# This session file creates a new database by
# name new.db. A triangular element is created.
# This function is then called to sweep the
# element along a spherical radius.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_sphere_radial()
# has the following arguments:
#
# fem_sweep_sphere_radial_1
# ( sweep_elem_select,
# sweep_node_select,
# sphere_coord_frame,
# sphere_center,
# radial_distance,
# offset_distance,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_sphere_coord_frame[32]
STRING s_sphere_center[32]
STRING s_radial_distance[32]
STRING s_offset_distance[32]
INTEGER i_flag
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create a triangular element
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"[2 2 0]", "[1 3 0]", "[5 3 0]", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
node_label( TRUE )
tri_elem_label( TRUE )
#---------------------------------------------------------------------
# Sweep the element along a spherical radius
#
s_sweep_elem_select = "2"
s_sweep_node_select = "4"
s_sphere_coord_frame = "Coord 0"
s_sphere_center = "[2 5 2]"
s_radial_distance = "5."
s_offset_distance = "1."
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_sphere_radial_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_sphere_coord_frame, @
s_sphere_center, @
s_radial_distance, @
s_offset_distance, @
i_flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function fem_sweep_vector_field_1()
#
# This session file creates a new database by
# name new.db. A vector field and a triangular
# element is created. This function is then
# called to sweep the element using the vector
# field sweep method.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function fem_sweep_vector_field()
# has the following arguments:
#
# fem_sweep_vector_field_1
# ( sweep_elem_select,
# sweep_node_select,
# vector_field,
# field_scale_factor,
# offset_distance,
# reverse_field,
# normalize_field,
# flag,
# entity_select,
# num_topologies,
# sweep_topologies,
# anly_coord_frame,
# ref_coord_frame,
# mesh_control_type,
# mesh_control,
# num_nodes,
# num_elements,
# nodes_created,
# elements_created )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_sweep_elem_select[32]
STRING s_sweep_node_select[32]
STRING s_vector_field[32]
STRING s_field_scale_factor[32]
STRING s_offset_distance[32]
LOGICAL l_reverse_field
LOGICAL l_normalize_field
INTEGER i_flage
STRING s_entity_select[32]
INTEGER i_num_topologies
STRING sa_sweep_topologies[32](10)
STRING s_anly_coord_frame[32]
STRING s_ref_coord_frame[32]
STRING s_mesh_control_type[32]
STRING sa_mesh_control[32](6)
INTEGER i_num_nodes
INTEGER i_num_elements
STRING sv_nodes_created[VIRTUAL]
STRING sv_elements_created[VIRTUAL]
STRING s_fem_elements_created[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create a vector field
i_return_value = @
fields_create @
( "vector_field", "Spatial", 1, "Vector", @
"Real", "Coord 0", "", "Function", 3, @
"X", "Y", "Z", "’X*2.", "’Y*2.", @
"’Z+’X+’Y", FALSE, [0.], [0.], [0.], [[[0.]]] )
dump i_return_value
#---------------------------------------------------------------------
# Create a triangular element
#
i_return_value = @
fem_create_elems @
( "Tri", "Tria3", "1", "Standard", TRUE, @
"[2 2 0]", "[1 3 0]", "[5 3 0]", "", @
"", "", "", "", s_fem_elements_created)
dump i_return_value
node_label( TRUE )
tri_elem_label( TRUE )
#---------------------------------------------------------------------
# Sweep the element by using the vector field sweep method
#
s_sweep_elem_select = "2"
s_sweep_node_select = "4"
s_vector_field = "vector_field"
s_field_scale_factor = "1.5"
s_offset_distance = "0.5"
l_reverse_field = FALSE
l_normalize_field = FALSE
i_flag = TRUE
s_entity_select = "Elem 1"
i_num_topologies = 10
sa_sweep_topologies(1) = "Bar2"
sa_sweep_topologies(2) = "Quad4"
sa_sweep_topologies(3) = "Quad8"
sa_sweep_topologies(4) = "Quad12"
sa_sweep_topologies(5) = "Wedge6"
sa_sweep_topologies(6) = "Wedge15"
sa_sweep_topologies(7) = "Wedge24"
sa_sweep_topologies(8) = "Hex8"
sa_sweep_topologies(9) = "Hex20"
sa_sweep_topologies(10) = "Hex32"
s_anly_coord_frame = "Coord 0"
s_ref_coord_frame = "Coord 0"
s_mesh_control_type = "Uniform: Number of Elements"
sa_mesh_control(6) = "2"
i_return_value = @
fem_sweep_vector_field_1 @
( s_sweep_elem_select, @
s_sweep_node_select, @
s_vector_field, @
s_field_scale_factor, @
s_offset_distance, @
l_reverse_field, @
l_normalize_field, @
i_flag, @
s_entity_select, @
i_num_topologies, @
sa_sweep_topologies, @
s_anly_coord_frame, @
s_ref_coord_frame, @
s_mesh_control_type, @
sa_mesh_control, @
i_num_nodes, @
i_num_elements, @
sv_nodes_created, @
sv_elements_created )
dump i_return_value
dump i_num_nodes
dump i_num_elements
dump sv_nodes_created
dump sv_elements_created
sys_free_string(sv_nodes_created)
sys_free_string(sv_elements_created)
#---------------------------------------------------------------------