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

Costume variable in CFX-Pre

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2020, 11:12
Default Costume variable in CFX-Pre
  #1
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 8
hand90 is on a distinguished road
Hi everyone,

I have come across a situation where I would like to monitor certain variables in a transient simulation (LES), which are not available for selection. For example I would like to monitor the "cumulative arithmetic mean of the product of pressure and temperature" (pT) and other products e.g. (uT), (vT), (wT),...

At first I thought that I could do something similar to CFD-Post, where an expression is defined, then a new variable is created based on that expression. However, I don't think this is possible or I have not figured out how to do this.

Does anyone know how I would be able to create a new variable, monitor the variable and finally have the variable available in CFD-Post?

Thank you in advance for your help.
hand90 is offline   Reply With Quote

Old   August 26, 2020, 13:02
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
The same process

- Insert an additional variable, say MyAddVar1
- Open the domain panel for which you want to compute that variable
- Select option = Algebraic Equation
- The expression for your additional variable

Additional Variable Value = Pressure * Temperature

Repeat for each of the combination you want to compute.

For the transient arithmetic average, you
- open Output Control
- select transient results/statistics (do not recall exactly)
- select the type of statistics you would like to compute
- list the variables you want the statistics of.

You should be able to visualize them in CFD-Post at the end of the simulation.

Hope it helps,
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   August 26, 2020, 14:03
Default
  #3
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 8
hand90 is on a distinguished road
Thank you very much Opaque. That is exactly what I was looking for. Didn't realise that the "Additional Variable" is thereafter defined in the domain panel.


Also you are correct in the way you have described the transient arithmetic average.
- Output control
- Trn Stats
- Output Variables List
- There you can select the newly created variable.

Many thanks
hand90 is offline   Reply With Quote

Old   August 27, 2020, 09:27
Default
  #4
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 8
hand90 is on a distinguished road
So the first part worked perfectly, creating new variables and then create transient statistics from them.

However, one of the problems still remains. How can I monitor the cumulative arithmetic average or even save the arithmetic average at different time steps?

I assume there is no way I can imbed the arithmetic average within the expression?
hand90 is offline   Reply With Quote

Old   August 27, 2020, 11:57
Default
  #5
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Try MyAddVar1.Trnave in an expression

If you want to monitor the time average at a few points only, there is no need to compute the transient statistics.

Just create a monitor point, and probe the variable of interest at the location of interest, and activate the transient statistics of the monitor point. Summary

Monitor Point/Expression

Expression value = probe(MyAddVar)@Location of interest

MONITOR STATISTICS/Option = Arithmetic Average
...

Or, just compute them in the ANSYS CFX Solver Manager. Summary:

Open the plot for your monitor points,
Go to the Derived Variable tab, insert a new definition
Select an option , say Arithmetic Average, fill the details
Press Apply

Multiple options, I am sure one of them should work for you.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   August 28, 2020, 04:35
Default
  #6
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 8
hand90 is on a distinguished road
Thanks again! Your solution works. I was not aware that I can use the transient statistics as operators in expressions. If anyone is looking for them, they are listed under "Statistics as Variable Operators" in ANSYS help.

One a side note for future reference, there is a little typo. Use "MyAddVar1.Trnavg" instead of "MyAddVar1.Trnave".

Also, I have used the second suggestion previously which works a treat if the values are only used on a monitor point.

Doing it just in the ANSYS CFX Solver Manager is also an option for everyone who is just looking for a moving arithmetic average. I haven't figured out yet how I could use a cumulative arithmetic average in the Solver Manager.

There is another option for outputting transient statistics at intermediate result. In the Transient Results tab select the Output Variable Operators check box and choose the "Full" option. However I have not used this yet and don't fully understand which variables will be output. Just found this option as I was working on the problem.


Thank you for your great assistance Opaque!
hand90 is offline   Reply With Quote

Reply

Tags
cfx-pre, variable


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX - Bingham Model with yield stess variable with temperature annagoco ANSYS 1 July 16, 2019 16:26
Accessing cell values (CFX Pre and CFX Post) brahmarishiraj CFX 14 June 24, 2014 19:12
Extracting a Geometry from CFX Pre eh14410 ANSYS 0 June 10, 2014 10:17
CFX 11.0 "Vector Variable Normal” Does not Rotate with Domain? User Surface Moving jrl4444 CFX 4 November 14, 2013 17:46
CFX Pre - TGrid Vivek Vasudevan CFX 2 March 20, 2007 06:31


All times are GMT -4. The time now is 02:12.