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

Re: [TRNSYS-users] bug in battery component



Egon 

The only time you should change the variable units to string, or variable name, is if you then enter the name of a previously defined equation name in the initial value field - and don’t connect that input to anything.  The program will then evaluate the equation each time and use that value as the input to the model.  The units of the equation should match the default units of that input.

Simple example: I want to supply a constant 10 kW input to the first input of a model but the model wants the input to be in kJ/hr.

Option 1, I write an equation P_supply = 10 * 3600 to get the power units to be in kJ/hr and then go into the input tab of the model, change the input variable type to string and enter the name P_supply as the initial value. 

Option 2, I go into the input tab of the model, change the variable type to kW and enter 10.

What doesn’t work is to have an output of 10 kW from a model and hook it to the input that is expecting kJ/hr.  The model will assume it is 10 kJ/hr no matter what you set for the variable units.  You’ll need to then use an equation to match the units.  That’s why most of the trnsys models use the default units for their inputs and outputs.

Jeff

Sent from my iPhone

On Jul 3, 2018, at 2:56 AM, Egon Troch <egon@think-e.be> wrote:

Thank you Jef for your quick respons. However, isn’t it the other way around? If an input is unconnected, “string” should be checked and the default is used. But if it is connected, shouldn’t the input that is selected be used? Or is it the other way around and does “string” need to be selected when an input is connected?

 

Kind regards,

Egon

 

From: Jeff Thornton <thornton@tess-inc.com>
Sent: Monday, 2 July 2018 16:15
To: TRNSYS users mailing list at OneBuilding.org <trnsys-users@lists.onebuilding.org>
Cc: Egon Troch <egon@think-e.be>; Leen Peeters <Leen@think-e.be>
Subject: Re: [TRNSYS-users] bug in battery component

 

Changing units of an input only changes the value of any UNCONNECTED input.  Connected inputs are always assumed to be the default units that the component expects.

 

Jeff

Sent from my iPhone


On Jun 29, 2018, at 11:05 AM, Egon Troch via TRNSYS-users <trnsys-users@lists.onebuilding.org> wrote:

Hi,

 

I found a bug in the TRNSYS 17 battery component “Type 47a”.

 

When changing the unit of the input “power to or from battery” to “kW” it still reads the input as if it were kJ/hr. This results in an unrealistic state of charge as if the battery is much too large.

 

If any questions, don’t hesitate to ask!

 

Kind regards,

Egon

 

<image001.png>

_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@lists.onebuilding.org
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org