CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Breakmodel in OpenFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/147483-breakmodel-openfoam.html)

wang219910611 January 22, 2015 04:36

Breakmodel in OpenFoam
 
Quote:

Originally Posted by dkxls (Post 452241)
I reported a bug on this issue:
http://www.openfoam.org/mantisbt/view.php?id=1018

If somebody would still have a comment/explanation, please also write it to the bug tracker.

Dear Armin,

I have just seen your bug report posted at 2013-09-08 about the exclusive of atomization model and breakup model in Openfoam, and I realize it haven't been solved. I am wondering have you got any progress on this?

Currently, I am struggling trying to imply primary breakup model such as KH breakup with blob method into Openfoam and met a lot of errors during the process. Do you have any suggestoin how this should be done properly? I think this process is also very important for my later plan of applying more advanced breakup model such as KH-ACT into openfoam. Any suggestion will be appreciated!

Best Regards,

Bo

dkxls January 22, 2015 06:53

Quote:

Originally Posted by wang219910611 (Post 528559)
Currently, I am struggling trying to imply primary breakup model such as KH breakup with blob method into Openfoam and met a lot of errors during the process. Do you have any suggestoin how this should be done properly? I think this process is also very important for my later plan of applying more advanced breakup model such as KH-ACT into openfoam. Any suggestion will be appreciated!

Even though this is off-topic and you shouldn't hijack other threads, here some hints/explanations for your problem.
I reported that bug at a time where the whole lagrangian spray classes had still a lot of sever bugs and things weren't working correctly. After tracking down and fixing the bugs, I think the current implementation in OpenFOAM is working fine and the bug #1000 is superfluous.

Note that you need to use the very latest development version (January 2015) of OpenFOAM to get all bug-fixes, especial with respect to the KHRT model, see here:
https://github.com/OpenFOAM/OpenFOAM...2783a51e6a9ea9
https://github.com/OpenFOAM/OpenFOAM...6a1c68dd9a0ed0
https://github.com/OpenFOAM/OpenFOAM...bd53e6d7263912
https://github.com/OpenFOAM/OpenFOAM...6700f24ccbb215
https://github.com/OpenFOAM/OpenFOAM...0928b2a54dad7a

You can implement you own atomization model very easily and supply it in a user defined library.

Please start a new thread and keep this one on topic, it might also be a good idea to familiarize yourself with the guidelines given here:
http://www.cfd-online.com/Forums/ope...-get-help.html

wang219910611 January 22, 2015 09:24

Breakmodel in OpenFoam
 
Quote:

Originally Posted by dkxls (Post 528585)
Even though this is off-topic and you shouldn't hijack other threads, here some hints/explanations for your problem.
I reported that bug at a time where the whole lagrangian spray classes had still a lot of sever bugs and things weren't working correctly. After tracking down and fixing the bugs, I think the current implementation in OpenFOAM is working fine and the bug #1000 is superfluous.

Note that you need to use the very latest development version (January 2015) of OpenFOAM to get all bug-fixes, especial with respect to the KHRT model, see here:
https://github.com/OpenFOAM/OpenFOAM...2783a51e6a9ea9
https://github.com/OpenFOAM/OpenFOAM...6a1c68dd9a0ed0
https://github.com/OpenFOAM/OpenFOAM...bd53e6d7263912
https://github.com/OpenFOAM/OpenFOAM...6700f24ccbb215
https://github.com/OpenFOAM/OpenFOAM...0928b2a54dad7a

You can implement you own atomization model very easily and supply it in a user defined library.

Please start a new thread and keep this one on topic, it might also be a good idea to familiarize yourself with the guidelines given here:
How to give enough info to get help

Firstly, thanks for the kind reply by dkxls, and sorry for hijack into other's thread. I have opened a new thread here about the implement of new breakup model in OpenFoam. Above are the reply by dkxls about the bugs and improvement of the library.

Regarding to the " very latest development version ", does it mean the latest OpenFoam 2.31 or can I also just modify the code according to the bug report in github with my OpenFoam 2.30?

dkxls January 23, 2015 09:47

Quote:

Originally Posted by wang219910611 (Post 528607)
Regarding to the " very latest development version ", does it mean the latest OpenFoam 2.31 or can I also just modify the code according to the bug report in github with my OpenFoam 2.30?

There were already several bug-fixes/improvements in the Lagrangian classes from OF 2.3.0 to 2.3.1, and as mentioned earlier, there are more bug-fixes in the latest git-version.

