Minimal hacking to interFoam to add funny gravity
1 Attachment(s)
Hi,
I had this idea to model a Rayleigh-Taylor instability for the simplest possible case. I needed a funny gravity field that would pull up on one of the phases, and down on the other. I hacked the interFoam solver minimally, and I think I have got correct results. My first trial was actually succesful. UEqn.H was changed to: Code:
MRF.correctBoundaryVelocity(U); But then I thought adding the gravity on the right-hand side of the equation would be more correct: Code:
MRF.correctBoundaryVelocity(U); Attachment 45800 Thanks in advance for any help! |
Hi Daniel,
probably you have not switched on the momentum predictor in fvSolution, it is usually switched off by default. Best, Pablo |
Quote:
You are right, it would seem that " if (pimple.momentumPredictor()) " would require the momentum predictor step. However, I have tried enabling it and now the velocity seems to evolve ... but not the pressure, which does not change, or the color field. Aside from " momentumPredictor yes;" at the PIMPLE section, I had to add the following to fvSolutions. Code:
UFinal [It's actually grad( p - rho g z ) + rho z grad(rho), but it's the same ] |
Hi again,
not really, you should always include it in the first one (to assemble the system of equations properly), and if you want a momentum predictor, also in the second equation. Momentum predictor just solves an intermediate step and updates U. Then it applies that value to obtain the independent terms (explicit) and solve the PPE. Otherwise, the U used is the one from the beginning of the time step. Best, Pablo |
Quote:
|
All times are GMT -4. The time now is 22:12. |