|
[Sponsors] |
September 16, 2016, 12:44 |
UDF of Variable Porosity
|
#1 |
Member
Join Date: Jun 2016
Posts: 31
Rep Power: 10 |
Hi Everyone,
I am trying to write UDF for porous media. porosity is variable porosity in Y direction (2D). This is UDF for variable porosity. #include "udf.h" DEFINE_PROFILE(porosity, t, i) { real x[ND_ND]; real y; cell_t c; begin_c_loop(c,t) { C_CENTROID(x,c,t); y=x[1]; F_PROFILE(c,t,i)=y+5; } end_c_loop(c,t) } In addition, viscous resistance, inertial resistance and interfacial area depend on this variable porosity. This is interfacial area UDF code. #include "udf.h" #define Dp 0.008 real Area(cell_t c,Thread* t) { real area; area = 6.0*(1-zeta)/Dp;// zeta is variable porosity. return area; } My question How can I receive variable porosity values for interfacial area. Because in this code zeta is constant. I would like to variable porosity values. |
|
September 30, 2016, 07:06 |
|
#2 |
New Member
Prakhar Agarwal
Join Date: Jan 2013
Location: India
Posts: 4
Rep Power: 13 |
One of the possible ways would be to convert your constant variables to field variables. But you will have to convert them throughout your code so that they match.
|
|
September 30, 2016, 07:38 |
|
#3 |
Member
Join Date: Jun 2016
Posts: 31
Rep Power: 10 |
Dear Prakhar,
thanks your reply. How can I conver constant variables to field variables. Can you suggest me document. |
|
October 4, 2016, 06:00 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
porosity udf | walied123 | Fluent UDF and Scheme Programming | 4 | February 17, 2015 15:34 |
UDF for writing porosity as a function of distance from the wall | rohinibc | Fluent UDF and Scheme Programming | 5 | August 8, 2012 09:16 |
UDF for porosity | Giacomo | FLUENT | 3 | July 23, 2007 10:23 |
Macros for writing UDF for porosity | umesh | FLUENT | 1 | June 13, 2003 05:20 |
UDF for variable porosity | pk | FLUENT | 0 | June 11, 2003 19:06 |