CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent Multiphase

multiphase flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2018, 16:17
Default multiphase flow
  #1
New Member
 
Tonoy Mondol
Join Date: Sep 2018
Posts: 13
Rep Power: 8
Tonoy Mondol is on a distinguished road
what can lee evaporation condensation model do? if i use lee model for evaporation condensation then is it necessary to use this udf?

#include "udf.h"
#include "sg_mphase.h"
#define T_SAT 373
#define LAT_HT 2455.1345e3
DEFINE_SOURCE(vap_src, cell, pri_th, dS, eqn)
{
Thread *mix_th, *sec_th;
real m_dot_v;
mix_th = THREAD_SUPER_THREAD(pri_th);
sec_th = THREAD_SUB_THREAD(mix_th, 1);
/*m_dot_v=0.;*/
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot_v = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;

dS[eqn] = 0.;
}

if(C_T(cell, mix_th)<=T_SAT)
{
m_dot_v = -0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] = -0.1*C_R(cell, pri_th)*fabs(C_T(cell, pri_th) - T_SAT)/T_SAT;
}
return m_dot_v ;
}

DEFINE_SOURCE(liq_src, cell, sec_th, dS, eqn)
{
Thread * mix_th, *pri_th;
real m_dot_l;
mix_th = THREAD_SUPER_THREAD(sec_th);
pri_th = THREAD_SUB_THREAD(mix_th, 0);
/*m_dot_l=0.;*/
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot_l = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
dS[eqn] = -0.1*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
}
if(C_T(cell, mix_th)<=T_SAT)
{
m_dot_l = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] =0.;
}

return m_dot_l;
}

DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn)
{
Thread *pri_th, *sec_th;
real m_dot;
pri_th = THREAD_SUB_THREAD(mix_th, 0);
sec_th = THREAD_SUB_THREAD(mix_th, 1);
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
dS[eqn] = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*LAT_HT/T_SAT;
}

if(C_T(cell, mix_th)<=T_SAT)
{
m_dot = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*LAT_HT/T_SAT;
}
return LAT_HT*m_dot; }


Did anyone use this code before?
in my knowledge lee model works under this code.
please share your experience so that i can understand something.thanks in advance
Tonoy Mondol is offline   Reply With Quote

Old   January 15, 2019, 07:42
Default
  #2
New Member
 
GW
Join Date: Nov 2018
Posts: 6
Rep Power: 8
violin000 is on a distinguished road
Quote:
Originally Posted by Tonoy Mondol View Post
what can lee evaporation condensation model do? if i use lee model for evaporation condensation then is it necessary to use this udf?

#include "udf.h"
#include "sg_mphase.h"
#define T_SAT 373
#define LAT_HT 2455.1345e3
DEFINE_SOURCE(vap_src, cell, pri_th, dS, eqn)
{
Thread *mix_th, *sec_th;
real m_dot_v;
mix_th = THREAD_SUPER_THREAD(pri_th);
sec_th = THREAD_SUB_THREAD(mix_th, 1);
/*m_dot_v=0.;*/
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot_v = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;

dS[eqn] = 0.;
}

if(C_T(cell, mix_th)<=T_SAT)
{
m_dot_v = -0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] = -0.1*C_R(cell, pri_th)*fabs(C_T(cell, pri_th) - T_SAT)/T_SAT;
}
return m_dot_v ;
}

DEFINE_SOURCE(liq_src, cell, sec_th, dS, eqn)
{
Thread * mix_th, *pri_th;
real m_dot_l;
mix_th = THREAD_SUPER_THREAD(sec_th);
pri_th = THREAD_SUB_THREAD(mix_th, 0);
/*m_dot_l=0.;*/
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot_l = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
dS[eqn] = -0.1*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
}
if(C_T(cell, mix_th)<=T_SAT)
{
m_dot_l = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] =0.;
}

return m_dot_l;
}

DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn)
{
Thread *pri_th, *sec_th;
real m_dot;
pri_th = THREAD_SUB_THREAD(mix_th, 0);
sec_th = THREAD_SUB_THREAD(mix_th, 1);
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th) - T_SAT)/T_SAT;
dS[eqn] = -0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*LAT_HT/T_SAT;
}

if(C_T(cell, mix_th)<=T_SAT)
{
m_dot = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT-C_T(cell,pri_th))/T_SAT;
dS[eqn] = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*LAT_HT/T_SAT;
}
return LAT_HT*m_dot; }


Did anyone use this code before?
in my knowledge lee model works under this code.
please share your experience so that i can understand something.thanks in advance
I have used this UDF, but the gas phase will not increase, I don't quite understand what is going on, or it does not apply to the VOF model.
violin000 is offline   Reply With Quote

Old   December 4, 2019, 22:18
Default
  #3
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
Quote:
Originally Posted by Tonoy Mondol View Post
Did anyone use this code before?
in my knowledge lee model works under this code.
please share your experience so that i can understand something.thanks in advance

I am using this udf.
If you are using this model, no need to use Lee model, no need to turn on mass transfer mechanism too; just include the source term, you will be able to see the volume fraction results.
But I do not understand the udf. I am not sure if this works or not yet.
Let me know if anybody know how it works.
soumitra2102 is offline   Reply With Quote

Old   December 22, 2019, 07:10
Default
  #4
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Quote:
Originally Posted by soumitra2102 View Post
I am using this udf.
If you are using this model, no need to use Lee model, no need to turn on mass transfer mechanism too; just include the source term, you will be able to see the volume fraction results.
But I do not understand the udf. I am not sure if this works or not yet.
Let me know if anybody know how it works.
How do you include the udf without turning on the mass transfer mechanism?

I am working on a condensation simulation in a CD nozzle but could not get the steam to condensate. Is the cavitation option in Fluent only possible for evaporation and not condensation?
cwl6750084 is offline   Reply With Quote

Old   December 22, 2019, 10:16
Default
  #5
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
You would need to Compile the UDF, not Interpret.
Then you will be able to assign appropriate source terms to respective cell-zones (for mixture, liquid and gaseous phases)

I think you would need two separate mass transfer mechanisms to incorporate a Cavitation phenomenon and an Evaporation (a thermal-phase change) phenomenon.

But again, if you are using the UDF, then you will not need a separate mass transfer mechanism for evaporation.
soumitra2102 is offline   Reply With Quote

Old   December 22, 2019, 12:42
Default
  #6
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Quote:
Originally Posted by soumitra2102 View Post
You would need to Compile the UDF, not Interpret.
Then you will be able to assign appropriate source terms to respective cell-zones (for mixture, liquid and gaseous phases)

I think you would need two separate mass transfer mechanisms to incorporate a Cavitation phenomenon and an Evaporation (a thermal-phase change) phenomenon.

But again, if you are using the UDF, then you will not need a separate mass transfer mechanism for evaporation.
Thanks for your explanation. For the Zwart cavitation model, how should I set the evaporation and condensation frequency? Is it that I must always set it as from water to steam and not the reverse? The simulation always crashes when I make it as from steam to water - this is the intended case as I am simulating condensation of steam as it flows through a CD nozzle.
cwl6750084 is offline   Reply With Quote

Old   December 24, 2019, 15:06
Default
  #7
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
I am not that experienced in multi-phase.
Yet, I believe, you would need two Mass Transfer Mechanism if you need to incorporate two different phenomena.
I am not sure, but something like this...mass transfer mechanism.PNG

