|
[Sponsors] |
May 28, 2013, 09:35 |
UDF for time-dependent flow
|
#1 |
Member
soodabe
Join Date: Apr 2013
Posts: 40
Rep Power: 13 |
Hi all ,I’m new in fluent and particularly UDF, I want to model a system that a gas is inlet and it flows for 3s and doesn’t flow for 3s alternatively and continuously. In fact it’s our respiration flow and the model is a respiratory mask.
How should I write UDF file? Probably CURRENT_TIMESTEP Macro should be used, Is it right? Would you tell me please how should I write the UDF? This is very important for me. Thank you very very much in advance. |
|
May 29, 2013, 05:50 |
|
#2 |
Senior Member
|
Something looks like
Code:
#include "udf.h" DEFINE_PROFILE(vel_in, thread, i) { real y; face_t f; real t = CURRENT_TIME; int off = (int) (t/0.03+0.5) %2; begin_f_loop(f,thread) { if (!off) F_PROFILE(f,thread,i) = 1.0; } end_f_loop(f,thread) } |
|
May 30, 2013, 03:59 |
|
#3 |
Member
soodabe
Join Date: Apr 2013
Posts: 40
Rep Power: 13 |
thank you very much for your quick reply
regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to measure Mass Flow Rate | a.lynchy | Fluent UDF and Scheme Programming | 31 | October 4, 2018 15:10 |
Periodic channel flow with time dependent mass flow rate | QBeast | FLUENT | 3 | May 10, 2013 14:14 |
Density UDF for supersonic flow | David Christopher | Fluent UDF and Scheme Programming | 0 | April 18, 2013 06:48 |
UDF for transient pressure inlet, mass flow check at nozzle exit and volumetric heat | kokoory | FLUENT | 0 | August 17, 2011 03:07 |
UDF for multiphase flow | ROOZBEH | FLUENT | 3 | April 7, 2004 18:54 |