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

UDF of Variable Porosity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2016, 11:44
Default UDF of Variable Porosity
  #1
Member
 
Join Date: Jun 2016
Posts: 31
Rep Power: 9
typhoon1010 is on a distinguished road
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.
typhoon1010 is offline   Reply With Quote

Old   September 30, 2016, 06:06
Default
  #2
New Member
 
Prakhar Agarwal
Join Date: Jan 2013
Location: India
Posts: 4
Rep Power: 13
Prakhar is on a distinguished road
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.
Prakhar is offline   Reply With Quote

Old   September 30, 2016, 06:38
Default
  #3
Member
 
Join Date: Jun 2016
Posts: 31
Rep Power: 9
typhoon1010 is on a distinguished road
Dear Prakhar,
thanks your reply.
How can I conver constant variables to field variables. Can you suggest me document.
typhoon1010 is offline   Reply With Quote

Old   October 4, 2016, 05:00
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
Originally Posted by typhoon1010 View Post
Dear Prakhar,
thanks your reply.
How can I conver constant variables to field variables. Can you suggest me document.
Suggested document: Fluent manual. Look for "User Defined Memory".
pakk 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
porosity udf walied123 Fluent UDF and Scheme Programming 4 February 17, 2015 14:34
UDF for writing porosity as a function of distance from the wall rohinibc Fluent UDF and Scheme Programming 5 August 8, 2012 08:16
UDF for porosity Giacomo FLUENT 3 July 23, 2007 09:23
Macros for writing UDF for porosity umesh FLUENT 1 June 13, 2003 04:20
UDF for variable porosity pk FLUENT 0 June 11, 2003 18:06


All times are GMT -4. The time now is 23:51.