Professional Documents
Culture Documents
What are vector commands? A vector command operates on an entire array of values.
11/8/2010
11/8/2010
0.000 min.
11/8/2010
Before I can use a vector command, I must create arrays. This is done with the *DIM command. The array will be initially filled with zeros.
11/8/2010
11/8/2010
There are lots of vector commands. Some have many options, some are simple. Rather than going through the commands one at a time, which is time consuming and boring, lets look at a couple of typical problems and see how they can be solved with vector commands.
11/8/2010
PROBLEM #1: Find the total change in heat energy in a model with multiple materials during a transient thermal analysis. APPROACH: Find the change in heat per element and sum across the model.
qe
Ve ci
Te
multi-body part
applied temps
Nuclear Engineering Division - Engineering Operations
11/8/2010
First, lets get some raw data. We need to get nodal geometry, elemental geometry, and material constants. Well use *VGET to speed things up.
Just a simple do-loop for this. Only three materials, so a vector command is not needed.
Note that we used seven *VGET commands. On a million node model, that would take 14 minutes!
Nuclear Engineering Division - Engineering Operations
11/8/2010
At this point we have the material properties by material types, but we dont have them associated with an element.
mat # density
specific heat
element #
Nuclear Engineering Division - Engineering Operations
element volume
11/8/2010
10
We will use the *VOPER command to gather the material properties to the correct location.
11/8/2010
11
This command is impossible to describe verbally. Use the diagrams below to decypher it.
Par1
ParR(j)=Par1(Par2(j))
data
order
Par2
ParR
ParR(Par2(j))=Par1(j)
11/8/2010
12
Next, we need to get temperatures. Temps are available only as nodal temps, and we need an elemental temp. We could try and do some boring, repetitive math and average the nodal temps to get an elemental value, but heres a slicker way.
Not a great description. Its true, but the MAP option is not limited to mapping results. It can map any kind of data from one set of reference points to another set.
11/8/2010
13
We can use the *MOPER,,,MAP command to interpolate data (nodal temps in TDAT) from a cloud of reference points (nodal coordinates in NDATA) to a new cloud of points(element centroids in EDATA).
data
3D
11/8/2010
14
11/8/2010
15
All thats left is the math. Well use *VSCFUN (vector scalar function) to sum the individual elemental heat losses across the entire model. Note that in the first *voper, Par2 = tinit, a scalar parameter. Either Par1 or Par2 or both can be a constant.
11/8/2010
16
Create a command snippet under Solution and insert your APDL commands.
Note that these commands will be executed after the POST1 command.
11/8/2010
17
11/8/2010
18
Then, click on Solution Information, and scroll down to find your results.
11/8/2010
19
CHECKING YOUR WORK: In Mechanical APDL, there are a couple ways to see what kind of damage you are doing.
To look at your Data array, click parameters, Array Parameters, Define/Edit, choose DATA, then click on EDIT. The window below, right will appear, displaying the DATA array
click here
11/8/2010
20
Another method that allows dirrect access to a known locatiopn is to use the *STATUS command. If you want to look at the entries for element 567 in the DATA array, at the command line type: *status,data,567,567,1,10
11/8/2010
21
PROBLEM #2: Calculate high cycle fatigue damage at every node in a model of a hydraulic pump and display it as a contour plot. APPROACH: 1. Assign fatigue parameters for each material to each node. 2. Obtain minimum and maximum stress at each node. Calculate mean and alternating stress. 3. Calculate the fatigue stress and damage at each node. 4. Plot the damage as a contour plot.
11/8/2010
22
First, lets get the material data well need for the fatigue calculations.
Estimate an S-N curve using the method given in Shigley, and fit it to a straight line in log-log space. Then input the material data needed for fatigue calculations. Next, select the component element HEAD, and select all the nodes associated with it. Now, use *VGET to create a mask based on nodal selection status.
11/8/2010
23
What a mask? A mask is a column of 0s and 1s that can be used to control the execution of the first vector command that follows it. Notice how the mask generated with the *vget command controls the action of the *vfill command.
11/8/2010
24
11/8/2010
25
To create our plot, well use *vput to put our calculated damage into the database for plotting. Pick a result that you are not using in your report. Lets use sx, st, and sz.
For this to work: No Powergraphics (/graphics,full). Cant write over a derived result (e.g. s,eqv).
11/8/2010
26
Change the selection status to coincide with the mask specified by ParR
11/8/2010
27
At a glance, I can see every potential fatigue hot-spot everywhere on the entire assembly.
The head has a hot-spot in the fillet around the discharge port
11/8/2010
28
The real high damage on the stainless steel housing is due the a BC, (bonded contact on the housing-head interface), so I can ignore it if I want.
We specified an endurance limit for the steel mounting flange, and it was above Sf everywhere on the part. The macro sets N to 108 cycles, so at 100,00 cycles, the damage is 0.001.
11/8/2010
29