|
[Sponsors] |
November 8, 2013, 08:25 |
UDF for Continuous Step Velocity Profile
|
#1 |
New Member
Naseh Hosseini
Join Date: Jul 2012
Posts: 6
Rep Power: 14 |
Hi.
I want to apply a continuous step velocity profile for my inlet. I want it to keep fluctuating with period of 0.04 seconds until I stop iteration. Would you please let me know how to do it and whether the way I have written that is correct. Here is my UDF. #include "udf.h" DEFINE_PROFILE(Step_UDF,thread,position) { real x[ND_ND]; face_t f; real u,u0=0.4; real t; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); t = RP_Get_Real("flow-time"); if ((fabs(t/0.04)%2)==0) u=u0; else u=u0*1.03; F_PROFILE(f,thread,position)=u; } end_f_loop(f,thread) } |
|
November 14, 2013, 09:11 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Since you already have a proposed solution:
-did you try it? -did it do what you wanted it to do? -if not, what was wrong? |
|
November 14, 2013, 12:15 |
|
#3 |
New Member
Naseh Hosseini
Join Date: Jul 2012
Posts: 6
Rep Power: 14 |
Well I tried and found that I have to mention before that both sides of % are integer.
I just found it through trial and error. I was actually hoping that someone give me a general solution. What I did is working for me now. Thank you |
|
Tags |
fluent, step, udf, velocity profile |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3D UDF Paraboilc Velocity Profile (Can't Maintain) | Sing | FLUENT | 12 | August 7, 2017 07:25 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
Velocity profile UDF | egge24 | Fluent UDF and Scheme Programming | 2 | May 10, 2012 14:03 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Variables Definition in CFX Solver 5.6 | R P | CFX | 2 | October 26, 2004 03:13 |