<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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;}
/* List Definitions */
@list l0
        {mso-list-id:618339590;
        mso-list-template-ids:1457157124;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Alex, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sorry for the late reply, a bad flu knocked me down for 5 days. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for the comprehensive answer but still my problem is there. I try to explain it more.&nbsp; In my model I use AIM2 and in line 1769 the CVVN is supposed to &nbsp;have an amount but it is zero. When I tried to debug what was the problem I found that CVVN is commented out in esrumfs/mfsbld.F therefore it is zero in the subsys.F. If I reintroduce CVVN and reintroduce the day type in this part of the code (which was there before and now it is part of another if so it has to be reintroduced or it will be zero) the results are the same as when I use AfnToBldData. And I don&#8217;t think you changed that one because according to your commit log r6548 (if you meant that because r6485 is written by Ian not you) you introduced another module which is fine. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>About the line 1897, previously the if statement was &#8220;If (IAIRN.ge.1)then &#8230;&#8221;&nbsp; it was including AIM2and OPR as well as AFN but now it is only looking at the AFN and it doesn&#8217;t modify the CVVFM which results in an unbalanced Zone_coupled heat advection. If you look at the dal/CHREM_report_data.F in my branch there is a post processing parameter called fZN_AP_ZnCpldVent &nbsp;(Zone_coupled heat advection) which should be the same with opposite signs for two coupled zones. In case of using new If statement in line 1897 these two numbers are dramatically different which is not the same as what I had with previous version of development_branch. When I reverse it to previous form (i.e. &#8220;If (IAIRN.ge.1)then &#8230;&#8221;&nbsp; ) it works as expected both has the same advection with opposite signs which makes sense. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I hope I could explain what I meant. &nbsp;I can send you three different results by changing those parameters to show what I mean if you need that please let me know and I can send you those.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sara<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Ferguson, Alex [mailto:Alex.Ferguson@NRCan-RNCan.gc.ca] <br><b>Sent:</b> April 28, 2011 5:43 PM<br><b>To:</b> s.nikoofard@Dal.Ca; esp-r@lists.strath.ac.uk<br><b>Subject:</b> RE: Some bugs in subsys.F ?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='color:blue'>Greetings from windy Ottawa!</span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>I'm the author of recent changes [r6485] to subsys.F that alter use of the PREC5N variables. In this revision, I modified MZVNT to allow more flexibility in specifying infiltration air flow. These changes permit switching from one air flow computation method to another (AIM-2, scheduled flow and air-flow network) mid-simulation depending on the operating conditions in the building. </span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>Prior to r6485, ESP-r held air infiltration and ventilation flow&nbsp;conductance in the CVIN and CVVN arrays, in common PREC5N.&nbsp; By default, ESP-r assumes that the air flow rates are specified by hourly schedules in the .opr file. CVIN and CVVN thus contain up to 72 separate flow rates for each zone: one for each hour (1-24) in each of the three day types (weekday/Saturday/Sunday). The routine MZVENC&nbsp;establishes&nbsp;values CVIN and CVVN&nbsp;prior to commencing&nbsp;simulation using the static air change rates specified in the .opr file.&nbsp;&nbsp;During the simulation, ESP-r reads the infiltration and ventilation data for the current hour and day type from these arrays.</span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>Rather than create a specific data structure, the air flow network exploited the same variables for imposing network-computed infiltration and ventilation flows on the building thermal model. There two deficiencies with this approach:</span><o:p></o:p></p><ul type=disc><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'><span style='color:blue'>It's cumbersome. Because CVIN and CVVN are designed to hold hourly schedules, the air-flow network had to locate the correct array location (that is, the current day type and hour) to save the data in, even though these parameters had no relevance to the air-flow network computation. This not only requires extra code;&nbsp;it also obfuscates the purpose of the CVIN/CVVN arrays.</span><o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'><span style='color:blue'>It erases the original schedules held in CVIN and CVVN.&nbsp; These arrays are&nbsp;populated prior to simulation by routine MZVENC. By repurposing them, the air flow network overwrites the original flow schedules with time-step computed values. This prevents re-imposing the .opr schedules mid-simulation&#8212;a key objective in our work. </span><o:p></o:p></li></ul><p class=MsoNormal><span style='color:blue'>For these reasons, I elected to revise&nbsp;routines&nbsp;MZVENT and MFLW2B&nbsp;to use dedicated variables&nbsp;when imposing infiltration and ventilation&nbsp;on the building thermal domain. &nbsp;I introduced a new common block&nbsp;AfnToBldData common for this purpose. </span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>Regarding your observations Sara, I'm not sure I understand your comments. When the&nbsp;opr schedule&nbsp;or AIM-2 models are in effect, ventilation is still governed by the hourly ventilation schedule&#8212;and therefore should be established via CVVN as per line 1769. I'm also unsure what you're suggesting regarding line 1897. The if statement has two clauses: bAFN = TRUE for air flow networks, and an else clause otherwise. Am I missing something?</span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>Thanks,</span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='color:blue'>- Alex </span><o:p></o:p></p><p><b>Alex Ferguson</b><br>Housing, Buildings and Communities Group<br>CanmetENERGY<br>Natural Resources Canada<br>P:+1 613 995 3294<br>F:+1 613 996 9909<br><a href="mailto:Alex.Ferguson@NRCan-RNCan.gc.ca">Alex.Ferguson@NRCan-RNCan.gc.ca</a><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" align=center></div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Joe Clarke [mailto:joe@esru.strath.ac.uk] <br><b>Sent:</b> April 28, 2011 12:02<br><b>To:</b> core_developers@espr.list.cvsdude.com<br><b>Subject:</b> Re: AW: Some bugs in subsys.F ?</span><o:p></o:p></p><p class=MsoNormal>Dear All<br><br>In relation to Sara's recent post below, I have made changes to ESP-r to enable the coupling of non-air flow networks to building models to allow the use of ESP-r's building-side features in plant modelling. I use the variables in common PREC5N extensively. The changes are at present resident in my branch and not yet integrated in development_branch.<br><br>Regards,<br><br>Joe<br><br><br><o:p></o:p></p><p class=MsoNormal><br>I want to only give a heads up in a mistake occurred in development_branch which should be fixed. It reflected in commit log 6618. Since the fluid flow network solver no longer changes the PREC5N variables and data is stored in the dedicated AfnToBldData common variables, the calculation of CV1, CV2 and other related parameters there for AIM2 in subsys.F should be changed (line 1769 in development_branch). Using the current version cannot calculate CVVF in the mode of AIM2 or OPR, so they have to be changed (which you can see in commit log 6618). <br><br>Another issue is in CVVFM modification line 1902. The if statement which is in line 1897 is wrong, it doesn't account for other type of air flow network which should consider them. It is also reflected in commit log 6618.<br><br>Best Regards,<br><br>Sara Nikoofard<br>Room C254A, Department of Mechanical Engineering, <br>Dalhousie University, Halifax, NS<br>Phone: (902)494-3165<br>email: <a href="mailto:s.nikoofard@dal.ca">s.nikoofard@dal.ca</a><o:p></o:p></p><p class=MsoNormal><br><br><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Professor J A Clarke&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;email: <a href="mailto:joe@esru.strath.ac.uk">joe@esru.strath.ac.uk</a><o:p></o:p></pre><pre>ESRU, Dept. of Mechanical Eng.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phone: +44 141 548 3986<o:p></o:p></pre><pre>University of Strathclyde&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fax: +44 141 552 5105<o:p></o:p></pre><pre>Glasgow G1 1XJ, UK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.esru.strath.ac.uk/">http://www.esru.strath.ac.uk/</a><o:p></o:p></pre></div></body></html>