<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Egon <div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>Option 2, I go into the input tab of the model, change the variable type to kW and enter 10.</div><div><br></div><div>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.</div><div><br></div><div>Jeff<br><br><div id="AppleMailSignature">Sent from my iPhone</div><div><br>On Jul 3, 2018, at 2:56 AM, Egon Troch <<a href="mailto:egon@think-e.be">egon@think-e.be</a>> wrote:<br><br></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Egon<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:#0C00">From:</span></b><span lang="EN-US" style="mso-fareast-language:#0C00"> Jeff Thornton <<a href="mailto:thornton@tess-inc.com">thornton@tess-inc.com</a>>
<br>
<b>Sent:</b> Monday, 2 July 2018 16:15<br>
<b>To:</b> TRNSYS users mailing list at <a href="http://OneBuilding.org">OneBuilding.org</a> <<a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a>><br>
<b>Cc:</b> Egon Troch <<a href="mailto:egon@think-e.be">egon@think-e.be</a>>; Leen Peeters <<a href="mailto:Leen@think-e.be">Leen@think-e.be</a>><br>
<b>Subject:</b> Re: [TRNSYS-users] bug in battery component<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<span style="mso-fareast-language:#0C00"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Jeff<o:p></o:p></p>
<div id="AppleMailSignature">
<p class="MsoNormal">Sent from my iPhone<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
On Jun 29, 2018, at 11:05 AM, Egon Troch via TRNSYS-users <<a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I found a bug in the TRNSYS 17 battery component “Type 47a”.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">If any questions, don’t hesitate to ask!</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Egon</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><image001.png><o:p></o:p></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="mso-fareast-language:#0C00">_______________________________________________<br>
TRNSYS-users mailing list<br>
</span><a href="mailto:TRNSYS-users@lists.onebuilding.org"><span style="mso-fareast-language:#0C00">TRNSYS-users@lists.onebuilding.org</span></a><span style="mso-fareast-language:#0C00"><br>
</span><a href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org"><span style="mso-fareast-language:#0C00">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</span></a><span style="mso-fareast-language:#0C00"><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</div>


</div></blockquote></div></body></html>