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

UDF macro to get relative humidity of air?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Jaskull

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2014, 04:40
Default UDF macro to get relative humidity of air?
  #1
Member
 
Join Date: Jun 2011
Posts: 86
Rep Power: 15
mali28 is on a distinguished road
Hi

Does any one know what is the UDF macro to get the relative humidity of air (%) in a certain cell?

Thnak you.
mali28 is offline   Reply With Quote

Old   June 6, 2015, 12:41
Default Relative humidity
  #2
Member
 
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13
m zahid is on a distinguished road
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
m zahid is offline   Reply With Quote

Old   July 9, 2015, 04:34
Default
  #3
New Member
 
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15
Jaskull is on a distinguished road
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.
Tobi likes this.
Jaskull is offline   Reply With Quote

Old   July 9, 2015, 06:10
Default thanks
  #4
Member
 
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13
m zahid is on a distinguished road
thanks Jaskull, i will try it and reply you as soon as possible.
thanks
m zahid is offline   Reply With Quote

Old   July 30, 2015, 05:20
Default Can you give some details of this macro?
  #5
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
How to use it, and where did you find some description?

Quote:
Originally Posted by Jaskull View Post
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.
jacek is offline   Reply With Quote

Old   July 30, 2015, 05:44
Default
  #6
New Member
 
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15
Jaskull is on a distinguished road
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.
Jaskull is offline   Reply With Quote

Old   July 30, 2015, 06:00
Default Hi, Jaskull
  #7
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
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?
jacek is offline   Reply With Quote

Old   July 30, 2015, 06:08
Default
  #8
New Member
 
Maciej
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 15
Jaskull is on a distinguished road
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.
Jaskull is offline   Reply With Quote

Old   July 30, 2015, 06:27
Default so, there is a problem
  #9
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
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...
jacek is offline   Reply With Quote

Old   July 30, 2015, 06:51
Default Solution:
  #10
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
#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!

}
jacek is offline   Reply With Quote

Old   July 30, 2015, 07:16
Default Final remark
  #11
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
relative_humidity() works on node values, so if your calculation is cell-based be carefull...
jacek 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
UDF macro to read the name of the case file polaritus Fluent UDF and Scheme Programming 2 March 23, 2015 04:59
Ansys Fluent UDF - for Data Center Air flow management kedarjan Fluent UDF and Scheme Programming 13 November 13, 2013 04:20
UDF macro not compliled KITetima Fluent UDF and Scheme Programming 12 October 23, 2013 09:13
what does FLUID_THREAD_P(t) macro do in udf? borhan_sd@yahoo.com Fluent UDF and Scheme Programming 2 June 10, 2013 05:49
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 07:59


All times are GMT -4. The time now is 04:17.