CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Monitoring the variance (https://www.cfd-online.com/Forums/cfx/141530-monitoring-variance.html)

hilde September 10, 2014 03:27

Monitoring the variance
 
Dear all,
I am simulating a mixing experiment where an additional variable (called A, dimensionless) is spreading in a reactor.

It would be very useful to be able to monitor the variance of A in the domain over time, do anyone know how this could be done?

I have found what I really think is the average, ave(A)@rotor, but every more or less creative attempt to modify this such as

ave((A)-ave(A)@rotor)@rotor

fails with the error message

The function 'ave' referenced in parameter 'Expression Value' in object '/FLOW:Flow Analysis 1/OUTPUT CONTROL/MONITOR OBJECTS/MONITOR POINT:Monitor Point 1' has an invalid argument, '(A)-ave(A)@rotor'. Only arguments that consist of a single recognised variable name are supported by the solver.

Has anyone any idea how this could be done? I am interested in the current variance/stv in the system and any way of monitoring this online during the simulation. (I know already how this can be done in post if saving up transient results of the distribution of A)

Thanks in advance and all input are most welcome!

ghorrocks September 10, 2014 06:06

First of all, the ave function simply does an arithmetic average over every node. There is no weighting for element size, density or anything else. You will probably find areaAve() is a more useful averaging function, or maybe massflowAve() if your flow is variable density.

Does your function work if you split it into two functions?
ave = areaAve(A)@rotor
var = areaAve(A-ave)@rotor

Make sure you enter the ave function first. CEL sometimes gets confused where one function depends on another, it tries to evaluate the second function first and complains about an undefined variable.


All times are GMT -4. The time now is 20:36.