[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Coupling with EES



Dear Juan,

The strings (acutally "LABELS", not initial input values) were added when
EES and Type66 were modified to allow a more efficient TRNSYS-EES
communication via the clipboard. The 2 strings are respectively the full
path to EES.exe and the full path to your EES file. Both should be separated
by a space . You must use double quotes if there are spaces in the
file/pathnames (although this is not recommended with Trnsys15). The EES
file should include $Import and $Export directives to use the clipboard. You
can have a look to Example 4 to see how these directives work.

There are a few tests that you can do to troubleshoot your problem:

1. Make sure that EES is called. To do that, close all EES instances and
launch your simulation from IISiBat. You should see EES coming out on the
taskbar.

2. Make sure that the number of inputs/outputs match each other in TRNSYS
and EES. For example, if you set the number of inputs to 3 and the number of
outputs to 2 in TRNSYS, your EES file should look like:

$Import 'CLIPBOARD' Inp_1,Inp_2,Inp_3
Out_1=... (add code here)
Out_2=... (add code here)
$Export 'CLIPBOARD' Out_1,Out_2

3. Test your EES file. Using the EES file here above, you can copy 3 numbers
to the clipboard from any text file (including the EES file itself), execute
the file (F2) and paste the results to any text file.

4. Test the standard TRNSYS example (Ex4). You can easily modify the EES
file (\trnsys15\EXAMPLES\EX4DAT\COMPRESSOR.EES) and check that you see the
results of your modification. E.g. replace the line that says "out3=
eta_isothermal" by "out3=0.88" and you should see a constant value for
ETA_ISO on the online plotter. 

5. Use the original Trnlib.dll file, especially if you modified Type66. Also
make sure that you are using a reasonably recent PROFESSIONAL version of EES
(current version is 6.667). There are no known problems related to EES in
previous TRNSYS 15 releases but it would not hurt to use the latest release
for TRNSYS as well (15.2.07).

If that does not solve your problem, you should send your TRNSYS project and
your EES file to your distributor and ask them for help.

Regards,

Michaël Kummert


> -----Original Message-----
> From: owner-trnsys@relay.doit.wisc.edu 
> [mailto:owner-trnsys@relay.doit.wisc.edu] On Behalf Of Juan 
> Pablo Salazar - LABSOLAR
> Sent: Sunday, December 15, 2002 19:24
> To: Trnsys
> Subject: Coupling with EES
> 
> 
> Dear TRNSYS Users,
> 
> I have encountered a problem while running a Deck that uses 
> Type 66. Instead of getting output values from the EES 
> program I get the EES input values that where pasted on the 
> CLIPBOARD by TRNSYS. I have taken a look at the Type 66 
> source code and think this problem might have something to do 
> with the following lines, specifically with the variable 
> ICARD. I tried giving this variable an index like "J" or 
> "ICH" but I wasn´t sure about what I was doing. Anyway, In my 
> output files I got a value that at least was different from 
> the input values...but they still were not right!
> 
> *************
>       J=1 ! same as the section in READIN that converts a 
> string to a bunch of numbers
> 	ich=1
> 415   CONTINUE
>       IF (ICH.GT.512) THEN
> C         FLAG ERROR AND RETURN IF CARD EXHAUSTED
>           return 1
>       ELSE IF (ICARD(ICH).EQ.BLANK.OR.ICARD(ICH).EQ.COMMA.
>      .         OR.ICARD(ICH).EQ.EQSIGN.OR.ICARD(ICH).EQ.TAB.
>      .         OR.ICARD(ICH).EQ.QUOTE.
>      .         OR.ICARD(ICH).EQ.CHAR(0)) THEN
>         ICH=ICH+1
>         GOTO 415
>       ENDIF
> 
>       CALL STRNUM(ICARD,RNUM,ICH,IERRED)
>       IF (IERRED.GT.0) THEN
>            write(luw,*) "error converting clipboard data to numbers"
> 	     call mystop(1001)
> 	     return 1
>       ELSEIF (IERRED.LT.0) THEN
> C  .      CHARACTER DETECTED why is EES doing that?
>            write(luw,*) "clipboard data contains a character"
> 	     call mystop(1001)
> 	     return 1
>       ELSE
>           out(J)=RNUM
>       ENDIF
> 
>       J=J+1
>       IF (J.GT.maxout) RETURN 1
>       GOTO 415
> *****************
> 
> Type 66 is referenced in the deck file like this:
> 
> ******
> * Model "Type66" (Type 66)
> *
> 
> UNIT 20 TYPE 66	 Type66
> INPUTS 3
> * Equa-2:Tc ->Input-1
> Tc
> * TYPE9a:Output 8 ->Input-2
> 5,8
> * Equa-2:Qp_aux_n ->Input-3
> Qp_aux_n
> *** INITIAL INPUT VALUES
> 0 0 0
> LABELS 1
> C:\EES32\EES.EXE C:\EES32\TRNSYS.EES
> *******
> 
> This form differs somewhat from the one described in the 
> Reference Manual (no strings were given as initial values). 
> This is probably due to the modifications made in the Type 66 
> subroutine in Spring 2001.
> 
> Can anyone help me out?
> 
> Thanks in advance,
> Juan Pablo de L. C. Salazar
> 
>