Following is link contain APDL code for GFRC. It will be modified for better post processing result and topology optimization.
The preview of above inp file is show below.
This APDL code is available for mentoring. Comment for your suggestions and improvements.
!Ansys APDL for GFRC
!
!!
!=======================================================
!Start of Solution
!=======================================================
!
!***** Author: Engr. Faisal ur Rehman *****
!*** enggprog.com – Engineering Programs ***
!
!
!27-04-12
!
!License under GNU/GPL V3 – gnu.org/licenses/gpl.html
!
!——-
!Goals:
!——-
!What’s Achieved: Demo for APDL modeling to analysis to Postprocessing.
!What’s Next to be added: Stress Distribution on Cross-section, P Delta plot.
!
!
!=============================================================
!Note: Ignore Warnings. Analysis is non linear. Approx Analysis time is 3 minutes.
!=============================================================
!
!=============================================================
!Start of File
!=============================================================
!
/Title, GFRC – By FR
/PREP7
Length=3048
D=152.4 !152.4panel depth= 6inch
n=7 ! number of triangular openings (Type A in Report) at the bottom of the panel
Tt=12.7 ! 0.5 inch thick top leaf
Tb=12.7 ! 0.5 inch thick bot leaf
Tl=12.7 ! 0.5 inch thick truss leaf
Ll=142.875! 5-5/8 inch truss member length
Lc=25.4/4 ! chamfer length= 0.25 inch
Wt=2*sqrt(Ll**2-(D-Tt-Tb)**2)
theta=abs(atan((D-Tt-Tb)/(0.5*Wt)))
W=(n*Wt)+(2*Tt)+(2*(n-1)*Tl/sin(theta))
! FLAT BASE Isoceles triangle hole
p1x=0.5*Lc/sin(theta/2)
p1y=0
p2x=2*(D-Tt-Tb)/tan(theta)-Lc/2/sin(theta/2)
p2y=0
p3x=2*(D-Tt-Tb)/tan(theta)-Lc*cos(theta)/2/sin(theta/2)
p3y=Lc*sin(theta)/2/sin(theta/2)
p4x=(D-Tt-Tb)/tan(theta)+Lc/2
p4y=(D-Tt-Tb)-Lc*tan(theta)/2
p5x=(D-Tt-Tb)/tan(theta)-Lc/2
p5y=(D-Tt-Tb)-0.5*Lc*tan(theta)
p6x=Lc*cos(theta)/2/sin(theta/2)
p6y=Lc*sin(theta)/2/sin(theta/2)
! First egde triangle hole
p7x=0
p7y=Tl/cos(theta)+0.5*Lc/sin((45*3.141592654/180)-(theta/2))
p8x=0.5*Lc*sin(90*3.141592654/180+theta)/sin(45*3.141592654/180-theta/2)
p8y=Tl/cos(theta)+0.5*Lc*sin(theta)/sin(45*3.141592654/180-theta/2)
p9x=(D-Tt-Tb)/tan(theta)-Tl/sin(theta)-0.5*Lc*cos(theta)/sin(theta/2)
p9y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)
p10x=(0.5*Wt)-(Tl/sin(theta))-(0.5*Lc/sin(theta/2))
p10y=(D-Tt-Tb)
p11x=Lc*cos(45*3.141592654/180)
p11y=(D-Tt-Tb)
p12x=0
p12y=(D-Tt-Tb)-Lc*sin(45*3.141592654/180)
! Pointed Isoceles triangle hole
p13x=(D-Tt-Tb)/tan(theta)-Lc/2
p13y=Lc*tan(theta)/2
p14x=(D-Tt-Tb)/tan(theta)+Lc/2
p14y=Lc*tan(theta)/2
p15x=2*(D-Tt-Tb)/tan(theta)-Lc*cos(theta)/2/sin(theta/2)
p15y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)
p16x=2*(D-Tt-Tb)/tan(theta)-Lc/2/sin(theta/2)
p16y=(D-Tt-Tb)
p17x=0.5*Lc/sin(theta/2)
p17y=(D-Tt-Tb)
p18x=Lc*cos(theta)/2/sin(theta/2)
p18y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)
! Outer boundary of DPC panel
K,1,0,0
K,2,W,0
K,3,W,D
K,4,0,D
! Create Area for that
A,1,2,3,4
! Inner first corner hole of DPC panel
Tx=Tt
Ty=Tt
K,5,Tx+p7x,Ty+p7y
K,6,Tx+p8x,Ty+p8y
K,7,Tx+p9x,Ty+p9y
K,8,Tx+p10x,Ty+p10y
K,9,Tx+p11x,Ty+p11y
K,10,Tx+p12x,Ty+p12y
! Create Area for that
A,5,6,7,8,9,10
!Inner first flat base isosceles hole of DPC panel
Tx=Tt
Ty=Tt
K,11,Tx+p1x,Ty+p1y
K,12,Tx+p2x,Ty+p2y
K,13,Tx+p3x,Ty+p3y
K,14,Tx+p4x,Ty+p4y
K,15,Tx+p5x,Ty+p5y
K,16,Tx+p6x,Ty+p6y
! Create Area for that
A,11,12,13,14,15,16
! looping for n number of triangular areas
m=n-1
j=17
*do,i,1,m
Tx=Tt+Wt/2+Tl/sin(theta)+(i-1)*(Wt+2*Tl/sin(theta))
Ty=Tt
K,j,Tx+p13x,Ty+p13y
j1=j+1
K,j1,Tx+p14x,Ty+p14y
j2=j+2
K,j2,Tx+p15x, Ty+p15y
j3=j+3
K,j3,Tx+p16x,Ty+p16y
j4=j+4
K,j4,Tx+p17x,Ty+p17y
j5=j+5
K,j5,Tx+p18x,Ty+p18y
! Create Area, ID # i+3 th for that
A,j,j1,j2,j3,j4,j5
Tx=Tt+2*(Wt/2+Tl/sin(theta))+(i-1)*(Wt+2*Tl/sin(theta))
Ty=Tt
j6=j+6
K,j6,Tx+p1x,Ty+p1y
j7=j+7
K,j7,Tx+p2x,Ty+p2y
j8=j+8
K,j8,Tx+p3x,Ty+p3y
j9=j+9
K,j9,Tx+p4x,Ty+p4y
j10=j+10
K,j10,Tx+p5x,Ty+p5y
j11=j+11
K,j11,Tx+p6x,Ty+p6y
! Create Area, ID # i+4 th for that
A,j6,j7,j8,j9,j10,j11
!for next loop
j=j11+1
*enddo
! Inner last corner hole of DPC panel
Tx=W-Tt
Ty=Tt
j13=j
K,j13,Tx-p7x,Ty+p7y
j14=j+1
K,j14,Tx-p8x,Ty+p8y
j15=j+2
K,j15,Tx-p9x, Ty+p9y
j16=j+3
K,j16,Tx-p10x,Ty+p10y
j17=j+4
K,j17,Tx-p11x,Ty+p11y
j18=j+5
K,j18,Tx-p12x,Ty+p12y
! Create Area, ID # i+1 th for that
A,j13,j14,j15,j16,j17,j18
!
!================================================================
!End of Dimension Data Calc.
!================================================================
!
!
!================================================================
!Preprocessing
!================================================================
!
! subtract triangles from rectangle
ASBA, 1, ALL
!Copy areas to 3
!AGEN, ITIME, NA1, NA2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE
AGEN, 3, ALL,,,,,Length/3
!extrude to volume
!VEXT, NA1, NA2, NINC, DX, DY, DZ, RX, RY, RZ
VEXT,17,,,,,Length/3
VEXT,1,,,,,Length/3
VEXT,2,,,,,Length/3
!glue together all vols
VGLUE,1,2,3
! Define Element Type
ET,1,SOLID65 !concrete solid 65
! Define Material Properties
MP,EX,1,2.37e9 ! mp,Young’s modulus,material number,value
MP,PRXY,1,0.24 ! mp,Poisson’s ratio,materialnumber,value
MP,DENS,1,2.3e3 ! mp,mass density,material number,value
TB,CONCR,1 !non linear properties
!TBDATA,startlocation,ft,fc,fu(tensile),,fu(compressive)
!(startloc = 3 means first data = 3rd row i.e ft)
TBDATA,3,7.8e6,2.2e7,2.64e7,3.81e7,3.19e7,3.795e7
!meshing
ESIZE,100 !global size of mesh
MSHKEY,0
MSHAPE,1,3D
VMESH,ALL !create Volume mesh of vol
FINISH ! Finish pre-processing
!
!============================================================
!Finished Pre-processing
!============================================================
!
!
!============================================================
!Start of Solution
!============================================================
!
/SOLU ! Enter the solution processor
ANTYPE,0 ! Analysis type,static
! Define Displacement Constraints on Lines (dl command)
!Supports
DL,1,,ALL,0 !Fixed
DL,659,,UX,0 !UX and UY for 659 is for hinge
DL,659,,UY,0
!Applied Displacement Load
DL,285,,UY,-30
DL,473,,UY,-30
!NSUB,10,50,5
SOLVE ! Solve the problem
FINISH ! Finish the solution processor
SAVE ! Save your work to the database
!
!=========================================================
!End of Solution.
!=========================================================
!
!
!==========================================================
!Start of Postprocessing.
!==========================================================
!
/post1 ! Enter the general post processor
!/WIND,ALL,OFF
!/WIND,1,LTOP
!/WIND,2,RTOP
!/WIND,3,LBOT
!/WIND,4,RBOT
!GPLOT
!/GCMD,1, PLDISP,2 ! Plot the deformed and undeformed edge
!/GCMD,2, PLNSOL,U,SUM,0,1 ! Plot the deflection USUM
!/GCMD,3, PLNSOL,S,EQV,0,1 ! Plot the equivalent stress
!/GCMD,4, PLNSOL,EPTO,EQV,0,1 ! Plot the equivalent strain
!/CONT,2,10,0,,0.0036 ! Set contour ranges
!/CONT,3,10,0,,8
!/CONT,4,10,0,,0.05e-3
!/FOC,ALL,-0.340000,,,1 ! Focus point
!my post process plot
/WIND,ALL,OFF
/WIND,1,FULL
GPLOT
/GCMD,1, PLDISP,2 ! Plot the deformed and undeformed edge
/replot
PRNSOL,DOF, ! Prints the nodal solutions
!
!==========================================================
!End of Post Processing.
!==========================================================
!
!
!==========================================================
!EOF
!==========================================================
!