TAGGED: fluent-udf-multi-phase, massflowrate, udf
-
-
May 6, 2024 at 3:54 pmabdullahhassanSubscriber
Hello, i am new to UDF and i made a first UDF.Â
include "udf.h"
DEFINE_PROFILE(inlet_mf,th,i)
{
face_t f;
int time_step = (int) CURRENT_TIME;
begin_f_loop(f,th)
{
if(time_step %2 != 0)
F_PROFILE(f,th,i) = 0.2410;
else
F_PROFILE(f,th,i) = 0.0;
}
end_f_loop(f,th);
}Basically, I am doing condensation of vapor steam inside a shell so I wanted to input variable mass flow rate in such a way that mass flow stops at even timestep and vapor focuses on condensation & then mass flow resumes on odd time steps.
UDF is working and i am getting variable mass flow rate. the confusion is that;
suppose there are 1000 number of time steps with time step size of 0.1 and max iteration/time step is 10. Input Mass flow changes after 10*10 iteration that at 990 timesteps remaining, it value becomes 0 and then at remaining 980 iteration left, mass flow changes to 0.2410.Â
1- why? I think it should change on every time step. I mean mass flow should change after 10 iterations/timesteps which is mass flow should be 0.2410 at 999 timesteps remaining and 0 at 998 timesteps remaining.Â
2- Secondly, if the UDF is right and results are also ok then based on this, I need to work with 1e-5 time step size in actual simulation (and above is the just the simple water test case) then the mass flow inlet will remain same i.e. 0.2410 for many number of time steps like 10,000 or more. how can i resolve that issue?
Â
Thanks.
-
May 7, 2024 at 10:33 amRobForum Moderator
I've never seen CURRENT_TIME used like that, read this https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_RPVariables.html Â
We tend to base any boundary conditions on the flow time, and if you need to alter the boundary value use time not time step.Â
-
May 7, 2024 at 4:00 pmabdullahhassanSubscriber
Hello Rob,
Yeah, it is my learning phase of UDF. I am unable to open this link, can you please share the image of what is inside in this link.Â
-
May 7, 2024 at 4:24 pmRobForum Moderator
Ah, open Help in Fluent & paste the link into that browser.Â
-
- The topic ‘UDF for variable mass flow inlet’ is closed to new replies.
- error udf
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- Diesel with Ammonia/Hydrogen blend combustion
- Non-Intersected faces found for matching interface periodic-walls
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Encountering Error in Heterogeneous Surface Reaction
- How to obtain axial and tangential velocity in CFX-post?
-
1156
-
471
-
468
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.