参数化建模
Define a variable name and its default value to be used during the modeling process
Response variables creation mode
Search through and manipulate the results of analysis to define meaningful metrics for export to an external file
Assign the configuration file using an environment variable: parametric_modeling_config_file Or assign the configuration file using the following command:
PARAMETRIC MODELING SCENARIOS
Using variables and configurations Marco definitions and usage Output definitions
CASE STUDY: PARAMETRIC MODELING
Step 3: Create the initial geometry
Create the 4 x 2 x 50 solid Use variables
PARAMETRIC MODELING
PARAMETRIC MODELING
Provide automated parametric analysis in support of complex design processes Allow users to parametrically investigate and assess a number of different designs via batch submittal of a number of different design studies
CASE STUDY: CANTILEVER BEAM
Step 2: Define macros
Pressure_loading
1500 / area Area = length * width Length / Element_size_length Convert the result into an integer value Width / Element_size_section Convert the result into an integer value
Step 1: Define variables
Width = 2 Height = 4 Length = 50 Element_size_length = 2
element size along the beam element size @ cross section
Element_size_section = 1
PARAMETRIC MODELING
A new toolbox implemented as an adaptive form accessed from the main menu bar and called “Parametric Modeling” has been developed Variables definition mode
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
Mesh_seed_length
Mesh_seed_width
Mesh_seed_height
Height / Element_size_section
Convert the result into an integer value
CASE STUDY: CANTILEVER BEAM
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
Configuration file
Generate output file containing pertain analysis data
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
1. 2. 3. 4. 5.
Create variables/macros
Assign variables to specific Patran actions Define desired results as output variables Create and assign a configuration file Run the session file containing variable settings and Patran actions Iterate analysis process using data stored in the output file
3 * cyl_radius
cyl_height / 2
6 * cyl_radius
CASE STUDY: PARAMETRIC MODELING
Step 1: Define variables
CASE STUDY: PARAMETRIC MODELING
Step 1: Define variables
cyl_height = 60 cyl_radius = 10
hole_radius = 2
CASE STUDY: PARAMETRIC MODELING
Step 2: Create a cylinder using the variables
CASE STUDY: PARAMETRIC MODELING
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
Create the cutter and subtract it from the cylinder
CASE STUDY: PARAMETRIC MODELING
Step 3: Set up the configuration files
Quit Patran Create relevant configuration file(s)
Structural analysis of a cantilever beam Distributed loads of 1500 lbs Fixed end Vary the beam cross section Height Width
CASE STUDY: CANTILEVER BEAM
PARAMETRIC MODELING
Variable creation
PARAMETRIC MODELING
Macro creation
PARAMETRIC MODELING
Responsive variable creation
PARAMETRIC MODELING
Steps in parametric modeling
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