UDF macro to get relative humidity of air?
Hi
Does any one know what is the UDF macro to get the relative humidity of air (%) in a certain cell? Thnak you. |
Relative humidity
hi, have you find the answer ? if yes please share the answer.i am modeling a spray in the air using Fluent . I want to get the relative humidity at a various points at different temperature within the domain. if u know the UDF or any other way please share your experience.
thanks |
Hi,
there is a macro to get RH in cell: relative_humidity(cell, thread) I found it by checking the fluent files one by one. |
thanks
thanks Jaskull, i will try it and reply you as soon as possible.
thanks |
Can you give some details of this macro?
How to use it, and where did you find some description?
Quote:
|
I didn't find any description. I fount it in one of the fluent files. To use it you need to find the particle cell and thread:
cell_t cc = P_CELL(p); Thread *t0 = P_CELL_THREAD(p); then you can find RH in cell where the particle is e.q.: humidity = relative_humidity(cc, t0); I'm using it in calculation of equilibrium moisture content of drying particles and it works well. |
Hi, Jaskull
That is not all indispensable to run this macro.
Ii is yet necessary to declare a suitable file in the header: #include "udf.h" #include " ???" What a file one should include? |
Im using this function in macro:
DEFINE_DPM_HEAT_MASS(multivap,p,Cp,hgas,hvap,cvap_ surf,Z,dydt,dzdt) and read those files: #include "udf.h" #include "math.h" In my opinion "math" is not necessary. |
so, there is a problem
I tried using it as a trial in EXECUTE_ON_DEMAND macro whith:
#include "udf.h" #include "math.h" // not neccessary in this case #include "species.h" // I foundin this file a string ".. real relative_humidity..." But I receive a compilation error "...unresolved external symbol RELATIVE_HUMIDITY... " I think you are more lucky whith this issue... |
Solution:
#include "udf.h"
#include "species.h" // your code, for instance: DEFINE_ON_DEMAND(NaZadanie) { Domain *dom = Get_Domain(Dzie); Thread *th_flu = Lookup_Thread(dom, ID_flu); // cell_t ce_flu; relative_humidity(ce_flu, th_flu) // lower case only !!! uppercase - you get error! } |
Final remark
relative_humidity() works on node values, so if your calculation is cell-based be carefull...
|
All times are GMT -4. The time now is 07:23. |