CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Some questions regarding the sprayclasses (

gjesing January 24, 2006 08:35

Hi, I made a copy of the di

I made a copy of the dieselSpray and modified/simplified it to only handle a simple one-component fluid, that doesn't evaporate. I know it is not the best way to go, to make things less general, but all the X and Y's are not necessary for my work.

However I ran into some understanding problems which I hope someone can help me with!

If I want to simulate the atomization and secondary break-up of a continuos circular liquid stream, how should I introduce the parcels as the liquid stream? As big parcels with the streams diamater? Would this involve use of the constInjector-injectorModel?

Shouldn't the collisionmodels and dispersionmodels be dependent on whether a given parcel is a part of the liquidcore or not? Perhaps it doesn't matter if the liquidcore is made out of big parcels?


niklas January 24, 2006 08:57

First, those modifications ar
those modifications arent necessary, just set evaporation to off and it will not evaporate.
Only heat transfer will be active then.

1. The Lagrangian treatment is strictly valid only in the thin region, i.e your liquid volume fraction is typically less than 10%. This then leads to some mesh restrictions, so the question is what is the diameter of the liquid. Apart from these considerations the answer is yes
constInjector sets the initial droplet diameter by specifying the ratio between drops/nozzle.

2. yes, to allow for special treatment of the liquid core, we decided to add that variable.
But it is not used in the collision and dispersion model, because I dont know what to change. Other models that should be affected by this is for example drag, heat/mass transfer, breakup.. et.c.
If you improve the handling of any of these phenomena please feel free to submit them as improvements.


gjesing January 24, 2006 09:59

1) Ok, say my liquid stream h
Ok, say my liquid stream has a diameter of 3 mm, I just have to make the mesh some factors coarser where the droplets are introduced. But what if a cell has the volume ratio 10:1 as you describes, and mutiple droplets occupies it? Isn't that also a problem? Or is it here the term "strictly valid" comes into play ;-)

This is properly also dependent of what you calculation is about. But my first thought was that only when the parcel has seperated from the core, drag, collision, dispersion etc. should be imposed.

Thanks for the help!

dhebert November 7, 2006 20:29

Hello all, I am just starti
Hello all,

I am just starting with OpenFOAM, and would like to set up an initial test case with dieselFoam that injects a constant stream of fluid into an area and then evaporates. I have run into some questions I hope someone can give some advice about:

1) It seems that I would like to use the constInjector for this problem. However, when I put in constInjector in injectorProperties file I get an unknown injectorType error. Does this mean that unitInjector is a subSprayModel only valid in sprayProperties file?

2) Does this mean that unitInjector is most appropriate for injectorProperites?

3) Is the purpose of constInjector to use a constant mass flow rate? If so, does it override massFlowRateProfile entered for unitInjector? Same for d0 vs diameter.

Thanks in advance for any help!


lucchini November 8, 2006 05:53

Hi David, there is a differen
Hi David,
there is a difference between the injetor type and the injector properties.
The injector type specifies the geometry and the mass flow rate law of the injector. The injector type must be specified in the file injectorProperties and you can choose among them:


The injectorModel is used to specify the initial droplets SIZE, VELOCITY and DIRECTION OF VELOCITY according to the model and the injector type selected. You can chose one the following in the sprayProperties dictionary:


Have a look at the implementation of the models to see the differences between them. However, in my opinion unitInjector+constant must be ok.



chris1980 November 8, 2006 07:15

Is someone able to tell if a b
Is someone able to tell if a blob-injection is possible (and how to do this)?

I have seen in the spray dictionary of the aachenBomb tutorial that there is specConstAtomizationCoeffs. But it seems to be that this type of atomistation model is out of date.

dhebert November 8, 2006 14:51

Hello again, Thanks Tommaso
Hello again,

