CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Pollutant dispersion in the environment

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 11, 2005, 11:33
Default Hello, I would like to model
  #1
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
I would like to model the dispersion of pollutants (non-reacting) in the environment (air).

The air flow is described as a turbulent ideal gas. Species transport is described with the usual set of y equations. Species properties should be user-defined.

I'm not familiar with the species transport model in OpenFOAM.
I had a look to dieselFoam, but I have some doubt on how to manage species in OpenFOAM.
Is there some example where this is shown?

Thank you for your attention.
Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   June 11, 2005, 11:59
Default Take a look at scalarTransport
  #2
OpenFOAM discussion board administrator
Guest
 
Posts: n/a
Take a look at scalarTransportFoam which shows the implementation of a simple passive scalar in a fixed flow field. However probably the best example is the ft equation in the combustion codes (XiFoam, engineFoam), take a look at ftEqn.H which is a simple transport equation for a passive scalar (ft) in the turbulent flow-field.
  Reply With Quote

Old   June 11, 2005, 21:12
Default Thank you for your answer. My
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Thank you for your answer.
My problem is not with the transport equation, but with the managment of a mixture of more than two components.

If I'm not wrong, I found something similar to what i need in the YEqn.H of dieselEngineFoam and in reactingFoam, where a set of Yi equation is solved.

What I don't understand is how species are defined and how their properties (for example, laminar diffusivity, which doesn't seem to be anywhere ) are passed to the solver.

dieselFoam reads from a CHEMKIN file, but can species be defined without using it? If so, how?

If I didn't misunderstand, in dieselEngineFoam, and similarly in XiFoam, the following lines should do the job reading from the thermophysicalProperties dictionary:

Info<< nl << "Reading thermophysicalProperties" << endl;
autoPtr<hcombustionthermo> thermo
(
hCombustionThermo::New(mesh)
);

combustionMixture& composition = thermo->composition();
ptrList<volscalarfield>& Y = composition.Y();

word inertSpecie(thermo->lookup("inertSpecie"));

But in that dictionary there are the definitions of the fuel, oxidant, ... with parameters which are not required in my case.

I just have one or more non-reacting species, and I need to set the basic transport properties (laminar diffusion included).

Is there a way to manage it, or is it something to be implemented?

Best regards,
Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   June 12, 2005, 04:33
Default Hi, in diesel(Engine)Foam t
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 692
Rep Power: 18
niklas will become famous soon enough
Hi,

in diesel(Engine)Foam the Schmidt number is assumed to be 1, i.e mass-diffusion equals the momentum diffusion. Hence, its not necessary to define the diffusion for the species.

Since laminar diffusion is much smaller than the turbulent diffusion this is acceptable for these codes. So if you want to specify your own laminar diffusion you have to so yourself.
You're solving for a turbulent flow, so i would say that the Sc=1 assumption holds pretty well for you also, but if you want to have something else you could add the division of user defined Sc-number for each specie.

The chemkin file specifies the NASA polynomial coefficients for the species, have a look at for instance this page http://diesel.me.berkeley.edu/~gri_m...nasa_plnm.html
, if you want to know more about what they do.
They are only necessary for calculating the temperature from the enthalpy and if you have a non-reacting environment with a constant temperature you dont need to define this.

Then you could just skip the thermo-stuff and define the Yi's yourself as a ptrList<volscalarfield>.

N
niklas is offline   Reply With Quote

Old   June 12, 2005, 08:32
Default Thank you Niklas. The assum
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Thank you Niklas.

The assumption of using only the turbulent diffusion is OK in my case in an open environment, where the wind plays the biggest role. I don't think so in a closed one.

