|
[Sponsors] |
September 1, 2018, 01:31 |
UDF for heat and mass transfer
|
#1 |
New Member
Akash Siddique
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Hi everyone!!
I’m working on a problem related to heat and mass transfer phenomena between adsorbent material and air. When humid air passes over the adsorbent material, heat and mass transfer happen. I want to write 3simple UDF’s for inlet boundary condition for heat and mass transfer. Equation 1 Variable Air Temperature = 1162 – (100/z), (z = distance along axis=0.01-0.4m) Equation 2 Variable Adsorbent Temperature = .06+ (.05/t^.19), (t=time =0-3600) Equation 3 Variable Air Humidity Ratio = -22(41*t^.1)-.625(4/z), (z= distance along axis, t=time) Capture.PNG I Hope you guys will cooperate You can ask me for any additional information New Email address- afzalkhangm001@gmail.com |
|
September 1, 2018, 03:12 |
|
#2 |
Senior Member
|
I look the word up in my dictionary and still do not know what cooperate means, but I will tell you how to deal with it anyway.
Code:
#include "udf.h" real T_air(real z) { return 1162.0 - 100.0/z; } real T_adsorbent(real t) { return 0.06+0.05/pow(t, 0.19); } real humidity_ratio(real z, real t) { return -22.0*(41.0*pow(t, 0.1))-0.625*(4.0/z); } DEFINE_PROFILE(inlet_T_air, thread, position) { real NV_VEC(x), NV_VEC(origin), NV_VEC(axis), NV_VEC(rvec); face_t f; real r; real t = CURRENT_TIME; /* origin is a point on the axis and axis is the direction vector*/ NV_S(origin, =, 0.0); NV_D(axis, =, 0.3, 0.4, 0.5); r = NV_MAG(axis); NV_VS(axis, =, axis, /, r); /* normalize to unit vector */ begin_f_loop(f,thread) { F_CENTROID(x, f, thread); NV_VV(x, =, x, -, origin); NV_CROSS(rvec, axis, x); r = NV_MAG(rvec); F_PROFILE(f, thread, position) = T_air(r); } end_f_loop(f, thread) } |
|
September 1, 2018, 03:35 |
|
#3 | |
New Member
Akash Siddique
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Quote:
but now I'm facing another difficulty. I think I need three (3) separate program for boundary condition with respect to each equation. Please make three separate programs with each equation and correct me if I'm wrong. and thanks for the Cooperation... |
||
September 1, 2018, 03:50 |
|
#4 |
Senior Member
|
Well, that is not what I expected, but, hey, why not.
Code:
#include "udf.h" real T_air(real z, real t) { return 1162.0 - 100.0/z; } real T_adsorbent(real z, real t) { return 0.06+0.05/pow(t, 0.19); } real humidity_ratio(real z, real t) { return -22.0*(41.0*pow(t, 0.1))-0.625*(4.0/z); } DEFINE_PROFILE(inlet_T_air, thread, position) { real NV_VEC(x), NV_VEC(origin), NV_VEC(axis), NV_VEC(rvec); face_t f; real r; real t = CURRENT_TIME; NV_S(origin, =, 0.0); NV_D(axis, =, 0.3, 0.4, 0.5); r = NV_MAG(axis); NV_VS(axis, =, axis, /, r); begin_f_loop(f,thread) { F_CENTROID(x, f, thread); NV_VV(x, =, x, -, origin); NV_CROSS(rvec, axis, x); r = NV_MAG(rvec); F_PROFILE(f, thread, position) = T_air(r, r); } end_f_loop(f, thread) } DEFINE_PROFILE(inlet_T_adsorbent, thread, position) { real NV_VEC(x), NV_VEC(origin), NV_VEC(axis), NV_VEC(rvec); face_t f; real r; real t = CURRENT_TIME; NV_S(origin, =, 0.0); NV_D(axis, =, 0.3, 0.4, 0.5); r = NV_MAG(axis); NV_VS(axis, =, axis, /, r); begin_f_loop(f,thread) { F_CENTROID(x, f, thread); NV_VV(x, =, x, -, origin); NV_CROSS(rvec, axis, x); r = NV_MAG(rvec); F_PROFILE(f, thread, position) = T_adsorbent(r, r); } end_f_loop(f, thread) } DEFINE_PROFILE(inlet_humidity_ratio, thread, position) { real NV_VEC(x), NV_VEC(origin), NV_VEC(axis), NV_VEC(rvec); face_t f; real r; real t = CURRENT_TIME; NV_S(origin, =, 0.0); NV_D(axis, =, 0.3, 0.4, 0.5); r = NV_MAG(axis); NV_VS(axis, =, axis, /, r); begin_f_loop(f,thread) { F_CENTROID(x, f, thread); NV_VV(x, =, x, -, origin); NV_CROSS(rvec, axis, x); r = NV_MAG(rvec); F_PROFILE(f, thread, position) = humidity_ratio(r, r); } end_f_loop(f, thread) } |
|
September 1, 2018, 04:07 |
|
#5 | |
New Member
Akash Siddique
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Quote:
one for Variable Air Temperature Boundary Condition second for Variable Adsorbent Temperature third for Variable Air Humidity Ratio I'm presenting here my limited understanding of UDF.. what do you say ?? |
||
September 1, 2018, 04:51 |
|
#7 | |
New Member
Akash Siddique
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Quote:
Please, can you help me understand that one program will do all the things that three separate programs were supposed to do ??? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using define mass transfer udf for cavitation | Komon | Fluent UDF and Scheme Programming | 14 | June 21, 2016 03:50 |
udf source code for modelling mass transfer during film boiling | vinita123 | Fluent UDF and Scheme Programming | 0 | December 22, 2015 09:43 |
transient mass transfer in multiphase flow | Tensian | Fluent UDF and Scheme Programming | 0 | November 16, 2015 11:39 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |