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)

eelcovv February 21, 2012 12:19

dispersion model with lagragian particle tracking model for incompressible flows
 
4 Attachment(s)
Dear All,

I started to explore the Lagrangian particle tracking capabilities of OF 2.1 last week. I would like to do particle tracking of non-reacting particles in an incompressible flow with turbulent dispersion. Standard forces like drag and buoyancy should be included. It seems that there is no standard model for this, as most models which come for OF are developed for reacting flows in compressible fluids. Therefore I tried to implement it myself. I have included the solver (pimpleCoupledKinematicParcelFOam ) + 2 test cases to this post. The solver works, except that I can not use the dispersionModels! I hope to find out what is wrong by opening this thread. First I will give some back ground of my approach and then I end with my question.

As a starting point I took the isoUncoupledKinematicParcelFoam solver in OF 2.1.0, which uses the kinematic particle foam class to solve the particle transport. As I understand, the particle tracking models in OF are all developed for compressible flow. This means that dt(rho,U) is solved in stead of dt(U), and moreover, the pressure is expressed in kg/m/s2 (Pa). The isoCoupledKinematicParcelFoam solver does not solve for U at all, so no problem here. However, I wanted to make a solver which also includes the U and p solution. If you formulate the solver as dt(rho,U), the turbulence modelling can not be included, because these require the pressure to have the unit m2/s2 (i.e. pressure normalized with density). Therefore I create a new pressure field p_rgh with units m2/s2 (just as the pimple solver), which I use in the solution of d(U)/dt and p_rgh, and calculate the p=rho*(rg+p_rgh) pressure which is the pressure in N/m2 including the hydrostatic pressure. This tricks works: you can include turbulence in the solution and still be able to call the kinematicParticle foam routines.

Well, here my version of the solver, which I call pimpleCoupledKinematicParcelFOam. It works and it allows you to use all functionality in the kinematic particles. It is actually very similar with the solver submitted michaelb in http://www.cfd-online.com/Forums/ope...-tracking.html, except that Michaels solver is only one-way coupled (it does not feed back the particle force on the fluid) and does not include the gravity term. So this solver is a bit more generic. I have taken Michaels test case of the 3D cavity with moving lid and show that the particle can be solved qualitatively correct. See the graph for a mass-less particle tracking and a particle with mass.

There is one problem which I can not solve though: if I want to use the dispesionModel in the kinematicParticleProperties dictionary, I get the following error:

lookup of RASProperties from objectRegistry region0 succesful, but is not RASModel, it is kEpsilon.

It seems to me that the dispersionModel again expects a turbulence model which is based on a compressible flow, whereas now in the solver the turbulence model is based on an incompressible flow.

My question is: can this be easily solved by tricking the dispersionModel, or do I need to rewrite the whole particle tracking class such that it is based on incompressible turbulence models?

Has somebody already implemented this Lagrangian particle tracing in transient incompressible flow which turbulent dispersion? Any hints or suggestions appreciated!

Regards
Eelco

Mat_fr February 22, 2012 11:50

Dear eelcovv,

I'm also dealing with lagrangian particle tracking.
I would like to use the stochasticDispersionRAS model with the icoUncoupledKinematicParcelFoam solver, and I get the same error :

--> FOAM FATAL ERROR:

lookup of RASProperties from objectRegistry region0 successful
but it is not a RASModel, it is a kEpsilon

So, unfortunatley I cannot help you, and I will be glad to read any advice.
And, let me know if you find a solution! :)

Furthermore, as I'm quite beginner with OpenFOAM, I've also some questions about lagrangian particle tracking :
As I said, I'm using the icoUncoupledKinematicParcelFoam solver, which does not solve U. It means that only one-way coupling is possible. However in the Properties file of the particles (in my case kinematicCloudProperties), one can precise if the solution is coupled or not. So, to what is refering this coupling ?

Thanks for the help.

Best,

Mat

eelcovv February 24, 2012 04:46

Hi Mat,

Thanks for the reply. You got the same error message as I got. If you look into the lagrangian particle tracking libraries (e.g $FOAM_SRC/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel) you see that it is related to the fact that the dispersion term is calculate on a compressibel ras model indeed, so I suspect this is the root of the problem. Either a new library model should be implemented for incompressible flows, or a trick should be done at solver level to be able to you the compressible model.

Building the new library model is not that trivial because it requires to modefy the library upto the level at which the RAS model is not relevant anymore. I think the whole Kinematic directory and all below it should be duplicated to a directory KinematicIncompressible, which means that all the files below it should be modified to. Or am I wrong? Can I introduce an incompressble ras model at a lower level in the kinematic particle class ? Who can advice?

On you question. You are right that you have an option in the kinematicParticleProperties dictionary, but in the icoUncoupledKinematicParcelFoam solver this is not used because the velocity field is not solved at all. So the option does not work. If you take the pimpleCoupledKinematicParcelFoam solver I sent in the previous post, the U equation is solved and also the particle mometum source is put back in the U equation (line 9 in UEqn.H). So now it is possible to do a two way coupled simulation. This is only relevant if you suspect your particles to have an effect on the flow of course. Such as bubbles in water.

Anyway, hopefully somebody has already developped a transient two way coupled solver for non-reacting particles which includes stochastic dispersion

Regards
Eelco

eelcovv February 28, 2012 09:02

Solver for particle tracking in incompressible fluid with turbulent dispersion
 
4 Attachment(s)
Dear All,

Today I found that turbulent dispersion can be included in particle tracking solvers based on incompressible fluid relatively easy. Just as I anticipated in my previous post, a new build of the particle tracking libary needs to be done in which all compressible turbulence models are replaced by incompressible turbulence models. If you then link your solver to this new library, it is possble to include turbulent dispersion in an incompressible solver during the run. The figure attached below gives an impression of the same cavity case as posted earlier, now with two-way coupled particle tracking in a gravity field with and without turbulent dispersion. As you can see, the particles indeed got dispersed by the stochasticDispersion model. Although I have validated the particle behaviour of individual particles in a stagnant fluid (both the terminal rising speed as well as the particle relaxation time are predicted correctly), I have not yet validated the dispersion models. Nevertheless, qualitatively the dispersion seems to be included correctly.

What I did is copying lagrangian/intermediate library to my own directory, and replace all compressible turbulence refereces with incompressible references, which actually only needs to be done in the files
DispersionRASModel (.C and .H) and BrownianMotionForce (C and H) files below the submodels directory. Also in the Make/options file all the compressible turbulent libraries need to be replaced by incompressible libraries. I have added the new library and the solver based on this library to this post. Here a short instruction to compile it:

1: make your own library directory under your home for the new particle tracking ilbary

mkdir -p $FOAM_USER_SRC/lagrangian/incompressible/

cd $FOAM_USER_SRC/lagrangian/incompressible/

2: copy the excisting Foam particle tracking library to your own directory (only the intermediate directory needs to be recompiled)

cp -r $FOAM_SRC/lagrangian/intermediate/ .
cd intermediate

3: Download the submodels.tar.bz2.gz attachment. Beware: the attachment is not really zipped with gzip, but the .gz extension is just to allow to upload the file to the forum (as gz extension is required); I actually zipped the archive with bzip2 in order to get the zipped archive below the required 100k. So put the attachment into the current directory and do the following

mv submodels.tar.bz2.gz submodels.tar.bz2
tar xjvf submodels.tar.bz2


This should unzip (using bzip2) the submodels directory plus the modified make files.

4: Compile the new library with

wmake libso

Now a new libary libincompressibleLagrangianIntermediate should have been put in your local library directory $FOAM_USER_LIBBIN

The new attachment of the pimpleCoupledKinematicParcelFoam solver can be compiled using the new libary and the dispersion models can this time be included in the kinemeticCloudProperties dict.

Finally, I have included my modified particleTrack utility, kinematicParticleTracksIncompressible, which adds functionality to the one which comes with OF. Next to writing the partlce track it also writes information on other properties such as the residence time and particle diameter. Besides that, some more options can be added in the particleTrackProperties dictonary, such as writing one file per track or writing the data in raw format. Just compile the file and try to run it.

Well, hopefully this is useful. Good luck!

Regards
Eelco

eelcovv March 9, 2012 06:12

stochatischDispersionLES model added to incompressible pimple solver
 
4 Attachment(s)
For those interested: I added stochastic fluctuations in an incompressible LES context as well (the original dispersion model is only implemented for RANS). Just compile the library attached and add

dispersionModel stochasticDispersionLES;

or

dispersionModel gradientDispersionLES;

to the kinematicCloudPropertries dictionary. Have a look at the 3D cavity example.

Note: The same trick has been just to the intermediate.tar.bz2.gz archieve: remove gz extension and unpack it with tar xjvf (using bzip2).

I also update the kinematicParticleTracks utility compiled against the new library. Also some more info per particle track is written (UTubr and tTurb for instance).

One question from my side again: does anybody now how to write the particles independently from the fields ? I would like to write the particle at a higher frequency than I write the field files. Hopefully any knows how to do this. Thanks!

Regards
Eelco

Mat_fr March 18, 2012 13:12

Dear eelcovv,

I'm really interested by your dispersion model for incompressible fluid. Thanks a lot for that.
I've tried to compile it, and I get the following errors on the RAS dispersion model :

Quote:

In file included from lnInclude/GradientDispersionRAS.H:38,
from lnInclude/makeParcelDispersionModels.H:33,
from parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:33:
lnInclude/DispersionRASModel.H:57: error: ‘incompressible’ has not been declared
lnInclude/DispersionRASModel.H:57: error: ISO C++ forbids declaration of ‘RASModel’ with no type
lnInclude/DispersionRASModel.H:57: error: expected ‘;’ before ‘&’ token
In file included from lnInclude/GradientDispersionRAS.H:38,
from lnInclude/makeParcelDispersionModels.H:33,
from parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:33:
lnInclude/DispersionRASModel.H:108: error: ‘incompressible’ has not been declared
lnInclude/DispersionRASModel.H:108: error: ISO C++ forbids declaration of ‘RASModel’ with no type
lnInclude/DispersionRASModel.H:108: error: expected ‘;’ before ‘&’ token
lnInclude/DispersionRASModel.H:117: error: expected ‘;’ before ‘virtual’
In file included from lnInclude/DispersionRASModel.H:129,
from lnInclude/GradientDispersionRAS.H:38,
from lnInclude/makeParcelDispersionModels.H:33,
from parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:33:
lnInclude/DispersionRASModel.C: In constructor ‘Foam:: DispersionRASModel<CloudType>:: DispersionRASModel(const Foam:: Dictionary&, CloudType&)’:
lnInclude/DispersionRASModel.C:39: error: class ‘Foam:: DispersionRASModel<CloudType>’ does not have any field named ‘turbulence_’
lnInclude/DispersionRASModel.C:43: error: ‘incompressible’ was not declared in this scope
lnInclude/DispersionRASModel.C:41: error: parse error in template argument list
lnInclude/DispersionRASModel.C: In copy constructor ‘Foam:: DispersionRASModel<CloudType>:: DispersionRASModel(Foam:: DispersionRASModel<CloudType>&)’:
lnInclude/DispersionRASModel.C:63: error: class ‘Foam:: DispersionRASModel<CloudType>’ does not have any field named ‘turbulence_’
lnInclude/DispersionRASModel.C: In member function ‘void Foam:: DispersionRASModel<CloudType>::cacheFields(bool) [with CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’:
lnInclude/DispersionRASModel.C:79: instantiated from ‘Foam:: DispersionRASModel<CloudType>::~DispersionRASModel () [with CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/GradientDispersionRAS.C:40: instantiated from ‘Foam::GradientDispersionRAS<CloudType>::GradientD ispersionRAS(const Foam:: Dictionary&, CloudType&) [with CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/DispersionModel.H:61: instantiated from ‘static Foam::autoPtr<Foam:: DispersionModel<CloudType> > Foam:: DispersionModel<CloudType>::adddictionaryConstruct orToTable<DispersionModelType>::New(const Foam:: Dictionary&, CloudType&) [with DispersionModelType = Foam::GradientDispersionRAS<Foam::KinematicCloud<F oam::Cloud<Foam::KinematicParcel<Foam:: particle> > > >, CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/DispersionModel.H:71: instantiated from ‘Foam:: DispersionModel<CloudType>::adddictionaryConstruct orToTable<DispersionModelType>::adddictionaryConst ructorToTable(const Foam::word&) [with DispersionModelType = Foam::GradientDispersionRAS<Foam::KinematicCloud<F oam::Cloud<Foam::KinematicParcel<Foam:: particle> > > >, CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:45: instantiated from here
lnInclude/DispersionRASModel.C:90: error: ‘class Foam:: DispersionRASModel<Foam::KinematicCloud<Foam::Clou d<Foam::KinematicParcel<Foam:: particle> > > >’ has no member named ‘turbulence’
lnInclude/DispersionRASModel.C:79: instantiated from ‘Foam:: DispersionRASModel<CloudType>::~DispersionRASModel () [with CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/GradientDispersionRAS.C:40: instantiated from ‘Foam::GradientDispersionRAS<CloudType>::GradientD ispersionRAS(const Foam:: Dictionary&, CloudType&) [with CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/DispersionModel.H:61: instantiated from ‘static Foam::autoPtr<Foam:: DispersionModel<CloudType> > Foam:: DispersionModel<CloudType>::adddictionaryConstruct orToTable<DispersionModelType>::New(const Foam:: Dictionary&, CloudType&) [with DispersionModelType = Foam::GradientDispersionRAS<Foam::KinematicCloud<F oam::Cloud<Foam::KinematicParcel<Foam:: particle> > > >, CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
lnInclude/DispersionModel.H:71: instantiated from ‘Foam:: DispersionModel<CloudType>::adddictionaryConstruct orToTable<DispersionModelType>::adddictionaryConst ructorToTable(const Foam::word&) [with DispersionModelType = Foam::GradientDispersionRAS<Foam::KinematicCloud<F oam::Cloud<Foam::KinematicParcel<Foam:: particle> > > >, CloudType = Foam::KinematicCloud<Foam::Cloud<Foam::KinematicPa rcel<Foam:: particle> > >]’
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:45: instantiated from here
lnInclude/DispersionRASModel.C:102: error: ‘class Foam:: DispersionRASModel<Foam::KinematicCloud<Foam::Clou d<Foam::KinematicParcel<Foam:: particle> > > >’ has no member named ‘turbulence’
make: *** [Make/linux64GccDPOpt/makeBasicKinematicParcelSubmodels.o] Error 1
I followed your instructions, Do you have an idea about this error ?
I don't understand, because the reference of the incompressible class is also made in BrownianMotionForce.H, for which there is no error.

eelcovv March 19, 2012 04:36

Hi Mat,

It seems that some reference to the incompressible turbulence libraries can not be found. First of all: I never mentioned that I developped everything in OpenFOAM 2.1.0. So if you are using a diffent version that is likely the cause of the problem. If you are indeed using 2.1, then you should check the Make/options file to see if all the reference to the incompressible RAS turbulence models are correct.

Regards
Eelco

CedricVH March 28, 2012 09:23

Quote:

Originally Posted by eelcovv (Post 348529)
One question from my side again: does anybody now how to write the particles independently from the fields ? I would like to write the particle at a higher frequency than I write the field files. Hopefully any knows how to do this. Thanks!

Can't this be done with the partialWrite functionObject? An example of the usage can be found in /opt/openfoam2xx/src/postProcessing/functionObjects/IO/controlDict

Mat_fr April 10, 2012 10:38

Dear eelcovv,

It was indeed a problem of version. I'm looking forward to postprocess the results.
Thanks for this solver :)
I think, I will add also a Saffman lift force for the particles, which is significant in most of the cases.

Best,

Mathieu

CedricVH April 11, 2012 06:07

Quote:

Originally Posted by Mat_fr (Post 353995)
Dear eelcovv,

It was indeed a problem of version. I'm looking forward to postprocess the results.
Thanks for this solver :)
I think, I will add also a Saffman lift force for the particles, which is significant in most of the cases.

Best,

Mathieu

That would be an excellent idea! The inclusion of the Saffman lift force and the stochastic dispersion model of Eelco would bring the particle solvers more on par with the dpm solvers in Ansys.

Please share it to the world when it is implemented :)

eelcovv April 11, 2012 14:12

Lift and dispersion
 
I actually did implement lift, but I am still kind of testing it. It seems to be ok, though.

As for the dispersion model which I modified for incompressible flows: I submitted this to OpenCFD and they have improved the way the dispersion model is implemented in the 2.1.x version: see http://www.openfoam.org/mantisbt/view.php?id=440. Now you can use the original library and still call the dispersion model from my solver.

My lift implementation is still done in 2.1.0 (so on top of my own modified library) and I actually create a whole new particle class for that as I didn't know how to elegantly incorporate that on top of the kinematicParticle class. Probably can also be done much more elegant, as soon as I think everything is ok I will post my solution. In the hope somebody picks it up and improves it in the way how it should be done of course:)

Mat_fr May 2, 2012 08:21

1 Attachment(s)
Dear all,

I have a doubt about the pressure gradient force (maybe I should create a new thread?). Usually, this force is evaluated as it is written in the doc file in attachment.

However, in OpenFOAM, the pressure gradient force acting on a particle is computed as following :
value.Su() = mass*p.rhoc()/p.rho()*(p.U() & gradU[p.cell()]);
where p.U() is the velocity of the particle. And this is wrong, because it should be p.Uc(), which is the velocity of the carrier phase. Isn'it ?

Best,

Mathieu

oswald May 25, 2012 05:34

Problems with escaping particles
 
At first: Thanks for this nice and useful tool :)

I'm currently trying to postprocess a simulation with kinematicParticleTracks and it seems that there is a problem with escaping particles at least when kinematicParticleTracks is started at a time at which not all particles are active anymore. In the header files for output (writeRawComposite.H etc.) it tries to write also data for escaped particles and this gives an error (segmentation fault).

Is there any possibility to check if the particle ID is valid before writing out the data for this particle?

eelcovv May 25, 2012 07:39

I think there is a field called 'active' in the particle properties which is probably used to indicate wether a particle is active or not. You could retrieve this and store it in het list just as I did for the other quantities and used it to test the particle before writing. I don't have time for it right now my self. Good luck!
Eelco

eelcovv May 31, 2012 08:55

Quote:

Originally Posted by CedricVH (Post 351935)
Can't this be done with the partialWrite functionObject? An example of the usage can be found in /opt/openfoam2xx/src/postProcessing/functionObjects/IO/controlDict


I just found out that partialWrite is rather inefficient: it writes all the files at the interval you specify in the controlDict (which represents the high frequently written fields) and then removes all but the specified fields. It only keeps all the fields at and interval you specify in the partialWriteDict. So you write everything and trow away what you don't need, which is really really inefficient if you for instance only want to keep a small particle tracking file every time step.

Does anybody know a more efficient way to do this ?

akuk June 4, 2012 08:44

Quote:

Originally Posted by eelcovv (Post 364045)
I just found out that partialWrite is rather inefficient: it writes all the files at the interval you specify in the controlDict (which represents the high frequently written fields) and then removes all but the specified fields. It only keeps all the fields at and interval you specify in the partialWriteDict. So you write everything and trow away what you don't need, which is really really inefficient if you for instance only want to keep a small particle tracking file every time step.

Does anybody know a more efficient way to do this ?

I think there has to be more elegant way to do it, but I did it by changing in the solver

runTime.write();

to

kinematicCloud.write();

Now it writes only particle tracking data.

CedricVH June 14, 2012 09:58

Hello Eelco!

I hope that your incompressible particle tracking library that OpenCFD included in 2.1.X is also included in the official 2.1.1 release! This wil make your solver already a lot cleaner.

Did you already manage to optimize and to incorporate your lift implementation into the kinematicParticleclass? I am very interested in your solver and would like to help you by comparing it to the dpm implementation in Ansys 14.

I am looking forward to an updated version!

eelcovv June 20, 2012 11:01

New version particle tracking with lift
 
4 Attachment(s)
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

eelcovv June 20, 2012 11:04

1 Attachment(s)
And in case you would like to use a utility to create the particle tracks:
here you are. Information can be set in the constant/lptBubbleTrackProperties file.

Regards
Eelco

morsal August 1, 2012 04:22

just a question...
 
Dear Eleco
thanks for your files.
I used them but, when i want to compile kinematicparticletracks, with using "wmake" command, I encounter with forward error:

morsal@morsal-laptop:/opt/openfoam201/applications/solvers/kinematicParticleTracks$ wmake
Making dependency list for source file kinematicParticleTracks.C
SOURCE=kinematicParticleTracks.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/lagrangian/basic/lnInclude -I/opt/openfoam211/src/lagrangian/intermediate/lnInclude -I/opt/openfoam211/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/thermophysicalModels/reactionThermo/lnInclude -I/opt/openfoam211/src/thermophysicalModels/radiationModels/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/LES/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam211/src/finiteVolume/lnInclude -I/opt/openfoam211/src/meshTools/lnInclude -I/opt/openfoam211/src/regionModels/regionModel/lnInclude -I/opt/openfoam211/src/regionModels/surfaceFilmModels/lnInclude -I/opt/openfoam211/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/kinematicParticleTracks.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/lagrangian/basic/lnInclude -I/opt/openfoam211/src/lagrangian/intermediate/lnInclude -I/opt/openfoam211/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/thermophysicalModels/reactionThermo/lnInclude -I/opt/openfoam211/src/thermophysicalModels/radiationModels/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/LES/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam211/src/finiteVolume/lnInclude -I/opt/openfoam211/src/meshTools/lnInclude -I/opt/openfoam211/src/regionModels/regionModel/lnInclude -I/opt/openfoam211/src/regionModels/surfaceFilmModels/lnInclude -I/opt/openfoam211/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/kinematicParticleTracks.o -L/opt/openfoam211/platforms/linux64GccDPOpt/lib \
-llagrangian -L/home/morsal/OpenFOAM/morsal-2.1.1/platforms/linux64GccDPOpt/lib -lincompressibleLagrangianIntermediate -lthermophysicalFunctions -lbasicThermophysicalModels -lspecie -lradiationModels -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTurbulenceModel -lincompressibleTransportModels -lfiniteVolume -lmeshTools -lregionModels -lsurfaceFilmModels -lsampling -lOpenFOAM -ldl -lm -o /home/morsal/OpenFOAM/morsal-2.1.1/platforms/linux64GccDPOpt/bin/kinemeticParticleTracks
/usr/bin/ld: cannot find -lincompressibleLagrangianIntermediate
collect2: ld returned 1 exit status
make: *** [/home/morsal/OpenFOAM/morsal-2.1.1/platforms/linux64GccDPOpt/bin/kinemeticParticleTracks] Error 1
morsal@morsal-laptop:/opt/openfoam201/applications/solvers/kinematicParticleTracks$

I apologize you to help me...
thanks for your help...

Mat_fr August 2, 2012 10:19

Dear Eelco,

Why did you add the lift force as a non-coupled contribution ? Shouldn't it be coupled ?

Best,

Mat

mohsen472 September 4, 2012 11:12

Quote:

Originally Posted by Mat_fr (Post 353995)
Dear eelcovv,

It was indeed a problem of version. I'm looking forward to postprocess the results.
Thanks for this solver :)
I think, I will add also a Saffman lift force for the particles, which is significant in most of the cases.

Best,

Mathieu

i have the same problem, should i change my OF Version? idont know how should i compile this

Mat_fr September 5, 2012 05:20

You should compile the library of Eelco inside the version 2.1 of OpenFOAM.

Here, the information to install and compile this version:
http://www.openfoam.org/download/git.php

Best,

Mat

eelcovv September 11, 2012 05:38

Hi Mat,

Explicite Lift is most straight forward. I do get good agreement with measurements of bubble plumes so for me it is good enough.

How would you suggest to implement the lift force ?

Regards
Eelco

Mat_fr October 8, 2012 06:07

Hello Eelco,

I implemented implicitely the lift force and it also gives correct agreement with my experimental reference. I thought it was better for the stabilization and also that it could have an influence in two-way coupling. But I don't think it is so important. :)

Best,

Mat

eelcovv October 10, 2012 09:37

Well, any improvements are appreciated, that's why I posted my version of the LPT in incompressible flows. By the way, in my lift force with the Tomiyama model was a small error which explained by my plume stayed bit to narrow. Should be replaced by in the file LiftForce.C

Code:

   
// Drag relation based on Tomiyama etal (1995), in advance in multiphase flows
scalar CL;
    scalar E=1/(1+0.163*pow(Eo,0.757));
    scalar EoD=Eo/pow(E,2/3.);
    if(EoD>10)
    {
      // note: in the Tomiyama model this is -0.29, however this give a discontinuity for the CL~Eo relation
      // at Eo=10. -0.27 keeps this relation continuous
      CL=-0.27;
    }
    else
    {
      scalar fEoD=0.00105*pow(EoD,3)-0.0159*pow(EoD,2)-0.0204*EoD+0.474;
      if(EoD<4)
      {
        CL=min(0.288*tanh(0.121*Re),fEoD);
      }
      else
      {
        CL=fEoD;
      }
    }
    return CL;

With this correction I get the plume on top of the experiments.

Furthermore, I have implemented a cloudfunctionobject (just like VoidFraction) in order to gather the statistics of the dispersed phase (dispersed phase velocity and rms values). If you are interested let me know. I would appreciate your implementation of the lift force as well of course:-)


Regards
Eelco

wellDone December 21, 2012 18:11

2 Attachment(s)
Hello everyone.

This solvers looks really nice eelcovv. Unfortunately I can't compile it yet, I have installed a fresh version of OpenFOAM from the git.

I can compile the library (libincompressibleLagrangianIntermediate.so) without errors. (see wmake.log). But when I try to compile the solver I obtain the next error (complete log Allwmake.log):

Code:

/home/wellDone/OpenFOAM/wellDone-2.1.x/platforms/linux64GccDPOpt/bin/pimpleLPTBubbleFoam
/home/wellDone/OpenFOAM/wellDone-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLagrangianIntermediate.so: undefined reference to `Foam::BubbleLookupTableInjection<Foam::BubbleCloud<Foam::Cloud<Foam::CollidingParcel<Foam::BubbleParcel<Foam::particle> > > > >::BubbleLookupTableInjection(Foam::dictionary const&, Foam::BubbleCloud<Foam::Cloud<Foam::CollidingParcel<Foam::BubbleParcel<Foam::particle> > > >&)'
/home/wellDone/OpenFOAM/wellDone-2.1.x/platforms/linux64GccDPOpt/lib/libincompressibleLagrangianIntermediate.so: undefined reference to `Foam::BubbleLookupTableInjection<Foam::BubbleCloud<Foam::Cloud<Foam::BubbleParcel<Foam::particle> > > >::BubbleLookupTableInjection(Foam::dictionary const&, Foam::BubbleCloud<Foam::Cloud<Foam::BubbleParcel<Foam::particle> > >&)'
collect2: ld returned 1 exit status
make: *** [/home/wellDone/OpenFOAM/wellDone-2.1.x/platforms/linux64GccDPOpt/bin/pimpleLPTBubbleFoam] Error 1

So if I make ldd on the issued library, the above undefined reference is shown. I think that I'm not missing any steps to insttall it so I would appreciate your help.

Thanks.

wellDone December 23, 2012 20:21

Hi,

I delved a little deeper into the error and I realized that the file BubbleLookupTableInjection.C present in the folder:

$FOAM_USER_SRC/lagrangian/intermediate/submodels/Bubble/InjectionModel/KinematicLookupTableInjection/

is empty. I have assumed that that code has been replaced with a new version in:

$FOAM_USER_SRC/lagrangian/intermediate/submodels/Bubble/InjectionModel/BubbleLookupTableInjection/

so I have deleted the KinematicLookupTableInjection folder and everything works now compiling pimpleLPTBubbleFoam. :)

Finally to be able to run the updated case bubcol3d_DES_yeLift_start1_clear could be required to change the boundary condition in nuTilda and nuSgs from nuSgsUSpaldingWallFunction to nutUSpaldingWallFunction as in a new commit they "Added support for variable density incompressible divDevReff for VoF solvers
Generalised wall-functions between RAS and LES/DES modelling" and nuSgsUSpaldingWallFunction is obsolete.

Regards

eelcovv January 31, 2013 02:48

bubbleCloudProperties
 
1 Attachment(s)
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

alquimista January 31, 2013 05:44

Thank you very much for the contribution! This cloud function object is useful :)

