41
We Make Innovation Work www.padtinc.com Alternating Stress in ANSYS (Part 2: von Mises Stress)

Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Alternating Stress in ANSYS(Part 2: von Mises Stress)

Page 2: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Review

• In Part 1, we learned about a strange issue when resolving principal stress in an ANSYS harmonic response analysis.

• We also provided an example Workbench model (2020R1 version) with scripts to calculate principal stress in a way consistent with all other variables in a harmonic response analysis, namely:

• The response is a function of the maximum response, umax = A (amplitude) , and phase ϕ(umax 𝑒𝑒−𝑖𝑖(𝜔𝜔𝑡𝑡+𝜑𝜑))

• From section 15 of the MAPDL Theory Reference

Page 3: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Review

• We also provided scripts which, when run (by simply updating and refreshing the Workbench model we provided) produce a comma-delimited summary file listing shown below

• The file lists all the principal stress amplitudes and phases calculated according to the rules on slide 2

Page 4: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase expansion

• Before continuing, we’d like to pause a moment to discuss how one goes about verifying phase solutions like the ones listed in slide 3

• It is useful when reviewing results, to ‘expand’ one or more nodal results at a given phase. Given results like those of the previous slide, what we would do is list or plot results at the phase angle of the maximum principal stress. That is to say: we’d plot results (perhaps over the entire model) at the phase angle listed as that corresponding to the nodal maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL.

• In Workbench, one would do this by creating a new contour plot, and setting ‘Amplitude’ to ‘No’, and then specifying a ‘sweeping phase’ equal to -ϕ.

• To understand why the minus sign above, we look at how ANSYS produces such a plot. From the documentation (Mechanical Applications->Using Results->Frequency Response and Phase Response):

• You find the same equation if you look up the MAPDL equivalent hrcplx command...

Page 5: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase expansion

• Equation 2 is the one that peform the expansion. • The documentation tells us this is for displacements, but it’s the same for stress and strain

quantities as well• This equation should look familiar to users. To start, we’ll simplify it a bit and pretend we

don’t know where it came from

𝑢𝑢′ = 𝑥𝑥𝑥𝑥𝑥𝑥𝑥𝑥 𝛼𝛼 − 𝑦𝑦𝑥𝑥𝑦𝑦𝑦𝑦(𝛼𝛼)

• First, we’ll make the substitutions: u’=u(t), x=ureal, y=uimag, α=Ωt

(1)

• Next, we’ll explicitly substitute the expressions for x and y back in...

𝑥𝑥 = 𝑢𝑢 𝑥𝑥𝑥𝑥𝑥𝑥 𝜙𝜙y = 𝑢𝑢 𝑥𝑥𝑦𝑦𝑦𝑦 𝜙𝜙

Page 6: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase expansion

• This produces the following trigonometric expresssion:

𝑢𝑢′ = 𝑢𝑢 cos 𝜙𝜙 𝑥𝑥𝑥𝑥𝑥𝑥 𝛼𝛼 − 𝑢𝑢 sin 𝜙𝜙 𝑥𝑥𝑦𝑦𝑦𝑦(𝛼𝛼)

• Which can be simplified with an angle sum identitiy*:

*see, for example, https://en.wikipedia.org/wiki/List_of_trigonometric_identities

𝑢𝑢′ = 𝑢𝑢 𝑥𝑥𝑥𝑥𝑥𝑥(𝜙𝜙 + 𝛼𝛼)

(2)

(3)

• This function takes on extremal (±u) values at angles = nπ, where n is an integer• In particular, over a full cycle Ωt = 2π, the function takes on maximum values when

𝜙𝜙 + 𝛼𝛼 = 0𝜙𝜙 + 𝛼𝛼 = 𝜋𝜋

• or...:

𝛼𝛼 = −𝜙𝜙,𝜋𝜋 − 𝜙𝜙 (4)

Page 7: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase Expansion • This result becomes rather obvious once we stop pretending and note where the expression (1)

came from.• It is simply the real part (row 1 of the equation below) of a counter-clockwise rotation in the

