当前位置:文档之家› PATRAN参数化建模教程

PATRAN参数化建模教程

Step 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
the parametric modeling process is automated The parametric process can be executed in batch
Patran –spf <session file name> -b
MSC.Patran 2003 Features and Capabilities
MSC.Patran 2003 Features and Capabilities
5
PARAMETRIC MODELING
Responsive variable creation
MSC.Patran 2003 Features and Capabilities
6
PARAMETRIC MODELING
18
PARAMETRIC MODELING SCENARIOS
Using variables and configurations Marco definitions and usage Output definitions
MSC.Patran 2003 Features and Capabilities
MSC.Patran 2003 Features and Capabilities
8
PARAMETRIC MODELING SCENARIOS
Using variables and configurations Marco definitions and usage Output definitions
MSC.Patran 2003 Features and Capabilities
15
CASE STUDY: PARAMETRIC MODELING
Step 3: Set up the configuration files
Quit Patran Create relevant configuration file(s)
MSC.Patran 2003 Features and Capabilities
10
CASE STUDY: PARAMETRIC MODELING
Part dimensions
cyl_radius
hole_radius
3 * cyl_radius
MSC.Patran 2003 Features and Capabilities
MSC.Patran 2003 Features and Capabilities
2
PARAMETRIC MODELING
A new toolbox implemented as an adaptive form accessed from the main menu bar and called “Parametric Modeling” has been developed
These files contains the new variable definitions.
cyl_height = 55 cyl_radius = 15 hole_radius = 2
my_config_1.dat
cyl_height = 50 cyl_radius = 20 hole_radius = 2
6 * cyl_radius
11
cyl_height cyl_height / 2
CASE STUDY: PARAMETRIC MODELING
Step 1: Define variables
MSC.Patran 2003 Features and Capabilities
12
CASE STUDY: PARAMETRIC MODELING
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
MSC.Patran 2003 Features and Capabilities
7
PARAMETRIC MODELING
Configuration file format
The configuration file is used to reset existing Parametric Modeling variables to new values
MSC.Patran 2003 Features and Capabilities
3
PARAMETRIC MODELING
Variatran 2003 Features and Capabilities
4
PARAMETRIC MODELING
Macro creation
Assign 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
my_config_2.dat
cyl_height = 45 cyl_radius = 25 hole_radius = 2
my_config_3.dat
MSC.Patran 2003 Features and Capabilities
16
CASE STUDY: PARAMETRIC MODELING
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 data
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,
Steps 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
Variables definition mode
z Define a variable name and its default value to be used during the modeling process
Response variables creation mode
z Search through and manipulate the results of analysis to define meaningful metrics for export to an external file
Step 2: Create a cylinder using the variables
MSC.Patran 2003 Features and Capabilities
14
CASE STUDY: PARAMETRIC MODELING
Create the cutter and subtract it from the cylinder
相关主题