|
[Sponsors] |
July 9, 2023, 18:32 |
time averaged age of air
|
#1 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 416
Rep Power: 15 |
https://www.computationalfluiddynami...-air-with-cfd/ has instructions for age of air calculation as UDF for Fluent.
Looks like there is a mistake in screenshot, the age of air VALUE (not FLUX) at the inlet boundary is zero. In the text it is correct. Looks like it suggests calculating the flow first, without Equation 0; then separately switching off Flow equations and calculating only Equation 0. Not clear what is the reason for this. Would be great to have a clarification if you can see the reason please. If unsteady calculation is required, then firstly the flow calculations can be time averaged; however, once the flow equations are switched off, the Equation 0 calculation is only for the latest instantaneous field. Is there a way to calculate time-averaged Scalar 0 (Age of air) without writing a script that'll calculate 10 secs of flow-only, 10 secs of equation0-only, etc many times until time averaged result is calculated for both? Many thanks. |
|
July 9, 2023, 20:17 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,763
Rep Power: 66 |
The value at the inlet should be set to 0 to have 0 time at an inlet.
It is a "passive" scalar that should only be calculated after the flow has already converged. To save computational cost, you would therefore solve flow with equation 0 off and then turn off flow and solve only equation 0. You can solve both, you just waste $. For unsteady and then time-averaged calculations where you want to solve using the mean field, you patch the instantaneous field using the values from the mean field. For time-accurate unsteady calculations, you should solve for the scalar every timestep. Here, for laziness reasons, people will not use a script that turns flow off and scalars 0 and then turn it on again off again every timestep. In principle it should be done, it's just more effort. |
|
July 9, 2023, 20:38 |
|
#3 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 416
Rep Power: 15 |
Hi, thank you for your clarifications.
> For time-accurate unsteady calculations, you should solve for the scalar every timestep. The mean age of air being a separate variable, i.e. it does not affect flow, would this solving for scalar at every time step offer any advantage over solving for the flow only, time averaging the flow variables, and then patching these mean variables onto instantaneous field, and subsequently solving for the Scalar-0? Thanks |
|
July 9, 2023, 20:52 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,763
Rep Power: 66 |
If you have a steady flow then by all means, take the time average of the flow and set the instantaneous to the mean.
A time-accurate residence time is when you have a transient process for example, such as with non-constant BCs for the flowrate. Clearly, you cannot simply take the time average of the flow in this case. This is when you would need to solve the residence time at every timestep. |
|
Tags |
age of air, time averaging, udf code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Slow calculation time on CFD server | killian153 | Hardware | 4 | July 27, 2021 08:28 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
laplacianFoam with source term | Herwig | OpenFOAM Running, Solving & CFD | 17 | November 19, 2019 14:47 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |