# How to calculate the flux of this term grad(alpha1)*alphaf*U?

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

 June 6, 2016, 10:42 How to calculate the flux of this term --- grad(alpha1)*alphaf*U? #1 Senior Member   David Long Join Date: May 2012 Location: Germany Posts: 104 Rep Power: 14 Hi Foamers, I am working on a modified solver based on interFoam, having problem to calculate the flux of the following term (in modified VOF method): where alpha1 is the liquid phase volume fraction, alphaf the fluid volume fraction, and U the fluid velocity. The term alphaf is introduced because there is a third phase: solid. To calculate the flux of this term, I tried the following code: Code: ```volVectorField afGrada1("afGrada1", alphaf*fvc::grad(alpha1)); //volVectorField afGrada1("afGrada1", alphaf*fvc::snGrad(alpha1)); surfaceScalarField afGrada1Uf(fvc::interpolate(U*afGrada1) & mesh.Sf());``` But it seems that there is a problem on the gradient of alpha1. Code: ```alphaEqn.H: In function ‘int main(int, char**)’: alphaEqn.H:16:69: error: no matching function for call to ‘Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>::GeometricField(const char [9], Foam::tmp >)’ volVectorField afGrada1("afGrada1", alphaf*fvc::grad(alpha1)); ^ alphaEqn.H:16:69: note: candidates are: ...........``` I have tried a lot of combinations, but none is working. Any idea to calculate the flux of alphaf*grad(alpha1)*U? Thanks in advance. David Last edited by keepfit; June 7, 2016 at 04:53.

 Tags discretisation, flux calculation, interfoam, vof method