MSC.Patran Architecture
MSC.Patran is architected into 5 major areas:
-
UIMS – User interface
-
Applications – Converts user input into suitable format for database storage
-
Database – Includes functionality for data persistence, embedded SQL, data integrity, simultaneous access, undo
-
Graphics – Provides functions to display database contents in the viewport, picking, graphical user feedback
-
Event Manager – Coordinates the other 4 areas
Appendix F Shareware Compiling Functions
The MSC.Patran Utilities or Shareware library contains several useful functions for compiling PCL that augment the basic !!COMPILE functionality. In addition to compiling the function into a PCL library, these functions first pass the function to be compiled through the C-preprocessor. Thus, these functions are useful in the event that it is impossible or inconvenient to use make and a Makefile.
The functions are contained in the bv_pcl class and can be executed at the MSC.Patran command line. The compile(…) function compiles a single PCL file into a PCL library while the compile_all(…) function compiles all files in the current directory/folder with a “.pcl” extension into a PCL library. Complete function descriptions and argument lists are given below.
bv_pcl.compile(file_name, plb_name)
DESCRIPTION
Same as “!!COMPILE file_name plb_name” except that the file_name is passed through the C-preprocessor (cpp) prior to compiling. Thus, by using this function you do not need to use “make” and a “makefile” prior to compiling. Note that if the PCL library does not exist, it is created.
EXAMPLE
bv_pcl.compile(“My_very_own_pcl.pcl”, “My_pcl_library.plb”)
bv_pcl.compile_all(plb_name)
DESCRIPTION
Same as bv_pcl.compile(…) except that all files with a “.pcl” extension in the current directory/folder are compiled. Note that “special” MSC.Patran files such as settings.pcl or p3epilog.pcl are not compiled.
INPUT
|
|
|
plb_name
|
String[]
|
Name of PCL library file.
|
OUTPUT
|
|
|
|
|
|
EXAMPLE
bv_pcl.compile_all(“My_pcl_library.plb”)
The following function makes use of the bv_pcl class as well.
au_make_all()
DESCRIPTION
Same as bv_pcl.compile_all(…) except the PCL library filename is specified via a file called “au_makefile.dat” instead of as a function argument. The “au_makefile.dat” file contains a single line which is the name of the PCL library file, i.e., NT_break_elms.plb”
EXAMPLE
au_make_all()
Appendix G Parametric Patran
parametric_modeling_util.create_variable( "length", "Real", "", "", "12", "" )
Real length = 12; em_sf_comment_previous_line()
$# Real length = 12; em_sf_comment_previous_line()
parametric_modeling_util.reset_variable( "length" )
parametric_modeling_util.create_variable( "height", "Real", "", "", "5", "" )
Real height = 5; em_sf_comment_previous_line()
$# Real height = 5; em_sf_comment_previous_line()
parametric_modeling_util.reset_variable( "height" )
parametric_modeling_util.create_macro( "mesh_density", @
"mth_min(~height~,~length~)*~mesh_factor~", "" )
FUNCTION mesh_density(); GLOBAL Real length; GLOBAL Real height; GLOBAL Real @
mesh_factor; RETURN( mth_min(height,length)*mesh_factor );END FUNCTION
$# Compiling: mesh_density
$# Compiled: mesh_density
-
The configuration file is simply a listing of the variable names and corresponding values. An exclamation mark (!) denotes a comment, i.e.,
variable_name= value ! comment
-
A sample configuration file:
length = 40
height = 10
hole_dia = 5
x_hole = 30
y_hole = 4
elastic_modulus = 30e6
applied_load = 120
thickness = .5
-
Another sample configuration file
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
|