C*********************************************************************** ! This component has been assigned Type Number 206. If that number conflicts with ! another user Type number, you will need to change it and recompile the appropriate ! dll. SUBROUTINE TYP206(TIME,XIN,OUT,T,DTDT,PAR,INFO,ICNTRL,*) !DEC$ATTRIBUTES DLLEXPORT :: TYPE206 C ---------------------------------------------------------------------- C C TYPE 206 : DAMPER or VALVE MODEL C C*********************************************************************** DOUBLE PRECISION XIN,OUT REAL PAR,K C INTEGER IOSTAT DIMENSION XIN(3),OUT(1),PAR(4) C DIMENSION IOSTAT(3) ! Set the version information for TRNSYS IF (INFO(7).EQ.-2) THEN INFO(12) = 15 RETURN 1 ENDIF W= XIN(1) P2= XIN(2) C= XIN(3) K= PAR(1) XL= PAR(2) XM= PAR(3) IF (PAR(4).NE.0.) C=1.-C IF (C.LT.0.) C=0. IF (C.GT.1.) C=1. RL=K/((1.0-XL)*C+XL)**2 RE=K*(XL**(2.0*C-2.0)) R=XM*RL+(1.0-XM)*RE P1=P2+R*W*ABS(W) OUT(1)=P1 C IOSTAT(1)=1 RETURN 1 END