Segmentation fault and bus errors opensees.exe

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
abira
Posts: 33
Joined: Mon Feb 03, 2020 10:26 pm

Segmentation fault and bus errors opensees.exe

Post by abira » Tue Sep 01, 2020 9:24 am

I am running a transient dynamic analysis under an element removal scenario in opensees. I am repeatedly getting segmentation faults and bus errors. Can someone help me with resolving the errors? I have pasted the script below

####################################################################
# 2- Storey 3- Bay frame to understand Progressive/Disproportioante Collapse #
####################################################################

wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
set dataDir PortalFrame_SMF; # set up name of data directory (you can remove this)
file mkdir $dataDir; # create data directory
source Units.tcl; # define units
source Wsection.tcl; # procedure to define fiber Wide Beam section

# DEFINE GEOMETRY
set LCol [expr 2*$m];
set LBeam [expr 3*$m]; #c/c distance between 2 columns

# NODES
node 1 0.0 0.0
node 2 $LBeam 0.0
node 3 [expr 2*$LBeam] 0.0
node 4 [expr 3*$LBeam] 0.0
node 5 0.0 $LCol
node 6 $LBeam $LCol
node 7 [expr 2*$LBeam] $LCol
node 8 [expr 3*$LBeam] $LCol
node 9 0.0 [expr 2*$LCol]
node 10 $LBeam [expr 2*$LCol]
node 11 [expr 2*$LBeam] [expr 2*$LCol]
node 12 [expr 3*$LBeam] [expr 2*$LCol]

# BOUNDARY CONDITIONS
fix 1 1 1 1
fix 2 1 1 1
fix 3 1 1 1
fix 4 1 1 1

# Define GRAVITY LOADS, weight and masses
# calculate dead load of frame, assume this to be an internal frame (do LL in a similar manner)
# calculate distributed weight along the beam length
set QdlBeam [expr 1371.83*$N/$m]; # W-section weight per length
set QdlCol [expr 1911.8*$N/$m]; # W-section weight per length
set WeightCol [expr $QdlCol*$LCol]; # total Column weight
set WeightBeam [expr $QdlBeam*$LBeam]; # total Beam weight
set massS [expr 0.5*($QdlCol+$QdlBeam+$QdlCol)/$g];
set massM [expr ($QdlBeam+$QdlCol)/$g];
set massT [expr 0.5*($QdlBeam+$QdlCol)/$g];
set massTM [expr 0.5*($QdlCol + $QdlBeam +$QdlBeam)/$g];
# Mass
set massC [expr $QdlCol/$g];
set massB [expr $QdlBeam/$g];
# Nodal Masses
mass 5 0.0 $massS 0.0;
mass 6 0.0 $massM 0.0;
mass 7 0.0 $massM 0.0;
mass 8 0.0 $massS 0.0;
mass 9 0.0 $massT 0.0;
mass 10 0.0 $massTM 0.0;
mass 11 0.0 $massTM 0.0;
mass 12 0.0 $massT 0.0;
# Define ELEMENTS & SECTIONS
set ColSecTag 1; # assign a tag number to the column section tag
set ColMatTagFlex 2; # assign a tag number to the column flexural behavior
set ColMatTagAxial 3; # assign a tag number to the column axial behavior
set BeamSecTag 4; # assign a tag number to the beam section tag
set BeamMatTagFlex 5; # assign a tag number to the beam flexural behavior
set BeamMatTagAxial 6; # assign a tag number to the beam axial behavior

# MATERIAL PROPERTIES
set Fy [expr 345*$MPa]; #ASTM A992 structural steel for Beams and Columns
set fy [expr 245*$MPa]; #ASTM A36 steel for shear tabs and continuity plates at the beam column joints
set E0 [expr 2e5*$MPa]; # Steel Young's Modulus
set b 0.01
set matIDsteel 1;
uniaxialMaterial Steel01 $matIDsteel $Fy $E0 $b
# ELEMENT properties
# Structural-Steel W-section properties
# COLUMN SECTIONS : W24x131
set d [expr 0.621792*$m]; # depth
set bf [expr 0.326517*$m]; # flange width
set tf [expr 0.024384*$m]; # flange thickness
set tw [expr 0.015367*$m]; # web thickness
set nfdw 16; # number of fibers along dw
set nftw 2; # number of fibers along tw
set nfbf 16; # number of fibers along bf
set nftf 4; # number of fibers along tf
Wsection $ColSecTag $matIDsteel $d $bf $tf $tw $nfdw $nftw $nfbf $nftf

# BEAM SECTIONS: W24x94
set d [expr 0.617474*$m]; # depth
set bf [expr 0.230251*$m]; # flange width
set tf [expr 0.022225*$m]; # flange thickness
set tw [expr 0.013081*$m]; # web thickness
set nfdw 16; # number of fibers along dw
set nftw 2; # number of fibers along tw
set nfbf 16; # number of fibers along bf
set nftf 4; # number of fibers along tf
Wsection $BeamSecTag $matIDsteel $d $bf $tf $tw $nfdw $nftw $nfbf $nftf

# define ELEMENTS
# set up geometric transformations of element
# separate columns and beams, in case of P-Delta analysis for columns
set IDColTransf 1; # all columns
set IDBeamTransf 2; # all beams
set ColTransfType Corotational; # options, Corotational PDelta Corotational
set BeamTransfType Corotational;
geomTransf $ColTransfType $IDColTransf ;
geomTransf $BeamTransfType $IDBeamTransf;

# Define Beam-Column Elements
set np 5; # number of Gauss integration points for nonlinear curvature distribution-- np=2 for linear distribution ok
# COLUMNS
element nonlinearBeamColumn 1 1 5 $np $ColSecTag $IDColTransf;
element nonlinearBeamColumn 2 5 9 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 3 2 6 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 4 6 10 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 5 3 7 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 6 7 11 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 7 4 8 $np $ColSecTag $IDColTransf ;
element nonlinearBeamColumn 8 8 12 $np $ColSecTag $IDColTransf;
# BEAMS
element nonlinearBeamColumn 9 5 6 $np $BeamSecTag $IDBeamTransf;
element nonlinearBeamColumn 10 6 7 $np $BeamSecTag $IDBeamTransf ;
element nonlinearBeamColumn 11 7 8 $np $BeamSecTag $IDBeamTransf ;
element nonlinearBeamColumn 12 9 10 $np $BeamSecTag $IDBeamTransf ;
element nonlinearBeamColumn 13 10 11 $np $BeamSecTag $IDBeamTransf ;
element nonlinearBeamColumn 14 11 12 $np $BeamSecTag $IDBeamTransf ;

# Define RECORDERS#
recorder Node -file $dataDir/DispNode5.txt -time -node 6 -dof 1 2 3 disp;
recorder Element -file $dataDir/ForceBeam1.txt -time -ele 9 globalForce;
recorder Element -file $dataDir/ForceBeam4.txt -time -ele 11 globalForce;
recorder Element -file $dataDir/ForceCol5.txt -time -ele 1 globalForce;
recorder Element -file $dataDir/ForceCol4.txt -time -ele 2 globalForce;
recorder Element -file $dataDir/ForceCol1.txt -time -ele 4 globalForce;
# Apply Gravity loads
pattern Plain 1 Linear {;
#Dead Loads
eleLoad -ele 9 10 11 12 13 14 -type beamUniform -$QdlBeam 0.0 0.0;
eleLoad -ele 1 2 3 4 5 6 7 8 -type beamUniform 0.0 -$QdlCol 0.0;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-8; # convergence tolerance for test
variable constraintsTypeGravity Plain; # default;
constraints $constraintsTypeGravity ; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral ; # how to store and solve the system of equations in the analysis (large model: try UmfPack)
test NormDispIncr $Tol 10 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1./$NstepGravity]; # first load increment;
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
loadConst -time;
puts "Model Built"

##############################################
# TRANSIENT DYNAMIC ANALYSIS #
##############################################
source LibAnalysisDynamicParameters.tcl
remove element 13
set EV [eigen 1];
puts $EV
set omega [expr pow($EV,0.5)];
set T [expr 2*$pi/$omega];
set TmaxAnalysis [expr 40*$T]
set dTAnalysis [expr $T/5];
set Nsteps [expr int($TmaxAnalysis/$dTAnalysis)]
rayleigh 0. 0. 0. [expr 2*0.02/$omega];
analyze $Nsteps $dTAnalysis;

mhscott
Posts: 874
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Segmentation fault and bus errors opensees.exe

Post by mhscott » Tue Sep 01, 2020 9:28 am

You probably have to remove the recorder associated with element 13 (the element you removed).

mhscott
Posts: 874
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Segmentation fault and bus errors opensees.exe

Post by mhscott » Tue Sep 01, 2020 9:32 am

Sorry, I meant eleLoad, not recorder.

abira
Posts: 33
Joined: Mon Feb 03, 2020 10:26 pm

Re: Segmentation fault and bus errors opensees.exe

Post by abira » Tue Sep 01, 2020 9:37 am

Ok. Thank you for your answer. I'll try it.

selimgunay
Posts: 913
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Segmentation fault and bus errors opensees.exe

Post by selimgunay » Tue Sep 01, 2020 9:45 am

If there are any dangling nodes or anything else that needs to be removed as a result of the removal of the element, you should also remove them.

There will be a redistribution of gravity loads after the element is removed. I am not sure if you can capture it when you remove the elements right after gravity loading. It may be a good idea to run a few steps of the transient analysis first and remove the element afterwards, not directly before the start of the transient analysis

abira
Posts: 33
Joined: Mon Feb 03, 2020 10:26 pm

Re: Segmentation fault and bus errors opensees.exe

Post by abira » Tue Sep 01, 2020 9:48 am

Thankyou sir. I will try it.

Post Reply