CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

sprayEngineFoam (dieselEngine)

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 1 Post By devayabir
  • 1 Post By mturcios777
  • 2 Post By mturcios777
  • 1 Post By ayhan515
  • 3 Post By mturcios777

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2014, 05:57
Default sprayEngineFoam (dieselEngine)
  #1
New Member
 
Devayan Bir
Join Date: Jul 2013
Posts: 15
Rep Power: 13
devayabir is on a distinguished road
I am trying to sinulate diesel engine in sprayEngineFoam but my simulation keeps crashing.

Foam fatal error:
Integrating outside table 0..0.00583333 not implemented. t:0.00582967 t2:0.00583337

I suppose this has to do something with my mass flow profile.
please advice
ayhan515 likes this.
devayabir is offline   Reply With Quote

Old   January 22, 2014, 13:00
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
See this bug report: http://www.openfoam.org/mantisbt/view.php?id=837#c2190
ayhan515 likes this.
mturcios777 is offline   Reply With Quote

Old   January 23, 2014, 03:05
Default sprayCloudProperties
  #3
New Member
 
Devayan Bir
Join Date: Jul 2013
Posts: 15
Rep Power: 13
devayabir is on a distinguished road
I read the bug report but I still can't understand the injectionmodel section of the sparycloudproperties.
I can't figure out how to make the flow rate profile.
how do I specify intake temperature ?
How to calculate the no, of parcels and the mass.

please advice
devayabir is offline   Reply With Quote

Old   January 23, 2014, 19:15
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Just add an extra line to the flow rate profile as described in the bug report. Temperature is specified in constantProperties, mass is set as massTotal and the parcels are specified by parcelsPerSecond (these are all in the injectionModel submodels).
mturcios777 is offline   Reply With Quote

Old   January 24, 2014, 08:35
Arrow
  #5
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
Code:
...
Selecting injection model coneNozzleInjection
    Constructing 3-D injection
Selecting distribution model RosinRammler


--> FOAM FATAL ERROR: 
Integrating outside table 0..0.000666667 not implemented. t1:0 t2:0.00111111

    From function linearInterpolationWeights::integrationWeights(..)
    in file interpolations/interpolationWeights/linearInterpolationWeights/linearInterpolationWeights.C at line 180.

FOAM exiting
i got same error message. I read http://www.openfoam.org/mantisbt/view.php?id=837#c2190 . Thanks both of you for (1000 0)

sprayCloudProperties
Code:
 
