-
-
October 23, 2019 at 9:21 am
Nida
SubscriberDear Sir,
Appended is my UDF for flow profile. I am providing it to Mass Flow Inlet. As it is starting from negative sinusoidal.
It should move flow out in the start and then flow should come it in sinusoidal pattern.
But there is NO difference even I put here negative sign or not.
F_PROFILE(f, thread, position) = (-0.000096)*sin(2 * PI * 0.001 * t);
I want to get flow out from Fluid Domain in start of simulation. I am initializing the fluid domain with zero velocity and 300K (by default Temperature)
Â
#include "udf.h"
#define PI 3.141592654
DEFINE_PROFILE(first_velocity_in_out, thread, position)
{
face_t f;
real t;
begin_f_loop(f, thread)
t = RP_Get_Real("flow-time");
{
F_PROFILE(f, thread, position) = (-0.000096)*sin(2 * PI * 0.001 * t);
}
end_f_loop(f, thread)
}
-
October 23, 2019 at 11:15 am
Rob
Forum ModeratorHave you checked the mass flux on the boundary, and run the model for a few time steps?
-
October 23, 2019 at 12:49 pm
Amine Ben Hadj Ali
Ansys EmployeeCan you share a screenshot of the boundary? What are giving as direction?
-
October 23, 2019 at 6:54 pm
Nida
SubscriberModel is simple. This is a cylinder where flow is coming in and out from bottom.
I am making bottom as mass flow inlet and providing that UDF to it. Flow is coming in and out in sinusoidal manners.Â
But the problem is that in the start flow should go out then come in(According to sin function with negative sign that I am providing).
But there is no difference for negative or positive sign to this Sin function. First flow go in then go out.
This is the setting for direction of flow "Normal to Boundary"
-
October 23, 2019 at 7:36 pm
Nida
SubscriberMass Flow rate at 10th time step is 6.0278908e-06 (positive)
I also shared the model and Mass flow Inlet settings in this post.Â
-
October 24, 2019 at 5:03 am
Amine Ben Hadj Ali
Ansys EmployeeThe most important thing is the direction. You need to use the direction vector to tell Fluent that flow will cone out. Check the manual as it describes it. -
October 24, 2019 at 10:15 am
Nida
SubscriberSir, I tried with both methods "Direction Vector" and " Normal to Boundary".
I am not saying that flow is not coming out. It coming out but not in start of simulation.
My question is that there should be a difference between these two profiles.
F_PROFILE(f, thread, position) = (-0.000096)*sin(2 * PI * 0.001 * t);
F_PROFILE(f, thread, position) = (0.000096)*sin(2 * PI * 0.001 * t);
One is starting with positive profile and other is starting with negative profile.
But why I am getting same output for both of these???
For (-0.000096) flow should come out in start of running simulation if I am initialization my domain.
Â
-
October 24, 2019 at 10:56 am
Rob
Forum ModeratorHow are you initialising the flow?Â
-
October 24, 2019 at 11:08 am
Nida
SubscriberSir, now it is hybrid initialization.
Previously I also used zero absolute velocity and 300K Temperature for initialization.
-
October 24, 2019 at 12:27 pm
Rob
Forum ModeratorSo, in that case why would the velocity be negative at t=0? Think what initialisation does then consider how the values are calculated in the UDF.Â
-
October 24, 2019 at 12:38 pm
Amine Ben Hadj Ali
Ansys EmployeeAt t=0 both Profiles return Zero. Still thinking better to make the direction vector by profile.
-
- The topic ‘Mass Flow Inlet – How flow will go outside’ is closed to new replies.
-
4914
-
1608
-
1386
-
1242
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.