And the reason for crashing can be due to problem with your assigned Standard State Enthalpy values in material definition.
In my case I put liquid phase enthalpy =0 and gaseous phase enthalpy as the enthalpy difference between the two phases at saturation temperature (from steam table(https://webbook.nist.gov/chemistry/fluid/)). And the value was negative. Reference temperature I used is the saturation temperature.
soumitra2102 is offline   Reply With Quote

Old   December 25, 2019, 00:42
Default
  #8
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Quote:
Originally Posted by soumitra2102 View Post
I am not that experienced in multi-phase.
Yet, I believe, you would need two Mass Transfer Mechanism if you need to incorporate two different phenomena.
I am not sure, but something like this...Attachment 73984

And the reason for crashing can be due to problem with your assigned Standard State Enthalpy values in material definition.
In my case I put liquid phase enthalpy =0 and gaseous phase enthalpy as the enthalpy difference between the two phases at saturation temperature (from steam table(https://webbook.nist.gov/chemistry/fluid/)). And the value was negative. Reference temperature I used is the saturation temperature.
I did not realize that we have to reset the enthalpy values. If the inlet pressure of my simulation is 4 MPa, I should use the saturation temperature and enthalpy values at 4 MPa?

I somehow could get the simulation running when I set the cavitation model from water to gas, but the resulted temperature (at the outlet) is way much higher, which is incorrect.

Thanks for your advice. Let me try it over the holiday.

Happy holidays.
cwl6750084 is offline   Reply With Quote

Old   December 25, 2019, 00:57
Smile
  #9
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
Quote:
Originally Posted by cwl6750084 View Post
resulted temperature (at the outlet) is way much higher, which is incorrect.
This could be an indicator that the energy equation is going wrong, and that may happen due to wrong latent heat calculations.
The latent heat and corresponding reference temperature are important!

You may specify them based on an average pressure in the domain.

You can play with assigning zero value to either of the liquid or gaseous phases and so with the enthalpy vice versa. Same you could do with sign of it.
I did that permutation-combination for all cases, and found what I said in earlier post. It is good for condensation. I had selected the case which gave me okayish temperature contour and (although,bad yet) relatively better volume fraction results.

Happy Holidays!
soumitra2102 is offline   Reply With Quote

Old   December 26, 2019, 03:30
Default
  #10
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Quote:
Originally Posted by soumitra2102 View Post
This could be an indicator that the energy equation is going wrong, and that may happen due to wrong latent heat calculations.
The latent heat and corresponding reference temperature are important!

You may specify them based on an average pressure in the domain.

You can play with assigning zero value to either of the liquid or gaseous phases and so with the enthalpy vice versa. Same you could do with sign of it.
I did that permutation-combination for all cases, and found what I said in earlier post. It is good for condensation. I had selected the case which gave me okayish temperature contour and (although,bad yet) relatively better volume fraction results.

Happy Holidays!
Thanks a lot for your help. It actually solved the crashing problem. However, it seems that the energy calculation is still incorrect. Other than setting the properties, do you aware any other model settings that could affect that calculation?
Attached Images
File Type: jpg Fluent Screen.jpg (82.0 KB, 17 views)
cwl6750084 is offline   Reply With Quote

Old   December 26, 2019, 11:32
Default
  #11
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
Create a monitor for temperature and see if it is rising or lowering during a transient-time scale.
If it is rising instead of lowering then possibly you have put the enthalpy is wrong way. Try swapping the zero value and the enthalpy value) or trying change ing the sign or do both.
You should also check swapping primary and secondary phases.
P.S. you residuals are very abnormal.
Maybe there is more than mere material properties that you would need to change.
Check mesh quality, try using laminar regime, recheck units, scaling and boundary conditions.
soumitra2102 is offline   Reply With Quote

Old   December 30, 2019, 14:03
Default
  #12
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
I tried several things, including replacing all properties with the one from steam table at the reference temperature. It still did not solve the problem, as long as I set the mass transfer mechanism from steam to water. Thus, I reverted it to water to steam, the simulation went smoothly. However, now, the pressure remains constant throughout at some values.

1. Does it matter if we set it water to steam or steam to water? I assumed if the model considered both evaporation and condensation, then, it should not matter.
2. I set steam as the primary phase as the fluid coming in is pure steam. Does it matter which one is the primary phase per your experience?

Thanks. Happy New Year.
cwl6750084 is offline   Reply With Quote

Old   December 30, 2019, 16:53
Default
  #13
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
Quote:
Originally Posted by cwl6750084 View Post
1. Does it matter if we set it water to steam or steam to water? I assumed if the model considered both evaporation and condensation, then, it should not matter.
2. I set steam as the primary phase as the fluid coming in is pure steam. Does it matter which one is the primary phase per your experience?

  1. I had the same issue. But I found that, it should be exactly what you want i.e. for condensation, From phase should be vapor and so To phase should be liquid.
  2. Yeah, check swapping primary-secondary phases. I did it. It matters a lot.
  1. Rather, in my case (weirdly) when I swapped the evaporation and condensation frequencies in the evaporation-condensation model, it smoothly worked out. So for condensation to occur, I kept my desired value in as the evaporation frequency
Happy New Year!
soumitra2102 is offline   Reply With Quote

Old   January 2, 2020, 13:18
Default
  #14
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Hello,

Thank you for your opinion. I actually figured out that the density model is the problem - I am using the real gas SRK equation. When I switched to constant density, the simulation actually giving something reasonable and logical. Tried the ideal gas law, the similar crashing occurred. I looked up the manual today when I get to my office, it seems that gas laws does not apply in the two-phase region for steam. Do you have any suggestions on how to model the density in this case?

By the way, why is it when I apply the cavitation model, the pressure field will always converged to the vapourization pressure that I put in throughout the domain?

Thanks.
cwl6750084 is offline   Reply With Quote

Old   January 2, 2020, 13:29
Default
  #15
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
I use temperature dependent piece-wise linear distribution for all the properties.
I get all the properties from NIST website
soumitra2102 is offline   Reply With Quote

Old   January 2, 2020, 13:53
Default
  #16
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 11
cwl6750084 is on a distinguished road
Quote:
Originally Posted by soumitra2102 View Post
I use temperature dependent piece-wise linear distribution for all the properties.
I get all the properties from NIST website
But density is a function of both temperature and pressure for steam, at what pressure did you fit the density curve?
cwl6750084 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Some Concepts:Laminar flow, turbulent flow, steady flow and time-dependent flow Jing Main CFD Forum 8 October 5, 2018 18:02
multiphase flow ,mass and volume fraction imbalance sope111 CFX 16 September 3, 2018 01:10
Review: Reversed flow CRT FLUENT 1 May 7, 2018 06:36
Multiphase flow in a pipe with a CHT wissal CFX 4 June 12, 2017 13:15
Capillary pressure in multiphase flow in porous media Lalit FLUENT 0 March 21, 2013 02:24


All times are GMT -4. The time now is 18:21.