|
[Sponsors] |
How to calculate the flux of this term grad(alpha1)*alphaf*U? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 6, 2016, 11:26 |
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()); Code:
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::snGrad(alpha1)); ^ alphaEqn.H:16:69: note: candidates are: ........... Thanks in advance. |
|
June 7, 2016, 06:37 |
|
#2 |
New Member
Balajee
Join Date: Dec 2013
Posts: 13
Rep Power: 13 |
Code:
U*afGrada1 The inner product of that volTensorField with mesh.Sf()should produce a vector field not a scalar field. |
|
June 9, 2016, 16:08 |
|
#3 | |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 |
Quote:
I was not aware of this problem. I tried the following code (no compile error) Code:
volVectorField afGrada1("afGrada1", a1af*fvc::grad(alpha1)); volScalarField afGrada1U("afGrada1U", afGrada1&U); surfaceScalarField Phi_afGrada1Uf("Phi_afGrada1Uf", fvc::interpolate(afGrada1U) * mesh.magSf()); Code:
LHS and RHS of + have different dimensions dimensions : [0 3 -1 0 0 0 0] + [0 2 -1 0 0 0 0] |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hi please tell me how can calculate heat flux in duct ? is draw line on surface ? | reslan | FLUENT | 0 | February 26, 2016 17:27 |
Hi i need to find surface heat flux is draw line on surface to calculate hlocal? | reslan | FLUENT | 0 | February 25, 2016 18:21 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Calculate diameter of a 3D vessel as a function of flux, Re and Wall shear stress | kamran_kibria | Main CFD Forum | 0 | October 20, 2010 17:38 |
How to calculate the flux? | YW | FLUENT | 2 | November 10, 2003 14:45 |