Temperature is not necessarily constant, expecially in the case of pollutants released as a consequence of accident, so I need to solve the energy equation. Usually gases are supposed to be ideal however.

Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   June 23, 2005, 13:47
Default Alberto, I think you and I ar
  #6
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 7
segersson is on a distinguished road
Alberto,
I think you and I are trying to solve similar problems. However, I'm still trying to get the wind field right and haven't included dispersion of species (I will as soon as I'm satisfied with the wind field simulations). It would be interesting to hear of your exepriences when your ready.

Regards
David
segersson is offline   Reply With Quote

Old   June 23, 2005, 16:49
Default Sure David. I didn't implem
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Sure David.

I didn't implement the wind profile. However there are two threads on inlet profiles here:

http://www.cfd-online.com/OpenFOAM_D...ages/1/42.html

http://www.cfd-online.com/OpenFOAM_D...ages/1/63.html

I will move them to the wiki (The links to the code in these threads are not active, please, can someone send the snipplet so I can add them to the wiki? Feel free to use my email alberto.passalacqua@tin.it ).

The species transport equation are quickly implemented, expecially if you neglect the laminar diffusion (It seems your case). All this is still done in dieselFoam and reactingFoam.

I had to add the laminar diffusion for a particular application, but it was easy because I was considering a single pollutant in the air.
I have some time in these days, I will work a bit on the wiki and I could clean the code. Feel free to e-mail me.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   July 7, 2005, 17:36
Default Thank you Alberto! You have d
  #8
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 7
segersson is on a distinguished road
Thank you Alberto!
You have definitely saved me some work. I'll try to follow your example as soon as I'm redy with the wind simulations.

I'm trying to introduce vegetation in my wind simulations (as a drag term in the momentum equation). I've done it before using Fluent, so I'm quite sure it will work out fine. The trickiest part seems to the initialization of the vegetation data field..
If you are interested I'll send you the code when I'm ready.
Regards
David
segersson is offline   Reply With Quote

Old   July 7, 2005, 17:56
Default Yes it would be very useful to
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Yes it would be very useful to see the code and to put it on the wiki.

For initialization, there is an example of patching utility in the manual, where the dam break is presented.

I plan to add multiple species diffusion as soon as I have some time. However, if you need the code, I can send it to you.

Regards,
Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 2, 2005, 21:24
Default Hello, I'm trying to add mult
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
I'm trying to add multiple species to the solver but I have some doubt on the usage of the ptrList.

I defined a ptrList of volScalarField and I called it Y. How can I set the MUST_READ and the AUTO_WRITE options for the whole list of fields?

Also, I have to read a list of diffusivities from a dictionary, and store it in a vector of scalars.
I was thinking to define a prtList<dimensionedscalar> Dl and to fill it by reading from the dictionary, but I'm not sure how I can do it. Is something like

ptrList<dimensionedscalar> Dl
(
speciesProperties.lookup("Dl");
);

possibile?

Thanks in advance for your answer,
Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 3, 2005, 03:11
Default Hi, Have a look in OpenFOA
  #11
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 692
Rep Power: 18
niklas will become famous soon enough
Hi,
Have a look in
OpenFOAM/OpenFOAM-1.2/src/thermophysicalModels/combustion/mixtureThermos/mixture s/combustionMixture/combustionMixture.C

There we define a default-field, which is used to set every specie that is not defined.
Typically we just want to set N2, O2 and use the default-setting for the rest.

N
niklas is offline   Reply With Quote

Old   August 3, 2005, 22:06
Default Thank you Niklas. Defining
  #12
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Thank you Niklas.

Defining a speciesTable, I can store the names of the species (I don't actually need this, but it makes the solver more user-friendly and the results easier to be read) and use its size to set the species ptrList size and set the Yi fields and their options.

Now, the speciesTable constructor requires a wordList as argument, containing the species names. I tried to read it from the speciesProperties dictionary using:

wordList speciesNames
(
speciesProperties.lookup("speciesNames");
);

but the solver doesn't compile giving errors.

Is there any way to read a list from a dictionary in OpenFOAM?

P.S. Hehe OpenFOAM/OpenFOAM-1.2/src/... ;-)
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 4, 2005, 04:28
Default Hey, If you get a compiler
  #13
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 692
Rep Power: 18
niklas will become famous soon enough
Hey,

If you get a compiler error it would be useful to see it, however, the semi-colon after speciesProperties should be removed if you have copy/pasted your code.

also you dont need a ptrList for the diffusivities,
a simple List<...> should work, i'm not sure if the ptrList will work.

N
niklas is offline   Reply With Quote

Old   August 4, 2005, 13:49
Default Sorry. It's a typo again. The
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Sorry. It's a typo again.
The actual code is:

List<dimensionedscalar> Dl
(
speciesProperties.lookup("Dl")
); //This is line 58 in createFields.H

but the error is the same.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 4, 2005, 14:07
Default List of anything requires the
  #15
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
List of anything requires the anything to have a null constructor (which dimensionedScalar does not have)

Use ptrList in combination with hook(...) to create an indexable list. There should be some examples already posted.
mattijs is offline   Reply With Quote

Old   August 4, 2005, 15:19
Default OK. But hook() just adds an el
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
OK. But hook() just adds an element at a time to the ptrList.

What I'd like to do is to let the user set the number of species, their name and then insert the diffusivities.
The speciesTable manages the names of the species, and I was thinking to store the ordered list of diffusivities in a list like

Dl
(
Dl_0
Dl_1
Dl_2
...
);

in the speciesProperties dictionary.

Now, if I use the ptrList, the problem of reading the list remains.

Regards,
Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 4, 2005, 16:15
Default I see your problem. 1. exte
  #17
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
I see your problem.

1. extend dimensionedScalar to have a clone and INew functions so it can be used with ptrList.

2. define your own class that reads all the info and can be used in a ptrList/List and then construct List<dimensionedscalar*>

(and make sure you delete any allocated dimensionedScalars)
mattijs is offline   Reply With Quote

Old   October 5, 2005, 11:03
Default Hello Alberto & David, I'm
  #18
rbw
New Member
 
Ramiro Brito Willmersdorf
Join Date: Mar 2009
Location: Recife, Pernambuco, Brasil
Posts: 16
Rep Power: 7
rbw is on a distinguished road
Hello Alberto & David,

I'm also interested in pollutant dispersal in the atmosphere, and I'm re-implementing your work described above.

One thing I'd like to wonder aloud, though, is that, as far as I can see, a model using OpenFOAM would be realistic only for short(ish) distances, no?

I think (this *really* is not my area, so please correct me if I'm wrong) that the turbulence in the atmosphere is not only due to the friction with the ground, which OpenFOAM can model easily, but mostly due to the stability conditions of the atmosphere, which, even though it's all cfd in end, would need *a lot* more input and physics that we (I at least) would be willing to add.

Not so long ago, I checked the Weather Research and Forecast Model (http://www.wrf-model.org/index.php), which I thought could be a nice basis for this kind of work (fortran 90, though, I think.) I'll do this when I buy a clone of myself to get some extra free time...
rbw is offline   Reply With Quote

Old   October 7, 2005, 07:50
Default Hello, dispersion models toge
  #19
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hello,
dispersion models together with k-eps turbulence models are commonly used to predict the diffusion of pollutants in limited portions of athmosphere like a part of a city where an accident happened and so on.
They are adopted in specific codes like FLACS too.

Alberto
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   October 7, 2005, 16:23
Default Hi Alberto, I should certai
  #20
rbw
New Member
 
Ramiro Brito Willmersdorf
Join Date: Mar 2009
Location: Recife, Pernambuco, Brasil
Posts: 16
Rep Power: 7
rbw is on a distinguished road
Hi Alberto,

I should certainly hope so, since I'm doing the very thing myself!

I'm just curious about the range where atmospheric turbulence starts to be more relevant. I'm not sure I'd feel too confortable with a simple k-epsilon model at distances over one kilometer (a nice round number . Are there any guidelines for this?
rbw is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
pollutant dispersion Andy CFX 1 August 26, 2007 18:41
Simulation of pollutant dispersion in a city George CD-adapco 1 June 27, 2007 04:26
pollutant source J.Z Phoenics 2 April 3, 2007 18:33
pollutant source Riccardo Buccolieri FLUENT 0 January 22, 2005 03:38
pollutant source Riccardo Buccolieri FLUENT 0 January 20, 2005 04:06


All times are GMT -4. The time now is 17:39.