|
[Sponsors] |
January 9, 2024, 10:29 |
Advection with three terms in VOF
|
#1 |
New Member
Join Date: Apr 2023
Posts: 12
Rep Power: 3 |
Dear Foamers,
I am modelling the simultaneous transport of several passive scalars over a phase field. Because of this, the advection term of the transport equation reads as follows: , where alpha is the phase field (scalar), U is the velocity field (vector) and Psi is the quantity being transported (scalar). Since both alpha and Psi vary on the space, it seems to me that this term should be written as: . Since the flow is incompressible, I have implemented it in openFoam the following way: Code:
(Psi * U & fvc::grad(alpha)) + alpha * Psi * fvc::div(phi) + (alpha * U & fvc::grad(Psi)) where u_i would be the velocity through each face and s_i, the surface of the face. So far, it compiles and runs without complaining. Does anybody know if this would be correct and/or if there is a more efficient way of doing it? Regards and thanks in advance |
|
January 10, 2024, 09:59 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14 |
The problem that I see with you expanding out the convection term into your three terms is that the three terms are not in a conservative form. This means that when you integrate them over a cell volume, as is required for the finite volume approach, you don't get simple expressions based on the average cell value or the average face value ... By contrast, with the single convection term, you can convert the divergence into a sum of fluxes on the cell face, with face averaged values of psi, U and alpha ... and this is second order accurate if you assume a linear variation of values across a face/cell (which is the underpinning of the FV approach).
Indeed, if you expand out the Taylor series for your approach, you'll probably find that your version includes a bunch of additional cross terms and is not equivalent to the "correct" implementation using the single term. So in short - whilst you can do it this way (in the sense that it compiles), I wouldn't recommend it. I hope that helps. |
|
January 10, 2024, 10:44 |
|
#3 |
New Member
Join Date: Apr 2023
Posts: 12
Rep Power: 3 |
Hi,
Thanks for your response. As you correctly guessed, the implementation with the expansion does not work - it blows up after a few time steps. After some tests, the reason is most likely the advective term, so I dropped the expansion. First, I calculate the face fluxes of U times alpha the following way: Code:
surfaceScalarField uAlpha ( IOobject ( "uAlpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(alpha*U) & mesh.Sf() ); Code:
fvm::div(uAlpha,Psi) Do you happen to have any other suggestion? Thanks in advance |
|
January 11, 2024, 05:07 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14 |
I am not very conversant with VoF type solvers (for example - should there not be a density term in the divergence as well? probably my ignorance ...), but could you not simply multiply alpha and psi since they are both volScalarFields, and then just write a conventional divergence as div(phi,alphaPsi) or am I missing something?
|
|
January 11, 2024, 12:18 |
|
#5 |
New Member
Join Date: Apr 2023
Posts: 12
Rep Power: 3 |
Hi,
I have now tried multiple approaches, with different, yet disappointing results...
Thanks anyway for your suggestion. It was worth a shot |
|
Tags |
divergence, gradient, interfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference of definition between HEM and VOF models | shipman | OpenFOAM | 1 | February 16, 2014 14:48 |
Question in definition of terms in solve | titio | OpenFOAM Running, Solving & CFD | 0 | March 19, 2009 17:02 |
ATTENTION!! Validty of Fluent's VOF?? | ozgur | FLUENT | 1 | February 18, 2004 12:59 |
Difficult BCs about Freesurface Simulation by VOF | Yongguang Cheng | FLUENT | 0 | September 19, 2003 08:39 |
K-Epsilon model? | Brindaban Ghosh | Main CFD Forum | 2 | June 24, 2000 05:22 |