|
[Sponsors] |
June 27, 2021, 07:58 |
interFoam modification for mass transfer
|
#1 |
New Member
Mano
Join Date: May 2019
Posts: 9
Rep Power: 7 |
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; zeroField divU; volScalarField Su ( IOobject ( "Su", runTime.timeName(), mesh ), -mdot*((1/rho1)-(alpha1*(1/rho1-1/rho2))) ); 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? mdot_0_5.jpg 0.jpg I'm running OpenFOAM v8. Thanks in advance. |
|
July 3, 2021, 12:35 |
|
#2 |
New Member
Mano
Join Date: May 2019
Posts: 9
Rep Power: 7 |
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! |
|
July 12, 2021, 03:31 |
|
#3 |
New Member
Mano
Join Date: May 2019
Posts: 9
Rep Power: 7 |
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! |
|
July 16, 2021, 06:44 |
|
#4 |
New Member
Join Date: Jul 2019
Location: MARS
Posts: 9
Rep Power: 7 |
Hi Mano2903
Have you tried to define the source term in an implicit way? like: Code:
zeroField Su; zeroField divU; volScalarField Sp ("Sp", (1.0/rho1 * mdot)/(alpha1 + SMALL)); Code:
fvScalarMatrix p_rghEqn ( fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) - mdot*(1.0/rho1 - 1.0/rho2) ); |
|
July 19, 2021, 16:27 |
|
#5 |
New Member
Mano
Join Date: May 2019
Posts: 9
Rep Power: 7 |
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)); |
|
July 19, 2021, 21:44 |
|
#6 |
New Member
Join Date: Jul 2019
Location: MARS
Posts: 9
Rep Power: 7 |
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; VGREAT = 1.0e+37; ROOTVGREAT = 1.0e+18; SMALL = 1.0e-6; VSMALL = 1.0e-37; ROOTVSMALL = 1.0e-18; |
|
July 30, 2021, 11:53 |
|
#7 | |
New Member
Mano
Join Date: May 2019
Posts: 9
Rep Power: 7 |
Quote:
Update: The implicit method worked! Thank you. Could you help me understand, how the Su and Sp implementation vary and why? Regards, Mano2903 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
Mass transfer interaction and DPM | attaullah | Fluent Multiphase | 0 | February 24, 2017 11:34 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |
additional variable mass transfer in CFX5.6 | john | CFX | 1 | February 14, 2004 01:30 |