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/)
-   -   dispersion model with lagragian particle tracking model for incompressible flows (https://www.cfd-online.com/Forums/openfoam-solving/97629-dispersion-model-lagragian-particle-tracking-model-incompressible-flows.html)

mayank.dce2k7 September 10, 2013 00:02

Hi Eelcov,

I am using your solver to simulate particle in a single bifurcating tube with one inlet and 2 outlets of different diameters. I have generated particle position file and corresponding velocity file for particles. How can I specify initial velocity of each particle using your solver? or alternatively how can I make initial particle velocity equal to fluid velocity profile at inlet?

Regards,
Mayank.

mayank.dce2k7 March 28, 2014 13:20

Hi Eelcov ,

Your transient particle solver is two way coupled. In case I want to make it one way coupled solver, what changes do I need to make in UEqn.H, pEqn and pimpleCoupledKinematicParcelFoam.C?

Regards,
Mayank.

koulis April 2, 2014 07:20

Mayank,

Regarding the coupling there is a switch at the very top of the kinematicParticleProperties file within the /constant/ directory set it to false/off...

Regarding the velocities of the particles you would either have to change the velocity file, within the lagrangian directory of your first time step directory, manually (line by line, ex. using a macro in VI) . Or you would have to specify one of the existing injectors where you can prescribe a starting velocity...see the lagrangian tutorials for more details on how the injectors work.

Hope this helps
Koulis

Azy July 16, 2014 15:16

How to calculate velocity gradient in particle tracking
 
Hello is there any one here could help me a bit about how to do calculate velocity gradient on tracked particles? I want to calculate the shear, so I need it.


Thanks,:)

wenxu November 2, 2014 04:06

Quote:

Originally Posted by jiejie (Post 405449)
Hi eelcovv

Could I ask how come my kinematicCloudTheta is like the following after I add the voidFraction in the kinematicCloudProperties with the cavityMassPartUncoupledSD_clear case?

Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    movingWall
    {
        type            calculated;
        value          uniform 0;
    }
    walls
    {
        type            calculated;
        value          uniform 0;
    }
}

Thank you very much.

Jie


Dear, jiejie,

I encountered the same problem as you i got the outputs stays zero when i use eelcovv's solver.
May be the way i compile the new class "parcelStatistics" in a wrong way. I copy the intermediate to my $FOAM_RUN/....../intermediate and the put the parcelStatistics in the CloudFunctions folder and changed the corresponding lines in the makParcelCloudSubmodels.H in the parcels folder.
Then i use the DPMFoam as the test case, yes ,the new class is used but firestly,
"Duplicate entry dual in runtime selection table AveragingMethod etc. many as these lines, but they say the same thing" errors was happening when the DPMFoam is exected. Secondly, the output was staying zero as i have described above.

Please help me, thank you !
regards,
wen

wyldckat November 2, 2014 07:45

Quote:

Originally Posted by wenxu (Post 516977)
"Duplicate entry dual in runtime selection table AveragingMethod etc. many as these lines, but they say the same thing"

Quick answer - Study this thread: http://www.cfd-online.com/Forums/ope...ion-fault.html

wenxu November 3, 2014 01:37

Quote:

Originally Posted by wyldckat (Post 516994)

Dear Bruno,
Thank you, master!!! I have solved the problem as soon as you give me the link.
But that's ok when i run the DPMFoam , however when i changed to the reactingParcelFoam and use the same method things gone wrong have the same point of "duplicate......."
Make/options:
Code:

EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I${LIB_SRC}/meshTools/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
    -I$(LIB_SRC)/lagrangian/basic/lnInclude \
    -I/root/OpenFOAM/root-2.3.0/src/myIntermediate/lnInclude \
    -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
    ...................
EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lcompressibleTurbulenceModel \
    -lcompressibleRASModels \
    -lcompressibleLESModels \
    -llagrangian \
    -L$(FOAM_USER_LIBBIN) -lmyintermediate \
    -llagrangianTurbulence \

PS: i also find a bug(maybe).. the member function in the CloudFunctionObject.H (base class of the CloudFunctionObjects)
Code:

//- Post-move hook
            virtual void postMove
            (
                const typename CloudType::parcelType& p,
                const label cellI,
                const scalar dt,
                const point& position0,
                bool& keepParticle

            );

but in the derived class,say, VoidFraction, the function is:
Code:

//- Post-move hook
            virtual void postMove
            (
                const parcelType& p,
                const label cellI,
                const scalar dt,
                bool& keepParticle

            );

SO when we use the function in the CloudFunctionObject, wen can not use the derived class function with the same name( polymorphism ! )

thank you again! you are really a expert!!!
best regards,
Wen

wyldckat November 17, 2014 16:03

Hi Wen,

I finally managed to look into this.

It seems you've spotted a bug that has already been fixed several months ago (on the 18th of February 2014) in OpenFOAM 2.3.x: https://github.com/OpenFOAM/OpenFOAM...35a5209f11d31a

Since you depend on this, perhaps you should either install OpenFOAM 2.3.x or at least get the "intermediate" library source code from it.

Best regards,
Bruno

Amjad Asad January 31, 2015 10:10

Hello Eelc,
could you tell me pls, how u estimated the massflowrate in your case ?
regards,
Amjad

chpjz0391 May 13, 2016 03:02

Hey Mayank,

could you post ur solver for incompressible flow particles tracking solver for steady state. Actually I am looking for such a solver, however, I am a newbie of OF, I am not able to compile the solver by myself. Thank you

chpjz0391 May 25, 2016 01:13

Quote:

Originally Posted by eelcovv (Post 405225)
Hi wellDone,

