Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
pid control and constraining a variable
Posted 16 oct. 2012, 18:29 UTC−4 Fluid & Heat, Heat Transfer & Phase Change, Chemical Reaction Engineering, Materials, Results & Visualization, Studies & Solvers Version 4.3 10 Replies
Please login with a confirmed email address before reporting spam
i'm making a pid control of a heat exchanger and I need to constraining the inlet velocity of fluid. The inlet velocity is calculated by the pid control law, but need to be constrained between 3.5<u<10 How can I make this in comsol? For example:
if u < 3.5 m/s
u = 3.5
if u > 10 m/s
u = 10
best regards,
gustavo
Please login with a confirmed email address before reporting spam
What about using a rect1() or perhaps a Gaussian function to shape your velocity within your limits ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
thanks for help me. I don't explained very well. I need a bether way to make this, my inlet boundary need to be:
if u < 3.5 m/s
u = 3.5
if u > 10 m/s
u = 10
else
u = pid_Control_Law.
In the case that the velocity inlet don't be saturated the value is calculate with a PID controller. You can help with this case?
best regards,
Gustavo
Please login with a confirmed email address before reporting spam
well then cannt you try sometinh like if(u<3.5,3.5,if(u>10,10,yourfunction))
but you shoudl ensure that "yourfunction" is smooth during the transition around 3.5 and 10, i.e. using a rect and a "+u" to get the overall slope along
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I made the restrictions in the inlet velocity, but now my model has inconsistent initial values. I don't understant, because without the restrictions the simulation occurs well, but when the inlet velocity turns negative a convergence error occurs. So I think the solution for this is to put a saturation in the inlet velocity boundary (like you said me), but now a initial value error is occuring.
Please login with a confirmed email address before reporting spam
COMSOL proposes all "0" as initial conditions, these are often far from optimum. Perhaps you should first runa stationary case to get your model into a correct starting point, then run a time series thereupon, starting from the stationary initial case (you link the 2nd study to the results of the first one, see the doc)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I made this, the problem with initial conditions is solved, thanks. But know the problem is with the time dependent solver, the solver has convergence error in t = 0. Is this occuring because my initial conditions are wrong?
best regards
Please login with a confirmed email address before reporting spam
Have you checked that all your t=0 BC conditions make sense, not forgotten somewhere a constant value or something. I.e. temperatures in Kelvin "0" K is not a good starting point 0[degC] (or 20) is better
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I think the problem is the controller parameter (proportional and integral term), I need to analise better this. I would like to ask you: This model that I need simulate has a industrial scale of 172 m long, but will need a high computational effort and maybe not work. Do you have any ideal how can I simulate this? I need to validate the temperature output of comsol model with the real system and the EDP model that already been done. Completing this step, I will put the PID control law in the inlet boundary condition to tracking the desired temperature and again validate with the real system and the EDP model. I really don't have an idea how to simulate 172 m long. As you have a great experience with this kind of simulation I would like to know your opinion.
obs: currently I just have simulated 3 m long and making some tests with the PID control.
best regards,
Gustavo
Please login with a confirmed email address before reporting spam
All of the above is written based on the mini-course that i attended in the recent Comsol conference. I have not used it myself and anyone using this particular module should be able to tell you better. More details are here:
www.comsol.com/products/pipe-flow/
Good Luck.
Please login with a confirmed email address before reporting spam
best regards
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.