I would recommend you to just use the latest 2.3.x git-version! You can of course also back-port all the changes from the 2.3.x git repository to your 2.3.0 installation, but I don't see how that would make any sense.

For instructions on how to do that, see here: http://www.openfoam.org/download/git.php

-Armin

wang219910611 January 25, 2015 21:09

Dear Armin,

Thanks for the quick reply. I have just installed the newest 2.3.x version. Currently, I want to distinguish the KH and later KHRT breakup process in the ReitzKHRT model, it seems to me there are two possible ways of doing this:

1) add a breakup length limitation into the breakup model, which seems to be straight forward
2) add KH part into the atomization model, a bit more complicate but can make use of the liquidcore concept

Which do you think is the better way of doing this? And the same with "blobs method"------- is it better to imply it in the atomization model part or injection model part? Thanks in advance. : )

By the way, I tried to add the breakup variable into calcBreakup function in SprayParcel like following:
Code:

......
scalar disbreakup = mag(this->position()-this->position0());
td.cloud().breakup().update
        (
          ....
          ....
            dChild,
            massChild,
            disbreakup
        )

However, I seemed to have a wild pointer here, but I can't find it anyway :(:
Code:

Solving 3-D cloud sprayCloud

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe92e15ae in Foam::EKHRT<Foam::SprayCloud<Foam::ReactingCloud<Foam::ThermoCloud<Foam::KinematicCloud<Foam::Cloud<Foam::SprayParcel<Foam::ReactingParcel<Foam::ThermoParcel<Foam::KinematicParcel<Foam::particle> > > > > > > > > >::update (this=0x4afed00, dt=3.6121911451147631e-07, g=...,
    d=@0xb948fc8: 3.7787746720808345e-05, tc=@0xb9490e0: 0, ms=@0xb9490e8: 0,
    nParticle=@0xb948fc0: 2.0142790546900065, KHindex=@0xb9490c8: 0,
    y=@0xb9490d0: 0, yDot=@0xb9490d8: 0, d0=3.7779345486647244e-05,
    rho=662.24081809240022,  U=......, Urmag=34.929408186742982,
    tMom=6.2366133261046816e-05, dChild=@0x7fffffff7c60: 0,
    massChild=@0x7fffffff7c58: 0,
    disbreak=@0x3ff404ea48000000: <error reading variable>)
    at lnInclude/EKHRT.C:164
164        if (disbreak > brelength)
(gdb)

Bo

wang219910611 January 26, 2015 21:15

Update: I have solved this problem, though I am not very clear of the reason: for the disbreak up, you should use "const scalar" rather than "scalar &" :)

wang219910611 February 2, 2015 07:42

Another question: Where is the breakup().update function really being called??
I was pretty sure it was called by the calcBreakup function in the SprayParcel.C, until I added the info lines into the calc function in SprayParcel.C:
Code:

if (liquidCore() > 0.5)
        { 
            Info<<"I am here AAA"<<endl;
            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
        {
            Info<<"I am here BBB"<<endl;
            calcBreakup(td, dt, cellI);
        }

Then I ran the aachenBomb again, expected to see the info lines appearing in the terminal, but it came out with neither of these! I am really confused this time, if the breakup.update function is not called here, then where is it called exactly? Any help is appreciated!!

dkxls February 2, 2015 07:57

Quote:

Originally Posted by wang219910611 (Post 529996)
Another question: Where is the breakup().update function really being called??
I was pretty sure it was called by the calcBreakup function in the SprayParcel.C, until I added the info lines into the calc function in SprayParcel.C:
Code:

if (liquidCore() > 0.5)
        { 
            Info<<"I am here AAA"<<endl;
            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
        {
            Info<<"I am here BBB"<<endl;
            calcBreakup(td, dt, cellI);
        }

Then I ran the aachenBomb again, expected to see the info lines appearing in the terminal, but it came out with neither of these! I am really confused this time, if the breakup.update function is not called here, then where is it called exactly? Any help is appreciated!!


It is called at that place. IIRC, the print-outs to Info don't work there. Try writing to cout instead of Info (not sure it it works though).

wang219910611 February 2, 2015 08:23

Quote:

Originally Posted by dkxls (Post 529998)
It is called at that place. IIRC, the print-outs to Info don't work there. Try writing to cout instead of Info (not sure it it works though).

Thanks for the quick reply! So my guess is not too wrong : ) (although the "cout" doesn't work there either...)


All times are GMT -4. The time now is 09:10.