CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

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

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2016, 10:42
Default How to calculate the flux of this term --- grad(alpha1)*alphaf*U?
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14
keepfit is on a distinguished road
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:
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.

alphaEqn.H: In function ‘int main(int, char**)’:
alphaEqn.H:16:69: error: no matching function for call to ‘Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(const char [9], Foam::tmp<Foam::Field<double> >)’
 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.


Last edited by keepfit; June 7, 2016 at 04:53.
keepfit is offline   Reply With Quote


discretisation, flux calculation, interfoam, vof method

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
how to calculate mass flux through a boundary in openfoam subash OpenFOAM Running, Solving & CFD 1 September 30, 2019 04:28
Hi i need to find surface heat flux is draw line on surface to calculate hlocal? reslan FLUENT 0 February 25, 2016 17:21
Hi how can calculate total surface heat flux in duct reslan FLUENT 0 February 24, 2016 17:17
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
How to calculate the flux? YW FLUENT 2 November 10, 2003 13:45

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