CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

CFX, using a controller

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 4, 2015, 01:56
Smile CFX, using a controller
  #1
New Member
 
matthew roberts
Join Date: Sep 2015
Posts: 5
Rep Power: 4
mrob302 is on a distinguished road
Hi

I am reasonably new to ANSYS, i am using workbench 13 i think. I have set up a room in 2D with air flow in and out and walls, with a heat flux at the bottom. I want to be able to pick points (probes?) and when the temperature at any of those points reaches a certain level the heat flux will decrease to a lower discret value. Once the heat flux has decreased if the temperature at another (or the same probe) goes below below a different set temp the heat flux will rise again. The idea is that the controller will keep the room at a stable temperature. I have written this code in MATLAB and simulink but im not sure if i can or how to implement into my CFX model. Am i able to do this? Any help would be greatly appreciated.

Thanks
mrob302 is offline   Reply With Quote

Old   September 4, 2015, 09:58
Default
  #2
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14
singer1812 is on a distinguished road
Without regards to the worthyness of your type of controller and without having actually tested this myself, I can suggest:

Read up help on CEL and Monitor Points. Place a monitor point at the locations that interest you.

Then, for your controller create an CEL expression such as (this is a 2 point probes and doesnt include logic if Ts are probes act in ways not intended):

step(T-probe(T)@Monitor Point 1)*Heat1+step(T-probe(T)@Monitor Point 2)*Heat2

Use the expression in your heatflux input.

This gives you the general idea. You will have to get fancier with the CEL to get your controller to work as you intend. Word of advice-Controllers such as this could be prone to runaway conditions.....
singer1812 is offline   Reply With Quote

Old   September 6, 2015, 17:42
Default
  #3
New Member
 
matthew roberts
Join Date: Sep 2015
Posts: 5
Rep Power: 4
mrob302 is on a distinguished road
Quote:
Originally Posted by singer1812 View Post
Without regards to the worthyness of your type of controller and without having actually tested this myself, I can suggest:

Read up help on CEL and Monitor Points. Place a monitor point at the locations that interest you.

Then, for your controller create an CEL expression such as (this is a 2 point probes and doesnt include logic if Ts are probes act in ways not intended):

step(T-probe(T)@Monitor Point 1)*Heat1+step(T-probe(T)@Monitor Point 2)*Heat2

Use the expression in your heatflux input.

This gives you the general idea. You will have to get fancier with the CEL to get your controller to work as you intend. Word of advice-Controllers such as this could be prone to runaway conditions.....
Hi, thank you for the reply. I have had an attempt with CEL, i have created the monitor points and the understand how to use the step function (i think?). How do i implement the logic of IF statements etc. Also when "T-probe" is used, is that just a name or what does that part of the equation represent?
mrob302 is offline   Reply With Quote

Old   September 6, 2015, 19:17
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,991
Rep Power: 107
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
You can use the step function like Edmund suggests or if statements. Look in the reference manual for the syntax of these expressions.
ghorrocks is offline   Reply With Quote

Old   September 7, 2015, 00:47
Default
  #5
New Member
 
matthew roberts
Join Date: Sep 2015
Posts: 5
Rep Power: 4
mrob302 is on a distinguished road
So if i want to implement a PI controller, is this possible? Also when looking at the results am i able to see the temperature contours at different times (iterations) or is it just the final iteration?
mrob302 is offline   Reply With Quote

Old   September 7, 2015, 01:08
Default
  #6
New Member
 
matthew roberts
Join Date: Sep 2015
Posts: 5
Rep Power: 4
mrob302 is on a distinguished road
Also am i able to plot the heater flux with time, to see when and how it is switching with the temperature changing? Im abit lost, but thanks for your help
mrob302 is offline   Reply With Quote

Old   September 7, 2015, 01:18
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,991
Rep Power: 107
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
A PI controller is much harder to implement as it requires historical data and this is tricky in CFX. I would not recommend this for beginners. Also it introduces all sorts of controller stability problems on top of the existing numerical stability problems as Edmund stated.

You can view any variable at any saved time step in the post processor.

Yes, you can view heat flux versus time. Make the heat flux a CEL variable and then set a monitor point equal to that variable. You will then have access to the value in the solver manager.
ghorrocks is offline   Reply With Quote

Old   September 7, 2015, 01:27
Default
  #8
New Member
 
matthew roberts
Join Date: Sep 2015
Posts: 5
Rep Power: 4
mrob302 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
A PI controller is much harder to implement as it requires historical data and this is tricky in CFX. I would not recommend this for beginners. Also it introduces all sorts of controller stability problems on top of the existing numerical stability problems as Edmund stated.

You can view any variable at any saved time step in the post processor.

Yes, you can view heat flux versus time. Make the heat flux a CEL variable and then set a monitor point equal to that variable. You will then have access to the value in the solver manager.
Okay i understand how to do it. Yeah i was starting to see the PI controller would be hard to implement. Unfortunately i might have to abandon the idea however i was wonder if you would know where i could see an example of it working for someone on CFX. Just to test the waters
mrob302 is offline   Reply With Quote

Old   September 7, 2015, 01:36
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,991
Rep Power: 107
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Search the forum. There have been so many questions asked on the forum before that it is bound to have been asked before.
ghorrocks is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX Treatment of Laminar and Turbulent Flows Jade M CFX 14 June 15, 2016 09:36
High Resolution (CFX) vs 2nd Order Upwind (Fluent) gravis ANSYS 3 March 24, 2011 03:43
CFX pressure in Simulations problem nasdak CFX 1 April 14, 2010 13:22
PhD using CFX Rui CFX 9 May 28, 2007 05:59
FSI using CFX and ANSYS Bi Chang CFX 2 May 10, 2005 04:47


All times are GMT -4. The time now is 19:51.