How to change flow direction during a transient analysis?
Hello forum community,
I want to reverse the direction of flow of water in a pipe after a certain time. At the beginning water flows from the inlet through the tube to the outlet for 20 seconds. Afterwards the flow direction turns and it flows water 40 seconds from the outlet to the inlet. That is what I want. I have tried whether I can enter negative values for the speed at the velocity-inlet. That's no problem. As a result, the water flows from the outlet towards inlet. I also tried to interrupt the calculation and during this break I changed the boundary conditions of the velocity_inlet into a pressure_outlet and the pressure_outlet into a velocity_inlet. Then I have the calculation run further. When I look at the result in the CFD postprocessor the velocity vectors change according to the direction - so this works also. Although I do not have streamlines in the animation to look at. For some reason the calculation of the streamlines takes eternally. After these tests and the realization that it seems possible to change the flow direction, I have tried to use a customized UDF for it: Code:
#include "udf.h" I would be very happy if you can help me to adjust the UDF. Thanks and regards Kauf |
Try to use lowercase 'v' and 't' everywhere?
|
Sorry, this is a spelling error. In the source text I have noticed the case sensitivity.
The code I use is: Code:
#include "udf.h" Any ideas? |
As a beginner, I have no idea if it is possible to reverse the flow direction during a transient analysis in Fluent. Maybe there is also a solution other than UDF?
Is it possible, for example, to first solve a transient solution for the flow direction in +x direction through a pipe and then use this solution as the starting condition of a new transient solution, where I change the position of the inlet and outlet so the new flow direction is now in -x direction? I would like to see how the liquid behaves in a tube when the flow direction turns suddenly by 180°. I am grateful for all tips and hints. |
Are you trying to look the streamlines at CFD-Post?
If so, a possible problem could occur if you select the inlet as starting point for the streamlines and tried to integrate "forward" while the flow is reversed. Try making the streamlines in a center plane, or uniformly distributed in all the domain if this is the problem. |
Thanks Venturi - but that's not what I'm trying.
I would like to see the turbulence image that is produced when the direction of flow in the pipe change the direktion. For that, I'm trying to make a flow simulation through a simple pipe. The entrance is say "left" and the exit is "right". The input e.g. a Velocity input and the output is a pressure output. At the beginning the flow velocity should be + 2m / s for 10 seconds. Subsequently, the flow velocity should be -2 m/s for 10 seconds. The velocity in the pipe should be: 10 secounds +2 m/s and than 10 secounds - 2 m/s Has some of you an idea how to do that? |
Oh I'm sorry then. That is what I understood from your first post.
Quote:
|
Yes, I have certainly expressed something ambiguous. I hope you understand my problem now and have an idea how I can solve it.
|
Nobody any idea how to change flow direction during a simulation in ansys fluent?
|
Add x, F_CENTROID
This version works for me with added x variable and F_CENTROID function call,
Code:
#include "udf.h" |
All times are GMT -4. The time now is 06:01. |