CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Signs used in advecting volume fractions in interfoam (https://www.cfd-online.com/Forums/openfoam/189895-signs-used-advecting-volume-fractions-interfoam.html)

Katt June 29, 2017 16:42

Signs used in advecting volume fractions in interfoam
 
Hi,

I am aware of the standard equation used to advect volume fractions and about the derivation regarding "interface compression" that interfoam solver uses.

Coming to the code in "alphaEqn.H", I have the following two questions:
Code:

surfaceScalarField phic = mag(phi/mesh.magSf());                     
phic = min(interface.cAlpha()*phic, max(phic));                     
 surfaceScalarField phir = phic*interface.nHatf();                       
  for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)                     
    {                     
      surfaceScalarField phiAlpha = 
                                  fvc::flux ( phi, 
                                  alpha1,                     
                                  alphaScheme  )
                              + fvc::flux ( -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
                                              alpha1,
                                              alpharScheme );

Q1) I don't really understand the sign convention used for the compression term.
In the relative flux term: -fvc::flux(-phir, ---). So, arent you finally adding an additional convective term to the first term of "phi*alpha1"?

Q2) If C-alpha =1 and considering the relative velocity acts as a shock front against the original convective term, wouldnt both the flux term and the relative flux term balance each other and cancel out leading to no advection?

I do realise my imagination is wrong as I do see correct flow behaviour. Can anyone enlighten me.

Thanks;
Katt

santiagomarquezd August 25, 2017 20:17

Hello Katt, check my thesis. K.R.


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