CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Mass Transfer without Phase Change in InterPhaseChangeFoam (https://www.cfd-online.com/Forums/openfoam-solving/143056-mass-transfer-without-phase-change-interphasechangefoam.html)

Parisa_Khiabani October 15, 2014 11:18

Mass Transfer without Phase Change in InterPhaseChangeFoam
 
Hello everyone,
I am working with interPhaseChangeFoam and diagnosing the solver. I modified the solver based on the tutorial of Andxersen, such that I implemented TEqn.H and also pSat as a function of temperature.
I created a simple case, flow in a duct. The inlet and the whole domain is vapor, with alpha=0. The temperatures for the walls, inlet flow and inside the domain is the same. So, no phase change happens, such that the minimum and maximum values of alpha are zero.
However, in alphaEqn.H, when I print "vDotvmcAlphal" I see strange values for that, that is -330.
Here is my question: If alpha doesn't change (that means no phase change occurs), why "vDotvmcAlphal" has a value. Since "vDotvmcAlphal" is calculated based on the evaporated/condensed mass rate, it seems that mass is transferred whitout a phase change.
I really appreciate if you guide me.

Best,
Parisa

liquidspoon October 15, 2014 15:57

Hi Parisa,

In your setup, the fluid is initially vapor everywhere (alpha1 = 0). In the solver, the vDotvmcAlphal parameter is applied as an implicit proportional source term. This is the equivalent of applying vDotvmcAlphal*alpha1 (= 0 for alpha1 = 0). So there won't be any condensation for this particular case.

Code:

fvScalarMatrix alpha1Eqn  (
    fv::EulerDdtScheme<scalar>(mesh).fvmDdt(alpha1)
    + fv::gaussConvectionScheme<scalar>
    (
      mesh,
      phi,
      upwind<scalar>(mesh, phi)
    ).fvmDiv(phi, alpha1)
  - fvm::Sp(divU, alpha1)    ==
    fvm::Sp(vDotvmcAlphal, alpha1)
    + vDotcAlphal
 );

I think you will want to modify your code so that your phase fraction source shows up the explicit term: vDotcAlphal.

You may want to look at the MS thesis by Thiele (2010). He made a similar modification to the interPhaseChangeFoam solver to handle thermally driven condensation. I have some concerns about the approach in that thesis, but it should give you some helpful pointers for your project.

Parisa_Khiabani October 15, 2014 16:01

Thanks Alex for your help,
So, if you think it can handle correctly (by the modification that you pointed), so there is no any worries about the lack of accuracy in mass transfer. Am I right?


Quote:

Originally Posted by liquidspoon (Post 514525)
Hi Parisa,

In your setup, the fluid is initially vapor everywhere (alpha1 = 0). In the solver, the vDotvmcAlphal parameter is applied as an implicit proportional source term. This is the equivalent of applying vDotvmcAlphal*alpha1 (= 0 for alpha1 = 0). So there won't be any condensation for this particular case.

Code:

fvScalarMatrix alpha1Eqn  (
    fv::EulerDdtScheme<scalar>(mesh).fvmDdt(alpha1)
    + fv::gaussConvectionScheme<scalar>
    (
      mesh,
      phi,
      upwind<scalar>(mesh, phi)
    ).fvmDiv(phi, alpha1)
  - fvm::Sp(divU, alpha1)    ==
    fvm::Sp(vDotvmcAlphal, alpha1)
    + vDotcAlphal
 );

I think you will want to modify your code so that your phase fraction source shows up the explicit term: vDotcAlphal.

You may want to look at the MS thesis by Thiele (2010). He made a similar modification to the interPhaseChangeFoam solver to handle thermally driven condensation. I have some concerns about the approach in that thesis, but it should give you some helpful pointers for your project.


liquidspoon October 15, 2014 16:29

There are some major questions to consider in your code development with respect to modeling phase change. In particular:
  • Do you apply phase change only on the interface? If so, how do you identify the interface? If not, is this appropriate for your problem?
  • How do you handle the internal thermal resistance and thermal time constant in each cell?
  • How do you maintain interface sharpness when there is a volumetric source term in the vicinity of the interface
My point is that I can't give you a guarantee about the accuracy of your code, especially without reviewing it and your algorithms thoroughly. The best advice I can give is to perform careful verification and validation as you develop your code.

Parisa_Khiabani October 15, 2014 16:33

No, I don't apply to interface since in interPhaseChangeFoam phase change can occur anywhere that there are gradients of pressure.
I just simply add net rate of evaporation and condensation multiply to latent heat, into energy equation.
But, for sure I need to validate my code. What do you recommend for the validation? Except Stephan Problem that is a benchmark.

Thanks,

Kanarya May 26, 2015 09:40

validation
 
Hi Parisa,

Did you manage to validate your code?
Do you get reasonable results?
thanks in advance!

Kanarya

Quote:

Originally Posted by Parisa_Khiabani (Post 514530)
No, I don't apply to interface since in interPhaseChangeFoam phase change can occur anywhere that there are gradients of pressure.
I just simply add net rate of evaporation and condensation multiply to latent heat, into energy equation.
But, for sure I need to validate my code. What do you recommend for the validation? Except Stephan Problem that is a benchmark.

Thanks,



All times are GMT -4. The time now is 10:49.