CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pollutant dispersion in the environment (https://www.cfd-online.com/Forums/openfoam-solving/58865-pollutant-dispersion-environment.html)

alberto October 7, 2005 16:47

I'm not sure. It's not my fiel
 
I'm not sure. It's not my field. But you could give a look to the papers on dispersion in the environment where flacs calculations are presented.
They validated their models on large scale data and experiments.

You can find the manual here (you need to subscribe for free):

http://www.gexcon.com/index.php?src=...alidation.html

Regards,
Alberto

evan January 29, 2008 20:27

Hi all, So to revisit the q
 
Hi all,

So to revisit the question raised by Alberto, does anyone know (or be willing to discuss) how to make an indexed list of constants that is read from a dictionary. So, the diffusivity example Alberto brought up would work great. That is, say you have n diffusion constants listed in your constants dictionary as:

dimensionedScalar D1 (dictionary.lookup("D1"));
.
.
.
dimensionedScalar Dn (dictionary.lookup("DY"));

but you want to index them in your solver (along with other indexed fields) as:

for(label i=0; i<n; i++)
{
volScalarField& Yi = Y[i];

// call D[i] list here

solve
(
fvm::ddt(Yi)
+ fvm::D[i]*fvm::laplacian(Yi)

);

etc.

Or is there a better way about going about this? Mattijs' suggestion from before is currently over my head http://www.cfd-online.com/OpenFOAM_D...part/happy.gif.

Best,
Evan

andersking May 23, 2008 05:09

I have just needed to do this,
 
I have just needed to do this, so I've posted what I have used.

for creating the scalar fields:

Info<< "Reading number of scalars...";

scalar nScalar(readScalar(transportProperties.lookup("nSc alar")));
Info<< nScalar <<endl;
PtrList<dimensionedscalar> DS(nScalar);
PtrList<volscalarfield> S(nScalar);

forAll(S, si)
{
Info<< "Reading diffusivity DS" << si << endl;

dimensionedScalar DSi(transportProperties.lookup("DS" + Foam::name(si)));
DS.set(si,new dimensionedScalar(DSi));

Info<< "Reading field S" << si << endl;

S.set(si,new volScalarField(
IOobject
(
"S" + Foam::name(si),
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
));

}

then to solve the (laminar) scalar transport

forAll(S,si)
{
solve
(
fvm::ddt(S[si])
+ fvm::div(phi, S[si])
- fvm::laplacian(DS[si], S[si])
);

}
}

(corrections welcome)

Regards,
Andrew

Hrushi September 21, 2010 03:49

Linking species properties with species equation and spacies table
 
Quote:

Originally Posted by alberto (Post 189239)
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

Hi Alberto,

I am also trying to develop steady state liquid phase multispecies
solver. Can you elaborate more on how to link individual species properties in the species equation?

Hrushikesh

azna November 29, 2014 13:31

Hi,

I am working on a multiphase flow ( air-water) project in Fluent. I would like to assume that at time=0 (initial condition), nitrogen exists in the water ( without any inlet). I was wondering how can I define water+nitrogen, for e.g. 50mg/l nitrogen exists in water.?

is there any section I can define concentration of nitrogen is water ?


All times are GMT -4. The time now is 12:54.