I would like to know any PCL function to plot contour----pressure----for a particular case ---all sets----Top Surface pr--- selected group---- and then Apply to create a contour plot. Thanks in advance.
I would like to know any PCL function to plot contour----pressure----for a particular case ---all sets----Top Surface pr--- selected group---- and then Apply to create a contour plot. Thanks in advance.
I am looking for a PCL function to query the loads and Bc's tab in patran and plot the pressure for a particular load case an subcase ids. Yes, it is for 2D elements only.
@Vishal Kalkunte , are you familiar with GUI to create fringe plot of the pressure?
You pick the a) Load Set(s) (eg a PLOAD4), b) Data Variable (Top or Bottom Surface Pressure) and the Group(s). If you have multiple Load Sets in a Subcase, you pick all of them along with appropriate groups. Multiple Load Sets and Groups can be selected.
Regarding 2d vs 3d pressures, the Load Sets will take care of this, as pressure uses a "Target Element Type", so you won't have 2d and 3d elems in the same load set.
Five PCL calls are used to create the plot (plus one global variable declaration). The easiest way to get them is to create a plot and examine the session file. I've included the calls below WITHOUT the arguments (for brevity).
lbc_create_scalar_table( ) ; creates scalar table, referencing desired load sets, and groups
res_data_load_elem_scalar( ) ; loads scalar table (above) for plotting
res_data_title( )
res_display_fringe_create( ) ; creates the plot from the elem_scalar_table data (also references groups for plotting)
res_display_fringe_post( )
If you don't have groups to match Load Sets, Patran can create them for you.
If you want to automate for Subcases and Groups, you will need to interrogate each Patran Load Case, then extract Plot Set info. Not complicated, but more involved than doing it 1-by-1. It might be easier to create a session file for load sets and groups of interest (unless you need to do this frequently).
@Ken Walker , Yes I am familiar with the GUI to create fringe plot. However, I am looking to automate this process for a defined object. For ex: "pressure" in my case and i user defined Load case and select all the sets(PLOAD4) for current group and plot contour. This process I want to automate by some pcl coding/function. The tricky part is interrogate the required/ particular load case. Is there any way, where the process can be automated if user can define the load case name in the pcl code before giving input into patran ?
@Vishal Kalkunte You can retrieve Load Case and LBC info from the database using functions documented in Patran PCL and Customization . Take a look at Chapter 8: Accessing the Patran Database; specifically sections on Load Cases and Loads.
The process is fairly straightforward:
Retrieve # of loads associated to the load case.
Retrieve load_ids associated to the load case.
Loop thru load_ids, get load type and element dimension.
Save the load_ids where type=8 (for pressure) and dimension=2 (for 2d)
Continue process with steps provided in my previous post.
Attached is a short function that includes steps 1-3. Note that Load Case name is hard-coded to work with my example model. This is a prototype and doesn't have a GUI or error checking. It should get you started.