!*************************************************************************************!
! TITLE: CFVR7283 - Torsion design according to ACI 349 13
! SUBTITLE: Design a reinforced concrete beam subjected to Torsion moment according to ACI 349 13
!
! DESCRIPTION: A fixed beam which has a rectangular reinforced concrete section is subjected to
! DESCRIPTION: a shear force of 7.52 Mp and a torsional moment of 1.52 Mp*m.
! DESCRIPTION:
! DESCRIPTION: The aim of the example is to obtain the necessary steel amount according to ACI 349 13.
!
! ELEMENT TYPE: BEAM4
! MODULES:
! UNITS: User
! KEYWORD1: Beam
! KEYWORD2: Cross Section
! KEYWORD3: Code Checking/Design
! KEYWORD4: Reinforced Concrete
! KEYWORD5: ACI 349 13
!
!*************************************************************************************!
   FINISH
  ~CFCLEAR,,1
   NomFile='CFVR7283'
 /TITLE,%NomFile%, TORSION DESIGN ACCORDING TO ACI 349 13

! -------------------------------------------------------------------------------------
! Initial data
! -------------------------------------------------------------------------------------
! CivilFEM SETUP
~UNITS,,LENG,M
~UNITS,,TIME,S
~UNITS,,FORC,MP
~CODESEL,EC3-05,ACI34913,EC2-08,,EC8-04

! Preprocessor
  /PREP7

! Parameters
  L=1              ! Length in m
  b=.4             ! Cross-section width in m.
  h=.3             ! Depth in m.
  T=0.95*1.6       ! Torsional moment in Mp*m
  Q=4.7*1.6        ! Maximum concomitant design shear force in Mp

! Material Definition
 ~CFMP,1,LIB,CONCRETE,ACI,fc_3500
 ~CFMP,2,LIB,REINF,ACI,fy_60000

! Element Type Definition
  ET,1,Beam4                           ! Element Type 1: 3D Beam

! Cross-section definition
 ~CSECDMS,1,REC,1,0.3,0.4
! Reinforcement definition
 ~RNFDEF,1,TORSION,2,1e-4, , , ,1e-4, ,

! Beam properties
  ~BMSHPRO,1,BEAM,1,1,,,4,0,0,,Beam properties

! Model Construction
  N,1                                  ! Nodes input
  N,5,L
  FILL,1,5
  E,1,2                                ! Elements input
  EGEN,4,1,1,1
  D,1,ALL                              ! Boundary conditions

/SOLU
  F,5,FY,-Q
  F,5,MX,T
  SOLVE               ! Calculation

/POST1

! Postprocessor
  ~CFSET,,1,1       ! Read first load step

! Torsion design according to ACI
~DIMCON,SHT,TORSION,0, , , , ,1, , , ,0

!---------------------------------------------------------------------------------------
! DATA CHECK
!--------------------------------------------------------------------------------------
! Data comparison number
  NComp = 2
  NComp_ch = 0

! Matrix 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,1) = 'ASLT'
  LABEL(2,1) = 'ASTT'

! Correct values
  VALUE(1,1)=4.34E-4
  VALUE(2,1)=4.027E-4 

! Comparison
  ~PLLSCON,ASLT
 *GET,VALUE(1,2),ELEM,4,ETAB,CFETAB_J
  ~PLLSCON,ASTT
  *GET,VALUE(2,2),ELEM,4,ETAB,CFETAB_J

! Warning and error tolerances
  TOLER( 1, 1)= 1E-05 $ TOLER( 1, 2)= 1E-05
  TOLER( 2, 1)= 1E-05 $ TOLER( 2, 2)= 1E-05

!--------------------------------------------------------------------------------------
! Results comparison
!--------------------------------------------------------------------------------------
  COMPARA.MAC
