CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Evaporation model in dieselSpray

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 10, 2011, 09:25
Default Evaporation model in dieselSpray
  #1
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
hii evrybody,

i want to implement a new evaporation model in dieselSpray, the are two models; standartEvaporation model and RutlandFlash boil model wich are both assuming the D2 law.

i want to implement a 0D model that calculate the equilibrium state of the droplet after evaporation, i have a c++ code that do this but the implimentation is not to be evident fo me.

thank's...

Last edited by Tag; June 10, 2011 at 09:57.
Tag is offline   Reply With Quote

Old   June 10, 2011, 10:20
Default
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
formulate the problem in a way that it can be written as

Code:
 d               m_d
-- m_d = - ------
dt               tau
the expression for tau is the evaporation model.

or relaxationTime in
http://foam.sourceforge.net/doc/Doxy...tionModel.html
niklas is offline   Reply With Quote

Old   June 14, 2011, 03:14
Default
  #3
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Thank you for your answer Niklas, have you an idea of what the Sevap in the Rho equation contains ?

Sevap += dieselSpray.evaporationSource(i);

My 0D model have not time for the moment, it caculate only the properties of droplets at the equilibrium state, it doesn't assume a D2 law or Abramzon model, i use the secant methode to calculate these properties.

So if i know what Sevap contains, i think that i can implement it..

thank you
Tag is offline   Reply With Quote

Old   June 14, 2011, 04:03
Default
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
I suspected that you would say that

actually you can relate your model to a characteristic time and use the existing
framework to add your new evaporation model.

in FOAM the mass of the droplet is calculated/updated according to this equation

Code:
(m^n - m^{n-1})           m^n
---------------------   = -   --------    (1)
      dt                        tau
where m^n is the new mass that the drop will have at this time-step and m^{n-1} is the previous drop mass.
dt is the integration step and tau is the characteristic evaporation time (evaporation model)

if you know that the mass of the drop is updated according to this equation,
you can calculate the new mass, m^n, according to your equilibrium conditions and related that to tau.

like this:

according to (1) you will get

Code:
     m^n                                                      K*dt
 ------------ = 1/( 1 + dt/tau) = K   =>    tau = -----------
  m^{n-1}                                                    1 - K
where K is something that you can calculate with your model.

This way you dont have to calculate the source terms and bother with Sevap as it will be handled
automatically.
niklas is offline   Reply With Quote

Old   June 14, 2011, 05:24
Default
  #5
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
thank you Niklas,

I think it's easier to do that, I will keep you informed on the progress of my implementation.

i will haves somme questions about the mass fraction of the liquids phase and gazous phase, temperature, pressure modification and updating ...

Thank you again Niklas....

Noureddine.
Tag is offline   Reply With Quote

Old   June 24, 2011, 10:32
Default
  #6
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Hii Niklas,

I have successfully implemented my 0D model in OpenFoam as you suggest.

for the case of standartEvaporationModel and my 0D evaporation model:
i want to know how the temperature and other properties like volume fraction and the diameter of the droplets are calculated and updated, I suspect that the B term in evaporation model is considered constant.

Thank you.
Tag is offline   Reply With Quote

Old   June 25, 2011, 08:00
Default
  #7
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Great,

Im not following, which B-term?

if you want to find out how these properties are updated, just check the updateProperties-function in parcel.C.
niklas is offline   Reply With Quote

Old   June 29, 2011, 07:55
Default
  #8
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Dear Niklas,

B is the Spalding mass number.

I have to give the initial mass fractions of the liquide, gaz, N2 and O2 (air) and their temperatures in cell to my 0Dmodel that calculate the equilibrium temperature and then the final mass fractions of these species in the same cell, in order to estimate the mass ratio of the liquide : m (n)/m(n-1)= Yl(n)/Yl(n-1) (Yl mass fraction of liquide). the problème that i don't found yet these propertise in openfoam.

Can you give me an idea to how i do that ?

Thank's.....
Tag is offline   Reply With Quote

Old   July 4, 2011, 05:27
Default
  #9
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Hi,

where can i find the total mass, the gas temperature, the fractions of different species in cell(i), i had to use these properties in one class that I've created in dieselSpray SubModels.

Thank U.
Tag is offline   Reply With Quote

Old   July 4, 2011, 05:59
Default
  #10
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Have you checked parcel.C?

All is in there.

if you want the mass of the cell you have to get the density and cell volume

Code:
    scalar cellV            = sDB.mesh().V()[celli];
    scalar rho              = sDB.rho()[celli];
    scalar cellMass         = rho*cellV;
temperature of the gas at parcel position
Code:
    scalar Tg0 = sDB.TInterpolator().interpolate(position(), celli, facei);
