-
-
March 6, 2019 at 2:23 am
suraj9735
SubscriberI have a simple plate (cavity of Injection Mold). I have Cartridge heater to heat it. Now I want to control the maximum temperature of the plate to not exceed more than 180 deg or 453K. I apply simple logic of ON/OFF control and write UDF in Fluent to control it. It works fine. But we know that ON/OFF control is used for a simple application. In actual practice for Mould, we use the PID controller. It helps to quickly set back to the target temperature when it gets deviates due to the injection of the material inside the mould.
Manual tuning of PID is difficult and I have to do that for my case. I try to write UDF or PID logic. I found for one parameter (Kp, Ki, Kd) testing, My simulation takes 30 minutes to complete the simulation. Because I don't have the mathematical modelling of my thermal system and I depend on Fluent to receive data after every time-step.
Now, my question is Fluent can do lots of complex simulation and probably we can't make mathematical modelling of it. If we need to find the PID parameter to control particular output for those simulations. What's the actual way to do that?
Can MATLAB functions of PID be used in Fluent?
Could you please provide me with something/example to learn how to implement a PID controller into the Fluent simulation?
Thanks!
-
March 6, 2019 at 10:48 am
Rob
Forum ModeratorThe control theory will need to be developed by you using whatever method you're comfortable with. In Fluent you'd monitor something (max temperature for example) and then adjust the energy source based on that. Look in the UDF manual for the source term examples: you'll need the C (or C++) function using the temperature value (look up using data loops or parameters) to set the source value.Â
-
March 6, 2019 at 11:10 am
suraj9735
SubscriberCan we connect MATLAB with Fluent for data sharing and use available PID functions in MATLAB to control the temperature?
As I mentioned I have written UDF using different DEFINE macros available in Fluent and it works well for ON/OFF control. But in that way, it takes very much time for one-time testing and I need to test many time. I just looking for an example someone implemented PID control by writing UDF inside Fluent. Thank You!
-
March 8, 2019 at 10:57 am
Rob
Forum ModeratorThere are various hook-ups but I don't think the tools are included in the Student bundle (Digital Twin builder). I'd look to build a UDF using the control theory developed in MATLAB.Â
From memory (I've not done control theory in about 25 years) control response tends to be fast compared to the fluid flow so be careful with timescales.Â
-
- The topic ‘PID temperature control in Fluent using UDF.’ is closed to new replies.
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- I am doing a corona simulation. But particles are not spreading.
- Issue to compile a UDF in ANSYS Fluent
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
-
3872
-
1414
-
1241
-
1118
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.