|
[Sponsors] |
May 7, 2013, 11:05 |
Multiphase Solid Particle Tracking
|
#1 |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
Hi,
After some time trying I finally compiled a new solver for particle tracking in interFoam and set up a case but when I try to run the case it seems that, at some point, it gets stuck in an infinite loop. I tracked in the .C file where the problem is and it shows that it is in the piece of code particles.move(g); and in the second iteration. The first iteration runs ok. Any suggestions would be appreciated! Thanks a lot in advance! Alex |
|
May 7, 2013, 12:27 |
Solved
|
#2 |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
Hi again!
I just solved the issue. It didn't get through the second iteration because tetFaceI and tetPtI were not properly initialised! Cheers anyway! P.S.:If someone wants to discuss such a solver in order to improve it, comments are welcome!! |
|
September 6, 2013, 15:47 |
|
#3 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
I am trying to combine interFoam with lagrangian particle tracking (2 or 4 way coupling). Could you please share some insight into how you developed your solver? Have you been able to validate results from the solver? Thanks. |
||
September 6, 2013, 17:26 |
|
#4 | |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
Quote:
I havent been able to validate because I am working now on the same kind of solver but with pimpleFoam. Anyway, as a starting point, there is a very good tutorial on how to couple both interFoam and the solidParticle class: http://www.tfd.chalmers.se/~hani/kur...LPT_120911.pdf The tutorial is for a previous version of OpenFoam so you will have to upgrade it in case you are using 2.2.x. Take a look and just let me know if you need some help. I will be glad to help you. Cheers,
__________________
Alex |
||
September 6, 2013, 19:33 |
|
#5 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
Thanks for the information. I actually have a copy of the Chalmers slides with me and I have been using it as guide to develop my solver. And yes, the tutorial in the pdf is for an older OF version. But I think the new Lagrangian implementation makes it easier to do particle tracking in an existing fluid solver. My main worry is how to deal with issues relating to particles migrating from one phase (say liquid) into another. I have not run any such simulations so I dont know if this is something that is likely to occur in the first place. I was just wondering if this is something you have thought of as well and could provide some ideas on how to design the solver to prevent such migration. Thanks for sharing your thoughts. |
||
September 7, 2013, 16:10 |
|
#6 | |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
Quote:
If your question is related to particles moving from one phase to another, I guess that could eventually happen, but from my point of view that could also have a physical explanation, taking into account the difference of density between both particles and fluids. I guess if both phases are clearly separated, you could just create a boundary in between so that you would not allow the particles to move from phase to the other. Let me know if this was what you intend to do and if not, could you explain it further? Cheers,
__________________
Alex |
||
September 10, 2013, 06:49 |
|
#7 | |
Member
|
Quote:
how did you define these two variables: tetFaceI, tetPtI? I am stuck right here, because the tutorial from Aurelia Vallier doesn't include how to define these two. My inject function looks like this right now: Code:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td) { label cellI=mesh_.findCell(td.spc().posP1_); // primitiveMesh::findCell() //label tetFaceI=mesh_.findCellFacePt(td.spc().posP1_, ?); //label tetPtI=mesh_.findCellFacePt(td.spc().posP1_, ? ); label tetPtI=mesh_.findCellFacePt(td.spc().posP1_,cellI,tetFaceI,tetPtI); solidParticle* ptr1=new solidParticle(*this,td.spc().posP1_,cellI,tetFaceI,tetPtI,td.spc().dP1_,td.spc().UP1_); Cloud<solidParticle>::addParticle(ptr1); label cellI=mesh_.findCell(td.spc().posP2_); // primitiveMesh::findCell() //label tetFaceI=mesh_.findCellFacePt(td.spc().posP2_, ? ); //label tetPtI=mesh_.findCellFacePt(td.spc().posP2_, ? ); label tetPtI=mesh_.findCellFacePt(td.spc().posP2_,cellI,tetFaceI,tetPtI); solidParticle* ptr2=new solidParticle(*this,td.spc().posP2_,cellI,tetFaceI,tetPtI,td.spc().dP2_,td.spc().UP2_); Cloud<solidParticle>::addParticle(ptr2); } Code:
label tetFaceI Code:
label tetPtI Greetings, Sebastian. |
||
September 11, 2013, 14:00 |
|
#8 | |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
Hello Sebastian,
First of all, what you do with that first part of the code, if I remember well, is to tell OpenFoam to search for the cell, the tetFaceI and the tetPtI in the position of the point you defined you injector is going to be. If you look in Doxygen for findCellFacePt you will get a definition of what I just said. So, basically this function Code:
mesh_.findCellFacePt() For this to work properly, it is better to initialize first those variables you are going to use and then just write them inside the function so that the values that it returns are stored in those variables you created. For example: Code:
label cellI=1; label tetFaceI=1; label tetPtI=1; mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI); Finally, for the code to work properly (if you are using newer versions of OpenFOAM than the one Aurelia used) you should change the Code:
td.spc(). Code:
td.cloud(). Hope this helps you! Cheers, Alex Quote:
__________________
Alex |
||
September 16, 2013, 12:16 |
|
#9 | |
Member
|
Quote:
thank you for your help! I will try this as soon I have some time for it . However I found another way to couple interfoam with a lagrangian particle tracking method, which is by including swak4Foam libraries into your controlDict. Thanks for the help! Greetings, Sebastian |
||
March 3, 2014, 11:22 |
|
#10 |
New Member
Stefan Wenzel
Join Date: Mar 2013
Posts: 6
Rep Power: 13 |
Hallo Foamers,
Does anyone know the coupling algorithm of "LPTtoVOF.H" by Vallier form this presentation: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/OF_kurs_LPT_120911.pdf or has an idea where to find it? I can't find any publication on this thank you Stefan |
|
March 3, 2014, 11:55 |
|
#11 | |
Member
|
Quote:
Hello Stefan, I am not sure if the any code was published but Ms. Vallier, but she describes in the presentation pretty good on how to couple LPT methods with interFoam. I tried it myself until I found a better solution. Also the tutorial uses a very old OpenFOAM version (1.6.x or 1.7.x). Therefor the coupling is different when using 2.3.x for example. A better way to integrate LPT into any OpenFOAM solver is by using swak4Foam. Hope this helps. Sebastian |
||
March 4, 2014, 04:51 |
|
#12 | |
New Member
Stefan Wenzel
Join Date: Mar 2013
Posts: 6
Rep Power: 13 |
Quote:
Hello Sebastian, thanks for the reply. i absolutly agree with you. She discribed the including of the "solidParticle" lib very good, and the solver is runnig (by the way, your upper hints where very helpful, thank you for that!). But i guess the key algorithm, which switches from LPT to VOF is implemented in this "LPTtoVOF.H" and not discribed in the presentation. Is swak4Foam able to remove lagrangian particles and add there mass/momentum/volume to the alpha fraction of the VOF methode? |
||
March 4, 2014, 10:07 |
|
#13 | |
Member
|
Quote:
However in this "LPTtoVOF" method she describes the modeling of a solid particle (Lagrange) which as soon it hits the phase interface becomes another fluid phase (VOF). This is physical non-sense however. Do you really need this feature? Normally a solid particle falling into a fluid interacts with the interface (creating waves resulting from the kinetic energy of the impact), it stays however solid. What is your physical setup you want to simulate? |
||
March 5, 2014, 04:36 |
|
#14 |
New Member
Stefan Wenzel
Join Date: Mar 2013
Posts: 6
Rep Power: 13 |
I'm trying to simulate breakup (atomization) and coalescence in small scales by using such a coupling of VOF and LPT in OF. Tomar et al. had already done implementaions like this in other codes:
3. Video (Lagrangian Particle Atomization Simulation - 5 Mbytes, click on image to view movie) http://www.lmm.jussieu.fr/~zaleski/zaleski.html > Link to "Animations" correlated paper: http://www.lmm.jussieu.fr/~zaleski/Papers/tomar-CAF.pdf as a first step for this, i thought i just try Ms Valliers way to switch from LPT to VOF near the surface. That's why i'm searching for her algorithm in LTPtoVOF.H |
|
March 22, 2014, 06:22 |
|
#15 | |
New Member
Will Chen
Join Date: Mar 2013
Posts: 1
Rep Power: 0 |
Quote:
|
||
March 26, 2014, 04:44 |
|
#16 |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
Actually you are right, as the solid particle impinges the fluid interface it
will cause splash and the physical change makes no sense. But, just imagine the solid particles as representative particles. They are used only as some imaginary data holder. you can add them and remove them whenever you need a continuous phase. Also I agree with Stefan that the LPTtoVOF.H is not presented in her document and it is a key part. |
|
April 23, 2014, 09:07 |
|
#17 | |
New Member
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 13 |
Quote:
|
||
April 23, 2014, 09:11 |
|
#18 | |
New Member
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 13 |
Quote:
|
||
April 24, 2014, 02:19 |
|
#19 |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
||
April 24, 2014, 03:41 |
|
#20 | |
New Member
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 13 |
Quote:
code: Code:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td) { label cellI = 1; label tetFaceI = 1; label tetPtI = 1; mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI); solidParticle* ptr1=new solidParticle(*this,td.cloud().posP1_,cellI,tetFaceI, tetPtI, td.cloud().dP1_,td.cloud().UP1_); Cloud<solidParticle>::addParticle(ptr1); mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI); solidParticle* ptr2=new solidParticle(*this,td.cloud().posP2_,cellI,tetFaceI, tetPtI, td.cloud().dP2_,td.cloud().UP2_); Cloud<solidParticle>::addParticle(ptr2); } when I compile it , There are still some errors. Code:
solidParticleCloud.C: In member function ‘void Foam::solidParticleCloud::inject(Foam::solidParticle::trackingData&)’: solidParticleCloud.C:81:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’ solidParticleCloud.C:81:34: note: candidates are: solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool) solidParticle.H:135:9: note: candidate expects 3 arguments, 7 provided solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&) solidParticleI.H:47:8: note: no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’ solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&) solidParticle.H:58:7: note: candidate expects 1 argument, 7 provided solidParticleCloud.C:85:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’ solidParticleCloud.C:85:34: note: candidates are: solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool) solidParticle.H:135:9: note: candidate expects 3 arguments, 7 provided solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&) solidParticleI.H:47:8: note: no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’ solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&) solidParticle.H:58:7: note: candidate expects 1 argument, 7 provided Last edited by wyldckat; April 24, 2014 at 16:41. Reason: Added [CODE][/CODE] |
||
Tags |
interfoam, lagrangian, move, solidparticle |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lagrangian solid particle tracking - OFv2.1 | PelusDadidus | OpenFOAM Programming & Development | 7 | August 21, 2015 10:05 |
Questions regarding Particle Tracking and Rotating Frame of reference | Maxime Gauthier | CFX | 1 | May 9, 2011 16:07 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
Particle tracking - Domain interface / FrozenRotor | mohanrao | CFX | 4 | January 23, 2008 04:39 |
restarting lagrange (particle tracking) simulation | dbdias | CFX | 0 | September 22, 2007 20:26 |