...
    injectionModels
    {
        model1
        {
            type            coneNozzleInjection;
            SOI             -178; // to just try
            massTotal       1.14e-6;
            parcelBasisType mass;
...  
        duration        5;
        position        ( 0 0.0005 0.109 );
        direction       ( 0 0 -1 );
        parcelsPerSecond 20000000; 
//crank angle ?? //mass flow ??  // i put values random.
        flowRateProfile table
            (
        (0 0.5)
        (1 1)
        (4 1)
        (4.5 0.5)
        (5 0)
        (1000 0)
        );
...
I have a question about flowRateProfile table.
In aachenbomb case, left column is time (seconds) flowRateProfile table and the right is massflow rate (kg/second i suppose)

In a sprayEngineFoam case, is left column enginetime (CAdegree) flowRateProfile table and the right massflow rate (kg/second i suppose) ?

How can i calculate injected fuel mass while i create a flowRateProfile table ?

rpm 1500 1 min
360 degree 25 1 seconds (ave.)
1 degree 0,069444444 1 seconds (ave.)

degree kg/s ?? injected fuel kg
(-178) 0 0,5 (0,06944444*0,5) 0,034722222

Thanks in advance.

sorry my english
ayhan515 is offline   Reply With Quote

Old   January 24, 2014, 13:21
Default
  #6
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
If you look at the code of the spray classes in the Lagrangian library (which I highly recommend) the flow rate profile is in crank angle degrees. However, what happens is that the rate is integrated, normalized and scaled so that it starts at SOI, lasts for the duration and injects the mass specified.
ayhan515 and alsaeng like this.
mturcios777 is offline   Reply With Quote

Old   October 14, 2014, 05:49
Default
  #7
New Member
 
Mateus Dias Ribeiro
Join Date: Jun 2013
Location: Guaratinguetá, Brazil
Posts: 20
Rep Power: 13
mateusdias89 is on a distinguished road
Hi Marco,

just to be sure if I got your last answer right. If I want to inject 8.8 mg (8.8 E-6 kg) of isooctane in the engine during 30 CAD, lets say with SOI at 210 CAD before TDC and just for simplicity with constant mass flow rate during the entire injection duration. So my sprayCloudProperties should look like this:

type coneNozzleInjection;
SOI -210;
massTotal 8.8e-6;
parcelBasisType mass;
injectionMethod disc;
flowType flowRateAndDischarge;
outerDiameter 0.001;
innerDiameter 0;
duration 30;
position ( 0 -0.0062 0.00719 );
direction ( 0 0 -1 );
parcelsPerSecond 1000000;
flowRateProfile table
(
(0 2.933e-7)
(30 2.933e-7)
);

As you can see, I calculate the mass flow rate dividing the total mass (8.8 E-6 kg) by the entire injection duration (30 CAD). So 8.8 E-6 / 30 = 2.9333 E-7. Is that right? I looked the tutorial aachenBomb (sprayFoam) and there the injection duration is 1.25e-3 s and the mass total 6e-6 kg, giving an average mass flow rate of 4.8e-3 kg/s. If you look the flowRateProfile table, which is not constant, you find values in an order of magnitude 1000 times bigger, giving me the impression that in the table the mass flow is given in g/s. So in the case of sprayEngineFoam it should be given in g/CAD. That means I would have a massFlowRate of 2.933e-4 instead of 2.933e-7. Did I get it right?

Thanks in advance,
Mateus
mateusdias89 is offline   Reply With Quote

Old   October 14, 2014, 06:59
Arrow
  #8
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
in my opinion below code is enough

if your injection profile is uniform
same amount fuel per CA degree
8,8/30=0.2933

Code:
massTotal       8.8e-6;
duration        30;
        flowRateProfile table
            (
        (0 0.2933)
        (1 0.2933)
        (2 0.2933)
        (3 0.2933)
        (4 0.2933)
        (5 0.2933)
        (6 0.2933)
        (7 0.2933)
        (8 0.2933)
        (9 0.2933)
        (10 0.2933)
        (11 0.2933)
        (12 0.2933)
        (13 0.2933)
        (14 0.2933)
        (15 0.2933)
        (16 0.2933)
        (17 0.2933)
        (18 0.2933)
        (19 0.2933)
        (20 0.2933)
        (21 0.2933)
        (22 0.2933)
        (23 0.2933)
        (24 0.2933)
        (25 0.2933)
        (26 0.2933)
        (27 0.2933)
        (28 0.2933)
        (29 0.2933)
        (30 0)
        (1000 0)
        );
ayhan515 is offline   Reply With Quote

Old   October 14, 2014, 08:21
Default
  #9
New Member
 
Mateus Dias Ribeiro
Join Date: Jun 2013
Location: Guaratinguetá, Brazil
Posts: 20
Rep Power: 13
mateusdias89 is on a distinguished road
Quote:
Originally Posted by ayhan515 View Post
in my opinion below code is enough

if your injection profile is uniform
same amount fuel per CA degree
8,8/30=0.2933

Code:
massTotal       8.8e-6;
duration        30;
        flowRateProfile table
            (
        (0 0.2933)
        (1 0.2933)
        (2 0.2933)
        (3 0.2933)
        (4 0.2933)
        (5 0.2933)
        (6 0.2933)
        (7 0.2933)
        (8 0.2933)
        (9 0.2933)
        (10 0.2933)
        (11 0.2933)
        (12 0.2933)
        (13 0.2933)
        (14 0.2933)
        (15 0.2933)
        (16 0.2933)
        (17 0.2933)
        (18 0.2933)
        (19 0.2933)
        (20 0.2933)
        (21 0.2933)
        (22 0.2933)
        (23 0.2933)
        (24 0.2933)
        (25 0.2933)
        (26 0.2933)
        (27 0.2933)
        (28 0.2933)
        (29 0.2933)
        (30 0)
        (1000 0)
        );
Thank you for the answer. I am trying this right now, but maybe you can also help me with another questions. I also realized that the simulation is very sensitive to the number of parcels (parcelsPerSecond entry in the sprayCloudProperties dictionary). My domain is an ICE with a bore of 84 mm, compression ratio 10:1 and running at 1500 rpm. I am performing a testcase to test the injection of isooctane inside the engine, as the piston goes down. I am using LES for the turbulence and tried to make the mesh as coarse as I can to be able to run faster, so the cell size inside the combustion chamber is about 1 mm. At the beginning, I set the parcelsPerSecond to 20E6 but I got floating point exception error. Decreasing this number I could go further with the simulation (at the end I set only 10E4 parcels per seconds) but still got floating point exception at a certain time. My questions are. First, this entry specifies the number of parcels injected per second as its name suggests or again for the case of sprayEngineFoam it is converted to parcels per CAD. Second, is the number of parcels related anyway to cell size? I mean, is there a maximum number of parcels allowed for a single cell? Third, is there a method to find out the optimal number of parcels per second?

Thanks in advance,
Mateus
mateusdias89 is offline   Reply With Quote

Old   October 15, 2014, 10:23
Arrow
  #10
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
i get same errors. i don't know these answers sorry.

I use foam extend 3-1(FE31) dieselEngineFoam
There is nParcels instead of parcelsPerSecond in FE31

I try to handle with trial and error

mass nParcels
2 mg 15000
7 mg 30000
12.81889832e-6 35000
16 mg 50000 (these values work on my case)


i suppose it depends on mesh quality (SOI value if near the TDC the problem occurs due to cell size becomes smaller) and hardware (memory ram)

i think we can not inject many parcels in a short range.

to reduce deltaT (controlDict)
to reduce flowRateProfile time step
may be solve the problem

8.8/120=0.07333

flowRateProfile table
(
(0 0.07333)
(0.25 0.07333)
(0.5 0.07333)
(0.75 0.07333)
(1 0.07333)
(1.25 0.07333)
(1.5 0.07333)
(1.75 0.07333)
(2 0.07333)
*
*
*
(30 0)
(1000 0)


I really wonder these answers.

Quote:
Originally Posted by mateusdias89 View Post
1-this entry specifies the number of parcels injected per second as its name suggests or again for the case of sprayEngineFoam it is converted to parcels per CAD.
2-is the number of parcels related anyway to cell size? I mean, is there a maximum number of parcels allowed for a single cell?
3-is there a method to find out the optimal number of parcels per second?
sorry for my English.

i hope more professional helps come.
best regards.
mateusdias89 likes this.
ayhan515 is offline   Reply With Quote

Old   October 15, 2014, 14:03
Default
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Quote:
Originally Posted by mateusdias89 View Post
Hi Marco,

just to be sure if I got your last answer right. If I want to inject 8.8 mg (8.8 E-6 kg) of isooctane in the engine during 30 CAD, lets say with SOI at 210 CAD before TDC and just for simplicity with constant mass flow rate during the entire injection duration. So my sprayCloudProperties should look like this:

type coneNozzleInjection;
SOI -210;
massTotal 8.8e-6;
parcelBasisType mass;
injectionMethod disc;
flowType flowRateAndDischarge;
outerDiameter 0.001;
innerDiameter 0;
duration 30;
position ( 0 -0.0062 0.00719 );
direction ( 0 0 -1 );
parcelsPerSecond 1000000;
flowRateProfile table
(
(0 2.933e-7)
(30 2.933e-7)
);

As you can see, I calculate the mass flow rate dividing the total mass (8.8 E-6 kg) by the entire injection duration (30 CAD). So 8.8 E-6 / 30 = 2.9333 E-7. Is that right? I looked the tutorial aachenBomb (sprayFoam) and there the injection duration is 1.25e-3 s and the mass total 6e-6 kg, giving an average mass flow rate of 4.8e-3 kg/s. If you look the flowRateProfile table, which is not constant, you find values in an order of magnitude 1000 times bigger, giving me the impression that in the table the mass flow is given in g/s. So in the case of sprayEngineFoam it should be given in g/CAD. That means I would have a massFlowRate of 2.933e-4 instead of 2.933e-7. Did I get it right?

Thanks in advance,
Mateus
This may work, but its better to have the mass flow rate end with a zero entry a little after end of injection with a magnitude of 0 so that the integration is properly performed. so

Code:
(
(0 2.933e-7) 
(30 2.933e-7)
(30.1 0)
);
Will do the trick. You don't need to worry so much about second column for the flow rate profile, as it is integrated and normalized as I mentioned about. You could use a rate like:

Code:
 
(
(0 1) 
(1 1)
(1.1 0)
);
So long as the total mass, SOI and duration are correct, your profile (which is constant injection) will be scaled to give the right total mass. You may want to increase the duration to account for the extra entry in the profile.

As for parcels, the more you have the better your spray characterization, though it will slow down your simulation. Having the right mesh density also helps.
ayhan515, mateusdias89 and wenxu like this.

Last edited by mturcios777; October 16, 2014 at 14:05. Reason: Formatting
mturcios777 is offline   Reply With Quote

Old   October 16, 2014, 05:11
Default
  #12
New Member
 
Mateus Dias Ribeiro
Join Date: Jun 2013
Location: Guaratinguetá, Brazil
Posts: 20
Rep Power: 13
mateusdias89 is on a distinguished road
Thank you Marco and Ayhan for the very clever answers!

I am running the intake stroke at the moment. I will use your suggestions for the injection and come back to tell the results!
mateusdias89 is offline   Reply With Quote

Old   June 16, 2015, 06:31
Default Diifferent numbers of particle injection?
  #13
New Member
 
Mamadou Camara
Join Date: Mar 2015
Posts: 12
Rep Power: 11
camzis is on a distinguished road
Dear Foamers,
I'm currently working with the solver iconUncoupledKinematicParcelFoam (lagrangian).
I need to inject a different number of particles at each time step.
I'm currently using the model "patchInjection" in the file kinematicCloudProperties.
The problem is, I dont know how to make the number of particels vary.
Is there a way to force the number of particles to vary by wether providing a table (for number of particles vs. time) or as a function?
Any suggestions, ideas are very welcome.
Please, my master thesis depends on this.
Regards!
Mamadou.
camzis is offline   Reply With Quote

Old   May 3, 2018, 07:03
Default
  #14
New Member
 
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 9
Shailja is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
If you look at the code of the spray classes in the Lagrangian library (which I highly recommend) the flow rate profile is in crank angle degrees. However, what happens is that the rate is integrated, normalized and scaled so that it starts at SOI, lasts for the duration and injects the mass specified.
Hii Marco

Can anybody please explain how flowrate profile is written in spraycloud properties of sprayFoam

injectionModels
{
model1
{
type coneNozzleInjection;
SOI 0;
massTotal 6.0e-6;
parcelBasisType mass;
injectionMethod disc;
flowType flowRateAndDischarge;
outerDiameter 1.9e-4;
innerDiameter 0;
duration 1.25e-3;
position (0 0.0995 0);
direction (0 -1 0);
parcelsPerSecond 20000000;
flowRateProfile table
(
(0 0.1272)
(4.16667e-05 6.1634)
(8.33333e-05 9.4778)
(0.000125 9.5806)
(0.000166667 9.4184)
(0.000208333 9.0926)
(0.00025 8.7011)
(0.000291667 8.2239)
(0.000333333 8.0401)
(0.000375 8.8450)
(0.000416667 8.9174)
(0.000458333 8.8688)
(0.0005 8.8882)
(0.000541667 8.6923)
(0.000583333 8.0014)
(0.000625 7.2582)
(0.000666667 7.2757)
(0.000708333 6.9680)
(0.00075 6.7608)
(0.000791667 6.6502)
(0.000833333 6.7695)
(0.000875 5.5774)
(0.000916667 4.8649)
(0.000958333 5.0805)
(0.001 4.9547)
(0.00104167 4.5613)
(0.00108333 4.4536)
(0.001125 5.2651)
(0.00116667 5.2560)
(0.00120833 5.1737)
(0.00125 3.9213)
(0.001251 0.0000)
(1000 0.0000)
);


Here it is mentioned in theabove post that it the second entry given is in terms of crank angle. Please clear it how to convert mass flow rate into cranck angle related flow rate.

regards
Shailja
Shailja is offline   Reply With Quote

Old   May 3, 2018, 14:04
Default
  #15
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
The flowrate profile is used to determine how much mass should be introduced into the domain for a given time. What matters more is the shape of your profile, rather than the actual magnitudes. The total mass that needs to be injected is set by massTotal. The profile you give is normalized and scaled such that is lasts as long as you specify in duration. This functionality for coneNozzle injectors was probably implemented to make it easy to change the mass injected with just one entry rather than recalculating the profile.

Note that the parcel velocity is set by the flowType, which can be either constant, pressureDriven and flowRateAndDischarge. Only flowRateAndDischarge and pressureDriven. pressureDriven will calculate the velocity using the Bernoulli equation, based on the pInj entry. pInj can be a constant or specified with a table.
mturcios777 is offline   Reply With Quote

Old   May 7, 2018, 02:32
Default
  #16
New Member
 
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 9
Shailja is on a distinguished road
Thanks for quick reply Marco !

So the flow rate Table defines a particular way of mass injection profile w.r.t time and it depends on plnj entry, but I am sorry i dont understand what quantity is plnj ?

I found a post in which Niklas has mentioned that second entry in flow rate table is kgPers (DieselFoam spray).
I understood this as kg-Parcel/s i.e. mass of 1 parcel multiplied by no. of parcels injected in that specfic time period, is this right?? I doubt that because when I try to back calculate with normalizing the nos. given in the Table by dividing every no. in table by Parcel/s to get total injected mass which is 6.0 mg, but I get 10.6 mg. what is I am doing wrong....

I am sorry for inconvenience but I am really stuck at this point.



regards
Shailja
Shailja is offline   Reply With Quote

Old   May 7, 2018, 14:03
Default
  #17
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
No problem. The thread you are referencing refers to the older version of the lagrangian libraries, which are different after version 2.0.

You have also misinterpreted the kgPers. What this entry is is kg/s. The parcels per second is an upper limit on the number of parcels that can possible be injected per second during your simulation. Explaining this would require a deep dive into the coneNozzleInjection class.

For the moment just try integrating the flowRateTable as it is and see if you get 6.0 mg. What you can also do is run the provided tutorial and look at the logFile to see that the injected mass is indeed 6 mg.

As further confirmation, try changing the mass flow rate and see if the injected mass changes; you should see that as long as massTotal is constant, the total injected mass will always be the same (this is because we've set the parcelBasis to mass).
mturcios777 is offline   Reply With Quote

Old   November 19, 2020, 15:19
Question
  #18
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
No problem. The thread you are referencing refers to the older version of the lagrangian libraries, which are different after version 2.0.

You have also misinterpreted the kgPers. What this entry is is kg/s. The parcels per second is an upper limit on the number of parcels that can possible be injected per second during your simulation. Explaining this would require a deep dive into the coneNozzleInjection class.

For the moment just try integrating the flowRateTable as it is and see if you get 6.0 mg. What you can also do is run the provided tutorial and look at the logFile to see that the injected mass is indeed 6 mg.

As further confirmation, try changing the mass flow rate and see if the injected mass changes; you should see that as long as massTotal is constant, the total injected mass will always be the same (this is because we've set the parcelBasis to mass).
Dear Marco/Foamers,

I am trying to simulate a pure pressure driven flow through a nozzle using speayFoam in OpenFoam1812. Imagine there is a nozzle between a large body of pressurized liquid and low pressure vapor on the other side. I would like to obtain the mass flow rate through the nozzle. Here is the relevant info from sprayCloudProperties file:
Code:
    injectionModels
    {
        model1
        {
            type            coneNozzleInjection;
            SOI             0;
            massTotal       1e-5;
            parcelBasisType mass;
            injectionMethod disc;
            flowType        pressureDrivenVelocity;
            Pinj	    constant 1e6;
            outerDiameter   2e-4;
            innerDiameter   0;
            duration        50e-3;
            position        (0 0.5 0);
            direction       (0 -1 0);
            parcelsPerSecond 20000000;
            flowRateProfile constant 1;
The problem is that both "massTotal" and "duration" should be defined. Consequently, wouldn't the mass flow rate (my output) be already imposed to the domain as mass flow = "massTotal" / "duration"?

I really appreciate your thoughts on this.

Regards,
MJ
mm66 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sprayEngineFoam problems in 2.2.x mturcios777 OpenFOAM Running, Solving & CFD 9 June 25, 2013 17:44
Tutorial for sprayEngineFoam ed_teller OpenFOAM Running, Solving & CFD 4 May 27, 2013 08:03
sprayEngineFoam - floating point exception error ris OpenFOAM Running, Solving & CFD 3 May 27, 2013 08:01
sprayEngineFoam crashes in parallel OF-2.1x Peter_600 OpenFOAM 5 March 21, 2013 18:47
SprayEngineFoam - multiple injections ris OpenFOAM Running, Solving & CFD 2 January 4, 2013 13:10


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