|
[Sponsors] |
June 25, 2014, 10:45 |
compressibleInterFoam
|
#1 |
Senior Member
Join Date: Nov 2010
Posts: 103
Rep Power: 15 |
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))); Thanks. Cheers! |
|
June 26, 2014, 02:25 |
|
#2 |
Senior Member
Join Date: Nov 2010
Posts: 103
Rep Power: 15 |
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? |
|
|
|