complex plane!

𝑢𝑢′𝑣𝑣′

= cos(𝛼𝛼) −sin(𝛼𝛼)sin(𝛼𝛼) cos(𝛼𝛼)

𝑥𝑥𝑦𝑦

Re(z)

Im(z)

α

• So, if we have a complex number with argument α, equation (4) tells us that the real of part (x) is equal to amplitude when we rotate the complex number by an angle of -α

• We should note that this is because of the convention being used in (1)• This is a counter-clockwise rotation. If it were clockwise, the sign on α would

flip...

Page 8: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase Expansion • Let’s check this re-using the example model from Part 1.

• the maximum σ1 value is indeed at -47.222623 degrees...

...remember to flip the sign of the phase angle!

first load set is 727.86 Hz...

• ...result agrees within 3 decimal places...

Page 9: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Phase Expansion

• So, we now know precisely what we’re doing in ANSYS when we expand a result at a particular phase angle, θ: we’re simply calculating the real component of the result on a coordinate system rotated by an angle θ

• We also now know that if θ=-α, then u’ = A = umax=sqrt(Re(u)2 + Im(u)2)• However, we’ve only proven this for u’: the real part of a (rotated) complex number u• Looking back at equation 2 from the documentation, we see that u(t) is an entire nodal

vector (of some unspecified quantity) –not just a scalar quantity.• Suppose we want to find the amplitude and phase of a vector inner product, like σeqv or usum?• We’ll see in a moment that this poses certain subtle difficulties

• But we can overcome them all!

Page 10: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Complex vector quantities

• The quantities σeqv and usum can be expressed as vector dot products, but the vectors we’re dealing with in a harmonic response analysis are complex

• Let’s start by looking at usum in 3 spatial dimensions• The usual definition of usum is: 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠 = 𝐮𝐮 ⋅ 𝐮𝐮. But for complex u, we’ll use: 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠 =

𝐮𝐮 ⋅ 𝐮𝐮 *• The complex vectors, u, 𝐮𝐮 are given by:

*For the reason why, see: https://en.wikipedia.org/wiki/Dot_product#Complex_vectors

𝐮𝐮 = 𝑅𝑅𝑒𝑒 𝐮𝐮 + 𝑦𝑦 𝐮𝐮 = 𝑅𝑅𝑒𝑒𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

+ 𝑦𝑦 𝐼𝐼𝐼𝐼𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

𝐮𝐮 = 𝑅𝑅𝑒𝑒 𝐮𝐮 − 𝑦𝑦 𝐮𝐮 = 𝑅𝑅𝑒𝑒𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

− 𝑦𝑦 𝐼𝐼𝐼𝐼𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

• and... 𝑢𝑢𝒔𝒔𝒔𝒔𝒔𝒔 = 𝐮𝐮 ⋅ 𝐮𝐮 = 𝑅𝑅𝑒𝑒 𝐮𝐮 ⋅ 𝐮𝐮 + 𝐼𝐼𝐼𝐼(𝐮𝐮 ⋅ 𝐮𝐮)

Page 11: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Harmonic Response Analysis: Complex vector quantities

• What we’re after is a scalar complex representation of u that looks like this:

u= 𝑢𝑢 = 𝑅𝑅𝑒𝑒 𝑢𝑢 + 𝑦𝑦 𝐼𝐼𝐼𝐼 𝑢𝑢 = 𝑅𝑅𝑒𝑒 𝐮𝐮 ⋅ 𝐮𝐮 + 𝑦𝑦 𝐼𝐼𝐼𝐼(𝐮𝐮 ⋅ 𝐮𝐮)

...where the magnitude (amplitude) of this complex number is simply usum.

• The implication here is that we can then determine a total phase angle according to:

𝜃𝜃 = 𝑡𝑡𝑡𝑡𝑦𝑦−1𝐼𝐼𝐼𝐼(𝐮𝐮 𝐮𝐮)𝑅𝑅𝑒𝑒(𝐮𝐮 𝐮𝐮)

