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

Question about DEFINE_LINEARIZED_MASS_TRANSFER multiphase macro

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2024, 11:17
Default Question about DEFINE_LINEARIZED_MASS_TRANSFER multiphase macro
  #1
New Member
 
Join Date: Mar 2024
Posts: 9
Rep Power: 2
voidcrow is on a distinguished road
I am simulating a multiphase system consisting of liquid water (primary phase) and gas mixture (secondary phase). I'd like the simulation to take into account the mass transfer between liquid water and water vapor assuming an equilibrium condition. So if the water pressure is less than the saturation pressure, liquid water evaporates, and condenses otherwise. I looked up the DEFINE_LINEARIZED_MASS_TRANSFER macro in the UDF manual and it seems it could be used to do that.


However, I am confused about the sign convention employed by Fluent for the return value from the function. Assuming I want the "origin" phase to be liquid water and "destination" phase to be the gas mixture, does Fluent consider the return value to be positive if mass is leaving the "origin" phase (water evaporating) and negative if entering the "origin" phase, or is it the opposite?


It is really hard to tell what is going on because if I consider a negative sign for mass leaving the "origin" phase, I get no water vapor in the system and if I consider a positive sign the residuals oscillate quite a lot and the solution never converges. Is there perhaps a better way to simulate the equilibrium between both phases without using the DEFINE_LINEARIZED_MASS_TRANSFER macro?
voidcrow is offline   Reply With Quote

Old   April 1, 2024, 12:59
Default
  #2
Member
 
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7
bloodflow is on a distinguished road
Quote:
Originally Posted by voidcrow View Post
I am simulating a multiphase system consisting of liquid water (primary phase) and gas mixture (secondary phase). I'd like the simulation to take into account the mass transfer between liquid water and water vapor assuming an equilibrium condition. So if the water pressure is less than the saturation pressure, liquid water evaporates, and condenses otherwise. I looked up the DEFINE_LINEARIZED_MASS_TRANSFER macro in the UDF manual and it seems it could be used to do that.


However, I am confused about the sign convention employed by Fluent for the return value from the function. Assuming I want the "origin" phase to be liquid water and "destination" phase to be the gas mixture, does Fluent consider the return value to be positive if mass is leaving the "origin" phase (water evaporating) and negative if entering the "origin" phase, or is it the opposite?.

It is really hard to tell what is going on because if I consider a negative sign for mass leaving the "origin" phase, I get no water vapor in the system and if I consider a positive sign the residuals oscillate quite a lot and the solution never converges. Is there perhaps a better way to simulate the equilibrium between both phases without using the DEFINE_LINEARIZED_MASS_TRANSFER macro?

Have you looked at the UDF manual for this macro? This macro takes as input a 'from phase' and a 'to' phase, so you can choose what way round the sign conversation would be.

Typically mass transfer is often chosen to be positive when denoting liquid to gaseous transitions (as in the example from the UDF manual). Hence if the UDF returns a negative value for m_dot, then it would imply mass transfer from gas to liquid phase.

Consider what you think the 'equilibrium' of your problem is. Evaporation is an unsteady process, oftentimes the steady-state of evaporation problems would be all of the water evaporating (e.g., puddle or swimming pool). It is not uncommon to see large swings in evaporation rate, and unsteadiness when trying to solve and evaporation solution as steady-state. At iteration 1, the conditions may impose a very high rate of evaporation, when this is propagated through the domain and iteration 2 starts, the opposite is now true. Too much water was evaporated, and now the conditions are such that 0 evaporation would occur. This is propagated through the domain, and so on in a unstable cycle of high -> 0 evaporation.

You need to very carefully impose the implicit part of the function (dS[n]) to make sure your initial guess for the next iteration is good, have good numeric (2nd order with small pseudo-timesteps). Some other tips are:

- If you cannot resolve the instabilities, multiple your m_dot by 0.001 before returning it.

- Verify that your UDF exhibits the behavior you expect (Check P<P_sat and T_T_Sat if evaporation is occurring)

- Are you accounting for the energy released or absorbed by evaporation with a DEFINE_SOURCE UDF?

Last edited by bloodflow; April 1, 2024 at 17:07. Reason: Extra info
bloodflow 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
Interesting Multiphase Loop Question rafacerq Fluent UDF and Scheme Programming 0 February 4, 2014 14:48
Multiphase question pankajbhatter9 CFX 3 November 4, 2013 05:26
Question about Eulerian multiphase model eaxbca FLUENT 0 March 21, 2013 11:47
Question about DEFINE_EXECUTE_AT_END macro Vishal FLUENT 4 March 10, 2006 07:24
multiphase modeling question liang FLUENT 0 December 3, 2005 15:40


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