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

one parcel contains too many particles after breakup

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2015, 03:36
Default one parcel contains too many particles after breakup
  #1
New Member
 
Join Date: Apr 2015
Posts: 8
Rep Power: 10
xuebao123 is on a distinguished road
I use sprayFoam to simulate water droplet's breakup,the breakup model is ETAB and KHRT model,when the parcel was injected into air ,it contains only one particle,but after
breakup the number of particle in one parcel is more than 1000。

(1) I think too many particles in one parcel will influence the droplet's distribution,especially when the water was injected into supersonic flow.

(2)I'm not sure whether it's a bug or not,I want to control the number of particle in one parcel less than 50,but I don't know how to do it.

(3)Is there some way to add some new parcels to make sure the number of particle in one parcel is less than 50?
xuebao123 is offline   Reply With Quote

Old   April 15, 2015, 12:04
Default
  #2
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by xuebao123 View Post
(3)Is there some way to add some new parcels to make sure the number of particle in one parcel is less than 50?
Yes, but if you want to have exactly this criterion for creating a new parcel then you have to write your own breakup model.
Othwerwise, have a look at the KHRT model.

-Armin
dkxls is offline   Reply With Quote

Old   April 16, 2015, 23:05
Default
  #3
New Member
 
Join Date: Apr 2015
Posts: 8
Rep Power: 10
xuebao123 is on a distinguished road
Quote:
Originally Posted by dkxls View Post
Yes, but if you want to have exactly this criterion for creating a new parcel then you have to write your own breakup model.
Othwerwise, have a look at the KHRT model.

-Armin
Hi,Armin.Thanks for your answer,I tried two kinds of methods.The result of first one is better than before,but the second failed.Then I will tell you the method I have tried.

(1) if one parcel contains more than 2 particles,a childParcel will be added.nParticel of the childParcel is half of parenParcel.nParticle and mass of parenParcel will be reduced.
The code is:
scalar massDrop = pow3(d)*rhopi6;
nParticle = mass/massDrop;
if (nParticle >= 2)
addParcel = true;
d = cbrt(massDrop/rhopi6);
ms = 0.0;
dChild = cbrt(massDrop/rhopi6);
massChild = 0.5*nParticle*pow3(dChild)*rhopi6;
mass -= massChild;
nParticle-=0.5*nParticle;
}
I add this code at the end of RT breakup and KHindex breakup.

(2)Since the addParcel function is realized in SprayParcel.C,I think change the code in SprayParcel.C is more effective than in KHRT model.The code is:

while(this->nParticle()>6)
{
SprayParcel<ParcelType>* myaddchild = new SprayParcel<ParcelType>(*this);
myaddchild->nParticle() =5;
td.cloud().addParticle(myaddchild);
this->mass()-=5*3.14*1000*pow3(this->d())/6;
this->nParticle()-=5;
}
I add this code after calcBreakup(td, dt, cellI); but it doesn't work.I don't no how to solve it.Can you give me some advice.

Thank you verymuch.
xuebao123 is offline   Reply With Quote

Old   April 17, 2015, 04:09
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Please, use the CODE tags!
Some beginners guidelines are given here:
http://www.cfd-online.com/Forums/ope...tml#post424508

Quote:
Originally Posted by xuebao123 View Post
(2)Since the addParcel function is realized in SprayParcel.C,I think change the code in SprayParcel.C is more effective than in KHRT model.
I don't see any reason why you would want to change the code in SprayParcel.C. You can do everything in the breakup model, which is much easier to implement than recompiling the whole spray classes.
Besides, changes in SprayParcel.C would affect all breakup models, something you clearly don't want to do when evaluating different models.
There is also not really any benefit concerning the computational efficiency!
dkxls is offline   Reply With Quote

Old   April 18, 2015, 22:30
Default
  #5
New Member
 
Join Date: Apr 2015
Posts: 8
Rep Power: 10
xuebao123 is on a distinguished road
Quote:
Originally Posted by dkxls View Post
Please, use the CODE tags!
Some beginners guidelines are given here:
http://www.cfd-online.com/Forums/ope...tml#post424508


