[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] IF statemenet



Use the Equations card and create one input, called Tambient, and connect the appropriate output from the weather model to the Equations card.  Then define two equations:

Equations 2
_On_Cool_ = GT(Tambient,18)
On_Heat LT(Tambient,14)

Then simply connect these two outputs to the heat pump model.  This approach works well if Tambient is unaffected by the heat pump (as it is in this case).  If Tambient was instead the room temperature then you should use a thermostat model to avoid iteration issues.

Be aware though that this equation based approach will make the heat pumps run constantly whenever the ambient temperature is above 18 or below 14.  If you want to only allow operation of the heat pumps when it's above 18 or below 14 then you'll have to use a thermostat model and an Equations card.  In that case you would create three inputs: Tambient, WantCool, and WantHeat.  You would connect the thermostat to the building and then the thermostat outputs to WantCool and WantHeat equation inputs.  Then your two equations would change to:

Equations 2
_On_Cool_=GT(Tambient,18)*WantCool
_On_Heat_=LT(Tambient,14)*WantHeat

Jeff

On Feb 13, 2014, at 7:19 AM, metkell yebiyo <metkell@yahoo.com> wrote:

Dear TRNSYS users,

Could you anyone tell me if it is possible to write an if statement in the equation box,
I am trying to send a control signal based on the outside temperature, if outside air temperature is
greater than 18 deg C then the heat pump would run in cooling mode else if the outside air temperature is less than 14 deg C then  the heat pump would run in heating mode.

Any suggestions would be appreciated thank you very much.


Regards,
Metkel

Metkel Yebiyo BEng (Hons), MSc
CEREB PhD Researcher - Ground Source Heat Pumps
Room T615
Department of Urban Engineering
Faculty of Engineering, Science and the Built Environment
London South Bank University,
103 Borough Road,
London SE1 0AA
Tel: +44 (0)20 7815 7639
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users