CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

interFoam vs multiphaseInterFoam: differences in the structure of function calling

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2019, 06:45
Question interFoam vs multiphaseInterFoam: differences in the structure of function calling
  #1
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 55
Rep Power: 6
mrishi is on a distinguished road
I am looking for the ways in which interFoam and eulerFoam have been extended to their multiphase counterparts.



More specifically, I am looking at the geometric VOF algorithm isoAdvector which has been integrated as an alternative to MULES for two-phase interFoam (available as interFlow with option to switch between the two methods). I am interested in the extension of this to environment with more than two phases, which is where my question comes in.



I am trying to go through the two source codes side-by-side to draw analogy and contrast, but would also appreciate any suggestions, thoughts and pointers to resources from the more experienced members of the community on this.


eg. the nature of mixture is contained in multiphaseMixture class vs incompressibleTwoPhaseMixture which supposedly derives from twoPhaseMixture. The first of these has member functions for calculating flux but the latter only returns the effective kinematic viscosity. I suppose this change becomes necessary to tackle multiple "secondary" phases which have been added?


The implementations have some subtle differences in the PIMPLE loop:


multiphaseInterFoam has this

Code:
   while (pimple.loop())
         {

             if (pimple.firstIter() || moveMeshOuterCorrectors)

             {

                 scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();

 

                 mesh.update();

 

                 if (mesh.changing())

                 {

                     Info<< "Execution time for mesh.update() = "

                         << runTime.elapsedCpuTime() - timeBeforeMeshUpdate

                         << " s" << endl;

 

                     gh = (g & mesh.C()) - ghRef;

                     ghf = (g & mesh.Cf()) - ghRef;

 

                     MRF.update();

 

                     if (correctPhi)

                     {

                         // Calculate absolute flux

                         // from the mapped surface velocity

                         phi = mesh.Sf() & Uf();

 

                         #include "correctPhi.H"

 

                         // Make the flux relative to the mesh motion

                         fvc::makeRelative(phi, U);

 

                         mixture.correct();

                     }

 

                     if (checkMeshCourantNo)

                     {

                         #include "meshCourantNo.H"

                     }

                 }

             }

 

             mixture.solve();

             rho = mixture.rho();
While, corresponding loop for interFoam goes:
Code:
        while (pimple.loop())

         {

             if (pimple.firstIter() || moveMeshOuterCorrectors)

             {

                 mesh.update();

 

                 if (mesh.changing())

                 {

                     // Do not apply previous time-step mesh compression flux

                     // if the mesh topology changed

                     if (mesh.topoChanging())

                     {

                         talphaPhi1Corr0.clear();

                     }

 

                     gh = (g & mesh.C()) - ghRef;

                     ghf = (g & mesh.Cf()) - ghRef;

 

                     MRF.update();

 

                     if (correctPhi)

                     {

                         // Calculate absolute flux

                         // from the mapped surface velocity

                         phi = mesh.Sf() & Uf();

 

                         #include "correctPhi.H"

 

                         // Make the flux relative to the mesh motion

                         fvc::makeRelative(phi, U);

 

                         mixture.correct();

                     }

 

                     if (checkMeshCourantNo)

                     {

                         #include "meshCourantNo.H"

                     }

                 }

             }

 

             #include "alphaControls.H"      //where does this bit go in the other code


             #include "alphaEqnSubCycle.H"

 

             mixture.correct();                 //we have only correct() in two-phase setup while the multiphase counterpart instead goes for solve() and rho recalculation., but there is a correct() counterpart as well, what does that do?


 

             if (pimple.frozenFlow())          //where does this bit go in the other code


             {

                 continue;

             }
I would really appreciate any help in understanding the reasoning behind these differences in the way these functions are called and why it was necessary to put it this way.



Apologies if these seem like noob queries but I have not been able to find suitable explanations or documentation in this respect.

Last edited by mrishi; May 21, 2019 at 08:19. Reason: better clarity of questioning
mrishi is offline   Reply With Quote

Reply

Tags
interfoam, isoadvector, multiphase, pimple transient

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 12 July 11, 2019 18:33
Surface tension driven flows: interFoam vs. multiphaseInterFoam dzordz OpenFOAM Programming & Development 2 October 31, 2018 23:26
multiphase explicitsolve function in interFoam abdo1984 OpenFOAM Running, Solving & CFD 0 September 4, 2016 06:45
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27


All times are GMT -4. The time now is 08:18.