|
[Sponsors] |
Need UDF code for time dependent temperature BC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 23, 2018, 05:34 |
Need UDF code for time dependent temperature BC
|
#1 |
New Member
Karthik
Join Date: Apr 2017
Posts: 29
Rep Power: 9 |
Hello Everyone,
Can someone write me a UDF code for time dependent temperature BC. The hot wall temperature is initially at 298K and it raised linearly for 10K/min and make it steady after it reaches 348 K. Step 1: at time = 0s, temp = 298K Step 2: Should raise 10K/min Step 3: Once it reached 348K, make it steady. I hope somone will help me. Thanks in advance. |
|
August 23, 2018, 05:51 |
|
#2 |
Senior Member
|
Something like the code below should do.
Code:
#include "udf.h" DEFINE_PROFILE(time_dep_temp,th,i) { face_t f; real flow_time = CURRENT_TIME; real K0=298.0, K1=348.0, rate = 10.0/60.0; real t0 = 0.0, t1 = t0 + (K1-K0)/rate; begin_f_loop(f,th) { if(flow_time <= t1) F_PROFILE(f,th,i) = K0 + rate*(flow_time - t0); else F_PROFILE(f,th,i) = K1; } end_f_loop(f,th); } |
|
August 23, 2018, 09:23 |
|
#3 |
New Member
Karthik
Join Date: Apr 2017
Posts: 29
Rep Power: 9 |
Thank you very much and it's working.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
write code UDF Fluent solve kinetic reaction rate equation palm oil | zirkov | FLUENT | 0 | February 13, 2017 11:16 |
UDF for linear temperature variation | nonstopthinker | Fluent UDF and Scheme Programming | 2 | September 4, 2016 01:36 |
Please Help! Temperature profile UDF for 3D geometry | subhankar_bhandari | FLUENT | 2 | April 16, 2011 06:30 |
Please Help! Temperature profile UDF for 3D geometry | subhankar_bhandari | FLUENT | 0 | August 16, 2010 09:40 |
Help please! UDF for Temperature profile in 3D | subhankar_bhandari | Fluent UDF and Scheme Programming | 2 | August 16, 2010 09:37 |