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

CCL Expression - is this possible?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 13, 2009, 08:18
Default CCL Expression - is this possible?
  #1
New Member
 
fabio
Join Date: Aug 2009
Posts: 17
Rep Power: 7
fabioacfoz is on a distinguished road
I need to create a damping in my thermostat, so what i though is with this set os parameters:

if T>25.2 AC is ON
if T<24.8 AC is OFF
if (T<25.2 AND T>24.8)AND(T(current timestep)<T(last timestep)) AC is ON
if (T<25.2 AND T>24.8)AND(T(current timestep)>T(last timestep)) AC is OFF

But i dont know how to do the Bolded part of the equation.

Does anyone knows how to set up the temperature at a specified timestep, like what i want to do in the example?

Thanks in advance
fabioacfoz is offline   Reply With Quote

Old   November 14, 2009, 06:50
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,816
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
There is no way of accessing historical data in CEL. Put in a feature request for it, it would have to be the most requested thing for CEL. To implement what you describe you really need fortran.
ghorrocks is offline   Reply With Quote

Old   November 14, 2009, 09:38
Default
  #3
New Member
 
fabio
Join Date: Aug 2009
Posts: 17
Rep Power: 7
fabioacfoz is on a distinguished road
Damn , thanks ghorrocks.
fabioacfoz is offline   Reply With Quote

Old   November 16, 2009, 22:16
Default
  #4
Senior Member
 
Join Date: Apr 2009
Posts: 513
Rep Power: 12
stumpy is on a distinguished road
You can do this without fortran, it just needs a bit of CCL adding. First create an Additional Variable equal to T. In your expression instead of asking for T(last timestep) you now need to ask for AV(last timestep). The usual problem with this approach is that the AV value is only lagged to the last coefficient loop (at most), so you're not getting the previous timestep value. You can force the AV to only get updated once per timestep, hence when you ask for it in timestep n it will actually hold the value from timestep n-1. The magic bit of CCL you need is, errr.., something like:
Update Loop = TRANS_LOOP
This is a parameter that you add to the CCL definition of the AV. PLEASE CHECK THE RULES FILE TO MAKE SURE I GOT THE PARAMETER NAME CORRECT (and to see exactly where it goes in the AV definition) - I don't have access to that right now.
stumpy 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
CCL / Monitor Object Problem James Date CFX 4 September 29, 2010 02:23
Writing an expression for fully developed flow! Usman CFX 12 December 20, 2007 12:26
Relief Plots in CFX Michael CFX 15 June 30, 2006 08:01
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 18:23
Creating, loop or iteration using expression edito Jan CFX 3 July 28, 2003 11:01


All times are GMT -4. The time now is 01:41.