|
[Sponsors] |
UDF for viscous resistance for porous media with time variable |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 24, 2011, 05:16 |
UDF for viscous resistance for porous media with time variable
|
#1 | |
New Member
Join Date: Oct 2011
Posts: 14
Rep Power: 15 |
Hello,
i am a new ansys fluent user, but i am now very urgent to demonstrate a flow in porous material. i have a viscous resistance of 5e12 + 2e12 t + 4e9 t^2 (given). but i have no idea to write a UDF to enter this kind of viscous resistance (with time variable), the place i enter the parameter can only allow me to put in a single constant value. May i ask the easy tutorial for writing the UDF for viscous resistance of 5e12 + 2e12 t + 4e9 t^2? or some nice guys can even write it to me? Thank You so much. I have tried to write this, but error: line 9:invalid type for binary expression: int * pointer to structure. Quote:
Last edited by benson621; November 24, 2011 at 05:42. |
||
November 24, 2011, 08:25 |
|
#2 |
Senior Member
|
Hi,
t is not time here! this is thread index. so replace this: Code:
#include "udf.h" DEFINE_PROFILE(porosity_function, t, nv) { cell_t c; real time=CURRENT_TIME; begin_c_loop(c,t) { C_PROFILE(c,t,nv) = 5000000000000+2000000000000*time+4000000000*pow(time,2); } end_c_loop(c,t) }
__________________
Amir |
|
November 24, 2011, 12:59 |
|
#3 | |
New Member
Join Date: Oct 2011
Posts: 14
Rep Power: 15 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiphase Porous Media Flow - Convergence Issues | VT_Bromley | FLUENT | 8 | May 30, 2024 03:59 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |
variable versus time | Cesare | CFX | 1 | September 27, 2004 12:00 |