|
[Sponsors] |
June 26, 2018, 09:18 |
UDF for velocity inlet depending on time
|
#1 |
New Member
Enrique Pérez Heredia
Join Date: May 2018
Location: Madrid, Spain.
Posts: 16
Rep Power: 8 |
Hello,
I'm trying to setup a velocity which changes its value depending on time (attahced figure), in an inlet boundary condition. The UDF that I have written is the following: DEFINE_PROFILE(y_velocity,t,i) { real T, H; /* variable declarations */ face_t f; T = 1; H = 3; begin_f_loop(f,t) { if(CURRENT_TIME <= T/2) F_PROFILE(f,t,i) = 0; else if (CURRENT_TIME <= 3*T/2 && CURRENT_TIME >T/2) F_PROFILE(f,t,i) = 4*H/pow(T,2)*pow(CURRENT_TIME-T,2)-H; else F_PROFILE(f,t,i) = 0; } end_f_loop(f,t) } I am quite new to UDFs and Im having some trouble. Any help would be really appreciated. Thank you. Enrique P. __
__________________
Loading signature... |
|
Tags |
inlet, profile, udf, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 02:36 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 22:29 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |
UDF problem- time dependent temperature at inlet | kaeran | FLUENT | 1 | June 16, 2015 21:48 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |