Documente Academic
Documente Profesional
Documente Cultură
=======================================================================
! Generated by : PSCAD v4.6.2.0
!
! Warning: The content of this file is automatically generated.
! Do not modify, as any changes made here will be lost!
!-----------------------------------------------------------------------
! Component : Crowbar_prot_1
! Description :
!-----------------------------------------------------------------------
!=======================================================================
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 'emtstor.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's2.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'fnames.h'
INCLUDE 'radiolinks.h'
INCLUDE 'matlab.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
INTEGER, INTENT(IN) :: Blk
REAL, INTENT(IN) :: Ecap
REAL, INTENT(IN) :: Vdc_crowbar_on
REAL, INTENT(IN) :: Vdc_crowbar_off
INTEGER, INTENT(OUT) :: S1o
! Control Signals
INTEGER IT_1, IT_2, IT_3, S1
REAL Idc, Icrowbar(3)
! Internal Variables
REAL RVD2_1(2)
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER ISTOI, ISTOF, IT_0 ! Storage Indices
INTEGER ICX, IPGB ! Control/Monitoring
INTEGER ISUBS, SS(1), IBRCH(1), INODE ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
NTXFR = NTXFR + 1
TXFR(NTXFR,1) = NSTOL
TXFR(NTXFR,2) = NSTOI
TXFR(NTXFR,3) = NSTOF
TXFR(NTXFR,4) = NSTOC
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
ISTOI = NSTOI
NSTOI = NSTOI + 6
ISTOF = NSTOF
NSTOF = NSTOF + 7
IPGB = NPGB
NPGB = NPGB + 1
ICX = NCX
NCX = NCX + 1
INODE = NNODE + 2
NNODE = NNODE + 12
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
ISUBS = NSUBS + 0
NSUBS = NSUBS + 1
DO IT_0 = 1,1
SS(IT_0) = SUBS(ISUBS + IT_0)
END DO
IBRCH(1) = NBRCH(SS(1))
NBRCH(SS(1)) = NBRCH(SS(1)) + 14
!---------------------------------------
! Transfers from storage arrays
!---------------------------------------
IT_1 = STOI(ISTOI + 3)
IT_2 = STOI(ISTOI + 4)
IT_3 = STOI(ISTOI + 5)
S1 = STOI(ISTOI + 6)
Idc = STOF(ISTOF + 4)
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Configuration of Models
!---------------------------------------
IF ( TIMEZERO ) THEN
FILENAME = 'Crowbar_prot_1.dta'
CALL EMTDC_OPENFILE
SECTION = 'DATADSD:'
CALL EMTDC_GOTOSECTION
ENDIF
!---------------------------------------
! Generated code from module definition
!---------------------------------------
!---------------------------------------
! Feedbacks and transfers to storage
!---------------------------------------
STOI(ISTOI + 2) = Blk
STOF(ISTOF + 1) = Ecap
STOF(ISTOF + 2) = Vdc_crowbar_on
STOF(ISTOF + 3) = Vdc_crowbar_off
STOI(ISTOI + 3) = IT_1
STOI(ISTOI + 4) = IT_2
STOI(ISTOI + 5) = IT_3
STOI(ISTOI + 6) = S1
STOF(ISTOF + 4) = Idc
!---------------------------------------
! Transfer to Exports
!---------------------------------------
S1o = S1
!---------------------------------------
! Close Model Data read
!---------------------------------------
!=======================================================================
SUBROUTINE Crowbar_prot_1Out()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 'emtstor.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's2.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'fnames.h'
INCLUDE 'radiolinks.h'
INCLUDE 'matlab.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Control Signals
REAL Idc, Icrowbar(3)
! Internal Variables
INTEGER IVD1_1
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER ISTOL, ISTOI, ISTOF, ISTOC, IT_0 ! Storage Indices
INTEGER ISUBS, SS(1), IBRCH(1), INODE ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
NTXFR = NTXFR + 1
ISTOL = TXFR(NTXFR,1)
ISTOI = TXFR(NTXFR,2)
ISTOF = TXFR(NTXFR,3)
ISTOC = TXFR(NTXFR,4)
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
NPGB = NPGB + 1
NCX = NCX + 0
INODE = NNODE + 2
NNODE = NNODE + 12
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
ISUBS = NSUBS + 0
NSUBS = NSUBS + 1
DO IT_0 = 1,1
SS(IT_0) = SUBS(ISUBS + IT_0)
END DO
IBRCH(1) = NBRCH(SS(1))
NBRCH(SS(1)) = NBRCH(SS(1)) + 14
!---------------------------------------
! Transfers from storage arrays
!---------------------------------------
Idc = STOF(ISTOF + 4)
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Configuration of Models
!---------------------------------------
IF ( TIMEZERO ) THEN
FILENAME = 'Crowbar_prot_1.dta'
CALL EMTDC_OPENFILE
SECTION = 'DATADSO:'
CALL EMTDC_GOTOSECTION
ENDIF
!---------------------------------------
! Generated code from module definition
!---------------------------------------
! 60:[multimeter] Multimeter
IVD1_1 = NRTCF
NRTCF = NRTCF + 5
Icrowbar(1) = (-CBR((IBRCH(1)+10), SS(1)))
Icrowbar(2) = (-CBR((IBRCH(1)+11), SS(1)))
Icrowbar(3) = (-CBR((IBRCH(1)+12), SS(1)))
!---------------------------------------
! Feedbacks and transfers to storage
!---------------------------------------
STOF(ISTOF + 4) = Idc
!---------------------------------------
! Close Model Data read
!---------------------------------------
!=======================================================================
SUBROUTINE Crowbar_prot_1Dyn_Begin()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'radiolinks.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
! Control Signals
! Internal Variables
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER IT_0 ! Storage Indices
INTEGER ICX ! Control/Monitoring
INTEGER ISUBS, SS(1), IBRCH(1), INODE ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
ICX = NCX
NCX = NCX + 1
INODE = NNODE + 2
NNODE = NNODE + 12
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
ISUBS = NSUBS + 0
NSUBS = NSUBS + 1
DO IT_0 = 1,1
SS(IT_0) = SUBS(ISUBS + IT_0)
END DO
! Initialize Branch Mapping.
IBRCH(1) = NBRCH(SS(1))
NBRCH(SS(1)) = NBRCH(SS(1)) + 14
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Generated code from module definition
!---------------------------------------
RETURN
END
!=======================================================================
SUBROUTINE Crowbar_prot_1Out_Begin()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'radiolinks.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
! Control Signals
! Internal Variables
INTEGER IVD1_1
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER IT_0 ! Storage Indices
INTEGER ISUBS, SS(1), IBRCH(1), INODE ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
NCX = NCX + 0
INODE = NNODE + 2
NNODE = NNODE + 12
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
! Initialize Subsystem Mapping
ISUBS = NSUBS + 0
NSUBS = NSUBS + 1
DO IT_0 = 1,1
SS(IT_0) = SUBS(ISUBS + IT_0)
END DO
IBRCH(1) = NBRCH(SS(1))
NBRCH(SS(1)) = NBRCH(SS(1)) + 14
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Generated code from module definition
!---------------------------------------
! 60:[multimeter] Multimeter
IVD1_1 = NRTCF
NRTCF = NRTCF + 5
RETURN
END