CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Changing wall to pressure outlet (functioning like check valve))

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2021, 02:00
Default Changing wall to pressure outlet (functioning like check valve))
New Member
Jan Song
Join Date: Jun 2021
Posts: 1
Rep Power: 0
jayjays is on a distinguished road
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.
jayjays is offline   Reply With Quote

Old   November 26, 2021, 02:25
Senior Member
Join Date: Nov 2013
Posts: 1,969
Rep Power: 24
pakk will become famous soon enough
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".
pakk is offline   Reply With Quote

Old   November 26, 2021, 03:17
Senior Member
Join Date: Apr 2013
Posts: 1,882
Rep Power: 29
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
(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
AlexanderZ is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

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

All times are GMT -4. The time now is 12:11.