|
[Sponsors] |
UDF for humid air - pressure and ethalpy correction |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 12, 2019, 04:10 |
UDF for humid air - pressure and ethalpy correction
|
#1 |
New Member
Piotr
Join Date: Oct 2019
Posts: 5
Rep Power: 6 |
Hi guys,
I have a question. I'm trying to implement UDF for air flow with condensation. I use two additional governing equations for liquid water mass fraction and number of droplets. I define everything in DEFINE_ADJUST functions and then add two sources of water mass and number of droplets as DEFINE_SOURCE. So far everything works fine. Due to the condensation there is a pressure jump in the flow. Having mass of liquid water and number of droplets it is possible to calculate the pressure and enthalpy change. Here is my question. If i correct the pressure and enthalpy as : C_H(c, t) = h_cor; /* prescribing value of enthalpy */ C_P(c, t) = p_cor; /* prescribing value of pressure */ the solves crashes. Do you have any ideas how to introduce the pressure and enthalpy change? Is there maybe a function like DEFINE_TURBULENT_VISCOSITY for enthalpy or pressure that is not mentioned in User's Manual?? Or maybe is there a way to change the definition of enthalpy? Last edited by Piotr95; November 13, 2019 at 09:27. |
|
December 13, 2019, 05:29 |
|
#2 |
New Member
Tim Wittmann
Join Date: Nov 2018
Posts: 4
Rep Power: 7 |
Hello Piotr,
which problem are you researching? Regarding your question: I had the very same problem (condensation sources) a few months ago. From my experience, it hardly works to adjust cell values with a code like that: C_H(c, t) = h_cor; Instead you need to use proper source terms in the continuity and energy equations. The UDFs name is DEFINE_SOURCE. Regards, Tim |
|
December 13, 2019, 05:34 |
|
#3 |
New Member
Piotr
Join Date: Oct 2019
Posts: 5
Rep Power: 6 |
Hi Tim,
thank you for your replay. I solved the problem in another way. Indeed adjusting properties in cells like C_H(c, t) = h_cor makes the solver very unstable. I used the UDRGM instead, where the Cp correction is introduced. Regards Piotr |
|
|
|