|
[Sponsors] |
November 17, 2014, 05:40 |
UDF macro to get relative humidity of air?
|
#1 |
Member
Join Date: Jun 2011
Posts: 86
Rep Power: 15 |
Hi
Does any one know what is the UDF macro to get the relative humidity of air (%) in a certain cell? Thnak you. |
|
June 6, 2015, 13:41 |
Relative humidity
|
#2 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
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 |
|
July 9, 2015, 05:34 |
|
#3 |
New Member
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15 |
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. |
|
July 9, 2015, 07:10 |
thanks
|
#4 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
thanks Jaskull, i will try it and reply you as soon as possible.
thanks |
|
July 30, 2015, 06:20 |
Can you give some details of this macro?
|
#5 |
New Member
Join Date: Oct 2009
Posts: 25
Rep Power: 17 |
||
July 30, 2015, 06:44 |
|
#6 |
New Member
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15 |
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. |
|
July 30, 2015, 07:00 |
Hi, Jaskull
|
#7 |
New Member
Join Date: Oct 2009
Posts: 25
Rep Power: 17 |
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? |
|
July 30, 2015, 07:08 |
|
#8 |
New Member
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15 |
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. |
|
July 30, 2015, 07:27 |
so, there is a problem
|
#9 |
New Member
Join Date: Oct 2009
Posts: 25
Rep Power: 17 |
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... |
|
July 30, 2015, 07:51 |
Solution:
|
#10 |
New Member
Join Date: Oct 2009
Posts: 25
Rep Power: 17 |
#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! } |
|
July 30, 2015, 08:16 |
Final remark
|
#11 |
New Member
Join Date: Oct 2009
Posts: 25
Rep Power: 17 |
relative_humidity() works on node values, so if your calculation is cell-based be carefull...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF macro to read the name of the case file | polaritus | Fluent UDF and Scheme Programming | 2 | March 23, 2015 05:59 |
Ansys Fluent UDF - for Data Center Air flow management | kedarjan | Fluent UDF and Scheme Programming | 13 | November 13, 2013 05:20 |
UDF macro not compliled | KITetima | Fluent UDF and Scheme Programming | 12 | October 23, 2013 10:13 |
what does FLUID_THREAD_P(t) macro do in udf? | borhan_sd@yahoo.com | Fluent UDF and Scheme Programming | 2 | June 10, 2013 06:49 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |