|
[Sponsors] |
UDF to simulate one-way valves in ANSYS Fluent to prevent backflow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 2, 2021, 18:30 |
UDF to simulate one-way valves in ANSYS Fluent to prevent backflow
|
#1 |
New Member
Viliam Kacerik
Join Date: Aug 2021
Posts: 1
Rep Power: 0 |
Hello,
I am trying to simulate a transient simulation of a system in which fluid flows in tubes. The tubes include one-way valves (=check valves), which prevent backflow in the real life. Yet, I've been having issues with defining the boundary condition to prevent backflow. It is pretty clear to me that I have to apply a custom boundary condition (UDF) on an interior wall where the check valve would sit. Yet, being new to UDFs and programming in C, I do not know how to write such a UDF, even after referring to the Fluent UDF manual: http://www.pmt.usp.br/academic/marto...F%20Manual.pdf For example, if the one-way valve should prevent backflow in the negative-Y direction (meaning allow flow in the positive-Y direction), the algorithm should resemble such: For every time step; If velocity_y < 0; then velocity_y = 0; A more refined version would be: For every time step; If pressure just before the check valve < pressure just after the check valve; then velocity_y = 0; Could you please help me write a UDF which I could apply onto an interior wall to act as a one-way valve to prevent backflow? I will appreciate your help, Kind regards, Viliam |
|
August 26, 2021, 15:05 |
|
#2 |
Senior Member
Join Date: Nov 2010
Posts: 103
Rep Power: 16 |
Hi,
I would say first check the outlet boundary conditions. Usually the backflow is caused by the BCs. If you are certain that the problem can only be resolved by an UDF. I'd suggest you start writing a very first version of it, and then you can post it here to get more help on improving it. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Fluent from Python: UDF Compilation problems | Ames | Fluent UDF and Scheme Programming | 5 | November 16, 2020 07:12 |
UDF for coding CFD ANSYS FLUENT | zuraidah rasep | FLUENT | 2 | September 5, 2020 23:22 |
GHow to define UDF for Density in Ansys Fluent? and How to remove Error? | Azim07 | FLUENT | 1 | July 31, 2019 00:58 |
how to understand UDF in ansys fluent? | sriyaz | Fluent UDF and Scheme Programming | 4 | November 10, 2015 03:27 |
sinusoidal horizontal translation udf in ansys fluent | shivshankarnair | FLUENT | 1 | September 19, 2014 07:40 |