Note to remove the following lines in "makeParcelCloudFunctionObjects.H" to compile it.
Code:

   
#include "DispersedPhaseVelocity.H"
makeCloudFunctionObjectType(DispersedPhaseVelocity, CloudType);          \


jiejie February 1, 2013 02:39

Quote:

Originally Posted by eelcovv (Post 405225)
Hi wellDone,

Code:

cloudFunctions
{
  voidFraction;

}

Eelco

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

eelcovv February 28, 2013 04:33

Not sure why it stays zero. Are you tracking particles ? I should work, it comes with the standard OF distrubution. Try it in one of the LPT tutorial cases to see if you can get it running.

Cheers
Eelco

jiejie April 12, 2013 03:33

Hi eelcovv

I found that Void Fraction only works with the basicKinematicCloud class but doesn't work with basicKinematicColliding class. The basicKinematicColliding class is the basicKinematicCloud class plus the colliding. However, the void fraction object function keeps outputting zero with the basicKinematicColliding class, but the basicKinematicCloud class did output the right void fraction.

jiejie

alquimista April 12, 2013 05:56

The function move in Colliding class overrides the function move of the Kinematic class. The function to call the void fraction calculation is not including in this class. You can fix it adding the following line in the file

*/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.C




Code:

                if (p.onBoundary() && td.keepParticle)
                {
                    if (isA<processorPolyPatch>(pbMesh[p.patch(p.face())]))
                    {
                        td.switchProcessor = true;
                    }
                }

                p.age() += dt;

                td.cloud().functions().postMove(p, cellI, dt);

            }

