CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Mean Age of Air

Register Blogs Community New Posts Updated Threads Search

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 14, 2009, 15:15
Default Mean Age of Air
  #1
New Member
 
Francois M Joubert
Join Date: Sep 2009
Posts: 1
Rep Power: 0
Greenplan is on a distinguished road
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 post-processing 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 129-1977 std.

Your help will be appreciated!

Thanks in advance,

Francois
yangui likes this.
Greenplan is offline   Reply With Quote

Old   March 15, 2010, 09:42
Default
  #2
Member
 
Join Date: Mar 2010
Posts: 42
Rep Power: 16
lindner is on a distinguished road
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 =)
lindner is offline   Reply With Quote

Old   March 16, 2010, 06:00
Default
  #3
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
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
matejfor is offline   Reply With Quote

Old   March 18, 2010, 23:56
Default
  #4
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
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 stand-alone use.

Feedback welcome. (Attribution appreciated as well - since that is what they measured by the powers that be)

Regards,
Andrew
Attached Files
File Type: gz ageingScalarTransportFoam.tar.gz (2.3 KB, 479 views)
fumiya, Tobi, linker and 5 others like this.
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   March 19, 2010, 04:24
Default
  #5
Member
 
Join Date: Mar 2010
Posts: 42
Rep Power: 16
lindner is on a distinguished road
Thanks matejf and Andrew!
I will test the solver now and will post the results.

Thanks for the attention,
Guilherme
lindner is offline   Reply With Quote

Old   March 22, 2010, 08:17
Default
  #6
Member
 
Join Date: Mar 2010
Posts: 42
Rep Power: 16
lindner is on a distinguished road
uuuuuuuuuu

Last edited by lindner; March 22, 2010 at 08:20. Reason: delete
lindner is offline   Reply With Quote

Old   March 22, 2010, 08:18
Default
  #7
Member
 
Join Date: Mar 2010
Posts: 42
Rep Power: 16
lindner is on a distinguished road
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
lindner is offline   Reply With Quote

Old   March 22, 2010, 21:30
Default
  #8
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
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)
term just implements a source term of "1", which is essentially the same as the density in this case. The rest just sets the dimensions to match (ie [unit] per second - since it's a source).

Regards,
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   March 23, 2010, 04:26
Default
  #9
Member
 
Join Date: Mar 2010
Posts: 42
Rep Power: 16
lindner is on a distinguished road
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
lindner is offline   Reply With Quote

Old   March 23, 2010, 14:09
Default
  #10
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hello,

maybe, this is another option or add-on:
http://sourceforge.net/projects/openfoamadd-ons/

Fabian
braennstroem is offline   Reply With Quote

Old   November 30, 2011, 14:55
Default
  #11
New Member
 
Ramy hamdy
Join Date: May 2011
Posts: 5
Rep Power: 15
Ramyhamdy is on a distinguished road
Quote:
Originally Posted by andersking View Post
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 stand-alone use.

Feedback welcome. (Attribution appreciated as well - since that is what they measured by the powers that be)

Regards,
Andrew
Hello, I can not download the file of mean age of air and I want to know the source term of its equation.
Ramyhamdy is offline   Reply With Quote

Old   May 14, 2012, 14:19
Unhappy
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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:
solve
(
             fvm::ddt(S)
   + fvm::div(phi, S)
       -  laplacian(nuEff, S)
)
So ... where is the differences to your suggestion?
I read your repost for the last line but i do not understand it!

Tobi
Tobi is offline   Reply With Quote

Old   June 26, 2012, 06:40
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi its me again,


my solver can`t handle the

Code:
laplacian(nuEff(),age)
so I want to change it so
Code:
laplacian(turbulent->mut()/sigmat,age)
but I do not know if that is correct and I ll get the right solutions.
Can someone give me an advice?

Tobi
Tobi is offline   Reply With Quote

Old   July 2, 2012, 09:41
Default
  #14
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Well okay that`s wrong i think couse

Code:
nuEff = nu + nut
and
Code:
nu = mu * rho
So the code should be like
Code:
laplacian(turbulence->mut()*rho+mu*rho,age)
Can someone give me a short feedback?

maybe its just "DnuTildaEff" ???
Tobi
Tobi is offline   Reply With Quote

Old   July 2, 2012, 10:13
Default
  #15
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Well okay that`s wrong i think couse

Code:
nuEff = nu + nut
and
Code:
nu = mu * rho
So the code should be like
Code:
laplacian(turbulence->mut()*rho+mu*rho,age)
Can someone give me a short feedback?

maybe its just "DnuTildaEff" ???
Tobi

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
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   July 3, 2012, 05:22
Default
  #16
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
    [age[0 0 -2 0 0 0 0] ] + [age[1 -3 -2 0 0 0 0] ]
my code is (rhoSimpleFoam)

Code:
        fvScalarMatrix ageEqn
        (
            fvm::ddt(age)
          + fvm::div(phi, age)
          - fvm::laplacian(turbulence->muEff(), age)
          ==
            dimensionedScalar("ageSource", age.dimensions()*dimensionSet(0,0,-1,0,0), 1)
        );
I am looking for the error now.
Tobi is offline   Reply With Quote

Old   July 3, 2012, 05:36
Default
  #17
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi again,

I made a mistake
Now I changed the code for the ddt() and the source...

Code:
      fvScalarMatrix ageEqn
        (
            fvm::ddt(rho, age)
          + fvm::div(phi, age)
          - fvm::laplacian(turbulence->muEff(), age)
          ==
            dimensionedScalar("ageSource", age.dimensions()*dimensionSet(1,-3,-1,0,0), 1)
        );
Is that correct?
Tobi is offline   Reply With Quote

Old   July 19, 2012, 04:40
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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?
Tobi is offline   Reply With Quote

Old   July 20, 2012, 12:14
Default
  #19
Member
 
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17
Toorop is on a distinguished road
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!
Attached Files
File Type: gz ageScalarFoam.tar.gz (2.5 KB, 112 views)
File Type: gz pitzDailyPimpleAge.tar.gz (3.5 KB, 78 views)
Toorop is offline   Reply With Quote

Old   July 20, 2012, 16:25
Default
  #20
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Attached Images
File Type: jpg Time.jpg (13.3 KB, 205 views)
Attached Files
File Type: gz ageScalarFoam.tar.gz (2.5 KB, 158 views)
File Type: gz pitzDailyPimpleAge.tar.gz (33.4 KB, 113 views)
Tobi is offline   Reply With Quote

Reply


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
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 08:59
local age of air in starccm+ Mike23 Siemens 3 September 20, 2008 12:16
[Indoor Air Quality]How do I calcauate "Age of Air Young CFX 6 April 29, 2008 00:14
age of air teddy Siemens 3 February 9, 2007 10:41
Age of Air In Star-CD Ted Crilly Siemens 1 February 19, 2005 20:50


All times are GMT -4. The time now is 06:43.