You are on page 1of 1

1: #include "udf.

h"
2: DEFINE_PROFILE(inlet_x_velocity, t, i)
3: {
4: real default_early_velocity_mag,default_late_velocity_mag,velocity_mag;
5:
6: real ramp_start,ramp_end;
7: real the_current_time = CURRENT_TIME;
8: face_t f;
9:
10: default_early_velocity_mag=0.0; //Wind Speed before changing start
11: default_late_velocity_mag=4; //Operating wind speed in X direction
12: ramp_start=0.0; //Strat time
13: ramp_end=10.0; //Eng time
14: velocity_mag=default_early_velocity_mag;
15:
16: if ((the_current_time>=ramp_start) && (the_current_time<=ramp_end)) //time range for X_vel changes
17: {
18: velocity_mag=-0.0006*(the_current_time*the_current_time)+0.0312*the_current_time+3.5934;
19: } // X_vel changing formula
20:
21: if ((the_current_time>ramp_end))
22: {
23: velocity_mag=default_late_velocity_mag;
24: }
25:
26: begin_f_loop(f,t)
27: {
28: F_PROFILE(f,t,i) = velocity_mag;
29: }
30: end_f_loop(f,t)
31: }
32:
33: DEFINE_PROFILE(inlet_y_velocity, t, i)
34: {
35: real default_early_velocity_mag,default_late_velocity_mag,velocity_mag;
36: real ramp_start,ramp_end;
37: real the_current_time = CURRENT_TIME;
38: face_t f;
39:
40: default_early_velocity_mag=0.0; //Wind Speed before changing start
41: default_late_velocity_mag=1.69; //Operating wind speed in Y direction
42: ramp_start=0.0;
43: ramp_end=10.0;
44:
45: velocity_mag=default_early_velocity_mag;
46:
47: if ((the_current_time>=ramp_start) && (the_current_time<=ramp_end)) //time range for Y_vel changes
48: {
49: velocity_mag=0.684*the_current_time-1.7795; // Y_vel changing formula
50: }
51:
52: if ((the_current_time>ramp_end))
53: {
54: velocity_mag=default_late_velocity_mag;
55: }
56: begin_f_loop(f,t)
57: {
58: F_PROFILE(f,t,i) = velocity_mag;
59: }
60: end_f_loop(f,t)
61: }

You might also like