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

compressibleInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2014, 10:45
Default compressibleInterFoam
  #1
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 15
Sun is on a distinguished road
Hi,
I am going through the compressibleInterFoam solver (VOf for 2 compressible, isothermal immiscible fluids). In the sub-cycling of the alpha equation (alphaEqnsSubCycle.H) there is this line of code:

Code:
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
I cannot figure out what this line does. Any explanations or helps would be really appreciated.
Thanks.
Cheers!
Sun is offline   Reply With Quote

Old   June 26, 2014, 02:25
Default
  #2
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 15
Sun is on a distinguished road
As far as I understand, it returns the given relative flux in absolute form. And i think this is how it does it. (fvcMeshPhi.C from line 151 to 183)

Code:
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::absolute
 (
    const tmp<surfaceScalarField>& tphi,
    const volVectorField& U
)
{
    if (tphi().mesh().moving())
     {
         return tphi + fvc::meshPhi(U);
     }
     else
     {
         return tmp<surfaceScalarField>(tphi, true);
      }
   }
   
   
   Foam::tmp<Foam::surfaceScalarField> Foam::fvc::absolute
   (
       const tmp<surfaceScalarField>& tphi,
       const volScalarField& rho,
       const volVectorField& U
   )
   {
       if (tphi().mesh().moving())
       {
           return tphi + fvc::interpolate(rho)*fvc::meshPhi(rho, U);
       }
       else
       {
           return tmp<surfaceScalarField>(tphi, true);
       }
   }

I still don't know, though, why we need it for the alpha sub-cycling?
Sun is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 00:31.