Thanks Tommaso for your reply. I have another general question. I would like to run my simulation with C12H26. If I understand the set up correctly, I need to add the gasseous properties in therm.dat (the liquid info is in /src/thermophysicalModels/liquids?). Anyway, there are some extra terms in therm.dat that aren't explained in the manual. For example the C7H16 line from aachenBomb example contains:

C7H16 P10/95C 7H 16 0 0G 200.000 5000.000 1391.000 1
2.22148969e+01 3.47675750e-02-1.18407129e-05 1.83298478e-09-1.06130266e-13 2
-3.42760081e+04-9.23040196e+01-1.26836187e+00 8.54355820e-02-5.25346786e-05 3
1.62945721e-08-2.02394925e-12-2.56586565e+04 3.53732912e+01 4

I thought the entries were supposed to be number of moles and molecular weight (according to the users guide). I am unclear about the P10/95C 7H 16 0 0G part.

Thanks much,


alan_fergus December 13, 2006 18:27

'm adding collision to icolagr
'm adding collision to icolagrangianfoam. I am using the spray class as a referrence to how to do this but when i try to make my ptfoam i get an error as follows

SOURCE=IncompressibleCloud.C ; g++ -m32 -Dlinux -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/cfdTools/incompressible -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/lagrangian/basic/lnInclude -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/finiteVolume/lnInclude -I/home/alan/OpenFOAM/alan-1.2/applications/solvers/multiphase/ptFoam/collisionM odel/InInclude -I/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4Opt/IncompressibleCloud.o
IncompressibleCloud.C: In constructor 'Foam::IncompressibleCloud::IncompressibleCloud(co nst Foam::volPointInterpolation&, const Foam::volVectorField&)':
IncompressibleCloud.C:75: error: no match for 'operator*' in '((Foam::IncompressibleCloud*)this)->Foam::IncompressibleCloud::cloudPropertie s_ * this'
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/tensorField.H:53: note: candidates are: Foam::tmp<foam::vectorfield> Foam::operator*(const Foam::tmp<foam::tensorfield>&)
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/tensorField.H:56: note: Foam::tmp<foam::tensorfield> Foam::operator*(const Foam::tmp<foam::vectorfield>&)
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionSet.H:194: note: Foam::dimensionSet Foam::operator*(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedScalar.H:58: note: Foam::dimensionedScalar Foam::operator*(const Foam::dimensionedScalar&, Foam::scalar)
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedTensor.H:70: note: Foam::dimensionedVector Foam::operator*(const Foam::dimensionedTensor&)
/home/alan/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedTensor.H:73: note: Foam::dimensionedTensor Foam::operator*(const Foam::dimensionedVector&)
IncompressibleCloud.H:128: warning: 'Foam::IncompressibleCloud::collisionModel_' will be initialized after
IncompressibleCloud.H:122: warning: 'Foam::dictionary Foam::IncompressibleCloud::interpolationSchemes_'
IncompressibleCloud.C:49: warning: when initialized here
make: *** [Make/linuxGcc4Opt/IncompressibleCloud.o] Error 1

this seems to be related to *this operator as in incompressiblecloud.c or in spray class as in spray.c


i have two questions i hope you can help me with

1 what exactly is *this and how does it work?

2 how do i get it to read newcollision.c so i can use a modeified o'rourkes model or modified trajectory model instead of the normal collision model


gschaider December 14, 2006 06:29

Hi Alan! @question 1: this
Hi Alan!

@question 1: this is a pointer to the object itself (it's C++'s way of saying: "I"). If you have to ask for that you propably should consider spending an afternoon or two with a C++-book before trying to modify something like the spray-class-hierarchy

alan_fergus December 20, 2006 10:01

hi Bernhard, thanks for the r
hi Bernhard,
thanks for the reply. i know that this might seem like a stupid question but where deos it exactly point to. i am nearly finshed the writing of the code for my phd and this has blaffled me. how can i solve it so i can get my solver to run
thanks in advance

All times are GMT -4. The time now is 21:59.