|
[Sponsors] |
November 13, 2009, 07:18 |
CCL Expression - is this possible?
|
#1 |
New Member
fabio
Join Date: Aug 2009
Posts: 17
Rep Power: 16 |
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 |
|
November 14, 2009, 05:50 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
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.
|
|
November 14, 2009, 08:38 |
|
#3 |
New Member
fabio
Join Date: Aug 2009
Posts: 17
Rep Power: 16 |
Damn , thanks ghorrocks.
|
|
November 16, 2009, 21:16 |
|
#4 |
Senior Member
Join Date: Apr 2009
Posts: 531
Rep Power: 21 |
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. |
|
|
|
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 11: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 17:23 |
Creating, loop or iteration using expression edito | Jan | CFX | 3 | July 28, 2003 11:01 |