Professional Documents
Culture Documents
Automated Post
Processing in
MADPL and
Workbench
6/20/2012
CAE Associates Inc. and ANSYS Inc. Proprietary
2012 CAE Associates Inc. and ANSYS Inc. All rights reserved.
Introduction
Engineering Advantage
CAE Associates are the leading simulation engineers in the North East
region. With global reach and local focus, we have been assisting, best in
class, engineers since 1981 and chosen by ANSYS to be one of the
original 4 exclusive Channel Partners in 1985. (Over 250 today)
CAE integrates simulation and analysis solutions into their client's projects
as well as into their client's portfolio of skills.
Engineering Advantage
Training Classes
Structural Analysis
Thermal Analysis
CFD
10
Path Plots
12
Path Operations
1. Define a path:
Points defining the path (2 to 1000). You can use existing nodes, locations on the
working plane or locations in the global cartesian system.
Path curvature,
curvature determined by the active coordinate system (CSYS)
(CSYS).
A name for the path.
13
Path Operations
14
Path Operations
2 Map data onto path:
2.
Choose the desired quantity, such as S1, and enter a label to be used on plots
and listings:
General Postproc > Path Operations > Map onto Path (or PDEF command)
15
Path Operations
16
Path Operations
17
Path Operations
Stress Linearization
The path must also be completely contained in the model. I.e. it cannot
pass through a hole
hole, or gap
gap.
19
Stress Linearization
The number and location of the intermediate points are not affected by the
number of divisions set by PATH,,,,nDiv.
20
Stress Linearization
21
Listing Paths
General Postproc > Path Operations > Plot Path Item > List Path Items
Or
PRPATH command.
command
The listing will appear on screen in interactive mode or in the output file in
batch mode.
The screen listing can be saved to a file with the File menu of that window.
/PAGE,9999,,9999
Write 9999 lines before new headers
Makes it easier to read data into other programs.
22
Path Automation
Procedure:
23
Paths in WB
24
Paths in WB
Two points
Edge geometry
X Axis intersection
X-Axis
To define by Edge, simply choose an edge in the model that you want the
path
th tto ffollow.
ll
IIn mostt cases this
thi will
ill require
i up front
f t planning
l
i in
i the
th
geometry creation.
To define by X-Axis intersection, first create a coordinate system whose xaxis represents the desired path direction. Then choose this system as
the Path Coordinate System.
25
Paths in WB
Clicking on a geometry item will center the point at the centroid of that
geometry.
Selecting this surface
centers the path point
at the
h CG off the
h
cylindrical surface
Selecting this edge
l
locates
t th
the path
th
point at the arc
center.
26
Paths in WB
27
Paths in WB
If you want
a t a pat
path to move
o e with
t geo
geometry
et y updates, ccreate
eate coo
coordinate
d ate
systems associated with geometry and define the path using these
coordinate systems.
28
Paths in WB
29
Paths in WB
30
Paths in WB
31
Paths in WB
Once the chart is added, you can select multiple items in the tree to
compare;
32
Saving Images
Recommended to set:
Quality
Q
lit = 100
Force White BG and Black FG = On
34
/SHOW,JPEG,,0
JPEG,QUAL,100,
JPEG ORIENT HORIZ
JPEG,ORIENT,HORIZ
JPEG,COLOR,2
JPEG,TMOD,1
/GFILE,800,
!*
!
/CMAP,_TEMPCMAP_,CMP,,SAVE
/RGB,INDEX,100,100,100,0
/RGB,INDEX,0,0,0,15
/REPLOT
/CMAP,_TEMPCMAP_,CMP
/DELETE,_TEMPCMAP_,CMP
/SHOW,CLOSE
jobnameXXX.jpg
Wh
Where XXX iis a number
b starting
t ti with
ith 000 and
d iincrementing
ti b
by one ffor each
h new
image.
35
PLNS,S,1
PLNS,S,3
PLNS,S,EQV
PLNS U SUM
PLNS,U,SUM
/CMAP,_TEMPCMAP_,CMP
/DELETE,_TEMPCMAP_,CMP
/SHOW,CLOSE
36
/DEV,PSFN,NINC
With this option set the plot is always sent to jobname.jpg
So it is easy to rename
/
/DEV,PSFN,NINC
/SHOW,JPEG,,0
/inquire,jnam,JOBNAME
PLNS,S,1
1
/rename,,jpg,,%jnam(1)%_S1,jpg
PLNS,S,3
/rename,,jpg,,%jnam(1)%_S3,jpg
PLNS,S,EQV
S S Q
/rename,,jpg,,%jnam(1)%_SEQV,jpg
PLNS,U,SUM
/rename,,jpg,,%jnam(1)%_USUM,jpg
/SHOW,CLOSE
37
Plots to File in WB
In Workbench
Workbench, the current view can be saved to an image file by clicking:
This report will automatically contain any Figures or Images added to the
tree.
Image: A static image of the current view, cannot be modified.
Figure: A separate view of the current tree item.
Figures can be rotated, zoomed, etc, just like the main view.
Ch
Changing
i th
the name off Fi
Figures and
d IImages will
ill make
k th
the reportt captions
ti
more
meaningful.
38
WB Report Generation
Once you have added all the desired figure, images, and comments, the
report can be viewed by clicking on the Report Preview tab.
39
WB Report Generation
40
WB Report Generation
41
WB Report Generation
Sending to MS Word will contain the complete report with all data.
Sending to PowerPoint will contain only the images and figures from the
report.
42
Automated Stress
E t
Extraction
ti
Stress Extraction
There are a number of ways to determine and store the maximum stress
for a particular load case:
Using these methods in a *DO loop that loops over all load cases, one can
find the maximum stress value of all load cases.
44
Stress Extraction
*vwrite,s1max,s1maxnode,s1maxlc
The maximum S1 stress of %G, occurs at node %i, in set number %i
45
Stress Extraction
The *VWRITE
VWRITE command is useful for writing data to files in a specified
format. Lets modify the macro slightly to write the max S1 stress for each
results set.
*get,nsets,ACTIVE,,SET,NSET
*dim,slist,array,nsets,2
*do,iset,1,nsets
set,,,,,,,iset
nsort,s,1
*get,slist(iset,1),sort,,max
*get,slist(iset,2),sort,,imax
*enddo
*cfopen,s1out,csv
*vwrite
Load Case, Max S1,
1 Node
*vwrite,SEQU,slist(1,1),slist(1,2)
%I, %G, %I
* f l
*cfclose
46
Stress Extraction
This will create a CSV file tha tcna be read directly into Excel:
LoadCase
Load
Case
1
2
3
4
5
6
MaxS1
Max
S1 Node
14823.21
17428
29648.53
17428
44475.96
17428
40390.54
17428
36634.85
17429
32984.73
17429
47
Maximum Stress in WB
In WB the maximum (and minimum) values for each result item are
automatically stored for each results set.
The graph tab will show a plot of maximum value vs. time for each quantity
plotted.
plotted
To display the results for the time point of interest, simply right click on the
graph at the location of interest, and choose Retrieve This Result
48
49
Adding abbreviations to this file will cause them to appear on the tool bar
in ANSYS MAPDL.
50