|
[Sponsors] |
PID control of valve using the immersed boundary method in foam-extend |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Goon
Join Date: Apr 2020
Posts: 8
Rep Power: 6 ![]() |
Hi. Now I am trying to develop the model which enables PID control of valve using the immersed boundary method of the foam-extend. The inflow velocity is fixed and the pressure difference before and after the valve is determined by the degree of valve opening and closing. Please see the attached gif file which shows the result of modeling and pressure contour.
In this situation, I want to control the position of the valve to adjust the predetermined pressure difference (goal of the pressure difference) through the PID control algorithm. I made the executable file using pimpleDyMIbFoam.C. I calculated the pressure difference before and after the valve using libfieldFunctionObjects.so and faceSource class. Thus the pressure difference is calculated every time step and appeared in log.result file well. I made the change in dynamicDict to read the pressure difference goal, KP, KI, KD and made the new library 'libvalveControl.so' (it is modified from libsolidBodyMotion.so and build from user-defined valveControl.C) where the valve position will be determined based on the PID control algorithm. The only left part is to transfer value of the pressure difference calculated using libfieldFunctionObjects.so to valveControl.C. I can change the valve based on the below equation but valveControl.C needs the value of the calculated pressure difference before and after the valve. valveOpening(t) = Kp*(P_goal - P_calculated(t)) + KI*Integral{P_goal - P_calculated(t)} + KD * Differential{P_goal - P_calculated(t)} In the log file (log.result), the pressure difference seems to be calculated properly at every time step. But I really do not know how I can use the value of the pressure difference that is obtained in one post-processing library (libfieldFunctionObjects.so) in another library (libvalveControl.so which is modified from libsolidBodyMotion.so) to move the valve based on the PID algorithm. ************************************************** ************************************************** * Thus, the question is how to transfer the value obtained in one library to another library? Is there any way to transfer pressure data calculated in the flow field to mesh motion (solid body motion). The pressure value will be used for PID control. Thanks for reading my problem. Any comments will help me a lot. Sincerely Goon |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PID control of valve using the immersed boundary method in foam-extend | qkrtjdrns | OpenFOAM Post-Processing | 2 | March 25, 2023 09:43 |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 13:55 |
Moving mesh (dynamic motion) with immersed boundary - foam extend 4.0 | abavo | OpenFOAM Running, Solving & CFD | 0 | August 2, 2018 09:25 |
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field | xiexing | CFX | 3 | March 29, 2017 10:00 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 04:05 |