!******************************************************************************************************!
! TITLE: CFVR7116 - Bending + Axial force design according to NBR6118
! SUBTITLE: Design a reinforced concrete beam subjected to Bending + Axial force according to NBR6118
!
! DESCRIPTION: A fixed beam which has a pipe reinforced concrete section is subjected to
! DESCRIPTION: an axial compression force of 70.820 Mp and a bending moment of 52.620 m*Mp.
! DESCRIPTION:
! DESCRIPTION: The aim of the example is to obtain the necessary steel amount according to NBR6118.
!
! ELEMENT TYPE: BEAM4
! MODULES:
! UNITS: User
! KEYWORD1: Beam
! KEYWORD2: Cross Section
! KEYWORD3: Code Checking/Design
! KEYWORD4: Reinforced Concrete
! KEYWORD5: NBR 6118
!
!******************************************************************************************************!
   FINISH
  ~CFCLEAR,,1
   NomFile='CFVR7116'
   /TITLE,%NomFile%, BENDING + AXIAL FORCE DESIGN ACCORDING TO NBR6118

! -------------------------------------------------------------------------------------
! Initial data
! -------------------------------------------------------------------------------------
! CivilFEM SETUP
 ~UNITS,,LENG,M
 ~UNITS,,TIME,S
 ~UNITS,,FORC,MP
 ~CODESEL,EC3-92,NBR6118,,,EC8-94

! Preprocessor
  /PREP7

! Material Definition
 ~CFMP,1,LIB,CONCRETE,NBR6118,C25
 ~CFMP,2,LIB,REINF,NBR6118,CA50

! Element Type Definition
  ET,1,Beam4                            ! Element Type 1: 3D Beam

! Cross-section definition
 ~CSECDMS,1,PIPE,1,0.6,0.15
! Reinforcement definition
 ~RNFDEF,1,1,2,1,0,0.046,1e-3           ! Total Reinf.area=10cm^2
! Beam & Shell property
 ~BMSHPRO,1,BEAM,1,,,,4,1

! Model Construction
  N,1                                   ! Nodes input
  N,5,5
  FILL,1,5
  E,1,2                                 ! Elements input
  EGEN,4,1,1,1
  D,1,ALL                               ! Boundary conditions

/SOLU
  M=52.620            ! 52.620 m*Mp bending moment
  H=-70.820           ! 70.820 Mp axial compression force
  F,5,FX,H
  F,5,MZ,M
  SOLVE               ! Calculation

/POST1

! Postprocessor
  ~CFSET,,1,1         ! Read first load step

! Bending + Axial design according to NBR6118
  ~DIMCON,3DB,,,2,8

!--------------------------------------------------------------------------------------
! 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) = 'CRTC2D_I'
  LABEL(2,1) = 'CRTC2D_J'

! Correct values
  VALUE(1,1)=1.00
  VALUE(2,1)=5.281

! Comparison
 ~PLLSCON,CRT_TOT
 *GET,VALUE(1,2),ELEM,4,ETAB,CFETAB_I
 ~PLLSCON,REINFACT
 *GET,VALUE(2,2),ELEM,4,ETAB,CFETAB_J

! Warning and error tolerances
  TOLER( 1, 1)= 3E-01 $ TOLER( 1, 2)= 5E-01
  TOLER( 2, 1)= 3E-01 $ TOLER( 2, 2)= 5E-01

!--------------------------------------------------------------------------------------
! Results comparison
!--------------------------------------------------------------------------------------
  COMPARA.MAC
