[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] dynamic data
"I kept the same NX and X since they are the same for the 2 files
Q1 : is that a mistake ?"
It should be fine as long as they are exactly the same.
"Q2 : some one has an example of a more complicated component ( more than
2 X)than the one in the manual that I could try to identify to ?"
If my fix below doesn't help I'll send you a code snippet to see how we're
doing it.
"Q4: I assigned a different number my self in the studio, in the
parameters section to each logical unit , I feel like TRNSYS does it
automatically for the component already existing . should I add a line
in the code to get TRNSYS to assign a logical number, instead of the one
that I picked ??"
Let TRNSYS assign the logical units in the studio. There's no need to try
and circumvent the way files are currently handled.
" INTEGER NX(3)
DOUBLE PRECISION X(3),Y(5),Z(4),W(5)
NX(1)=4
NX(2)=3
NX(3)=2
X(1)=elec_load_percent
X(2)=bldg_load
X(3)=hot_water_set_point_temp
CALL DYNAMICDATA(LU_1,2,NX,5,X,Y,INFO,*10)"
"here is a part of the code
INTEGER NX(3)
DOUBLE PRECISION X(3),Y(5),Z(4),W(5)
NX(1)=4
NX(2)=3
NX(3)=2
X(1)=elec_load_percent
X(2)=bldg_load
X(3)=hot_water_set_point_temp
CALL DYNAMICDATA(LU_1,2,NX,5,X,Y,INFO,*10)"
The call to dynamic data is of the form:
SUBROUTINE DYNAMICDATA(LUdd,NINDdd,NXdd,NYdd,Xdd,Ydd,INFO,*)
LUdd = LU for data file (OK)
NINdd = # of independent variables, you have 3 variables and have
specified it as 2!
NXdd = An array containg the number of data points for each independent
variable (OK)
NYdd = # of dependent variables (OK)
Xdd = Array containing values of independent variabels (OK)
Ydd = Array containing values of dependent variables (OK)
Make that change and you should be fine.
Jeff
Jeff Thornton
President - TESS, LLC
22 North Carroll Street - Suite 370
Madison WI 53703 USA
Phone: 608-274-2577
Fax: 608-278-1475
E-mail: thornton@tess-inc.com
Web: www.tess-inc.com