CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   interFoam with transport: add a transport equation to only one phase (https://www.cfd-online.com/Forums/openfoam-programming-development/196450-interfoam-transport-add-transport-equation-only-one-phase.html)

HectorLee December 5, 2017 05:35

interFoam with transport: add a transport equation to only one phase
 
1 Attachment(s)
Hello, everyone. Currently, I am simulating transport phenomena in multiphase flow and the solute only exists in one phase, which means that the solute cannot cross the interface between two phases (e.g., salt in the water-air system). With the help from this link:
https://www.cfd-online.com/Forums/op...one-phase.html
I added the transport equation to the solver as below:
Code:

Info<< "solve CEqn" << endl;
{
    surfaceScalarField Cf = fvc::interpolate(C);
    fvScalarMatrix CEqn
    (
        fvm::ddt(C)
      + fvm::div(phi, C)
      - fvm::laplacian(DT, C)
      == -fvc::laplacian(DT*Cf, alpha1)
    );
   
    CEqn.relax();
    fvOptions.constrain(CEqn);
    CEqn.solve();
    fvOptions.correct(C);
   
}

However, the solute still propagates through the interface somehow during the simulation as the attached figure shows.
To solve this problem, how should I modify the equation of the transport? Is there anyone who can enlighten me on this problem?
Thanks a lot!

Z.Q. Niu July 27, 2018 12:46

Hi Li,
Have you solved this problem? Thanks!

Blumenkind March 6, 2019 08:42

This problem has been solved.


It is implemented in OpenFOAM v1612
https://www.openfoam.com/releases/op...nd-physics.php
(see at the bottom of the page)



and in OpenFOAM-dev (for three weeks now)
https://twitter.com/CFDdirect/status...17062073167872
https://github.com/OpenFOAM/OpenFOAM...561205476f8b42


All times are GMT -4. The time now is 05:30.