vapor mass fraction of liquid index i (which has index j among the gas species)

Code:
        label j = sDB.liquidToGasIndex()[i];
        const volScalarField& Yj = sDB.composition().Y()[j];
        scalar Yfg0 = Yj[celli];
niklas is offline   Reply With Quote

Old   July 4, 2011, 06:18
Default
  #11
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Hi Niklas,
thank you for your answer, i suspected that and you confirmed me thses information, what about the mass fraction of vapor ?
Tag is offline   Reply With Quote

Old   July 4, 2011, 06:20
Default
  #12
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
again...
vapor mass fraction of liquid index i (which has index j among the gas species)

Code:
        label j = sDB.liquidToGasIndex()[i];
        const volScalarField& Yj = sDB.composition().Y()[j];
        scalar Yfg0 = Yj[celli];
sDB.composition().Y() is the reference to the vapour mass fractions
niklas is offline   Reply With Quote

Old   July 4, 2011, 06:24
Default
  #13
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
oops ... thank you so much Mr Niklas.
Tag is offline   Reply With Quote

Old   July 4, 2011, 06:25
Default
  #14
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
last question,

know you how the spalding number that used in the evaporation model (ys-y/1-ys) (somme thing lick that.) is calculated in openFoam?
Tag is offline   Reply With Quote

Old   July 4, 2011, 08:08
Default
  #15
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
standardEvaporationModel.C

B = 1 + Xratio
Code:
    /*
        (pressure - partialFuelVaporPressure)/
        (pressure - pressureAtSurface)
      = 1 + Xratio

        if the pressure @ Surface > pressure
        this lead to boiling
        and Xratio -> infinity (as it should)
        ... this is numerically nasty

    NB! by N. Nordin
        X_v,s = (p_v,s/p) X_v,d
        where X_v,d = 1 for single component fuel
        according to eq (3.136)
        in D. Clerides Thesis
    */

    scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);

    if (Xratio > 0.0)
    {
        lgExpr = log(1.0 + Xratio);
    }
niklas is offline   Reply With Quote

Old   July 4, 2011, 08:21
Default
  #16
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
thank you Niklas,

i have already seen this in standardEvaporationModel.C, Xs is a variable of the relaxationTime function, but when this function is used we must give the Xs that is, i think is calculated by another function or expression, this is what i want to know.

thank you.
Tag is offline   Reply With Quote

Old   July 5, 2011, 02:27
Default
  #17
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Ah, OK.

Thats done in parcel/setRelaxationTimes.C

However, Xs just calls the function which is defined in the liquidMixture class
thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C

which just looks like this
Code:
Foam::scalarField Foam::liquidMixture::Xs
(
    const scalar p,
    const scalar Tg,
    const scalar Tl,
    const scalarField& xg,
    const scalarField& xl
) const
{
    scalarField xs(xl.size(), 0.0);

    // Raoult's Law
    forAll(xs, i)
    {
        scalar Ti = min(TrMax*properties_[i].Tc(), Tl);
        xs[i] = properties_[i].pv(p, Ti)*xl[i]/p;
    }
    return xs;
}
niklas is offline   Reply With Quote

Old   July 5, 2011, 08:44
Default
  #18
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Hi Niklas,

To use the molar fraction and gas temperature in my "model0D" class, i have to use an instance of the "spray" class, so what kind of inheritance can do that easily ?

Thank's....
Tag is offline   Reply With Quote

Old   July 5, 2011, 09:04
Default
  #19
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Im not sure I understand your question, but the access calls to those variables are posted in my previous mails.
niklas is offline   Reply With Quote

Old   July 5, 2011, 09:20
Default
  #20
Tag
New Member
 
Noureddine TAGUELMIMT
Join Date: Mar 2011
Location: Rouen, France
Posts: 21
Rep Power: 6
Tag is on a distinguished road
Hi,
This is a part of a header of the class i created called model0D,

#ifndef model0D_H
#define model0D_H

namespace Foam
{

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
class spray; // line added to call the spray class
class model0D
{

And, in the model0D.C i added the properties lick gas temperature :
spray mysDB;
scalar Tg0 = mysDB.TInterpolator().interpolate(position(), celli, facei);

but it doesn't work!!, i suspect that i haven't made the necessary operations to make correct calling between the two classes .


Thank you....
Tag is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
multiphaseInterFoam for RAS turbulence model chiven OpenFOAM Bugs 7 August 23, 2011 02:52
multi fluid mixture model issue rystokes CFX 3 August 9, 2009 19:13
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model Jonas Larsson FLUENT 5 March 13, 2000 04:27


All times are GMT -4. The time now is 20:47.