!*************************************************************************************!
! TITLE: CFVR1321 - Biaxial Bending + Axial force checking according to ACI 318
! SUBTITLE: check a reinforced concrete beam subjected to Biaxial Bending + Axial force according to ACI 318
!
! DESCRIPTION: A fixed beam which has a T reinforced concrete section is subjected to
! DESCRIPTION: an axial compression force of 106.23 Mp, a bending moment of 10 m*Mp on the Z axis direction,
! DESCRIPTION: and a bending moment of 7.5 m*Mp on the Y axis direction.
! DESCRIPTION:
! DESCRIPTION: The aim of the example is to obtain the check criterion according to ACI 318.
!
! ELEMENT TYPE: BEAM4
! MODULES:
! UNITS: User
! KEYWORD1: Beam
! KEYWORD2: Cross Section
! KEYWORD3: Code Checking/Design
! KEYWORD4: Reinforced Concrete
! KEYWORD5: ACI 318
!
!*************************************************************************************!
   FINISH
  ~CFCLEAR,,1
   NomFile='CFVR1321'
 /TITLE,%NomFile%, Biaxial BENDING + AXIAL FORCE CHECKING ACI 318

! -------------------------------------------------------------------------------------
! Initial data
! -------------------------------------------------------------------------------------
! CivilFEM SETUP
 ~UNITS,BIN
 ~CODESEL,,ACI
 
 ! Parameters
  Ec_ACI=38202000 ! Psi
  
! Preprocessor
  /PREP7

! Material Definition
 ~CFMP,1,LIB,CONCRETE,ACI,fc_3500
 ~CFMP,1,USER
 ~CFMP,1,ACI_C   ,Ec      ,,  Ec_ACI,7,0,0
 ~CFMP,2,LIB,REINF,ACI,fy_70000
 
 FINISH
 ~UNITS,,LENG,M
 ~UNITS,,TIME,S
 ~UNITS,,FORC,MP
 
 /PREP7
! Element Type Definition
  ET,1,Beam4                            ! Element Type 1: 3D Beam

! Cross-section definition
 ~CSECDMS,1,T,1,0.5,0.2,0.45,0.15
! Reinforcement definition
 ~RNFDEF,1,1,2,2,0,0.046,0.5120E-2
! Beam & Shell property
 ~SECMDF,1,STRPROP,ASEC,,7   
 ~BMSHPRO,1,BEAM,1,1,,,4,1,0,,Beam property

! 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
  M1=10				       ! 72.31 Kip*ft bending moment
  M2=7.5		           ! 54.23 Kip*ft bending moment
  H=-106.23                ! 234.18 Kip axial force
  F,5,FX,H
  F,5,MZ,M1
  F,5,MY,M2
  SOLVE               ! Calculation

/POST1

! Postprocessor
  ~CFSET,,1,1         ! Read first load step

! Biaxial Bending + Axial force checking according to ACI 318
  ~CHKCON,3DB

!--------------------------------------------------------------------------------------
! 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) = 'CRTC3D_I'
  LABEL(2,1) = 'CRTC3D_J'

! Correct values
  VALUE(1,1)=1.074
  VALUE(2,1)=1.074

! Comparison
 ~PLLSCON,CRT_TOT
 *GET,VALUE(1,2),ELEM,4,ETAB,CFETAB_I
 *GET,VALUE(2,2),ELEM,4,ETAB,CFETAB_J

! Warning and error tolerances
  TOLER( 1, 1)= 1E-02 $ TOLER( 1, 2)= 1E-02
  TOLER( 2, 1)= 1E-02 $ TOLER( 2, 2)= 1E-02

!--------------------------------------------------------------------------------------
! Results comparison
!--------------------------------------------------------------------------------------
  COMPARA.MAC
