CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   discretizing void fraction transport equation (http://www.cfd-online.com/Forums/openfoam-programming-development/123298-discretizing-void-fraction-transport-equation.html)

discretizing void fraction transport equation

Hi everybody,

I am having a really hard time for discretizing the transport equation for void fraction in OpenFOAM. The equation is as following:

http://www.cfd-online.com/Forums/dat...AAAElFTkSuQmCChttp://www.cfd-online.com/Forums/dat...AAAElFTkSuQmCCd(alpha)/dt+U.Δ(alpha)=Δ.J

and J is a function of alpha. I appreciate it if you help me to write it in OpenFOAM format.

Thanks.

 Bernhard September 10, 2013 02:23

What did you try up until now? Where are you stuck exactly? Have a look at \$FOAM_SOLVERS/basic/scalarTransportFoam

Thanks for your response. I describe for you the whole story. The equation that I have put in my first post d(alpha)/dt+U.Δ(alpha)=Δ.J is the governing equation for the transport of particles in a suspension due to normal stresses (Δ is the divergence operator here). The normal stress is the J term in the right hand side.

The process that I have done to reach the J equation is:

SP=-etha0*gamma*ethaN*Q

Here, etha0 and ethaN are viscosity, gamma is the magnitude of the strain rate and Q is a tensor. In OpenFOAM format it is :

To find J, i have done:

volVectorField divSP = fvc::div(SP);

volVectorField J= (-2.0*aa*aa/9.0/etha0)*fphi*divSP;

As you see J is a vector which is calculated based on a divergence process on a tensor field. I do not know if the divergence calculation is correct or not. Having the J vector field, I have written the transport equation of void fraction:

fvScalarMatrix alphaEqn
(
fvm::ddt(alpha)
+ fvm::div(phic, alpha, scheme)
- fvc::div(J)
);

As you see another divergence is applied to J. So now I do not know
first: if the two divergence process that I have done are written correctly in OpenFOAM format or not,

second: is my transport equation which is the discretized form of the equation presented in my first post correct or not?

I appreciate if any body can help me.