!*************************************************************************************!
! TITLE: CFVR5221 -Short term losses.Stronghold example.
! SUBTITLE:
!
! DESCRIPTION: The model is a prestressed beam with a length of 40 m.
! DESCRIPTION:
! DESCRIPTION: The beam is made of C20/25 concrete and the tendons are made of Y1860C steel.
! DESCRIPTION:
! DESCRIPTION: The section is rectangular 7 x 9.
! DESCRIPTION:
! DESCRIPTION: The aim of the example is to verify stress losses calculation.
!
! ELEMENT TYPE: BEAM44
! MODULES: PRSC NLBR
! UNITS: SI
! KEYWORD1: Beam
! KEYWORD2: Tendon
! KEYWORD3: Cross Section
! KEYWORD4: Prestressed Concrete
!
!*************************************************************************************!
  FINISH
  ~CFCLEAR,,1
  ~CFACTIV,NLBR,Y
  ~CFACTIV,PRSC,Y
  NomFile='CFVR5221'
  /TITLE, %NomFile%, Short term losses. Stronghold example.

! -------------------------------------------------------------------------------------
! Initial data
! -------------------------------------------------------------------------------------
  /PREP7
! Materials
  ~CFMP,1,LIB,CONCRETE,EC2,C20/25
  ~CFMP,1,EC2_C ,Ecm,,2.8169e+010,3
  ~CFMP,10,LIB,PREST,EN10138,Y1860C
  ~CFMP,10,Prest,MU ,,0.30
  ~CFMP,10,Prest,A  ,,4e-3
  ~CFMP,10,Prest,K  ,,3.3e-003

! Model definition
  Width = .7
  Length = 9.0
  ~CSECDMS,1,REC,1,Width,Length
  ~BMSHPRO,1,BEAM,1,1,,,44,1,1,,Beam 1

  N,1
  N,2,4.0,0
  N,3,8.0,0
  N,4,20.0,0
  N,5,32.0,0
  N,6,36.0,0
  N,7,40.0,0

  ET,1,BEAM44
  TYPE,1
  REAL,1
  MAT,1

  E,1,2
  E,2,3
  E,3,4
  E,4,5
  E,5,6
  E,6,7

! Capture support beam.
  ~SBBMDEF,1

! Prestressing tendons definition.
! Points
  ~PCPPDEF,1,1,2.8,0.0
  ~PCPPDEF,2,1,1.4,0.0
  ~PCPPDEF,3,1,0.0,0.0
  ~PCPPDEF,4,1,-1.4,0.0
  ~PCPPDEF,5,1,-2.8,0.0
  ~PCPPDEF,11,7,2.8,0.0
  ~PCPPDEF,12,7,1.4,0.0
  ~PCPPDEF,13,7,0.0,0.0
  ~PCPPDEF,14,7,-1.4,0.0
  ~PCPPDEF,15,7,-2.8,0.0

  ~PCEPDEF,1,1,Width/2-.05,0.0
  ~PCEPDEF,2,3,Width/2-.65,0.0
  ~PCEPDEF,3,4,Width/2-.65,0.0
  ~PCEPDEF,4,5,Width/2-.65,0.0
  ~PCEPDEF,5,7,Width/2-.05,0.0
  ~PCEPDEF,11,1,Width/2-.65,0.0
  ~PCEPDEF,15,7,Width/2-.65,0.0

  ! Tendons
  P0 = 1029000
  Area = 691e-6
  *DO,II,1,5
    ~PCTNDEF, II, 10,Area,.05,P0,P0
    ~PCTNMDF, II,METHOD,0
    ~PCTNMDF, II,ORDER,II
  *ENDDO

  *DO,II,1,5
    ~PCTNMDF,II,PADD,II
    ~PCTNMDF,II,PADD,10+II
  *ENDDO

  ~PCTNMDF,1,EADD,11
  ~PCTNMDF,1,EADD,15
  ~PCTNMDF,5,EADD,11
  ~PCTNMDF,5,EADD,15
  *DO,II,2,4
    ~PCTNMDF,II,EADD,1
    ~PCTNMDF,II,EADD,2
    ~PCTNMDF,II,EADD,4
    ~PCTNMDF,II,EADD,5
  *ENDDO

  ~PCTNMDF,2,EPAROUT,1
  ~PCTNMDF,2,EPARIN,4

  ! Stress losses calculation
  ~PCLOSS

!--------------------------------------------------------------------------------------
! DATA CHECK
!--------------------------------------------------------------------------------------
! Data comparison number
  NComp    = 10
  NComp_ch = 0

! Marix dim.
  *DIM,LABEL,CHAR,Ncomp,1
  *DIM,LABEL_CH,CHAR,Ncomp_ch,1
  *DIM,VALUE,,Ncomp,3
  *DIM,VALUE_CH,CHAR,Ncomp_ch,3
  *DIM,TOLER,,Ncomp,2

! Labels
!--------------------------------------------------------------------------------------
  LABEL( 1)  = 'L1C1N4'
  LABEL( 2)  = 'L1C2N4'
  LABEL( 3)  = 'L1C3N4'
  LABEL( 4)  = 'L1C4N4'
  LABEL( 5)  = 'L1C5N4'
  LABEL( 6)  = 'L2C1N1'
  LABEL( 7)  = 'L2C2N1'
  LABEL( 8)  = 'L2C3N1'
  LABEL( 9)  = 'L2C4N1'
  LABEL(10)  = 'L2C5N1'

! Correct data, obtained data
!--------------------------------------------------------------------------------------
  VALUE( 1,1) =  95311143.3     $  ~CFGET,value( 1,2),PRSCONC,,TENDON,LOSS,,1,4,1
  VALUE( 2,1) = 156454413.9     $  ~CFGET,value( 2,2),PRSCONC,,TENDON,LOSS,,2,4,1
  VALUE( 3,1) = 156454413.9     $  ~CFGET,value( 3,2),PRSCONC,,TENDON,LOSS,,3,4,1
  VALUE( 4,1) = 156454413.9     $  ~CFGET,value( 4,2),PRSCONC,,TENDON,LOSS,,4,4,1
  VALUE( 5,1) =  95311143.3     $  ~CFGET,value( 5,2),PRSCONC,,TENDON,LOSS,,5,4,1
  VALUE( 6,1) = 124934877.0     $  ~CFGET,value( 6,2),PRSCONC,,TENDON,LOSS,,1,1,2
  VALUE( 7,1) = 198609551.4     $  ~CFGET,value( 7,2),PRSCONC,,TENDON,LOSS,,2,1,2
  VALUE( 8,1) = 198609551.4     $  ~CFGET,value( 8,2),PRSCONC,,TENDON,LOSS,,3,1,2
  VALUE( 9,1) = 198609551.4     $  ~CFGET,value( 9,2),PRSCONC,,TENDON,LOSS,,4,1,2
  VALUE(10,1) = 124934877.0     $  ~CFGET,value(10,2),PRSCONC,,TENDON,LOSS,,5,1,2

! Warning and error tolerances
! Tolerances are high because an aproximate method has been used to
! calculate the anchorage slip losses for the correct data.
  *DO,II,1,NComp
    TOLER(II,1)  = 1E7
    TOLER(II,2)  = 1E7
  *ENDDO

!--------------------------------------------------------------------------------------
! Result comparison
!--------------------------------------------------------------------------------------
  COMPARA.MAC
