I'm having trouble running a displacement controlled axial compression/tension test on a fiber element. The code is configured to run with an elastic material right now but I would eventually like to test a Concrete04 fiber element. Can someone please provide some insight as to why this code will not run properly?
Thanks,
Andrew
# SET UP ----------------------------------------------------------------------------
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
# Create folder for collecting mass and modal information
set eigFolder EigOutput
file mkdir $eigFolder
# -----------------------------------
# GM direction combinations
# -----------------------------------
#Set the Ground Motion Directions (GM1:X+Y, GM2:X+Y+V, GM3:Y+X, GM4:Y+X+V)
set GMdir "GM1"
#########################################################################
# DEFINE UNITS--------------------------------------------------------------------------------
# Basic units are: in., kips, sec.
source LibUnits.tcl
source DisplayPlane.tcl; # procedure for displaying a plane in model
source DisplayModel2D.tcl; # procedure for displaying 3D perspectives of model
#########################################################################
# DEFINE GEOMETRY -------------------------------------------------------------------------
# define panel-geometry paramters
set fHeight 1; # Fiber Height
# calculate locations of nodes:
set X0 0;
set Y0 0;
set Y2 $fHeight;
# define nodal coordinates
# Base joint
#node 2 $X1 $Y0
node 1 $X0 $Y0
node 2 $X0 $Y2
# Save nodal coordinates
print origFiberGeo.txt -node
puts "Nodes Created"
#########################################################################
# BOUNDARY CONDITIONS------------------------------------------------------------------
fix 1 1 1 1
puts "Fixities Set"
#########################################################################
# ASSIGN CONSTRAINTS----------------------------------------------------------------------
# Constraints in x- and y- between nodes of rotational springs
# equalDOF $rNodeTag $cNodeTag $dof1 $dof2 ...
# $rNodeTag integer tag identifying the retained, or master node (rNode)
# $cNodeTag integer tag identifying the constrained, or slave node (cNode)
# equalDOF 1 2 1
# puts "Constraints Assigned"
#########################################################################
# DEFINE SPRING PROPERTIES-------------------------------------------------------------------------
# linear discrete spring
# uniaxialMaterial Concrete02 $matTag $fpc $epsc0 $fpcU $epsU $lambda $ft $Ets
set MasonryMatTag 1;
set E_0 [expr 305*$ksi];
set fpc [expr -0.9*$ksi];
set eps_c -0.6; # Read off of the stress-strain relationship in Anthoine et al.
set fpcu [expr -0.25*$ksi];
set epsU -2.0;
set lambda 5E-4;
set ft [expr 0.015*$ksi];
set Ets [expr 0.73*$ksi];
# uniaxialMaterial Concrete04 $matTag $fc $ec $ecu $Ec <$fct $et> <$beta>
#uniaxialMaterial Concrete04 $MasonryMatTag $fpc $eps_c $epsU $E_0 $ft 0.05
uniaxialMaterial Elastic $MasonryMatTag $E_0
puts "Fiber Material Defined"
#########################################################################
# DEFINE FIBER SECTION --------------------------------------------------------
# Discritize fiber sections for the horizontal and vertical directions
set FiberTag 2
set ExtremeFiberLoc 19;
puts "Extreme horizontal fiber location is : $ExtremeFiberLoc";
set FiberArea $pWidth;
section Fiber $HorizontalFiberTag {
#fiber $yLoc $zLoc $A $matTag
fiber [expr $ExtremeFiberLoc + 0.5 + 0.095] 0.0 [expr 0.38/2*$pWidth] $MasonryMatTag;
fiber $ExtremeFiberLoc 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-1] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-2] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-3] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-4] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-5] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-6] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-7] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-8] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-9] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-10] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-11] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-12] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-13] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-14] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-15] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-16] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-17] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-18] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-19] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-20] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-21] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-22] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-23] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-24] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-25] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-26] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-27] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-28] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-29] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-30] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-31] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-32] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-33] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-34] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-35] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-36] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-37] 0.0 $FiberArea $MasonryMatTag;
fiber [expr $ExtremeFiberLoc-38] 0.0 $FiberArea $MasonryMatTag;
fiber [expr -1*$ExtremeFiberLoc - 0.5 - 0.38/4] 0.0 [expr 0.38/2*$pWidth] $MasonryMatTag;
}
puts "Fiber Properties Defined"
#########################################################################
# GEOMETRIC TRANSFORMATION --------------------------------------------------------
# Set up geometric transformation for element
# Seperate columns and beams in case of P-Delta analysis for columns
set IDTransf 1;
geomTransf Linear $IDLinkTransf
puts "Geometric Transformation Complete"
#########################################################################
# ASSIGN ELEMENTS---------------------------------------------------------------------------
# Define Beam-Column elements
set np 10; # number of Gauss integration points for nonlinear curvature distribution
#########################################################################
# Nonlinear Elements
# Vertical Fiber Element
element nonlinearBeamColumn 12 1 2 $np $FiberTag $IDTransf
puts "Concrete Element Built"
DisplayModel2D
#########################################################################
# Start Pushover Analysis
set analysisType pushover
set Tol 0.00001
set dataDir PushoverData/ReversedCyclic/$SpecType
file mkdir ./$dataDir/
recorder Node -file $dataDir/TopElementDisp.out -time -node 2 -dof 1 2 disp;
# recorder Node <-file $fileName> <-xml $fileName> <-time> <-node $node1 $node2> <-nodeRange $startNode $endNode> <-region $RegionTag> <-node all> -dof ($dof1 $dof2) $respType
recorder Node -file $dataDir/BaseReaction.out -time -node 1 -dof 1 2 reaction;
# recorder Element <-file $fileName> <-time> <-ele ($ele1 $ele2)> <-eleRange $startEle $endEle> <-region $regTag> <-ele all> ($arg1 $arg2)
recorder Element -file $dataDir/VerticalFiberForces.out -time -ele 12 localForce;
# Fiber element Stress-Strain
# recorder Element -file ele1sec1StressStrain.out –time -ele 1 section 1 fiber $y $z <$matID> stressStrain
set yFib [expr $ExtremeFiberLoc + 0.5 + 0.095];
set zFib 0
# recorder Element -file Element1.out -time -ele 1 3 section 1 fiber 0.10 0.10 stressStrain
recorder Element -file $dataDir/FiberElementExtremeStressStrainBottom.out -time -ele 12 section 1 fiber $yFib $zFib stressStrain
recorder Element -file $dataDir/FiberElementCentroidStressStrainBottom.out -time -ele 12 section 1 fiber 0 0 stressStrain
recorder Element -file $dataDir/FiberElementExtremeStressStrainTop.out -time -ele 12 section 10 fiber $yFib $zFib stressStrain
recorder Element -file $dataDir/FiberElementCentroidStressStrainTop.out -time -ele 12 section 10 fiber 0 0 stressStrain
puts "\n"
puts "Start Axial Analysis"
puts "\n"
# we need to set up parameters that are particular to the model.
set IDctrlNode 2; # node where displacement is read for displacement control
set IDctrlDOF 2; # degree of freedom of displacement read for displacement control
# characteristics of cyclic analysis
set iDmax "0.001 0.0025 0.005 0.01 0.015 0.02"; # vector of displacement-cycle peaks, in terms of drift ratio
set Dincr [expr 0.0005*$fHeight]; # displacement increment for pushover. you want this to be very small, but not too small to slow down the analysis
set Fact $fHeight; # scale drift ratio by storey height for displacement cycles
set CycleType Push; # you can do Full / Push / Half cycles with the proc
set Ncycles Full; # specify the number of cycles at each peak
# create load pattern for lateral pushover load
set Hload 1.0; # define the lateral load as a proportion of the weight so that the pseudo time equals the lateral-load coefficient when using linear load pattern
set iPushNode "2"; # define nodes where lateral load is applied in static lateral analysis
pattern Plain 200 Linear {; # define load pattern -- generalized
foreach PushNode $iPushNode {
load $PushNode $Hload 0.0 0.0
}
}
# ----------- set up analysis parameters
source LibAnalysisStaticParameters.tcl; # constraintsHandler,DOFnumberer,system-ofequations,convergenceTest,solutionAlgorithm,integrator
# --------------------------------- perform Static Cyclic Displacements Analysis
source LibGeneratePeaks.tcl
set fmt1 "%s Cyclic analysis: CtrlNode %.3i, dof %.1i, Disp=%.4f %s"; # format for screen/file output of DONE/PROBLEM analysis
foreach Dmax $iDmax {
set iDstep [GeneratePeaks $Dmax $Dincr $CycleType $Fact]; # this proc is defined above
for {set i 1} {$i <= $Ncycles} {incr i 1} {
set zeroD 0
set D0 0.0
foreach Dstep $iDstep {
set D1 $Dstep
set Dincr [expr $D1 - $D0]
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
analysis Static
# ----------------------------------------------first analyze command------------------------
set ok [analyze 1]
# ----------------------------------------------if convergence failure-------------------------
if {$ok != 0} {
# if analysis fails, we try some other stuff
# performance is slower inside this loop global maxNumIterStatic; # max no. of iterations performed before "failure to converge" is ret'd
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 2000 0
algorithm Newton -initial
set ok [analyze 1]
test $testTypeStatic $TolStatic $maxNumIterStatic 0
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
set putout [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
puts $putout
return -1
}; # end if
}; # end if
# -----------------------------------------------------------------------------------------------------
set D0 $D1; # move to next step
}; # end Dstep
}; # end i
}; # end of iDmaxCycl
# -----------------------------------------------------------------------------------------------------
if {$ok != 0 } {
puts [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
} else {
puts [format $fmt1 "DONE" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
}
wipe
Fiber Element Axial Material Test
Moderators: silvia, selimgunay, Moderators
Re: Fiber Element Axial Material Test
Please note:
The line that reads "section Fiber $HorizontalFiberTag {" Should read "section Fiber $FiberTag {" but that does not affect the ability of the code to run.
Thanks,
Andrew
The line that reads "section Fiber $HorizontalFiberTag {" Should read "section Fiber $FiberTag {" but that does not affect the ability of the code to run.
Thanks,
Andrew
Re: Fiber Element Axial Material Test
What error message did you get?