CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Calculating principle stresses (Difficult)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 4, 2007, 20:14
Default Calculating principle stresses (Difficult)
  #1
Joe
Guest
 
Posts: n/a
I would like to calculate the principle normal and shear stresses for the effective stress tensor. Calculating the components of this tensor is trivial.

However, in order to calculate the principle stresses you need to solve a cubic equation. While exact analytical solutions for cubic equations are available they all seem (AFAIK) to require imaginary numbers even if the final roots are strictly real (as in my case). This is a problem as CFX Post does not support imaginary numbers. The other option is to find the roots numerically. However, this cannot (AFAIK) be implemented in an expression for a CFX Post variable.

Ergo, Im stuck ...

Any suggestions? I could extract the tensor field from CFX Post and do the calcs in a third party app but that would break the optimisation loop I need CFX Post to function in.

Suggestions?
  Reply With Quote

Old   March 5, 2007, 06:21
Default Re: Calculating principle stresses (Difficult)
  #2
Johnson
Guest
 
Posts: n/a
Joe,

you could write a perl subroutine that performs this task, and call it from within a Post session file, or even a macro. There should be examples of how to do this using 'power syntax' in the Post documentation.

Regards,

Johnson
  Reply With Quote

Old   March 5, 2007, 07:06
Default Re: Calculating principle stresses (Difficult)
  #3
Joe
Guest
 
Posts: n/a
I thought of that but I need to calculate the principle stresses for the entire domain. You cant incorporate perl expressions into Posts expression definitions AFAIK.
  Reply With Quote

Old   March 5, 2007, 07:41
Default Re: Calculating principle stresses (Difficult)
  #4
Joe
Guest
 
Posts: n/a
To elaborate, as I understand it, expressions used to define new variables in CFX post (e.g. varNew = Velocity u + Velocity v)are executed in a vector manner. Or is the expression provided executed with a separate function call for each point in the domain sequentially?

If the second case applies then I would be in business ...
  Reply With Quote

Old   March 5, 2007, 10:40
Default Re: Calculating principle stresses (Difficult)
  #5
Joe
Guest
 
Posts: n/a
Found a solution. If you can calculate one root without imaginary numbers (which is always possible) you can calculate the other two roots by solving a quadratic equation without the use of imaginary numbers.
  Reply With Quote

Old   March 7, 2007, 12:55
Default Re: Calculating principle stresses (Difficult)
  #6
KBanks
Guest
 
Posts: n/a
If you ever do need to use Perl in CFX Post as part of an optimisation loop, you can! I know, because I do it. You can run a User Defined macro which allows the inclusion of Perl. This macro can be called from a session file and hence can be run in batch mode with no user intervention. I haven't used imaginary numbers (because what I'm doing doesn't need it), but I see no reason why you couldn't.
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems in calculating the fluid traction on the current structure frame in 3D models fw407 OpenFOAM Running, Solving & CFD 0 August 6, 2008 12:04
Scaling the Reynolds stresses via UDF Markus FLUENT 0 January 23, 2008 06:49
Reynolds stresses without velocity correlations? Phil Main CFD Forum 1 October 2, 2006 04:29
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27
Calculating Sub-grid Stresses Craig Johansen CFX 0 November 15, 2004 08:54


All times are GMT -4. The time now is 10:22.