[TRNSYS-users] InterpolateData

David BRADLEY d.bradley at tess-inc.com
Thu Jun 21 09:14:24 PDT 2012


Erik,
   Unfortunately there is not an easy way to do that. You would have to 
modify InterpolateData and I suspect you would have to also add a data 
structure to it so that it was able to store the mins and max, then 
communicate them back to the Type that called it. Its an interesting 
idea and I definitely see the benefit. I will certainly add this to the 
list of requested enhancements.
Best,
  David


On 6/21/2012 08:46, Erik Boschek wrote:
> Dear David / TRNSYS-users,
> thank you for the hint for using DynamicData. That worked and in the 
> mean time I have upgraded to version 17.
> I have another question about using what is now called 
> InterpolateData. Essentially, I was wondering if it is possible to 
> extract directly the mimimum and maximum values of the independant 
> variables from the data file being interpolated. Obviously, values 
> outside of these ranges are not extrapolated. Thus, it would be 
> sometimes be useful to use those limits automatically as constraints 
> in the logic of the component.
> As a first try, I have modified "InterpolateData" to return an array 
> containing all these limits - something like:
> xMinMax(1,1) = X1dd(1,ILUdd)
> xMinMax(1,2) = X1dd(NX1dd,ILUdd)
> .
> .
> .
> xMinMax(6,1) = X6dd(1,ILUdd)
> xMinMax(6,2) = X6dd(NX6dd,ILUdd)
> Is there is a more straight forward way in which I don't have to 
> modify "InterpolateData"? Or am I missing something?
> Thanks,
> Erik
>
> *From:* David BRADLEY <d.bradley at tess-inc.com>
> *To:* Erik Boschek <erikboschek at yahoo.com>
> *Cc:* "TRNSYS-users at cae.wisc.edu" <TRNSYS-users at cae.wisc.edu>
> *Sent:* Wednesday, May 23, 2012 4:34 PM
> *Subject:* Re: [TRNSYS-users] DynamicData and Visual Fortran XE 2011
>
> Erik,
>   We found and fixed this in Trnsys17 when we moved over to the IVF 
> compilers. CVF didn't mind if you exited a subroutine without 
> deallocating your allocatable arrays (it deallocated them for you). 
> IVF is a bit more rigorous and forces you do deallocate arrays 
> manually. You need to add the following lines to the GROW() subroutine 
> in DynamicData
>
> Deallocate(X1TEMPdd)
> Deallocate(X2TEMPdd)
> Deallocate(X3TEMPdd)
> Deallocate(X4TEMPdd)
> Deallocate(LUSTORTEMPdd)
> Deallocate(YDATATEMPdd)
> Deallocate(DATAINTEMPdd)
> Deallocate(IPTTEMPdd)
>
>   Another issue that you may run into is that IVF does not like when a 
> function returns without setting a return value. CVF was more 
> forgiving about that. You will need to go through some of the 
> TrnsysFunctions routines and make sure that they always set a return 
> value. Again, this is fixed in Trnsys17.
> Best,
>  David
>
>
> On 5/23/2012 06:13, Erik Boschek wrote:
>> Dear TRNSYS users,
>> I am in the process of migrating to Intel Visual Fortran Composer XE 
>> 2011, with VS2010 from CVF6.6 for component development. 
>> I'm currently using TRNSYS 16.
>> Generally, with not too many problems I've gotten TRNSYS to compile 
>> and a few custom types.
>> However, in the mean time I've run into an issue which seems to be 
>> related to calling "DynamicData", which I use quite often.
>> I've found that if I create a simulation with more than one call, 
>> TRNSYS crashes with a run-time error "severe (151): allocatable array 
>> is already allocated" (as attaced screen shot).
>> To check that it wasn't related to my own component, I could also 
>> reproduce this simply by e.g. putting two instances of TESS Type581 
>> (multi dimensional interpolation) into an empty project. This never 
>> occurs for the basic installed TRNDll or one I've compiled with the 
>> old compiler.
>> Is this problem known to anyone and is there a fix? Is the new intel 
>> compiler supported or is it known to give problems with TRNSYS? Would 
>> this problem disapear using TRNSYS 17?
>> Thanks for any insight,
>> Erik Boschek
>>
>>
>> _______________________________________________
>> TRNSYS-users mailing list
>> TRNSYS-users at cae.wisc.edu  <mailto:TRNSYS-users at cae.wisc.edu>
>> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>
> -- 
> ***************************
> David BRADLEY
> Principal
> Thermal Energy Systems Specialists, LLC
> 22 North Carroll Street - suite 370
> Madison, WI  53703 USA
>
> P:+1.608.274.2577
> F:+1.608.278.1475
> d.bradley at tess-inc.com  <mailto:d.bradley at tess-inc.com>
>
> http://www.tess-inc.com
> http://www.trnsys.com
>
>

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley at tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20120621/537eab73/attachment-0005.htm>


More information about the TRNSYS-users mailing list