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 09: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 11: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 14: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 19: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 06: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 13: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 04: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 04: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.

saeedshayae November 14, 2014 18:00

Hello CFD-mans

I read above discussion and your dialogue about "how can we simulate spray by sprayFoam solver without solving energy(combustion) and species eqs", but i don't Conclude....
assume that i want to simulate a simple jet spray with sprayFoam (OF 230):
A way that the all user refer it : deactivating combustion and chemistry (active---->no in combustionProperties and chemistry---->off in chemistryProperties, respectively) but this is not general and good way.
in fact i want to release from species story! N2 ,O2 ,C7H16 and its error:confused:...and have a solver that solve Navier_St and primary and secondary atomization only (pure spray and w/o combustion and chemistry eq)

changing source files (sprayFoam.C) or better way????

mturcios777 November 17, 2014 19:17

Hello saeedshayae,

When you turn of chemistry and combustion in sprayFoam, we are still solving for the transport of species and evaporation from the spray. All turning those flags does is turn off the chemistry source term for species and enthalpty transport.

Hope this helps you.

saeedshayae November 18, 2014 17:04

Thanks for your post Marco

Are you able to simulate any spray (w/o comb and chem) now? and do you know incompressible solver for spray simulation?
(Why dont OpenFOAM set a simple Salver for spray?:mad::mad:)

mturcios777 November 18, 2014 17:25

Yes, I am able to simulate the spray w/o combustion and chemistry using this method. I don't believe there is an incompressible spray solver by default as there isn't much demand, though you could probably take simpleFoam and add a spray like they do in sprayFoam.

You will still need to specify what species make up the spray as this sets the thermophysical properties.

saeedshayae November 19, 2014 16:04

OK,thanks so much
assume that i' m trying to simulate H2O(liquid) spray in air (O2 N2) at ambient temp and pressure(300k and e+5 pa).I use the aachemBomb example for this goal with same geometry and with these changes:

1-I turn off chemistry and combustion and delete REACTIONS section in chem.inp and

2-delete C7H16 and CO2 from species (in chem.inp) (remain H2O,N2 and O2) and

3-initialize for O2(0.23), N2(0.76) ,T(300) and P(e+5) in 0 directory.

4-but Question: where do i set H2O as spray fluid (instead of C7H16)? is it in "liquids { C7H16 { defaultCoeffs yes; }} in thermophysicalproperties" or in "singlePhaseMixtureCoeffs { phases (liquid {C7H16 1});} in sprayCloudProperties" or in "liquidEvaporationBoilCoeffs {enthalpyTransfer enthalpyDifference; activeLiquids ( C7H16 ); } in sprayCloudProperties".
in other words, How do solver understand which fluid is injected?


All times are GMT -4. The time now is 02:16.