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/)
-   -   DieselFoam spray (https://www.cfd-online.com/Forums/openfoam-solving/57854-dieselfoam-spray.html)

dhebert December 5, 2006 11:47

Hello everyone, When I inse
 
Hello everyone,

When I insert an injector with a specified diameter, do the droplets get injected from the center or edge of injector. For example, say I set a hollow cone injector with diameter 1mm and angle of 30 degrees. Will the droplets be injected with a 30 degree angle from the center or at 1mm from center?

Thanks,

David

ville December 5, 2006 12:09

Hi David, In sprayInject.C (/
 
Hi David,
In sprayInject.C (/OpenFOAM/OpenFOAM-1.3/src/lagrangian/dieselSpray/spray/)
there is a variable called
injectionPosition which determines the place
where the drop is created (around line 100).
To my understanding the drop is created to this
position initially which would be the nozzle center. You can change this variable here to take into account that your nozzle has a 1mm diameter.
I hope I answered your question.
-Ville

dhebert December 5, 2006 14:16

Ville, Thanks for pointing
 
Ville,

Thanks for pointing this out, it was a big help to know where to start looking. It looks like in the injector definitions the initial droplet position is specified by the position() function. For example, near line 223 of /OpenFOAM/OpenFOAM-1.3/src/lagrangian/dieselSpray/injector/swirlInjector.C there exists:

scalar iRadius = d_*rndGen.scalar01();
scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01();

return
(
position_
+ iRadius
* (
tangentialInjectionVector1_*cos(iAngle)
+ tangentialInjectionVector2_*sin(iAngle)
)
);

.
.
.

which, if I am not mistaken, randomly selects the radial and angular position of the droplet to be injected. Similar defitions exist for other injector types. If my interpretation is not correct, could someone clarify?

Thanks,

David

niklas December 7, 2006 04:44

That is correct. The position
 
That is correct.
The position of the injection point is randomly chosen within the circle defined by injector position and diameter of injector.

aderliner March 18, 2007 22:12

Hi everyone: I am working
 
Hi everyone:

I am working on the project about fuel spray,the fuel I am interested is DME, it is C2H6O. I find that there is a folder named C2H6O in /src/thermophysicalmodels/liquids/, I wonder if it is DME. Also, I want to know how to use the fuel.

Thanks a lot~~~!

Best regards~~~!

Bobby

niklas March 19, 2007 01:39

Yes, it is DME.
 
Yes, it is DME.

aderliner March 19, 2007 23:17

Hi, Niklas Thanks~~! Als
 
Hi, Niklas

Thanks~~!

Also, I want to know how to use DME in dieselSpray and lesInterFoam.

Thank you ~~~~~!

Best regards~~~!


Bobby

aderliner March 22, 2007 07:45

Hi~~everyone As diesel oil
 
Hi~~everyone

As diesel oil is a complex mixture, so, I want to know what is the diesel oil that is used in diesefoam comprised of? I mean, in /src/thermophysicalmodels/liquids/, there are many compound, like C2H6O,H20...several kinds of those make up of diesel oil, I want to know which they are.

Thanks a lot~~~~!

Bobby

sebastian_vogl June 27, 2008 05:02

Hallo everybody, I want to
 
Hallo everybody,

I want to simulate the injection and the following evaporation of one single droplet in stagnant air. I therefore decided to use the dieselFoam solver and the aachenBomb testcase with chemistry and ignition set to off. However the solver stopped the solution only few seconds after starting. Therefore I would like to show you my case setup and would be very pleased if you could tell me the reason for my problem.
I used the unitInjector as Injectortyp with the following properties (defined in the infectorProperties dictionary):

unitInjectorProps
{
position (0 0.0995 0);
direction (0 -1 0);
diameter 0.00019;
Cd 0.9;
mass 2.37995177626e-09;
temperature 320;
nParcels 1;

X
(
1.0
);

massFlowRateProfile
(
(0 1.0)
);
}

-->position, direction and Cd are the same as in aachenbomb test case
the mass results from the droplet diameter and its corresponding volume multiplied with the fuel (C7H16) density which itself comes from the NSRDSfunc5 evaluated at the temperature of 320K. nParcels = 1, because I want to simulate only one droplet.
X remains unchanged in comparison to the test case.
Withe the setup of the massFlowRateProfile I want to inject the whole mass of the droplet at the beginning of the simulation (t=0).
As injector model I chose "constant" with the following properties defined in the "sprayProperties" dictionary:

constInjectorCoeffs
{
dropletNozzleDiameterRatio
(
1.0
);

sprayAngle
(
0.0
);
}

The atomization Model was set to off as were the collision and dispersion model. So, with the exception of the injectorModel, all properties were the same as in the aachenbomb test case.
The log file (excerpt) reads as following:

Point 0
Create time

Point 1
Create mesh for time = 0

[1] Root : /scratch1/aachenBombInjektorvergleich/unitInjector/constant/.
[1] Case : sprayangle_0°
[1] Nprocs : 4
[2] Root : /scratch1/aachenBombInjektorvergleich/unitInjector/constant/.
[2] Case : sprayangle_0°
[2] Nprocs : 4
[3] Root : /scratch1/aachenBombInjektorvergleich/unitInjector/constant/.
[3] Case : sprayangle_0°
[3] Nprocs : 4
Before --> if (file(time().timePath()/V0))
After --> if (file(time().timePath()/V0))
Before --> if (file(time().timePath()/meshPhi))
After --> if (file(time().timePath()/meshPhi))
Point 2

Reading thermophysicalProperties
Point 2.1
Selecting thermodynamics package hMixtureThermo<reactingmixture>
Selecting chemistryReader chemkinReader
Initializing lduPtr_ from IOobject
Point 2.2
Point 2.3
Point 2.4
Point 2.5
Reading field U

Reading/calculating face flux field phi

Creating turbulence model.

Selecting turbulence model kEpsilon
Creating field DpDt

Constructing chemical mechanism
Selecting ODE solver SIBS
chemistryModel::chemistryModel: Number of species = 5 and reactions = 1
Point 3

Reading environmentalProperties
Point 4
Reading combustion properties

Point 5
Constructing Spray
Selecting injectorType unitInjector
3 additional processes aborted (not shown)


I would be very pleased for a soon answer.
Thank you in advance for your time.

Yours,
Sebastian Vogl

niklas June 27, 2008 06:12

massFlowRateProfile (or any ot
 
massFlowRateProfile (or any other profile) has to have at least 2 arguments.
the first is start-of-injection
and the last is end-of-injection.

if you only want 1 parcel you should do something like

massFlowRateProfile
(
(0 1.0)
(1.0e-10 1.0)
);

dont know if that will solve it though, but that's one mistake.

sebastian_vogl June 27, 2008 06:39

Thank you for your answer Mr N
 
Thank you for your answer Mr Nordin.

I'll implement your suggested correction and post my results here.

With kind regards,
Sebastian Vogl

sebastian_vogl June 30, 2008 04:39

Hallo everybody, In my simu
 
Hallo everybody,

In my simulation, I tried to calculate the evaporation of a single droplet. However it doesn't seem to be possible (at least for me), as the massFlowRateProfile needs two entries. I also tried Mr Nordin's trick from above which didn't work either.
What surprised my, was the fact that, even when I only injected two particles, I finally found up to five particles in my volume during the postprocessing. Where did the other three particles come from? Does anyone have an idea?
Another question I have deals with the entries in the injectorproperties file, especially with the way, the injectorProperties (e.g. for the unitInjector) are defined:
First of all, the diameter of the nozzle is required. With the knowledge of the nozzle-droplet-ratio (as it is necessary for the constant injectormodel) I also know the droplet diameter and the volume of the droplet. For a given fuel, I also know the density and therefore the mass of one droplet is known. By also specifying the number of particles injected, the mass of the whole spray injected is given. But why do I have to specify the mass of the spray explicitly in the file, if it is already known?
I would be very pleased, if somebody of you had an answer for my questions.

Yours,
Sebastian Vogl

niklas June 30, 2008 06:13

Its not particles that you spe
 
Its not particles that you specify, its parcels.
Important distinction, since a parcel can contain anything from 0.11231 to ..oh... 1231213100123.812 number of drops, i.e
mParcel = N*mDrop, where N is the statistical number of drops in the parcel.

Think about it this way.

The totalMass of the liquid will be represented by nParcels.

That means, each parcel will represent a mass=totMass/nParcels.

So when we are about to inject a certain mass (during a time step), we can calculate how many parcels that is approximately equal to.

What can we vary for the liquid, we have temperature, fuel composition (if multi-component) and size (diameter), these can all be time dependent and this will all change the value of N that will vary from parcel to parcel.

I can only assume that you have made a mistake in your setup, but I'll check if I can inject 1 drop with N=1.

niklas June 30, 2008 07:41

As expected I had no problem i
 
As expected I had no problem inserting only 1 drop...
Here's a working case.
http://files.nequam.se/drop.tgz

Here's a small helper application that will write the density of the liquid fuel for a given temp.
http://files.nequam.se/liquidFoam.tgz

This is what I used for C7H16 in my injectorProperties

(
{
injectorType definedInjector;

definedInjectorProps
{
position (0 0.005 0);
direction (0 -1 0);
diameter 0.0001;
Cd 0.9;
mass 3.5603722e-10;
temperature 300;
nParcels 1;

X
(
1.0
);

massFlowRateProfile
(
(0.0 1.0)
(1.0e-6 1.0)
);

velocityProfile
(
(0.0 1.0e-15)
(1.0e-6 1.0e-15)
);
}
)

sebastian_vogl June 30, 2008 10:07

Once again, Mr Nordin, thank y
 
Once again, Mr Nordin, thank you very much for your time and effort!

Sincerely,
Sebastian Vogl

sebastian_vogl July 1, 2008 07:54

Hello everybody, Does someb
 
Hello everybody,

Does somebody know, why the number of parcels in a system can exceed the number which is written in the injectorProperties file, because in a simulation I did I finally had up to 1010 parcels in the system although nParcel was set to 2 by me? Maybe because of droplet breakup?
Furthermore I reckoned two cases in which I injected a mass of fuel in two portions of the same amount. Both cases only differ in the time difference between the injections (defined in the massflowRateProfile).
The injectorProperties files for the cases read as following:

//injectorProps are equal for both cases

injectorType unitInjector;

unitInjectorProps
{
position (0 0.0995 0);
direction (0 -1 0);
diameter 0.00019;
Cd 0.9;
mass 4e-09;
temperature 320;
nParcels 2;

X
(
1.0
);


//massFlowRateProfile case 1

massFlowRateProfile
(
(0 0.5)
(1.0e-6 0.5)
);

//massFlowRateProfile case 2

massFlowRateProfile
(
(0 0.5)
(1.0e-2 0.5)
);


Although both cases seem to be very similar, the droplets, as shown in paraview, look completely different with case two having many more droplets after each time step than case one. In my opinion, the number of droplets should be very similar in both cases. What do you think?

niklas July 1, 2008 09:21

There is only 1 way to get mor
 
There is only 1 way to get more drops than what you have set nParcels to and that is of course the breakup.

However....

In the second case you are injecting liquid for 10ms and you are only representing that with 2 parcels. The nParcels number is only used to calculate
an averageParcelMass, which in most cases is pretty high and high enough that more than 1 parcel will be injected during 1 timestep.

So... we have a flow of liquid that is constant during a period specified by the massFlowProfile.
So during 1 timestep there will be a certain amount of liquid mass that will be injected.
If that mass is smaller than the avergeParcelMass we
have a choice on how to deal with this.
1 - either wait to inject a parcel until the accumulated injected mass is larger than averageParcelMass.

2 - inject 1 parcel to fulfill the massFlowRateProfile.

In the current implementation, we have gone for the second option, since I think its more important to maintain a correct mass-flow rate than getting the correct number of parcels.

sebastian_vogl July 1, 2008 12:13

When I understood your definit
 
When I understood your definition of a parcel correctly, Mr Nordin, a parcel represents a part of the total mass injected and can contain a big number of droplets with any size below the nozzle diameter as specified in the injectorprop-file. So it is not possible to regard a parcel as a class of droplets with a diameter lying in a certain region, e.g parcel 1 contains all droplets with a diameter between 5-10µm, parcel 2 contains those with an diameter of 10-20µm, and parcel 3 those from 20-30µm, etc?
Furthermore, you mentioned the problem that there will be more parcels injected than specified by the user (break up not included), if the mass to be injected is below the mass of one parcel. However, by setting the number of parcels to 2 and specifying the mass to be injected (0,004mg) and set two point of times of injection in my massRateProfile (e.g. as in my last question from this morning), then I can clearly say that in each injection 0,002mg are injected. So I can't see the problem that you mentioned. May I ask you to explain your issue more detailed? Maybe I haven't understood the definition of parcels or the way the program handels the input files I specify.

For your support I thank you very much,
Yours Sincerely,
Sebastian Vogl

niklas July 2, 2008 02:22

> So it is not possible to reg
 
> So it is not possible to regard a parcel as a
> class of droplets with a diameter lying in a
> certain region, e.g parcel 1 contains all droplets
> with a diameter between 5-10µm, parcel 2 contains
> those with an diameter of 10-20µm, and parcel 3
> those from 20-30µm, etc?
nope. If you have a pdf to describe the drop size,
the size will be a random sample everytime a new parcel is injected.

Lets see if I can make it a bit clearer...

Assume that you want to inject the fuel you say during 100 timesteps.
If we were to inject only 2 parcels (as specified), those would be injected at (lets say) timesteps 50 and 100.

during timesteps 1-49 and 51-99, what is the massflow rate from the injector?
In the above approach it is zero.

what is the massflow rate during timestep 50 and 100?
In the above approach it is 50 times higher than the specified rate.

Your massFlowRateProfile is now essentially two 'big' spikes instead of the flat curve described by the massFlowRateProfile.

By not injecting fuel during a timestep you accumulate it for a later injection period and you will not obey the specified massFlowRateProfile and for sprays it is more important to follow the specified massflow than the number of drops.

I hope it is clearer now.

sebastian_vogl July 2, 2008 05:20

Thank you again! As I have un
 
Thank you again!
As I have understood the massFlowRateProfele, the first row of each entry spcifies the points of time for each injection and the second one the mass that should be injected at that specific time. In the way you described it, it seems as if the injector tries to inject every time step, even if the massFlowRateProfile doesn't schedule an injection for that time step.
What I tried to do in my simulation, was to inject an array of droplets with a certain diameter and I wanted to inject them at a certain point of time. So I started with trying to create one single droplet and now I wanted to continue with two droplets. That's why I thought I could split up the injections in two portions. Later I intended to inject maybe 20 droplets with that diameter and the same time between each injection. So it seems to be impossible to create an appropriate massFlowRateProfile.


All times are GMT -4. The time now is 23:41.