|November 13, 2009, 08:18||
CCL Expression - is this possible?
Join Date: Aug 2009
Posts: 17Rep Power: 9
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, 06:50||
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,552Rep Power: 97
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 16, 2009, 22:16||
Join Date: Apr 2009
Posts: 530Rep Power: 13
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.
|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|