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/)
-   -   How to use MPPICFoam with turbulence effects on particle motion? (https://www.cfd-online.com/Forums/openfoam-solving/132594-how-use-mppicfoam-turbulence-effects-particle-motion.html)

mneben April 3, 2014 04:16

How to use MPPICFoam with turbulence effects on particle motion?
 
Hello foamers,

I try to simulate a pipe bend like it is mentioned here
http://www.cfd.com.au/cfd_conf12/PDFs/203SOM.pdf
with the new MPPICFoam solver.

I got really good results for the particle concentration at the bend exit, where the particle collisions are predominant. But downstream far away from the bend the strain is still existing.

So therefore I tried to use a dispersion model to scatter the strain through turbulent effects, but only "none" is available:

--> FOAM FATAL ERROR:
Unknown dispersion model type non

Valid dispersion model types are:
1(none)

So my question is: How can I get this dispersion model to work or do I make a false conclusion and the programmers dont want the possibilty to use it?

Thank you very much.

mneben April 3, 2014 09:36

1 Attachment(s)
I have made a comparison between reactingParcelFoam and MPPICFoam.
One can see two quadratic channels (bulkRe=75000) with injected particles from the left side.
On the top reactingParcelFoam was used, on the bottom MPPICFoam.
For reactingParcelFoam stochasticDispersion was activated.
This leads to a scattering of the particles, where there is no scattering through turbulence effects when using MPPICFoam.

wyldckat April 6, 2014 14:40

Greetings Matthias,

This seems to be a problem similar to this one: http://www.openfoam.org/mantisbt/view.php?id=1259

Try adding to the file "system/controlDict" this line:
Code:

libs ( "liblagrangianIntermediate.so" );
Then try again to set the desired dispersion model.

Best regards,
Bruno

mneben April 7, 2014 03:43

Thanks for your help, but unfortunately it does not work and I still get the same error message:

Valid dispersion model types are:
1(none)

Additionally I tried to change the path like it is written in the link, but with no success.

Kind regards

Matthias

wyldckat April 13, 2014 15:10

Hi Matthias,

OK, using "liblagrangianTurbulence.so" is really bad, as there is a conflict in turbulence libraries.

I've taken a deeper look into this and here's what I've found out:
  1. The solvers DPMFoam and MPPICFoam are virtually identical, except that the first one uses "basicKinematicCollidingCloud" as the base cloud type and the second one uses "basicKinematicMPPICCloud".
  2. The source code used by these two solvers is pretty heavily templated C++ code. I've gotten lost in the middle of it and I'm unable to figure out the solution for this issue.
  3. The reason why I got lost is because:
    1. In "$FOAM_SRC/lagrangian/turbulence/submodels/Kinematic/DispersionModel/" are only templates.
    2. It is in "$FOAM_SRC/lagrangian/turbulence/parcels/derived" that the dispersion models are created... or at least I think they are created there.
    3. The turbulence models used by the solvers in question are actually created in the library "$FOAM_SOLVERS/lagrangian/DPMFoam/DPMTurbulenceModels". This is because these models are relying on the "Turbulence" template library.
    4. Problem is that so is the library "$FOAM_SRC/lagrangian/turbulence" and that is why there is an object conflict when we load this library into memory for these solvers.
  4. From what I can figure out, the only way to have dispersion models in these solvers, is to somehow recreate these dispersion models directly in the "DPMTurbulenceModels" library... problem is that I can't figure out how that can be done :(.
Therefore, the problem you're having, is pretty much the same as the one specified on this bug report: http://www.openfoam.org/mantisbt/view.php?id=1259

My guess is that coding this isn't an easy task (at least not for me :() and validation is also necessary... therefore, they probably will require a support contract for implementing this feature and therefore to fix that bug report.

Best regards,
Bruno

mneben April 15, 2014 04:22

Thank you for your help and investing so much time in this problem.
I added on http://www.openfoam.org/mantisbt/view.php?id=1259 your hints as a note.

Through this templating the OF-Code becomes so complicated and finally unreadable. This leads to the conclusion that only the original programmer can solve this problem.
I hope that in future times this part of OF becomes less object-orientated but more understandable.

Kind regards

Matthias

wyldckat April 15, 2014 14:42

Hi Matthias,

Well, they've fixed it! It would really have taken me a lot of time to figure that one out... I have some experience with templates in OpenFOAM, but the "Turbulence" template library appeared in OpenFOAM 2.3 (i.e. very recent code to me) and... well, the release notes explain for themselves: http://www.openfoam.org/version2.3.0/multiphase.php - search for the section "Multiphase Turbulence".

Quote:

Originally Posted by mneben (Post 486191)
I hope that in future times this part of OF becomes less object-orientated but more understandable.

OpenFOAM is coded in C++. Templates are a really powerful C++ feature, that OpenFOAM is taking full advantage of. And they're making it more and more dependent of templates.

But the thing is that templates aren't all that hard to understand, once we have a better understanding of the code itself and how they all interconnect. Problem is that there are now seeeeveral possible interconnections and OpenFOAM's source code is pretty big and even with some sort of interactive template navigation system, it can get pretty confusing.

One example is the "DPMTurbulenceModels" library used for the DPMFoam and MPPICFoam solvers: https://github.com/OpenFOAM/OpenFOAM...ulenceModels.C - in 35 lines of code, we have a single library that is loaded up with a massive world of code for both RANS and LES turbulence models, dedicated to DPM's kind of modelling and with an utterly simplistic look to it. Problem is figuring out where all the bits and pieces came from...

But Will's comment on the bug tracker does give a big insight into the original issue here:
Quote:

Originally Posted by http://www.openfoam.org/mantisbt/view.php?id=1259#c3013
DPMFoam and MPPICFoam use the new turbulence structure (src/Turbulence) which takes the volume fraction of the phase into account. The dispersion models depend upon the old turbulence structure (src/turbulence), which is why [they] are not available in these solvers.

With that comment alone, I possibly might have been able to sort it out sooner... something like, instead of taking a month, I would possibly only take a week to figure it out :D

Best regards,
Bruno

mneben April 29, 2014 04:32

Hello Bruno,

thank you for your answer. I knew the importance of templates in OpenFOAM. I just wanted to say that in future time it may arise the problem, that a decreasing amount of the community is able to improve or just understand the code.
I will spent more time in improving my knowledge of templates. Do you have a recommendation for literature?

Kind regards

Matthias

wyldckat May 1, 2014 10:24

Hi Matthias,

Quote:

Originally Posted by mneben (Post 488830)
Do you have a recommendation for literature?

From personal experience, I simply went with the basic tutorial on C++ language: http://www.cplusplus.com/doc/tutorial/

For the rest, I went with training directly by looking and testing source code. Which would explain why I couldn't figure out how solve this issue :rolleyes:

Apparently there is an official book on C++: http://en.wikipedia.org/wiki/The_C%2...mming_Language - but there are a ton of books about C++, so I don't know what to suggest as I've never read them :rolleyes:

A quick search via Google about OpenFOAM and C++ and I've found this thread: http://www.cfd-online.com/Forums/ope...ogramming.html - it does have a few suggestions about C++ books.

Best regards,
Bruno

kalyan November 4, 2014 03:37

Hello,

i am using MPPICFoam solver for simulation and i am also getting same error while using DIspersionModel. Can you tell me how to add dispersion Model for this solver. Thanks.

Regards,
Kalyan

mneben November 4, 2014 03:46

Hello Kaylan,

you only have to install the latest OpenFOAM 2.3.x version.

Regards

Matthias

kalyan November 4, 2014 05:03

Hello mattias,

Thanks for reply.I am using openFoam version 2.3.0. but still im getting the same error.

regards,
Kalyan

mneben November 4, 2014 05:23

But it is necessary to install the latest OF2.3.x version
http://www.openfoam.org/download/git.php

kalyan November 4, 2014 05:31

Hi Matthias,

Thank you. will install the latest version and try simulation..

Regards,
Kalyan

kalyan December 1, 2014 02:46

Unknown RASModel type kOmegaSST
 
Hello everyone,

I am Using openFoam version 2.3.x. i am trying to simulate a case with MPPICFoam with KOmegaSST Turbulence model. i am getting the below error

Unknown RASModel type kOmegaSST

Valid RASModel types:
1(kEpsilon)

From function RASModel::New(const volScalarField&, const volVectorField&, const surfaceScalarField&, transportModel&, const word&)
in file /root/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/turbulenceModels/lnInclude/RASModel.C at line 160.

anyhelp is appreciated.


Regards,
kalyan

wyldckat December 8, 2014 13:50

Greetings kalyan,

I took a quick look into this and I'm sorry to say that this implementation you're looking for doesn't seem to be something easily done. The implementation that was done for the initial report is indicated on the bug report as being a temporary solution: http://www.openfoam.org/mantisbt/view.php?id=1259 - see the last comment by Will.
The commit he's referring to is this one: https://github.com/OpenFOAM/OpenFOAM...9dee0b7ac4feb5

You can try and do a similar implementation, after studying how that implementation for "kEpsilon" was performed.

Best regards,
Bruno

nimasam February 22, 2015 15:14

Quote:

Originally Posted by http://www.openfoam.org/mantisbt/view.php?id=1259#c3013
DPMFoam and MPPICFoam use the new turbulence structure (src/Turbulence) which takes the volume fraction of the phase into account. The dispersion models depend upon the old turbulence structure (src/turbulence), which is why [they] are not available in these solvers.
im digging the code to find how it is considered volume fraction of the phase :), but i got lost in the middle of it :), would you please help me findout how DPMTurbulenceModels works?
as much as i understand, it recalls volume fraction from solver, but again it use standard kEpsilon model :) how volume fraction is considered in this structure?