I don't see any reason why you would want to change the code in SprayParcel.C. You can do everything in the breakup model, which is much easier to implement than recompiling the whole spray classes.
Besides, changes in SprayParcel.C would affect all breakup models, something you clearly don't want to do when evaluating different models.
There is also not really any benefit concerning the computational efficiency!
Sorry,I'm new here.Thank you for your patience to answer.
(1)I have changed the code in KHRT model.I tried two methods,but I think it have some problems.
The first one(The red word is my code):
Code:
         if ((tc > 0) || (lambdaRT < d) )
    {
        tc += dt;
    }

    // characteristic RT breakup time
    scalar tauRT = cTau_/(omegaRT + VSMALL);

    // check if we have RT breakup
    if ((tc > tauRT) && (lambdaRT < d))
    {
        tc = -GREAT;
        scalar nDrops = d/lambdaRT;
        d = cbrt(d3/nDrops);
    scalar massDrop = pow3(d)*rhopi6;
    nParticle = mass/massDrop;
        if (nParticle >= 2)
        {
           addParcel = true;
           d = cbrt(massDrop/rhopi6);
           ms = 0.0;
           dChild = cbrt(massDrop/rhopi6);
           massChild = 0.5*nParticle*pow3(dChild)*rhopi6;
           mass -= massChild;
           nParticle-=0.5*nParticle;
         }
   
    }
In this way we could add one child parcel,and nParticle in parenParcel has been cut in half.But we can't control the nParticle of childParcel.So I tried another method.
The second one:
Code:
  if ((tc > 0) || (lambdaRT < d) )
    {
        tc += dt;
    }

    // characteristic RT breakup time
    scalar tauRT = cTau_/(omegaRT + VSMALL);

    // check if we have RT breakup
    if ((tc > tauRT) && (lambdaRT < d))
    {
        tc = -GREAT;
        scalar nDrops = d/lambdaRT;
        d = cbrt(d3/nDrops);
        scalar massDrop = pow3(d)*rhopi6;
        nParticle = mass/massDrop;
        if (nParticle >= 51)
        {
           addParcel = true;
           d = cbrt(massDrop/rhopi6);
           ms = 0.0;
           dChild = cbrt(massDrop/rhopi6);
           massChild = 50*pow3(dChild)*rhopi6;
           mass -= massChild;
           nParticle-=50;
         }
   
    }
In this way we could specify the nParticle of childParcel.But for a parcel contains 300 particles,we could control the nParticle of child parcel,but the nParticle of parenParcel is still large.So I want to change the code in SprayParcel.C.

(2)The code I have changed inSprayParcel.C
Code:
 if (liquidCore() > 0.5)
        {
            calcAtomization(td, dt, cellI);

            // Preserve the total mass/volume by increasing the number of
            // particles in parcels due to breakup
            scalar d2 = this->d();
            this->nParticle() *= pow3(d1/d2);
        }
        else
        {
            calcBreakup(td, dt, cellI);
      
    }
    
    while(this->nParticle()>51)
    {
         SprayParcel<ParcelType>* myaddchild = new SprayParcel<ParcelType>(*this);
         myaddchild->nParticle() =50;
         td.cloud().addParticle(myaddchild);
         this->mass()-=50*rhopi6*pow3(this->d());
         this->nParticle()-=50;
        }    
    }
In this way we could control nParticle in all Parcel is below 50,I think it's better than change code in breakup model.But it doesn't work,I have no idea about it .Can you give me some advice?
Thank you very much.

Last edited by xuebao123; April 19, 2015 at 08:55.
xuebao123 is offline   Reply With Quote

Old   April 22, 2015, 05:59
Default
  #6
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Without knowing what goes wrong it's pretty difficult to say why. Any error message?
(Before posting the error message/log, please read the guidelines on how to do that properly.)
dkxls is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to determine the number of particles injected. welch FLUENT 2 January 18, 2024 05:08
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 22:33
allocating some particles to a parcel in DPM morihangi FLUENT 0 October 24, 2012 09:08
particles model ati_ros61 FLOW-3D 3 December 6, 2009 17:03
WAVE & TAB breakup inconsistency Orrin FLUENT 0 January 7, 2009 12:02


All times are GMT -4. The time now is 01:48.