Upload
vuongxuyen
View
254
Download
11
Embed Size (px)
Citation preview
1MSC.Patran 2003 Features and Capabilities
PARAMETRIC PARAMETRIC MODELINGMODELING
2MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGProvide automated parametric analysis in support of complex design processes
Allow users to parametrically investigate and assess a number ofdifferent designs via batch submittal of a number of different design studies
Permits the use of named variables to replace the usual fixed numerical values of the modeling parameters
The values of these parameters different than the prescribed default can be provided by an external file
Configuration file
Generate output file containing pertain analysis dataAssign result value to a variable for additional calculation & processing
The goal is to make it possible for the user to use names and default values for variables (parameters) in every entry point on every form that can be accessed for modeling purposes
3MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGA new toolbox implemented as an adaptive form accessed from the main menu bar and called “Parametric Modeling” has been developed
Variables definition modeDefine a variable name and its default value to be used during the modeling process
Response variables creation modeSearch through and manipulate the results of analysis to define meaningful metrics for export to an external file
4MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGVariable creation
5MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGMacro creation
6MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGResponsive variable creation
7MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGSteps in parametric modeling
1. Create variables/macros
2. Assign variables to specific Patran actions
3. Define desired results as output variables
4. Create and assign a configuration file
5. Run the session file containing variable settings and Patran actions
6. Iterate analysis process using data stored in the output file
8MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELINGConfiguration file format
The configuration file is used to reset existing Parametric Modeling variables to new values
The format of the configuration file is: name = value ! comment
Here are some examples.
maximum = 1000 ! this is an integer
three = 1, 2, 3 ! this is a 3 word integer array
data = 37.655 ! this is a real
moredata = 1.0, 2.0, 3.0, 4.0 ! this is a 4 word real array
name = mat1 ! this is a string variable, note no quotes
names = one, two, three ! this is a string array, again no quotes
Configuration filenames are case sensitive
9MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELING SCENARIOSUsing variables and configurations
Marco definitions and usage
Output definitions
10MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGModel a cylinder with a hole through itVary the cylinder radius and height
11MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGPart dimensions cyl_radius
cyl_height
6 * cyl_radius
cyl_height / 23 * cyl_radius
hole_radius
12MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGStep 1: Define variables
13MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGStep 1: Define variables
cyl_height = 60
cyl_radius = 10
hole_radius = 2
14MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGStep 2: Create a cylinder using the variables
15MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGCreate the cutter and subtract it from the cylinder
16MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELING
Step 3: Set up the configuration filesQuit Patran
Create relevant configuration file(s)
These files contains the new variable definitions.
my_config_1.dat
my_config_2.dat
my_config_3.dat
cyl_height = 55
cyl_radius = 15
hole_radius = 2
cyl_height = 45
cyl_radius = 25
hole_radius = 2
cyl_height = 50
cyl_radius = 20
hole_radius = 2
17MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGStep 4: Run the session file created earlier
Assign the configuration file using an environment variable:
parametric_modeling_config_file
Or assign the configuration file using the following command:
In the command line
In the session file
parametric_modeling_util.define_user_config_file (“my_config_1.dat”)
When the session file is played, Patran looks for the variable definitions contained in the configuration file
By creating/editing the configuration file and re-playing the session file, the parametric modeling process is automated
The parametric process can be executed in batch
Patran –spf <session file name> -b
18MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELING
Step 4: Run the session file created earlier
Vary the cylinder height
Vary the cylinder height & radius
19MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELING SCENARIOSUsing variables and configurations
Marco definitions and usage
Output definitions
20MSC.Patran 2003 Features and Capabilities
CASE STUDY: DESIGN EXPLORATIONCANTILEVER BEAM
Structural analysis of a cantilever beamDistributed loads of 1500 lbsFixed endVary the beam cross section
HeightWidth
21MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAMStep 1: Define variables
Width = 2
Height = 4
Length = 50
Element_size_length = 2
element size along the beam
Element_size_section = 1
element size @ cross section
22MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAMStep 2: Define macros
Pressure_loading
1500 / area
Area = length * width
Mesh_seed_length
Length / Element_size_length
Convert the result into an integer value
Mesh_seed_width
Width / Element_size_section
Convert the result into an integer value
Mesh_seed_height
Height / Element_size_section
Convert the result into an integer value
23MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAMStep 3: Create the initial geometry
Create the 4 x 2 x 50 solid
Use variables
`length`
`width`
`height`
24MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAMStep 4: Define mesh seeds & generate mesh
Use macros to define mesh seeds
`mesh_seed_length()`
`mesh_seed_width()`
`mesh_seed_height()`
Generate hex8 elements
25MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAMStep 5: Define loads and boundary conditions
Use macro to define the pressure loading
`pressure_loading`
26MSC.Patran 2003 Features and Capabilities
CASE STUDY: CANTILEVER BEAM
Step 6: Set up the configuration fileQuit Patran
Create relevant configuration file:
Height = 3
Width = 3
Length = 50
Run the session file
Model has been revised
Pressure loading is updated accordingly
Top surface area was 100
Top surface area is now 150
my_config.dat
height = 3
width = 3
length = 50
27MSC.Patran 2003 Features and Capabilities
PARAMETRIC MODELING SCENARIOSUsing variables and configurations
Marco definitions and usage
Output definitions
28MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONCANTILEVER BEAM
Constant distributed loads of 1500 lbsInitial cross section of 3 x 3Examine 2 analysis criteria
Maximum displacement at free endMaximum bendinf stress at fixed end
Vary the beam cross section to 4 x 2Reexamine the analysis criteria
29MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 1: Define output variable
Maximum displacement at free end
Use variables
Output type = Nodal Vector
Quantity = Y Component
Target = Nodes at the free end
30MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 2: Define output variable
Maximum bending stress at fixed end
Use variables
Output type = Element Tensor
Location = At Node
Quantity = Y Component
Target = Elements at the fixed end
31MSC.Patran 2003 Features and Capabilities
CASE STUDY: PARAMETRIC MODELINGStep 3: Run the session file created earlier
In addition to the configuration file environment variables or PCL commands
The following environment variables or PCL commands are needed to generate the external output file
Parametric_modeling_util.print_all_output()Enable the printing of output variables if the output file is already defined
Assign the output file using an environment variable:
parametric_modeling_output_fileOr assign the configuration file using the following command:
In the command line
In the session file
parametric_modeling_util.define_user_output_file (“my_output.dat”)
32MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 4: Perform initial analysis
my_config.dat
height = 3
width = 3
length = 50
33MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 5: Examine output file
!
! VARIABLES
!
Real length = 50 !
Real width = 3 !
Real height = 3 !
Real element_size_length = 2 !
Real element_size_section = 1 !
!
! MACROS
!
area() = 150. ! Top surface area
pressure_loading() = 10
mesh_seed_length() = 25.
mesh_seed_width() = 3.
mesh_seed_height() = 3.
!
! OUTPUTS
!
Real max_displacement = -1.084347E-3 ---> At Node 2 ! maximum displacement at free end
Real Max_stress = 8.131680E+3 ---> At Element 51 ! Maximum bending stress
Output variables & results
34MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 6: Iterate analysis process
New configuration file
my_config_1.dat
height = 4
width = 2
length = 50
35MSC.Patran 2003 Features and Capabilities
CASE STUDY: ANALYSIS ITERATIONStep 7: Examine output file
!
! VARIABLES
!
Real length = 50 !
Real width = 2 !
Real height = 4 !
Real element_size_length = 2 !
Real element_size_section = 1 !
!
! MACROS
!
area() = 100. ! Top surface area
pressure_loading() = 15
mesh_seed_length() = 25.
mesh_seed_width() = 2.
mesh_seed_height() = 4.
!
! OUTPUTS
!
Real max_displacement = -8.418538E-4---> At Node 2 ! maximum displacement at free end
Real Max_stress = 6.930413E+3---> At Element 76 ! Maximum bending stress
Output variables w/ new results
Automatic update of macro values
36MSC.Patran 2003 Features and Capabilities