|
[Sponsors] |
UDF for saturation temperature for Lee's Condensation model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 22, 2020, 10:28 |
UDF for saturation temperature for Lee's Condensation model
|
#1 |
New Member
Chun Wheng
Join Date: Aug 2011
Posts: 5
Rep Power: 15 |
Hello everyone!
I am doing a fluent simulation for the condensation of water vapor on a cool surface exposed to air. So right now I am planning the simulation and would like some idea on how to write the UDF, as I think a UDF is needed to adjust the saturation temp based on the air moisture in the air above it. The idea I have is to use VOF with 2 phases:
The objective is to use the UDF for calculate the saturated air temperature from ONLY the air phase assuming that is the primary phase. Therefore the UDF should not perform any calculations on the liquid water phase. The UDF I found on the other thread, which I modified is this: #include "udf.h" #define rho_dry_air 1.2 #define rho_wv 0.59 DEFINE_PROPERTY(saturation_temperature,c,thread) { Thread *t_air = THREAD_SUB_THREAD(thread,0); real mass_dry_air = C_YI(c,t_air,0)*rho_dry_air; real mass_wv = C_YI(c,t_air,1)*rho_wv; if (mass_dry_air>0) { w = mass_wv / mass_dry_air; return w*(XXXXXXXXXXXXXXXXXXXXXXXXXXXXX); } else { return 1000; } } So with the humidity ratio, w, I will calculate the saturated air temperature under the return function. Most importantly will the UDF be able to achieve the calculation of just the air phase this way or am I totally off? I have done very simple UDFs before like for the profile etc. This is my first UDF working with VOF, multiple species and using thread_sub_thread, so i am wondering if I am on the right track. Any comments will be greatly appreciated! Thanks! |
|
August 21, 2021, 17:05 |
|
#2 | |
Senior Member
|
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF saturation temperature (evaporation model Fluent) | bbarbier07 | Fluent UDF and Scheme Programming | 12 | March 14, 2024 08:29 |
primary/secondary phase in VoF condensation model | soumitra2102 | FLUENT | 2 | December 16, 2019 11:41 |
interFoam wave propagation and explosion of Courant number and residuals | ChiaraViola | OpenFOAM Running, Solving & CFD | 1 | June 26, 2019 06:36 |
Modified k-e turbulence model UDF | Travis | Fluent UDF and Scheme Programming | 7 | November 11, 2018 21:21 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |