Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations 3DDave on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Patran/PCL - parametrization

Status
Not open for further replies.

MeMechanicalEng

Mechanical
Mar 13, 2014
1
Dear eng-tips users,

I have decided to learn how to use .ses and .pcl files in Patran to simplify repeatable operations.

In my problem, I would like to consider several beams of the same length, loading/BC conditions etc. but with different cross-section dimensions.
In order to make my calculations fully automatic, I have parametrized both width and height of the cross sections (as REAL a,b) and created nested FOR loops to obtain 20 different designs.

I would be grateful for answers on these questions:
1. As long as I play session file for a single dimensions case, everything works perfectly fine. Case is created, submitted, results attached and post-proccessed, after which all the job files (except for the necessary images) are deleted. However, when I copy the same lines from the .ses file into the FUNCTION in .pcl file (in order to create FOR loops there), my variables a and b are not recognized, e.g. here:

REAL a=20., b=30.
$#
$# Creating geometry
$#
asm_const_grid_xyz( "2", "[`a` 0 0]", "Coord 0", asm_create_grid_xyz_created_ids )

$# ERROR, Patran doesn't understand what "[`a` 0 0]" means and doesn't create a point

How to use/declare my variables in FUNCTION in .pcl file to make Patran create parametrized geometry when my function is called?

2. In the same FUNCTION, I have also written the lines responsible for submitting job, attaching and postprocessing the results. Unlike in session file, keyword analysis_submit_2 doesn't ask if Patran should wait for the analysis to complete before reading next lines. That generates an error: .xdb file is not yet created, however lines referring to .xdb attachment are read soon after submitting analysis.

Is there any command to use in .pcl file to "freeze" Patran for reading next lines for a while (or- until the analysis is finished)?


Thank you in advance
MeMechanicalEng
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor