<div dir="ltr"><div class="gmail_default" style=""><font color="#000000" size="4" style="" face="times new roman, serif">Hello,</font></div><div class="gmail_default" style=""><font color="#000000" size="4" face="times new roman, serif"><br></font></div><div class="gmail_default" style=""><font face="times new roman, serif"><span style="color:rgb(0,0,0);font-size:large">I use subprocess to call my TRNSYS model from Python and run it with my inputs and get back the outputs. I should mention that my model includes</span><span style="color:rgb(0,0,0);font-size:large"> type 3157 (few components are programmed in Python). At a specific timestep (1204 hours of simulation time after start), I always get the error of "Floating point division by Zero". These are what I did so far:</span></font></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">1- I checked my code in type 3157 and removed any possibility of devision by zero (wherever there is a division I either added a small value or used if function to ensure division by zero would not happen).</font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">2- I also recorded some of the main inputs of other components at that specific timestep and all look fine !</font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">3- I changed the value of some inputs (e.g. flowrates) and run the model again, but I always get the division by zero error at that specific time.</font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">4- I removed all the equations in my model that contained a division. So basically my model now includes some default components of TRNSYS and TESS as well as my type 3157 that cannot contain a decision by zero in Python code (Attached). </font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">I do not know which component of my TRNSYS model causes this error (Can it be still type 3157?!) and how to solve it. I wonder that it always happen on the same specific timestep.  </font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif"><br></font></span></div><div class="gmail_default" style=""><span style="color:rgb(0,0,0);font-size:large"><font face="times new roman, serif">I have attached the .dck file, .lst file, .b18 file for the type 56b, and also my Python code that is used in type 3157. </font><font face="georgia, serif">  </font></span></div><div class="gmail_default" style="font-family:georgia,serif;color:#0b5394"><b style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)"><font color="#0000ff"><font size="1"><br></font></font></b></div><div class="gmail_default" style="font-family:georgia,serif;color:#0b5394"><b style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)"><font color="#0000ff"><font size="1"><br></font></font></b></div><img src="cid:ii_lcwgtxa90" alt="image.png" width="416" height="265"><br><div class="gmail_default" style="font-family:georgia,serif;color:#0b5394"><b style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)"><font color="#0000ff"><font size="1">                                                                                                                     </font></font></b><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div style="text-align:right"><br></div><font color="#0000ff"><font size="1"><br></font></font></div><div><font color="#0000ff"><font size="1"><br></font></font><div><div><font color="#0000ff"><font size="1"><br></font></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>