Quote:

Originally Posted by jiejie (Post 420056)
Hi eelcovv

I found that Void Fraction only works with the basicKinematicCloud class but doesn't work with basicKinematicColliding class. The basicKinematicColliding class is the basicKinematicCloud class plus the colliding. However, the void fraction object function keeps outputting zero with the basicKinematicColliding class, but the basicKinematicCloud class did output the right void fraction.

jiejie


vonboett May 24, 2013 09:21

OpenFOAm with Lagrangian particle Tracking
 
...take a look at CFDEM/LIGGGHTS coupling openFOAM to LAMMMPS Lagrangian Particle Code in resolved and unresolved way. For treating the turbulence interaction, a coupling between LIGGGHTS particle code and PALABOS Lattice Boltzmann code is in developement, and its embedding in OpenFOAM will be the next challenge to get a full coupled cascade of turbulent particle laden flow :)

koulis June 14, 2013 07:30

mo
 
thanks solved it;#

baila12 August 1, 2013 09:52

Thank you for posting this solver! I am very interested in using it and am wondering if you have any advice for how to compile it using version 2.2.

Dommy August 9, 2013 04:13

First - thanks eelcovv for this wonderful working solver - pretty much what I needed in advance to the existing solvers in OF!

In case of errors while compiling the solver I changed
Code:

-I$(FOAM_USER_SRC)/lagrangian/incompressible/intermediate/lnInclude \
to the absolute path - e.g.
Code:

-I/disk701/home/Dommy/OpenFOAM/Dommy-2.1.x/userPrograms/lagrangian/incompressible/intermediate/lnInclude \
(just where lnInclude of the new langrangian lib is located)

I´m thinking about adding a collision model (such as implemented in icoUncoupledParcelFoam) to that solver. It would make it more accurate for high mass loaddings. Any experiences with that?

Speaking of high mass loadings - at the moment I try to validate the solver (with other Euler-Langrange solvers in OF21x) for some test cases.

In order to reach significant mass loadings (22 - 100%) one has unite particles to parcels. The solver seams to have problems with a large number of particles per parcel.

It crashs from one time step to another with exploding time step continuity errors. By reducing the particles per parcel it works fine again but more parcels have to be calculated - somebody has experienced the same?

Regards,
Tom

mayank.dce2k7 August 19, 2013 20:25

1 Attachment(s)
Hi Eelcov,

Thanks for the wonderful solver. I was looking for two way coupled Lagrangian solver and your solver works great!

I am simulating a case were one tube having one inlet bifurcates into two branches having one outlet each.

The problem is I want a steady state Lagrangian solver. Now, I started studying your solver and in a similar way I tried to modify 'bouyantBousinessqSimpleFoam' as your solver was based on 'bouyantBousinessqPimpleFoam' and I compiled the solver succesfully but when I am running on a test case I am getting following errors:

--> FOAM FATAL ERROR:
temporary deallocated

From function T& Foam::tmp<T>::operator()()
in file /opt/openfoam211/src/OpenFOAM/lnInclude/tmpI.H at line 158.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2
in "/home/mayank/OpenFOAM/mayank-2.1.1/platforms/linux64GccDPOpt/bin/simpleCoupledKinematicParcelFoam"
#3 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#4
in "/home/mayank/OpenFOAM/mayank-2.1.1/platforms/linux64GccDPOpt/bin/simpleCoupledKinematicParcelFoam"
Aborted (core dumped)

I don't understand where to remove this error. I checked I removed field 'T' from everywhere within the solver. I have also attached a copy of modified steady state Lagrangian solver.

Please advice me.

Regards,
Mayank

mayank.dce2k7 August 20, 2013 14:44

I removed the above error....I made a mistake while editing the solver.

Thanks again for transient two way coupled solver.


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