[Equest-users] Is there a way to extract specific data from sim result?

Joe Huang yjhuang at whiteboxtechnologies.com
Wed May 22 08:33:12 PDT 2013


As others have pointed out, eQUEST runs DOE-2.2 which outputs a text 
file originally renamed *.OUT in DOE-2 but now renamed *.SIM in 
eQUEST.   As a long-time DOE-2 user, I've written lots of awk scripts to 
extract out the variables of interest from the *.OUT/*.SIM files.  In 
fact, I only look at the *.OUT/*.SIM file during the debugging phase of 
a project, or when some results look suspicious.

I don't know how many people still use awk, but I've found it absolutely 
indispensible in my work (no exaggeration).  Basically, awk is a 
scripting language with C-like syntax, but more contextual than formal 
languages like C or Fortran, i.e., you don't have to define variable 
types, set array sizes, etc.

When I use awk to extract data from a *.OUT/*.SIM file, I basically do a 
pattern search for the title of the report (SS-A, SS-H, etc.), and when 
I find it, I start counting lines.  Then, when I get to the correct line 
number, I pull out the variables of interest, which in awk are simply 
the strings with a blank as the "field separator".  I've done this so 
many times that it takes me only a few minutes to write an awk script 
for what you're trying to do.   For your info, I'm attaching a sample 
awk script that I use to pull out the heating and cooling loads and peak 
loads from an SS-H file.

Awk has been around since the 1980's.  I'm sure you can do the same with 
Ppython, Perl,  VB, etc., but I've never felt the need because awk 
worked so well for me.

Joe

On 5/21/2013 6:48 PM, Yf Sun wrote:
> Hi,dear Equesters!
> Im currently doing my ph.d research using equest to analyse building 
> energy performance, i found its time consuming to find the data i need 
> from sim result, as the data i need almost the same for every 
> simulation, do you know a way to extract the specific text data(for 
> importing to excel) quickly by using some third party program maybe?
>
> -- 
> Best regards
> Ivan
>
>
> _______________________________________________
> Equest-users mailing list
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20130522/d5cc7f74/attachment-0002.htm>
-------------- next part --------------
{if ($1 ~/0TOTAL/) 
    {
      if (eqp == "FAC") heatE += $3
      if (eqp == "HP") heatE += $5
      coolE += $6
    }
}
{if ($1 ~/0MAX/) 
    {
      if (eqp == "FAC") pkheatE += $3
      if (eqp == "HP") pkheatE += $5
      pkcoolE += $6
    }
}
{if ($4 == "#" && $5 == "##set1" && $6 == "FdnTyp") fdn= substr($7,1,4) }
END{
if (btype == "1S") flrarea = len*wid
if (btype == "2S") flrarea = len*wid*2
windarea = 0.15*flrarea
if (eqp == "FAC") heatEsf = heatE*1000/flrarea
if (eqp == "HP") heatEsf = heatE/flrarea
coolEsf = coolE*1000/flrarea
pkheatEsf = pkheatE*1000/flrarea
pkcoolEsf = pkcoolE*1000/flrarea
if (eqp == "FAC") printf("%-17s %4s %2s %-4s  %-3s  %4d %4d %4d %5s %7.2f %5.0f   %6.2f %6.3f %6.2f %5.0f  %6.2f %6.3f\n",locat,fdn,btype,vint,eqp,flrarea,windarea,wtype,sizing,heatE,coolE,pkheatE,pkcoolE,heatEsf,coolEsf,pkheatEsf,pkcoolEsf) 
if (eqp == "HP") printf("%-17s %4s %2s %-4s  %-3s  %4d %4d %4d %5s %7.0f %5.0f   %6.3f %6.3f %6.2f %5.0f  %6.3f %6.3f\n",locat,fdn,btype,vint,eqp,flrarea,windarea,wtype,sizing,heatE,coolE,pkheatE,pkcoolE,heatEsf,coolEsf,pkheatEsf,pkcoolEsf) 
}


More information about the Equest-users mailing list