mazdak March 3, 2016 13:39

DPMFoam
 
hey guys

can you let me know how I can use DPMFoam? is there any PDF file helping?
I can't run the Goldschimdt tutorial. My goal is to run particle tracking for a single phase flow in an elbow, one way coupling with OF 3.0.0.

thanks

wyldckat March 13, 2016 06:20

Quick answers:
Quote:

Originally Posted by mazdak (Post 587920)
can you let me know how I can use DPMFoam? is there any PDF file helping?

The best I could find was this: http://openfoam-extend.sourceforge.n...r/?page_id=146
Look for "Evaluation of the DPMFoam solver (Denis Semyonov)" in that page. Unfortunately, I'm not aware of anything more detailed than this.
Try looking in the links given here: http://openfoamwiki.net/index.php/Handy_links

Quote:

Originally Posted by mazdak (Post 587920)
I can't run the Goldschimdt tutorial.

There is an FAQ for this question: How to run the tutorials in OpenFOAM?

chpjz0391 June 17, 2016 03:57

Quote:

Originally Posted by wyldckat (Post 589407)
Quick answers:

The best I could find was this: http://openfoam-extend.sourceforge.n...r/?page_id=146
Look for "Evaluation of the DPMFoam solver (Denis Semyonov)" in that page. Unfortunately, I'm not aware of anything more detailed than this.
Try looking in the links given here: http://openfoamwiki.net/index.php/Handy_links


There is an FAQ for this question: How to run the tutorials in OpenFOAM?

Hey bruno,

Have you solved your problem?
After I added collisionModel into reactingParcelFoam, I met the same problem.
HTML Code:

Unknown dispersion model type none

Valid dispersion model types are:
1(none)

I have no idea what's going on ?

Kind Regards,

Ping


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