Thanks for the comments. Yes, probably you need to tweak a bit to get the library compiled, I just compiled it too the latest 2.1.x version, but I don't keep up the versions unless I need to my self. I will have a look to the new wall function you mention.

I just got a request to share the particle statistics cloud function object. I am only attaching this because of the limited upload space (only 100kb). You should add this too the CloudFunctionObjects directory and add the following in the intermediate/parcles/include/cloudfumakeParcelCloudFunctionObjects.H file

#include "ParticleStatistics.H"

and lower

makeCloudFunctionObjectType(ParticleStatistics, CloudType);

Now you can add to the bubbleCloudProperties the following lines.

Code:

cloudFunctions
{
  voidFraction;

  particleStatistics
  {
      resetFields    true;
      prime2Mean    true;
      writeBubblePDF true;
      timeStart      100;
      timeEnd        1e10;
  }
}

The voidFraction is cloudfunction only give you the void fraction of the bubbles, but the particlestatistics also give you the particlevelocity and its rms vales, as will as the PDF of the particle distribution. Very handy, I can assure you (it is the only way to obtain mean profiles of the gas velocity)

Cheers
Eelco

Hey Eelco,

Can I get the particles concentration(kg/m3) by this way?If I can could you tell me how

Ping

cfdopenfoam July 3, 2016 04:15

physical description about your problem
 
Quote:

Originally Posted by eelcovv (Post 367477)
Hi Cedric and others,

Yes, I have lift included to the particle library. I actually created a new class call bubbleCloud as I didn't want to modify the original kinematicParticle class.

Well, I can give my code, as I hope it can be improved. The code contains a library which you should unpack in you own local library location (in my case
/home/eelco/OpenFOAM/eelco-2.1.x/src). Build it with wmake libso

Then there is a solver call pimpleLPTBubbleFoam which uses the library to include the bubble including lift.

Finally, I have added a sample case which calculates the benchmark with bubbels in a square bubble columm performed by Deen et al (2001, Chemical engineering science 56). The bubble tracking information can be found in the constant directory. I have added and extra field called writeEvery in this directory to solve the problem I mentioned earlier in this thread: it allows you to write the bubbles a higher frequency than the data fields.

Note that the files are zipped with bzip2 (as the resulting files are smaller) but that extension is not allowed so I added .gz to the file name. To unpack the files do

mv filename.tar.bz2.gz filename.tar.bz2
tar xjvf filename.tar.bz2

The file must be compiled using OpenFOAM 2.1.x (probably also 2.1.1) because I make use of the bug fixed released on my earlier post.

The pictures show the velocity profiles at three heights in the square bubble column compared to experiments, one without and one with lift.
You can see that the lift improves the results as more spread is established, however, it is not completely correct yet.

One of the thinks I am looking at is the turbulent dispersion, which was on for this case, but did not have an effect. The reason is that I used the SpalartAllmarasDDES turbulence model, which does not internally calculates the k-value. Therefore, the Uturb contribution is 0, where as it should have a value. I also run the case with the oneEqEddy turbulence model and then turbulence fluctuations are included because k is calculated in this turbulence model. My question is: how can I force the k-values to be calculated from the library , even this k is not used by the turbulence model?

Another thing I can not figure out is how to set the value of the force in the new fields Flift, Fdrag and Fbuoy I have created. I was trying to set the fields of the pointer to the particle p in the calcNonCoupled routines, but since it is defined as const it is not allowed to change the values. Removing the const from the type definitation does not work as well, even if done consistently throughout the code. What would be an appropriate way to access those field so that the force can be stored on the particle properties such you can write them to file to analyse later?

Well, so far. Hopefully this is enough information to check the code. Please let me know if you can make any improvements. Hopefully something like this code can be included in the official OF release as it allows to use Lagrangian particle tracking of bubble flows in OF.

Regards
Eelco

hi, Eelco. dear all.

I am quite interested in Eelcos work and everybodys enlightment on the topic of this thread. I would very much like to dig into the solver and the elegant code. But before that I think I need some help about the physical description about the attached test case and also the theoretical background. So I am going to restart this thread.

Could anybody give me some guidance on the physical and mathematical interpretation of the pimpleLPTBubbleFoam or the bubcol3d case? I work with OF-2.3.0 and know the pimple solver, but I am quite new to the lagrangian world of OF.

Thank you in advance!

Best,
Karekle

ywang July 24, 2016 19:59

heat transfer
 
Hi Eelco,

Your solver looks great. Before trying, could you please let me know whether it can consider heat transfer or not? I want to use it for particle tracking in a room where the turbulent flow is driven by temperature difference.

Thanks.

Best,
Yong

eelcovv December 20, 2017 13:33

Update version for OpenFOAM 5.x by openfoam.org
 
2 Attachment(s)
Dear All

Thanks for the likes for this solver I posted a couple of years ago. Could not answer all the question as I am not online on the forum that much anymore

Anyhow, I needed to use it myself lately and found that the OpenFOAM 5.x branch has an improved particle tracking algorithm, see here

I have updated the particle tracking solver for simulating bubbles in an incompressible flow for the OpenFOAM 5.x version (from openfoam.org) The good news is that you do not have to compile any libraries anymore. Just the solver is enough. I have included a small example of usage as well. Good luck with it!

Regards
Eelco

vishal_s April 10, 2018 09:36

Hello,

Did anyone solved the void fraction issue in CollidingParcel case ? can anyone please share their file or suggest me where and how to incorporate the line " td.cloud().functions().postMove(p, cellI, dt);" in CollidingParcel.C. Moreover, dt is not mention in the CollidingParcel.H file. so it will give an error while compiling

I am using OF-2.2.2.


All times are GMT -4. The time now is 16:00.