Mean Age of Air
Hi all,
I am a new member and may be asking an old, already answered question. If so I apologise. I notice that quite some time ago (~2007) Vincent enquired about determining mean age of air predictions with OpenFOAM but I could not find any response to that. It seems that relatively simple techniques exist to do this postprocessing with many commercial CFD software packages. My requirement is to use Mean Age of Air data to measure Air Change Effectiveness in buildings according to the ASHRAE 1291977 std. Your help will be appreciated! Thanks in advance, Francois 
I have almost the same problem, I want to output a custom variable "maa" (mean age air) to measure Air Change Effectiveness. I have the function from articles, i just want to see this variable on paraview. Should i create a new solver? I just need the velocity fields like scalarTransportFoam, so modifying this solver will be enough? If yes what file contains the function from scalarTransportFoam to modify?
thanks for the patience reading =) 
Hi,
as far as I remember, the mean age of air is a scalar with a density as a source term. scalarTransportFoam is a good choice. Just be aware it is written for incompressible flow with no density variation. You have to do few small changes to work with your solution which I assume is not isothermal. Other possibility would be to add your maa scalar to your solver of course. good luck matej 
1 Attachment(s)
I have attached a solver that can do this.
To get air change effectiveness, you'll have to do some postprocessing on the age field. (which could probably be moved into the solver). It can use an existing flow field, or solve it as part of the calculation. Also it's written to live with the main OF solvers, you may want to change Make/files to use FOAM_USER_APPBIN for standalone use. Feedback welcome. (Attribution appreciated as well  since that is what they measured by the powers that be) Regards, Andrew 
Thanks matejf and Andrew!
I will test the solver now and will post the results. Thanks for the attention, Guilherme 
uuuuuuuuuu

Hi andersking,
The solver worked and i got results close to the literature, thank you! But i have a question, the equation you are using to calculate the age is the same as the one from this article or is it another one? www.ibpsa.org/proceedings/BS2001/BS01_0773_780.pdf And another question (my lack of programming knowledge), the sentence in the scalar part of the code dimensionedScalar("ageSource", age.dimensions()*dimensionSet(0,0,1,0,0), 1) means what? I did a test changing to the value 1 and it gave the same result. Thanks for the help, Guilherme 
It is essentially the same as that equation. (Assuming a schmidt no of 1  this should probably be changeable though).
the Code:
dimensionedScalar("ageSource", age.dimensions()*dimensionSet(0,0,1,0,0), 1) Regards, Andrew 
Ok, now I understand. Im studying the code to be able to create my own solvers later on.
Thanks for everything, the Local Mean Age problem is solved. Guilherme 
Hello,
maybe, this is another option or addon: http://sourceforge.net/projects/openfoamaddons/ Fabian 
Quote:

hi to all,
there is a discussion in our office of the mean time of a fluid in two geometrys. So i just wanna analyse what mean time is bigger. Therefor I implemented a new scalar in my solver Code:
I read your repost for the last line but i do not understand it! Tobi 
Hi its me again,
my solver can`t handle the Code:
laplacian(nuEff(),age) Code:
laplacian(turbulent>mut()/sigmat,age) Can someone give me an advice? Tobi 
Well okay that`s wrong i think couse
Code:
nuEff = nu + nut Code:
nu = mu * rho Code:
laplacian(turbulence>mut()*rho+mu*rho,age) maybe its just "DnuTildaEff" ??? Tobi 
Quote:
If you are using a solver with density (which is likely if you have mu available), then you probably should be using turbulence>muEff(), which is the effective viscosity. also , nu = mu / rho. The source term of "1", grows with time, so for stagnant areas age = t, whereas for areas with "fresh" fluid inlet, age = 0 (which should be the boundary conditions on inlet). (you can normalise it versus t to get values from 0 to 1). Regards, Andrew 
Hi andrew,
thanks for your replay! Well is mu = dynamic viscosity, nu = kinematic viskosity, or? There was a problem in my head with the litrature. Okay. Now its clear. But I have problems in my calculations with the dimensions Code:
incompatible dimensions for operation Code:
fvScalarMatrix ageEqn 
Hi again,
I made a mistake :) Now I changed the code for the ddt() and the source... Code:
fvScalarMatrix ageEqn 
Hi again,
is there a way to validate the solved age time? I am not sure about my results. Using combustion and in the flame zone I have age values to 5 (like 5s) and that should be something like 0.3 sec ... did I do sth. wrong? 
2 Attachment(s)
Hi Tobias,
I got the same result. I compared the method that you used with a new solution to calculate the residence time with field sources (OF2.1). If anyone interested, I attached the solver and a pitzDaily demo. I have used it successfully before, but I tried to recompile it this morning and it failed ... Any ideas are appreciated! 
3 Attachment(s)
Hey Tibor,
I changed some lines in your solver and now it works again :) Is there a reason why you set DT  its zero or not ? Hmmm ... I ll try it with the simpleFoam again and compare it. At least a question. If I analyse a flow structure with a long inlet (time = 0) and get to a diffusor. How can I get the time which the fluid need to flow through the diffusor when the fluid needs 5 seconds to get to the diffusor!? Do you know what I mean? Tobi 
All times are GMT 4. The time now is 05:47. 