[TRNSYS-users] Initial value for outputs

Ghady Dib deebghady at gmail.com
Thu Nov 16 09:45:22 PST 2017


Dear M. Thornton,


You are totally right regarding that it’s not necessary to go and rebuilt
all the TRNDLL. In order to rebuild just my only one component; I am
following these steps;


1) Open Trnsys17 > Compilers Ivf111 > Select Type 164 > Modify it (JPEG1)


2) Right it click on the type > Compile. After that I have 0 errors and 0
warnings (JPEG2)


Now in order to rebuild it (not all of the types)


3) Generate > only project > build TRNDLL (JPEG3) (Is this right)? (I don’t
know if this is right, because by this steps it is affecting all the types
and not only mine) and I am affraid to affect the other types.


After that where the (Type164).dll will be located? In Ivf111 >TRNDll >
Debug > TRNDll.lib ? (So it will remain at the same place and so the new
dll take the place of the old dll; is it right ?)


Now after step 3 is there any procedure left to do it? Are these 3 steps
are enough in order to Trnsys take into consideration the changes? If step
3 is wrong, can you tell me please step by step what procedure should I
take.


Many thanks for your enormous help.

On Thu, Nov 16, 2017 at 4:36 PM, Jeff Thornton via TRNSYS-users <
trnsys-users at lists.onebuilding.org> wrote:

> Ghady,
>
> Yes - those are the steps to include your component changes if you have
> the model as part of your large TRNSYS library.  But you can also build a
> DLL for just that component as part of the TRNSYS User Library approach.  I
> suggest that you eventually try that approach so you don't have to rebuild
> everything every time you make a change.
>
>
>
> Jeff
>
>
>
> ---
> Jeff Thornton
> President - TESS LLC
> 22 N. Carroll Street, Madison WI USA 53703
> Office: (608) 274-2577  Fax: (608) 278-1475www.tess-inc.com
> E-Mail: thornton at tess-inc.com
>
> On 11/16/2017 3:42 am, Ghady Dib via TRNSYS-users wrote:
>
> Dear M. Thornton,
>
> In order to do eddit the type:
>
> 1) Modify the type (Add initial output values)
> 2) Recompile it
> 3) Rebuild the TRNDLL
> Are these the steps ?
> In order to Rebuild the library, I follow the procedure in
> ProgrammersGuide (Instructions to rebuild TRNDll.dll with Intel Visual
> Fortran 9.1 and MS Visual Studio 2003) ?
> Have a nice day
>
>
>
> On Wed, Nov 15, 2017 at 11:20 AM, Ghady Dib <deebghady at gmail.com> wrote:
>
>> Dear M. Thornton,
>>
>> Thank you very much for help.
>>
>> You are totally right, I tried to create a new component but it's not
>> easy. So i'll just modify the initial values like you told me.
>>
>> But in order to compile the Type 164, and rebuilt the library after
>> modifying the type, should I generate the TRNDLL in MVS (JPEG1) ? By this
>> step Trnsys will be able to take the modifications in consideration ? Is it
>> sure that the other types will not be affected ?
>>
>> So step : 1: Modify the type; 2 : Generate TRNDLL in MVS ?
>>
>> Thank you in advance
>>
>>
>>
>> On Tue, Nov 14, 2017 at 7:54 PM, Jeff Thornton via TRNSYS-users <
>> trnsys-users at lists.onebuilding.org> wrote:
>>
>>> Ghady,
>>>
>>> You wrote "In order to add the initial value outputs in the Type 164
>>> code, I prefer to create a new type and not modify the existed one in
>>> Trnsys Library. For that I created a new component using Trnsys 17. I had
>>> some difficulties because it’s not the same code writing from defining
>>> inputs, outputs and parameters to storage; I managed to copy the code line
>>> that I am interested in but the problem remains with the storage array.>
>>>
>>> Unless you want to completely re-write a version 16 component in version
>>> 17 format (and you are certainly willing to attempt that if you'd like), I
>>> would suggest that you leave it in version 16 format and just change the
>>> output initialization line as I suggested earlier.  Find the lines:
>>>
>>> !set initial output values
>>> OUT(1:NO)=0.d0
>>>
>>> and replace them with your initial values:
>>> Out(1) =20.d0
>>> Out(2) = 0.do
>>> etc.
>>>
>>> Jeff
>>>
>>> ---
>>> Jeff Thornton
>>> President - TESS LLC
>>> 22 N. Carroll Street, Madison WI USA 53703
>>> Office: (608) 274-2577  Fax: (608) 278-1475www.tess-inc.com
>>> E-Mail: thornton at tess-inc.com
>>>
>>> On 11/13/2017 7:35 am, Ghady Dib via TRNSYS-users wrote:
>>>
>>> Hello,
>>>
>>>
>>>
>>> In order to add the initial value outputs in the Type 164 code, I prefer
>>> to create a new type and not modify the existed one in Trnsys Library.
>>>
>>>
>>>
>>> For that I created a new component using Trnsys 17. I had some
>>> difficulties because it’s not the same code writing from defining inputs,
>>> outputs and parameters to storage; I managed to copy the code line that I
>>> am interested in but the problem remains with the storage array.
>>>
>>>
>>>
>>> In fact when I created the new component (from Trnsys), I didn’t notice
>>> any place where I can specify my number of storage (Which is equal to 2 in
>>> Type 164).
>>>
>>>
>>>
>>> Do I set my storage number there:  ‘’*Call
>>> SetNumberStoredVariables(0,0)*’’; It’s not like the inputs and
>>> parameters where I defined their numbers them in Trnsys.
>>>
>>> I have to include (in my new component ''type210'') the storage array in
>>> FOUR places just like in type 164a:
>>>
>>>
>>>
>>> *POST CONVERGENCE MANIPULAITIONS*
>>>
>>>         CALL getStorageVars(STORED,NS,INFO)
>>>
>>>         STORED(1)=STORED(2)
>>>
>>>         CALL setStorageVars(STORED,NS,INFO)
>>>
>>>
>>>
>>> *PERFORM FIRST CALL MANIPULATIONS*
>>>
>>>   CALL setStorageSize(NS,INFO)
>>>
>>>
>>>
>>> *PERFORM INITIAL TIMESTEP MANIPULATIONS*
>>>
>>>         STORED(1:NS) = N_INI       !NO. OF MOLES IN PREVIOUS TIME STEP
>>>
>>>         CALL setStorageVars(STORED,NS,INFO)
>>>
>>>
>>>
>>> *UPDATE STORAGE*
>>>
>>>         STORED(2) = NGAS
>>>
>>>         CALL setStorageVars(STORED,NS,INFO)
>>>
>>>
>>>
>>> Are these nomenclatures work in the Type210 created by Trnsys 17? Or I
>>> have to include other nomenclatures ? such as getStaticArrayValue ? and for
>>> the others ?
>>>
>>>
>>>
>>>
>>>
>>> Thank you in advance for your support.
>>>
>>> --
>>>
>>>
>>> Ghady DIB
>>>
>>> Doctorant
>>> Laboratoire CETHIL UMR 5008 Groupe Energétique des Systèmes Thermiques
>>> et Frigorifiques (ESTF) Département Génie Energétique et Environnement INSA
>>> Lyon France
>>>
>>>
>>>
>>>
>>>
>>> Tel:+ (33) 6 33 52 96 74
>>>
>>>
>>>
>>> _______________________________________________
>>> TRNSYS-users mailing listTRNSYS-users at lists.onebuilding.orghttp://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>>>
>>>
>>> _______________________________________________
>>> TRNSYS-users mailing list
>>> TRNSYS-users at lists.onebuilding.org
>>> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>>>
>>>
>>
>>
>> --
>>
>>
>>
>>
>>
>>
>>
>> Ghady DIB
>>
>> Doctorant
>> Laboratoire CETHIL UMR 5008 Groupe Energétique des Systèmes Thermiques et
>> Frigorifiques (ESTF) Département Génie Energétique et Environnement INSA
>> Lyon France
>>
>>
>>
>>
>>
>> Tel:+ (33) 6 33 52 96 74
>>
>>
>>
>
>
>
> --
>
>
>
>
>
>
>
> Ghady DIB
>
> Doctorant
> Laboratoire CETHIL UMR 5008 Groupe Energétique des Systèmes Thermiques et
> Frigorifiques (ESTF) Département Génie Energétique et Environnement INSA
> Lyon France
>
>
>
>
>
> Tel:+ (33) 6 33 52 96 74
>
>
>
> _______________________________________________
> TRNSYS-users mailing listTRNSYS-users at lists.onebuilding.orghttp://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
>
>


-- 




*  Ghady DIBDoctorantLaboratoire CETHIL UMR 5008 Groupe Energétique des
Systèmes Thermiques et Frigorifiques (ESTF) Département Génie Energétique
et Environnement INSA Lyon FranceTel:+ (33) 6 33 52 96 74
<%2B%20%2833%29%206%2033%2052%2096%2074>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20171116/f62e8a01/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JPEG1.jpg
Type: image/jpeg
Size: 349772 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20171116/f62e8a01/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JPEG2.jpg
Type: image/jpeg
Size: 327198 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20171116/f62e8a01/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JPEG3.jpg
Type: image/jpeg
Size: 333992 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20171116/f62e8a01/attachment-0005.jpg>


More information about the TRNSYS-users mailing list