CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Need Confirmation - Eulerian solver for tiny particules (https://www.cfd-online.com/Forums/openfoam-programming-development/106454-need-confirmation-eulerian-solver-tiny-particules.html)

 fredo490 August 29, 2012 10:26

Need Confirmation - Eulerian solver for tiny particules

Hi everyone, it would be nice if somebody can give me some confirmations on the general aspect of my algorithm and the "code" that follows (especially the translation of the equations). I want to setup an unsteady Eulerian solver to compute the behavior of tiny particles in a fluid (only the fluid impact the particules motion through the drag).

Nomenclature :
- volume fraction of the particles
- velocity of the particles
- function of the relative Reynolds number
- time respond of the particle
- velocity of the fluid

Continuity equation :

Momentum equation

The algorithm I have in mind :
1) setup a "phi_alpha" flux equal to
2) initialize this flux in the createfield with:
Code:

"linearInterpolate(alpha)*linearInterpolate(u) & mesh.Sf()"
3) solve the continuity equation using the following code:
Code:

fvScalarMatrix cEqn ( fvm::ddt(alpha) + fvc::div(alpha_phi) ); cEqn.solve()
4) update the flux phi_alpha with:
Code:

alpha_phi -= cEqn.flux();
5) compute the relative Reynolds number, the function and
6) solve the momentum equation using:
Code:

fvVectorMatrix uEqn ( fvm::ddt(alpha, u) + fvm::div(alpha_phi, u) == fRe / Tau * alpa * (V – u) ); uEqn.solve()
My questions are:
i) I'm not sure of the step 4... I kind of reproduce the simpleFoam code. Is there any documentation somewhere about the command ".flux" ?
ii) I'm not sure of the translation of the momentum equation step 6. Do I need to use a specific formulation for the source term ? Does the solver identify the last "u" by itself ?