interFoam modification for mass transfer
2 Attachment(s)
Dear Foamers,
I'm working on a project involving multi-phase flows and was tasked with plugging in a mass transfer term into the interFoam solver. After reading some literature, I found a paper by Dr. Nima Samkhaniani, where he had added a source term to the volume fraction equation, which considered mass transfer rate and I made the following modification to alphaSuSp.H file based on the same: Code:
zeroField Sp; I made this change and compiled the solver. I ran two simulations: Rising Bubble case and Cavitation over a hydrofoil. The contours of water of the simulations are below. Could someone please explain the physics behind what's going on here and why is the contour very different from a typical interFoam contour?:confused: Attachment 85115 Attachment 85116 I'm running OpenFOAM v8. Thanks in advance. :) |
A theory as to why the "tiger stripes" appear is that since I have defined the source term explicitly in the volume fraction(alpha.water) equation, the value of the same has has changed in the entire domain.
I would really appreciate suggestions as to how I can eliminate these stripes while still keeping the source term in the equation. Thank you! |
Now I wish to add mass transfer only at the interface, i.e, where 0<alpha.water<1. I've found a solution here, but the latest openfoam version does not let me modify alphaEqn.H file found in /opt/openfoam8/src/twoPhaseModels/twoPhaseMixture/VoF. And I'm not able to add "if" conditions to alphaSuSp.H file either.
Any advice would be appreciated! :) |
Hi Mano2903
Have you tried to define the source term in an implicit way? like: Code:
zeroField Su; Code:
fvScalarMatrix p_rghEqn |
Hi lxufeishi,
Thanks for replying! I haven't considered implementing the mass transfer as an implicit source term yet. I look forward to implementing your code. But I have a question. Code:
volScalarField Sp ("Sp", (1.0/rho1 * mdot)/(alpha1 + SMALL)); |
SMALL is a constant already defined in src/OpenFOAM/primitives/Scalar/scalar/scalar.H and it is used here to prevent from dividing by 0.
Code:
GREAT = 1.0e+6; |
Quote:
Update: The implicit method worked! Thank you. Could you help me understand, how the Su and Sp implementation vary and why? Regards, Mano2903 |
All times are GMT -4. The time now is 11:00. |