# Mass Transfer without Phase Change in InterPhaseChangeFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 15, 2014, 11:18 Mass Transfer without Phase Change in InterPhaseChangeFoam #1 Member   Parisa Join Date: Feb 2013 Posts: 51 Rep Power: 10 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

 October 15, 2014, 15:57 #2 Member   Alex Join Date: Jun 2011 Posts: 32 Rep Power: 11 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(mesh).fvmDdt(alpha1) + fv::gaussConvectionScheme ( mesh, phi, upwind(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.

October 15, 2014, 16:01
#3
Member

Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 10
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 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(mesh).fvmDdt(alpha1) + fv::gaussConvectionScheme ( mesh, phi, upwind(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.

 October 15, 2014, 16:29 #4 Member   Alex Join Date: Jun 2011 Posts: 32 Rep Power: 11 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.

 October 15, 2014, 16:33 #5 Member   Parisa Join Date: Feb 2013 Posts: 51 Rep Power: 10 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,

May 26, 2015, 09:40
validation
#6
Senior Member

Join Date: May 2011
Posts: 231
Rep Power: 12
Hi Parisa,

Did you manage to validate your code?
Do you get reasonable results?

Kanarya

Quote:
 Originally Posted by Parisa_Khiabani 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,