• If correct, this would give us an alternative way to express the complex vector, u:u = z = 𝐷𝐷 (𝑥𝑥𝑥𝑥𝑥𝑥 𝜃𝜃 + 𝑦𝑦(sin θ )

…whereD= 𝐮𝐮 ⋅ 𝐮𝐮

• The motivation for doing this is just so that we can find an effective amplitude and phase of vector sums like usum and σeqv.. In other words: We’d like to explore whether we can treat these quantities like complex scalars

• But, as we’ll see in a moment, this only works when all the components of u are in phase!• The more general case is a bit more nuanced...

Page 12: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• To clarify, let’s name the two different ways to express the complex displacement vector as u (the full representation with no assumptions) and z:

Harmonic Response Analysis: Complex vector quantities

𝐮𝐮 = 𝑅𝑅𝑒𝑒 𝐮𝐮 + 𝑦𝑦 𝐮𝐮 = 𝑅𝑅𝑒𝑒𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

+ 𝑦𝑦 𝐼𝐼𝐼𝐼𝑢𝑢𝑥𝑥𝑢𝑢𝑦𝑦𝑢𝑢𝑢𝑢

𝑢𝑢 = 𝐷𝐷(𝑥𝑥𝑥𝑥𝑥𝑥 𝜃𝜃 + 𝑦𝑦(sin θ )

D = 𝐮𝐮 ⋅ 𝐮𝐮

…where:

𝜃𝜃 = 𝑡𝑡𝑡𝑡𝑦𝑦−1𝐼𝐼𝐼𝐼(𝐮𝐮 𝐮𝐮)𝑅𝑅𝑒𝑒(𝐮𝐮 𝐮𝐮)

(5)

(6)

(7)

(8)

Page 13: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• The magnitudes |z| and |u| are the same• However, what we want to do next is show that, in general:

Re(|u|)≠Re(z)

Harmonic Response Analysis: Complex vector quantities

• …except when the phase of all components of u are equal. We’ll do this by looking at some specific examples of a 3-dimensional complex spatial vector (a complex 3-vector):

𝑢𝑢𝑥𝑥 = 𝐴𝐴 cos(𝜔𝜔𝑡𝑡 + 𝛼𝛼 + i sin(ω𝑡𝑡 + 𝛼𝛼))𝑢𝑢𝑦𝑦 = 𝐵𝐵 cos(𝜔𝜔𝑡𝑡 + 𝛽𝛽 + i sin(ω𝑡𝑡 + 𝛽𝛽))𝑢𝑢𝑧𝑧 = 𝐶𝐶 cos(𝜔𝜔𝑡𝑡 + 𝛾𝛾 + i sin(ω𝑡𝑡 + 𝛾𝛾))

• To fully appreciate what’s going on, we’ll track the real parts of ux, uy, uz• The constants A, B, and C, as well as α, β, and γ have real scalar values

Page 14: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• To begin, we’ll look at the special case when all phase components are equal: α=β=γ = 0

• The diagram below right is an orbit plot of Re(u)• The dark blue line traces the path of the vector

tip over time• This diagram reveals that when the phases of all

components are equal, Re(u) traces out the straight (blue) line:

Harmonic Response Analysis: Complex vector quantities

|Re(u)| = 𝐴𝐴2 + 𝐵𝐵2 + 𝐶𝐶2

• This behaves just like the real part of a complex scalar, taking min and max values at θ/2π = 0, ½,1 over a complete cycle

• Min and max (amplitude) values are equal to:

P = 𝐴𝐴,𝐵𝐵,𝐶𝐶

Re 𝐮𝐮 = 𝐏𝐏 cos θ ⊆ 𝐏𝐏 𝑡𝑡,−1 ≤ 𝑡𝑡 ≤ 1where

Page 15: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• However, when the components of u take on different phases (α≠β≠γ), something else happens. Below right is the orbit of u with phases α=π/4, β=π/2, γ=π

• Three important aspects of the new orbit are:• min and max values no longer occur at

θ/2π=0,1/2,1• The orbit is no longer confined to the straight

line P t• Min and max absolute values of the

resultant are <| u|• The components of u each take on their max real

values of A, B, and C at different angles (times). Over a complete period:• Max|Re(ux)| = -A,A at θ/2π = 3/8,78• Max|Re(uy)| = -B,B at θ/2π =1/4,3/4• Max|Re(uz)| = -C,C,-C at θ/2π =0,1/2,1

Harmonic Response Analysis: Complex vector quantities

Page 16: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Our orbit diagram easily verifies the predictions of the previous slide:

• Max|Re(ux)| = -A,A at θ/2π = 3/8,7/8

Harmonic Response Analysis: Complex vector quantities

Page 17: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Max|Re(uy)| =-B,B at θ/2π =1/4,3/4

Harmonic Response Analysis: Complex vector quantities

Page 18: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Max|Re(uz)| =-C,C,-C at θ/2π =0,1/2,1

Harmonic Response Analysis: Complex vector quantities

Page 19: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• So, we’re left with a problem. So far, it doesn’t look like we can express Re(u) (equation (5)) with an equivalent scalar (like equation (6)) for the general case when the phases of the components are unequal

• We don’t even know what the max value of Re(u) is!

• We will momentarily fix this, but for now, let’s just explore our third claim -- that when the component phases are unequal, max(u) < 𝐮𝐮 ⋅ 𝐮𝐮

• We’ll do this by depicting the projection Re(u) and 𝐮𝐮 ⋅ 𝐮𝐮 onto the coordinate planes

• On each coordinate plane, the projection of 𝐮𝐮 ⋅ 𝐮𝐮 is:• XY: 𝐮𝐮𝑥𝑥𝑦𝑦 = 𝐴𝐴2 + 𝐵𝐵2

• YZ: 𝐮𝐮𝑦𝑦𝑧𝑧 = 𝐵𝐵2 + 𝐶𝐶2• XZ: 𝐮𝐮𝑧𝑧𝑥𝑥 = 𝐴𝐴2 + 𝐶𝐶2

• These are drawn as green circles on each coordinate plane. Since the 3D image is cluttered, we’ll look at each plane individually….

Harmonic Response Analysis: Complex vector quantities

Page 20: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Again, the green circles are the projection of 𝐮𝐮 ⋅ 𝐮𝐮 onto each

coordinate plane, and the corresponding orbit projection in each view is clearly inside that

Harmonic Response Analysis: Complex vector quantities

Page 21: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• All this becomes even clearer if we look at a plot of the vector components and vector sums –both in complex plane, as well as the real components vs. angle

• This is shown at right. At left is the complex representation, and at right the real components vs. angle

• The vector components are shown at the bottom, while the sums are shown at the top

• We can see from this that the vector u only ever spans a portion of the complex plane when the components have different phases

• The total angle spanned by u never exceeds the red arc

Harmonic Response Analysis: Complex vector quantities

Page 22: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Contrast this with the situation when α=β=γ = 0

• u then spans 90 degrees of the complex plane

• Also, max(Re(|u|) = max(|z|) = 𝐮𝐮 ⋅ 𝐮𝐮

• However, note the difference (in the upper right figure) between plotting Re(|u|) and Re(z)

• To recap: When the vector component phases are equal (they don’t have to be zero), the real part of the vector sum behaves like a complex scalar

Harmonic Response Analysis: Complex vector quantities

Page 23: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• The situation may be summarized this way:• Tracking an ‘effective’ vector sum as a complex scalar in a manner like equation (6) produces the

wrong amplitude when the component phases are unequal• Tracking the actual vector sum (equation (5)), while retaining the correct amplitude, results in a

combined phase angle which, while helpful in understanding the reduced magnitude, doesn’t seem to help us understand when the maximum real value occurs.

• Importantly, unlike the case for scalar complex values, the maximum vector sum cannot be expected to reach a value equal to the vector norm when the component phases differ. Even if we track the actual vector sum, we still don’t know in general when the maximum real sum occurs.

• Thus, if we want to know the maximum values of a vector sum (the real part), we have to run through at least a quarter of a full period to see when the maximum occurs and what it’s value is (ANSYS refers to this in the documentation as a phase sweep)

• We can do better than this…!

Harmonic Response Analysis: Complex vector quantities

Page 24: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• All we really need is a way to calculate the angle when the maximum real value of a vector sum occurs*

• This can be done by calculating the angle(s) θ such that dumax/dθ=0. Doing so results in the following:

*As a challenge for readers: try finding a formula for this online. Look for “maximum real part of complex vector sum” or something similar. The only discussions of this kind I’ve found are related to the polarization of light –which is mathematically identical to what we’re doing. In that context, however, the maximum amplitude of the real part seems to be of no practical interest

θ = ± cos−1 − 𝐹𝐹+ 𝐷𝐷+𝐸𝐸+𝐺𝐺2 𝐷𝐷+𝐸𝐸+𝐺𝐺

(9)

where:

𝑢𝑢𝑠𝑠𝑚𝑚𝑥𝑥 = 𝑅𝑅𝑒𝑒(𝐮𝐮) = Max 𝐴𝐴 cos(𝜃𝜃 + 𝛼𝛼 2 + 𝐵𝐵 cos(𝜃𝜃 + 𝛽𝛽 2 + 𝐶𝐶 cos(𝜃𝜃 + 𝛾𝛾 2 (10)

and:D= 2𝐴𝐴2 𝐵𝐵2 cos(2(𝛼𝛼 − 𝛽𝛽 ) + 𝐶𝐶2 cos(2 𝛼𝛼 − 𝛾𝛾 ))E= 2𝐵𝐵2𝐶𝐶2 cos(2 𝛽𝛽 − 𝛾𝛾 ))F= 𝐴𝐴2 cos(2𝛼𝛼) + 𝐵𝐵2 cos(2𝛽𝛽) + 𝐶𝐶2 cos(2𝛾𝛾)𝐺𝐺 = 𝐴𝐴4 + 𝐵𝐵4 + 𝐶𝐶4

Harmonic Response Analysis: Complex vector quantities

Page 25: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Thus, if we let the maximum possible value of umax = 𝐮𝐮 ⋅ 𝐮𝐮 = 𝐴𝐴2 + 𝐵𝐵2 + 𝐶𝐶2 = Λ , and estimate thevalues of max(Re(|u|) that result from various combinations of α, β,𝑡𝑡𝑦𝑦𝑎𝑎 γ, we find:

• When α=β=γ, max(Re(|u|)= Λ, as expected• But when α≠β≠γ, max(Re(|u|) < Λ, verifying what we saw graphically. For example, when α=π/4,

β=π/2, γ=π, max(Re(|u|) =0.796 Λ• For readers’ convenience, we offer a spreadsheet called “max_vector_sum.xlsx” which allows one to

input any combination of A,B,C,α,β, and γ to more easily see these relationships

Harmonic Response Analysis: Complex vector quantities

Page 26: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

max_vector_sum: example usage

• Input vector component amplitudes in cells b2: b4 (circled blue)• Input vector component phases in cels c9:c11 (circled green. Units in radians)• Select whether to use user-supplied angles in column c or randomly generated angles in column b by

typing ‘yes’ or ‘no’ in cell B6 (without the apostrophes)

Harmonic Response Analysis: Complex vector quantities

Page 27: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• In this example, the spreadsheets calculates and graphs the vector magnitude for A=0.7, B=1.0, C=1.3, α=π/4, β=π/2, γ=π

max_vector_sum: example usage

Harmonic Response Analysis: Complex vector quantities

Page 28: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Now we know how to calculate the maximum real part of a vector a sum. The von Mises stress may be treated just like any other 3-vector if we adopt the following convention. We’ll introduce the stress vector τ:

• The von Mises stress may be expressed as a norm of τ

But What About von Mises Stress?

𝝉𝝉 =𝜏𝜏1𝜏𝜏2𝜏𝜏3

=𝜎𝜎1 − 𝜎𝜎2𝜎𝜎2 − 𝜎𝜎3𝜎𝜎1 − 𝜎𝜎3

σvm = 𝝉𝝉⋅𝛕𝛕𝟐𝟐

• Calculating the maximum real part of this quantity is thus indistinguishable from the operation we’ve already been performing

Harmonic Response Analysis: Complex vector quantities

Page 29: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

ANSYS examples:• In all the verification examples that follow, we want to use the

“Harmonic_Test_Case” Workbench archive provided with this blog post• This is a simple harmonic response analysis with the following boundary

condtions

• Loading consists of applied x,y, and z displacements at phases shown below over a range from 700 – 1000 Hz

𝑢𝑢𝑥𝑥 = 0.254𝑒𝑒𝑖𝑖(𝜔𝜔𝑡𝑡+𝜋𝜋4)

𝑢𝑢𝑦𝑦 = 0.254𝑒𝑒𝑖𝑖(𝜔𝜔𝑡𝑡+𝜋𝜋2)

𝑢𝑢𝑧𝑧 = 0.254𝑒𝑒𝑖𝑖(𝜔𝜔𝑡𝑡+𝜋𝜋)

Harmonic Response Analysis: Complex vector quantities

Page 30: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

ANSYS examples: Total Displacement

• As another convenience, we also provide MAPDL macros for performing the calculations (9) and (10) for finding the maximum real part of the vector sum (some of the macros below are re-used from Part 1 of this post). The macros are follows:• mk_vm: (new) macro for calculating maximum von Mises stress according to equations (6) and (7). Requires

that the user first execute mk_ps.• mk_vm2: (new) macro for calculating the maximum real part of the vector sum according to equations (9)

and (10). If von Mises stress is used as the ‘vector’, then mk_ps must first be called to provide the principal stress components. If displacement components are required, then the user must first call mk_uvect.

• mk_uvect: (new) macro for extracting real/complex displacement components.• mk_ps.mac: (from Part 1) macro for sorting the principal stresses real and imaginary values such that the

total complex amplitudes |s1|>|s2|>|s3|. The sorted complex values are stored in the nx6 array “cps”. The amplitude/phase counterpart of this array is called “aps”. In addition to the sorting, this macro also calculates the maximum s1, s2, and s3 amplitudes for the currently active node set

• mk_ampcalc.mac: (from Part 1) auxiliary macro for calculating amplitude/phase from a complex results

Harmonic Response Analysis: Complex vector quantities

Page 31: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• We’ll start by verifying equations (9) and(10) for the displacement vector• We can do this with the “Harmonic_Test_Case” workbench archive (version 2020R1)• Begin by launching MAPDL from the Project Schematic as was demonstrated in Part 1 (instructions

provided again below)

ANSYS examples: Total Displacement

• Cut and paste the following lines into the command window to prep the environment:

fini !exit current processor/psearch,_wb_userfiles_dir(1) !search user files folder for macros/post1 !switch processor to general post-processor/graphics,full !use full graphics rendering

• Now invoke the mk_uvect.mac (displacements) macro by issuing the following in the command, followed by the mk_vm2 macro to calculate the vector sum

mk_uvect,2 ! invoke mk_uvect macro for the second substep (frequency) on the results file)Mk_vm,12 ! Invoke mk_mv2 macro for displacement vector sum

Harmonic Response Analysis: Complex vector quantities

Page 32: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Now visualize these results by mapping them onto the model by use of the *vput command (these plots should be compared to the “Maximum over Phase” plots in Workbench)

• Since Ansys does not store the displacement sum in the database (it is calculated “on the fly”), we have to pick a quantity which is stored to temporarily hold our results. We’ll pick x-component displacement (ux)

• To recap what we’re doing here: We’ve calculated the maximum real part of the displacement vector sum according to equations (9) and (10) and are plotting them as ‘ux’ by mapping these results on that quantity and plotting it

• At the right, we’re just plotting the total amplitude

ANSYS examples: Total Displacement

*vput,tvm(1),node,1,u,xplnsol,u,x

max value = 4.01

set,1,2,,amplplnsol,u,sum

max value = 4.41

Harmonic Response Analysis: Complex vector quantities

Page 33: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• The macro stores the node index and the following variables for maximum nodal result:

ANSYS examples: Total Displacement

• These are precisely the quantities that we the provided spreadsheet needs as input

Harmonic Response Analysis: Complex vector quantities

Page 34: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• The results match nicely (up to some roundoff error)!

Maximum real part…

Total sum amplitude…

ANSYS examples: Total Displacement

Harmonic Response Analysis: Complex vector quantities

Page 35: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

ANSYS examples: Total Displacement

• As a final check, we compare these calculations against the max over phase (resolution of 1°) and amplitude plots in Workbench

• We get very good agreement for this case

Maximum over phase Max value = 4.05878 Amplitude Max value = 4.4079

Harmonic Response Analysis: Complex vector quantities

Page 36: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• Using the same model to explore the maximum von Mises stress results in the images below• This time, we can store the von Mises in its’ appropriate variable location on the results file • At the left, is the maximum real part. At the right, the total amplitude

ANSYS examples: von Mises Stress

*vput,tvm(1),node,1,s,eqvplnsol,s,eqvMax value = 704.752

set,1,2,,amplplnsol,s,eqvMax value = 704.713

Harmonic Response Analysis: Complex vector quantities

Page 37: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• When comparing the maximum real part of the von Mises stress to the total amplitude, we notice a curious phenomenon

• The two values are nearly identical –in spite of our pains to make the load components out of phase!• We want to check to see that this identity holds in the spreadsheet calculation as well• Once again, extracting the spreadsheet input from the macro…:

ANSYS examples: von Mises Stress

Harmonic Response Analysis: Complex vector quantities

Page 38: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• And we see that the near identity we observed earlier does indeed hold• In fact, this curve is very close to the curve we’d get if all component phases we equal at 15°

ANSYS examples: von Mises Stress

• As a side note, we should mention that, while adding or subtracting an angle of pi radians shifts a cosine or sine curve, it DOES NOT SHIFT vector sum components (has no effect on cosine or sine squared as can be proven with a double-angle identity)

Maximum real part…

Total sum amplitude…

Harmonic Response Analysis: Complex vector quantities

Page 39: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

ANSYS examples: von Mises Stress

• Repeating the final check (as with the displacement case) in Workbench • The agreement is not quite as good as for the displacement case, but still suggests the

same pattern

Maximum over phase Max value = 701.12 Amplitude Max value = 704.75

Harmonic Response Analysis: Complex vector quantities

Page 40: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

• We should pause to consider more carefully the pattern we’re seeing with the von maximum real part of the von Mises stress

• While obeying equations (9) and (10), and agreeing well with ANSYS’ maximum-over-phase results, this quantity seems to behave more like a complex scalar (see slides 14 and 2) instead of a vector

• We saw for the case studied here, the stress vector behaves as if all components act at a phase angle of 15°

• Except for certain pathological cases*, this will always be the case for principal stress and von Mises stress (though not the components themselves)

• This has to do with the dilation/rotation property of eigenvalues and eigenvectors (for more, see here: https://textbooks.math.gatech.edu/ila/complex-eigenvalues.html )

*for example: states of pure hydrostatic stress

Harmonic Response Analysis: Complex vector quantities

Page 41: Alternating Stress in ANSYS (Part 2: von Mises Stress)...maximum principal stress result. This can be done both in ANSYS Workbench and MAPDL. • In Workbench, one would do this by

We Make Innovation Workwww.padtinc.com

Conclusions

• This article sought to shed light on how ANSYS (and other FE codes) treat oscillating complex vector quantities in a harmonic response analysis

• ANSYS uses a numerical procedure they refer to as a phase sweep to determine the maximum real parts of such quantities

• We wanted instead to offer users an EXACT expression (equations (9) and (10) of slide 24) for finding such quantities in general

• To this end, we provide users with both a spreadsheet solution, as well as a generic MAPDL macro (mk_vm2.mac) for doing this