|
[Sponsors] |
How to run pulsating flow simulation in Ansys fluently using UDF code? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 12, 2022, 15:38 |
How to run pulsating flow simulation in Ansys fluently using UDF code?
|
#1 |
New Member
Rubén
Join Date: Aug 2022
Posts: 1
Rep Power: 0 |
Hi everybody
I am carrying out the study of the pulsating flow of the intake of a 4-stroke engine. For this I have created this boundary condition (UDF) to simulate the suction of the engine, but when I run the Fluent simulation it does not recognize it and marks that the mass flow is 0 kg/s. Can anyone suggest me what could be wrong? I put the code below. Thank you #include "udf.h" #include "math.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real time; real m; time=CURRENT_TIME; m = 0; begin_f_loop(f, thread) { if (time <= (0 + (0.00136 * m)) && time > (0.00136 + (0.00136 * m))) F_PROFILE(f, thread, position) = 0.0; else if (time <= (0.00136 + (0.00136 * m)) && time > (0.0027 + (0.00136 * m))) F_PROFILE(f, thread, position) = 0.18382; else if (time <= (0.0027 + (0.00136 * m)) && time > (0.0041 + (0.00136 * m))) F_PROFILE(f, thread, position) = 0.0; else if (time <= (0.0041 + (0.00136 * m)) && time > (0.0054 + (0.00136 * m))) F_PROFILE(f, thread, position) = 0.0; else if(time> (0.0054 + (0.00136 * m))) m = m + 1; } end_f_loop(f, thread) } |
|
August 15, 2022, 21:37 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
udf should be hooked properly
look into ansys fluent customization manual also I'm expecting probles with this code as you have "m" in if condition however m is changing inside the loop over faces -> means condition will be different at different location on the same stime moment, double check it
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF bug, for reversing flow direction and magnitude | EngGhost | Fluent UDF and Scheme Programming | 12 | April 20, 2020 08:50 |
Dumb Ansys Fluent can't compile UDF | ordinary | FLUENT | 1 | October 9, 2019 08:55 |
How to input a UDF code for simulaing particle-laden flow | EvanHuang | Fluent Multiphase | 0 | September 10, 2019 02:23 |
Flow 3D Cast_can not run simulation | pcapsa | FLOW-3D | 2 | June 21, 2013 05:21 |
Comparison between Solidworks Flow Simulation and Ansys Fluent | Bruce828 | Main CFD Forum | 5 | February 23, 2013 11:13 |