CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   sprayFoam w/o combustion (http://www.cfd-online.com/Forums/openfoam-solving/103605-sprayfoam-w-o-combustion.html)

daxindamix June 21, 2012 08:05

sprayFoam w/o combustion
 
Dear all

is it possible to simulate sprayFoam from the tutorials without combustion. If yes do you know how please?
I just finished the tutorial but still I don't managed to switch off the combustion properly.

Thank you.

mturcios777 June 21, 2012 12:24

Turning off chemistry in constant/chemistryProperties should only give you the spray.

daxindamix June 22, 2012 04:09

it is already I guess:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

psiChemistryModel ODEChemistryModel<gasThermoPhysics>;

chemistry off;

chemistrySolver ode;

initialChemicalTimeStep 1e-07;

odeCoeffs
{
solver SIBS;
eps 0.05;
}

// ************************************************** *********************** /

but when I launch the calculation, it shows: Solving for CO2, Solving for H2O etc ...

daxindamix June 22, 2012 09:04

indeed it works. Sorry for this very simple question. Thank you.

mturcios777 June 29, 2012 19:04

Yes it does; you still need to solve the species transport even if there is no chemical reaction (those are just source terms).

daxindamix July 11, 2012 08:22

indeed. thanks for the information ;)

Akuji February 12, 2013 08:54

Quote:

Originally Posted by mturcios777 (Post 368958)
Yes it does; you still need to solve the species transport even if there is no chemical reaction (those are just source terms).

Hello, mturcios777!

In my case I don't need to solve species transport, because I have only air in room and spray of water. So, to cancel it I need to change source files (sprayFoam.C), am I understand right? Or there is exist more simple step?

sushant February 12, 2013 10:21

Quote:

Originally Posted by Akuji (Post 407421)
In my case I don't need to solve species transport, because I have only air in room and spray of water. So, to cancel it I need to change source files (sprayFoam.C), am I understand right? Or there is exist more simple step?

Just edit chemkin/chem.inp and leave only H2O in the species (remove the rest). Then edit the constant/thermophysicalProperties file and replace C7H16 (in 'liquids') with H2O.

Assuming you want to model evaporation of water, you will be solving species transport (for just H2O - the gaseous phase).

Akuji February 13, 2013 13:18

Dear, sushant!
Thank you for so quickly reply. But I still have problems. 1. Prioritary I don't need to solve evaporation of water.
2. In chem.inp I delete all species exept H2O and now solver doesn/t understand what specie C7H16 he has in file. I try to delete all reactions, then all elements, then try to find solution...but it doesn't work.
Now my file looks like

Code:

ELEMENTS
 H  O 
END
SPECIE
 H2O
END
REACTIONS
 

END

Console gives errors:

Code:

Selecting chemistryReader chemkinReader


--> FOAM FATAL ERROR:
while error on line 10
    expected  but found '" "END'

    From function chemkinReader::lex()
    in file chemistryReaders/chemkinReader/chemkinLexer.L at line 1497.

FOAM exiting


In thermophysicalPropeties all is ok. But one question: section of intertSpecie. Should I write H2O too?

mturcios777 February 13, 2013 18:52

Depending on what you need to do, it may not be worth it to be fiddling around with chem.inp, since the file format is very sensitive to changes. If you have the chemistry flags off, you should be fine.

As for inertSpecie, if you look at YEqn.H in reactingParcelFoam (on which sprayFoam is based), when calculating the mass fractions of all species, the inert specie does not have a transport equation solved for it. Instead, if Yt is the total species mass fraction for species other than the inert:

Yinert = 1 - Yt.

If you are doing nonreacting flows under ambient conditions, I would leave inertSpecie as N2. With the spray of water into air, are you looking for the evaporation, spray characteristics (penetration, mean diameter, etc.)?

sushant February 14, 2013 05:15

A very good idea by Marco -- don't touch the chem.inp unless you can fix it if it breaks :)

To the OP, just turn off chemistry and revert to the original file chem.inp. If you still want to correct the existing file, it should be:
Code:

ELEMENTS
 H  O 
END
SPECIE
 H2O
END

That is to say, remove the REACTIONS block.

Leave N2 as the inertSpecie, and further as you do not want to model evaporation there really is no species transport to solve for. With chemistry off, you will see a line in the output that says solving for H20, but nothing will be actually solved. Turn on chemistry when you want to model evaporation.

Marco, is there a way to specify which scalar the liquid evaporates to? Or is it determined by the name (H2O) only?

mturcios777 February 14, 2013 12:52

A liquid species will always evaporate into the gaseous species that bears the same name. It is possible assign the evaporated mass to another volScalarField. I asked that question once here on the forum, as it is different under 2.x.x than 1.x.x. Have a look under threads I've started and you should find it from about a year and a half ago.

Akuji February 15, 2013 03:17

Quote:

Originally Posted by sushant (Post 407774)
A very good idea by Marco -- don't touch the chem.inp unless you can fix it if it breaks :)

To the OP, just turn off chemistry and revert to the original file chem.inp. If you still want to correct the existing file, it should be:
Code:

ELEMENTS
 H  O 
END
SPECIE
 H2O
END

That is to say, remove the REACTIONS block.

Leave N2 as the inertSpecie, and further as you do not want to model evaporation there really is no species transport to solve for. With chemistry off, you will see a line in the output that says solving for H20, but nothing will be actually solved. Turn on chemistry when you want to model evaporation.


I tried just remove block SPECIES and console gave error about it. It wanted to find this block in chem.inp but didn't and it couldn't solve sprayFoam without it.
So I didn't modified original file, in my case now I see
Code:

DILUPBiCG:  Solving for C7H16, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for O2, Initial residual = 5.07237e-06, Final residual = 5.07237e-06, No Iterations 0
DILUPBiCG:  Solving for CO2, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0

Chemistry off, if I understand right, solver doesn't solve chemistry equations now (because
Code:

no iterations 0
)
I don't have to solve my case with evaporation.
Thanks for your tips:)

Akuji February 15, 2013 03:23

Quote:

Originally Posted by mturcios777 (Post 407706)
Depending on what you need to do, it may not be worth it to be fiddling around with chem.inp, since the file format is very sensitive to changes. If you have the chemistry flags off, you should be fine.

As for inertSpecie, if you look at YEqn.H in reactingParcelFoam (on which sprayFoam is based), when calculating the mass fractions of all species, the inert specie does not have a transport equation solved for it. Instead, if Yt is the total species mass fraction for species other than the inert:

Yinert = 1 - Yt.

If you are doing nonreacting flows under ambient conditions, I would leave inertSpecie as N2. With the spray of water into air, are you looking for the evaporation, spray characteristics (penetration, mean diameter, etc.)?

I don't interested in evaporation, but I need to see spray characteristics. The particle should break and stick -I'm interested in the diameter of new particles.

Also, now I couldn't find how the foam solve D32? For my calculations it should be 1.3 mm. According openfoфm - D32=21603e-06=2.1cm

Pretam July 28, 2013 19:47

I'm also just trying to run a simple case with water. I turned chemistry off, I also changed the mixture type to homogeneousMixture, in Thermophysical properties. However when I changed the liquid to H20 I got this error

"keyword reactants is undefined in dictionary " I see H20 defined in the chemkin input so not sure where it would be undefined.


All times are GMT -4. The time now is 11:07.