|
[Sponsors] |
Changing wall to pressure outlet (functioning like check valve)) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 26, 2021, 02:00 |
Changing wall to pressure outlet (functioning like check valve))
|
#1 |
New Member
Jan Song
Join Date: Jun 2021
Posts: 1
Rep Power: 0 |
Hello, I am new to UDF and find the way to make udf functioning like a check valve.
If pressure at the wall reaches some point, this wall should change its boundary condition as pressure outlet so the fluid can go out through it. and if pressure goes down it goes back to wall again. Is there any existing code that I can study with? thank you. |
|
November 26, 2021, 02:25 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
This is difficult. Maybe not impossible, but for sure difficult. You need scheme commands, not a UDF.
Can't help you more than this...
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
November 26, 2021, 03:17 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
as Pakk said you need to use TUI command to switch boundary condition type
you may put in journal file this TUI code and execute it, also it could be written as a scheme code you may find how to get TUI commands in google or in this forum small example of scheme to switch boundary(boundary_name) to mass-low-inlet boundary condition (mass flow rate 1, pressure 100, temperature 300 all in SI) and back again to wall Code:
(ti-menu-load-string (format #f "define boundary-conditions set m-f-i boundary_name () m-f no 1 supersonic-or-initial-gauge-pressure no 100 t0 no 300 direct-spec no yes q" )) (ti-menu-load-string (format #f "define boundary-conditions modify-zones z-t boundary_name wall" )) once you defined TUI code, now you should execute it at the right moment. you can make it using scheme code: 1. with TUI commands to get pressure on specific wall using reports->surface_integral 2. OR you may use UDF and compute pressure there. But then you should send computed criteria to your scheme, so you need to define rpvar (rp variable) in scheme, read it in UDF, modify in UDF and send it back to scheme you may run everything using execute commands tab in solution->calculation activities
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
viscosity udf don't use correct temperature and strain rate | rezvani | Fluent UDF and Scheme Programming | 8 | May 27, 2021 06:40 |
Fail to converge when solving with a fabricated solution | zizhou | FLUENT | 0 | March 22, 2021 07:33 |
Pressure driven flow through a valve: pressure BCs clarification | Coraz94 | FLUENT | 1 | December 17, 2020 06:37 |
Pressure Driven Supersonic Flow in Converging-Diverging Nozzle | cdm | OpenFOAM Running, Solving & CFD | 7 | August 28, 2019 02:37 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |