|
[Sponsors] |
strange behaviour of interCondensingEvaporatingFoam for a simple 1D Stefan condensati |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 21, 2016, 11:07 |
strange behaviour of interCondensingEvaporatingFoam for a simple 1D Stefan condensati
|
#1 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Hi Foamers, I created simple 1D test case for condensation, which is basically the Stefan problem for which analytical solution exists. The test case is a rod filled with a water vapour (alpha.liquid = 0) at saturation temperature of 380.26 K. In the first case (StefanCond_left) I set:
http://fluid.itcmp.pwr.wroc.pl/~pbla...fanCond.tar.gz
__________________
best regards pblasiak |
|
September 22, 2016, 07:57 |
|
#2 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Hi again,
I did described above the two test cases in Fluent and there I got mirror image solutions when I only changed the side of the cooled wall. So in interCondensingEvaporatingFoam is bug. It is more interesting because I found the same strange behavior in interThermalPhaseChangeFoam, as described here https://github.com/MahdiNabil/CFD-PC/issues/3 So it can be bug that can be inherent in all interFoam based family solvers.
__________________
best regards pblasiak |
|
October 18, 2016, 13:11 |
|
#3 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Hi,
i am also working with evaporation/condensation and i want to implement my own phase change model in openFOAM. I started by having a look at the existing solvers: interPhaseChangeFoam and interCondesingEvaporatingFoam. I do not understand the energy formulation in interCondesingEvaporatingFoam, do you know why there are no source terms to account for extra energies due to evaporation/condensation? By starting from single-phase equations and deriving the equation for the mixture i think source terms should appear....or am i missing something? Best, Andrea |
|
October 19, 2016, 02:40 |
|
#4 | |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Quote:
source terms to account for extra energies due to evaporation/condensation are included in the definition of internal energy e please see the file twoPhaseMixtureThermo.H where they defined e1 = Cv1(T - Tsat) + Hv1 e2 = Cv2(T - Tsat) + Hv2 e = (alpha1*rho1*e1 + alpha2*rho2*e2)/(alpha1*rho1 + alpha2*rho2) and then in the transportProperties dict we set Hv1 = 0 for the liquid phase
__________________
best regards pblasiak |
||
October 19, 2016, 09:17 |
|
#5 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Thanks for the reply,
however I am not yet convinced of the energy formulation. In my opinion the source term for the energy equation should be proportional to the specific mass that is evaporating/condinsing in the unit time (mDotAlphal() according to constant.C) multiply by the specific latent heat of vaporization/condensation. isn't it? here it does not seem to be the case.... Another question...the heat flux term, div(q), in the energy equation can be rewritten using Fourier law as div(q) = -div(kappa*grad(T)) where k is the thermal conductivitiy. Then assuming e = Cv*T, where "e" is the internal energy, the term should read -div(kappa/Cv * grad(e)) but in eEqn.H we have - fvm::laplacian(kappaEff/cp, e) So, why kappa is divided by Cp and not by Cv?...then Cv and Cp are not constant in space so i am not sure we can take them out of the gradient of T. Last thing and i am sorry if i bother you. The term fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), e) Does it have a mathematical derivation? or it is artificially added to improve stability (negative implicit source term)? a similar term is also added in the momentum eq. It is the continuity eq. which should be zero... Best, andrea Last edited by Andrea_85; October 19, 2016 at 10:37. |
|
October 21, 2016, 05:43 |
|
#6 | |||
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Quote:
I did not track all the equations and I cannot give the answer. The correct equations you can find here http://www.tandfonline.com/doi/abs/1...07780903423908 Quote:
ftp://210.212.172.242/Digital_Librar...20anderson.pdf However in the interCondensingEvaporatingFoam we have e under laplacian and your question is justified why we devide kappa by cp and not by cv. I do not understand it as well. Quote:
fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), e) I do not fully understand it but my interpretation is the same as yours, namely it is additional term that enhance convergence and it is zero because it is something like continuity equation. However I have some doubts because in the OpenFOAM, the continuity equation for incompressible fluid should be fvm::Sp(fvc::ddt(rho) + fvc::div(phi), e) or am I wrong?
__________________
best regards pblasiak |
||||
October 21, 2016, 08:09 |
|
#7 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Hi,
i understand the formulation in Kunkelmann paper. There the source term in the energy eq. is calculated as the product of the evaporation/condensation rate and the latent heat, i.e. J=(T-Tsat)/(Ri DeltaH) * DeltaH which means that if the cell is not evaporating/condensing the source term is zero for that cell. In interCondesingEvaporatingFoam the evaporation rate is calculated as Revap = coeff*alpha1*rho1*max(T-Tsat,0) where it is assumed alpha1=1 in the liquid. Now if we have a cell completely full with liquid (alpha1=1) but at a temperature lower than Tsat, the liquid in the cell will not evaporate (as it should be, Revap=0). However, if i've understood the energy formulation in OF (and probably i've not), the energy for that cell will be calculated by adding the contribution of the latent heat to the internal energy even if the liquid is not evaporating, i.e. by assuming we only have evaporation (Hf2=0) and alpha1=1 e = (T-Tsat)*(Cv+Hf1) < 0 which looks weird to me....but maybe i am missing something. Regarding the energy equation, i derived it from the total energy equation, neglecting viscous dissipation and gravity term, and i got ddt(rho*e) + div(rhoPhi*e) + ddt(rho*K) + div(rhoPhi*K) + div(pU) = + div(kappa*grad(T)) + Se which is not exactly what is implemented is eEqn.H. The term p*div(U) that is in eEqn.H appears if you simplify the mechanical contribution using the momentum eq. Have a look here for example http://cfd.direct/openfoam/energy-equation/ The continuity equation for the mixture is written as ddt(rho)+div(rho*U)=0 where rho=alpha1*rho1+alpha2*rho2 In the OF syntax this reads fvc::ddt(rho)+fvc::div(rhoPhi) phi= volumetric flux rhoPhi= mass flux = rho*phi So the term fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), e) is the continuity eq. multiply by the internal energy. Best, Andrea |
|
October 22, 2016, 05:25 |
|
#8 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Hi Andrea,
Thanks a lot for explanation. Maybe you know why does interCondensingEvaporatingFoam behave strangely as I described in post #1 ??
__________________
best regards pblasiak |
|
October 23, 2016, 09:09 |
|
#9 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Honestly, i do not know.
I'll do some tests in the next days, if i have news ill let you know. andrea |
|
October 23, 2016, 14:26 |
|
#10 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Hi
It is very strange because I did it the same in Fluent and everything works well there.
__________________
best regards pblasiak |
|
October 7, 2023, 12:12 |
|
#11 | |
New Member
Jaymeen Patel
Join Date: Jan 2023
Location: Chennai
Posts: 7
Rep Power: 3 |
Quote:
|
||
October 7, 2023, 13:31 |
|
#12 | |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15 |
Quote:
https://thermores.pwr.edu.pl/pracown...asiak/download
__________________
best regards pblasiak |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange behaviour: Ethanol solution flow on channel with interface to porous domain | khariel | CFX | 6 | December 11, 2014 17:08 |
Strange behaviour while running in parallel | samiam1000 | OpenFOAM | 3 | September 19, 2012 14:23 |
Problem with SST-Model - strange behaviour | Peter85 | OpenFOAM Running, Solving & CFD | 11 | November 18, 2010 01:32 |
strange behaviour of GGI in parallel on axis symmetrical case | A.Devesa | OpenFOAM Running, Solving & CFD | 0 | April 6, 2010 03:58 |
Strange Solution for a simple pipe flow!! | shekharc | Main CFD Forum | 4 | May 9, 2005 09:21 |