missing operator at _@_ error in dynamic 2D Stress Analysis

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

Moderators: silvia, selimgunay, Moderators

Post Reply
AnnaKowal
Posts: 14
Joined: Thu Oct 25, 2018 12:54 pm
Location: University of Otago

missing operator at _@_ error in dynamic 2D Stress Analysis

Post by AnnaKowal »

Hi,

I am trying to run Dynamic 2D Stress Analysis using the script:
after defining soil nodes, layers parameters, soil materials (all layers elastic isotropic), quad elements:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------
# 7. DEFINE ANALYSIS PARAMETERS
#-----------------------------------------------------------------------------------------

#---GROUND MOTION PARAMETERS
# time step in ground motion record
set motiondT 0.005
# number of steps in ground motion record
set nSteps 24000

#---RAYLEIGH DAMPING PARAMETERS
set pi 3.141592654
# damping ratio
set damp 0.01
# lower frequency
set omega1 [expr 2*$pi*0.0]
# upper frequency
set omega2 [expr 2*$pi*15]
# damping coefficients
set a0 [expr 2*$damp*$omega1*$omega2/($omega1 + $omega2)]
set a1 [expr 2*$damp/($omega1 + $omega2)]
puts "damping coefficients: a_0 = $a0; a_1 = $a1"


set dT $motiondT

#---ANALYSIS PARAMETERS
# Newmark parameters
set gamma 0.5
set beta 0.25

#puts "Finished defyning analysis parameters..."

#-----------------------------------------------------------------------------------------
# 9. CREATE POST-GRAVITY RECORDERS
#-----------------------------------------------------------------------------------------
# reset time and analysis
setTime 0.0
wipeAnalysis
remove recorders

# recorder time step
set recdT [expr 1.0*$motiondT]

# record nodal displacment, acceleration, and porepressure
recorder Node -file displacement_Dunedin_StBeach.out -time -dT $recdT -nodeRange 1 16647 -dof 1 2 disp
recorder Node -file acceleration_Dunedin_StBeach.out -time -dT $recdT -nodeRange 1 16647 -dof 1 2 accel
recorder Node -file velocity_Dunedin_StBeach.out -time -dT $recdT -nodeRange 1 16647 -dof 1 2 vel
recorder Node -file vel_surface.out -time -dT $recdT -region 1 -dof 1 2 vel
recorder Node -file acc_surface.out -time -dT $recdT -region 1 -dof 1 2 accel
recorder Node -file dis_surface.out -time -dT $recdT -region 1 -dof 1 2 disp

# record elemental stress and strain
recorder Element -file stress1_soil_Dunedin_StBeach.out -time -dT $recdT -ele 301 356 649 931 1170 1497 1626 1859 2113 2156 2520 2680 2905 2918 3140 material 1 stress
recorder Element -file strain1_soil_Dunedin_StBeach.out -time -dT $recdT -ele 301 356 649 931 1170 1497 1626 1859 2113 2156 2520 2680 2905 2918 3140 material 1 strain
puts "Finished creating all recorders..."

#-----------------------------------------------------------------------------------------
# 10. DYNAMIC ANALYSIS
#-----------------------------------------------------------------------------------------

# define constant scaling factor for applied velocity
set cFactorH [expr 1.00*$baseArea*$dashpotCoeff_s]

# define velocity time history file
set velocityFileH /Users/annakowal/Documents/2D_site_analysis/deconvolution/Kettle_park_beach/VelocityHistory_4_OpenSees/01_Akatore_centr_NS_deconv.out

# timeseries object for force history
set mSeriesH "Path -dt $motiondT -filePath $velocityFileH -factor $cFactorH"

# loading object
pattern Plain 10 $mSeriesH {
load 18 0.50 0.00
load 172 1.00 0.00
load 147 1.00 0.00
load 197 1.00 0.00
load 146 1.00 0.00
load 152 1.00 0.00
load 145 1.00 0.00
load 151 1.00 0.00
load 144 1.00 0.00
load 153 1.00 0.00
load 143 1.00 0.00
load 171 1.00 0.00
load 142 1.00 0.00
load 148 1.00 0.00
load 141 1.00 0.00
load 162 1.00 0.00
load 140 1.00 0.00
load 195 1.00 0.00
load 139 1.00 0.00
load 178 1.00 0.00
load 138 1.00 0.00
load 194 1.00 0.00
load 137 1.00 0.00
load 159 1.00 0.00
load 136 1.00 0.00
load 198 1.00 0.00
load 135 1.00 0.00
load 150 1.00 0.00
load 134 1.00 0.00
load 157 1.00 0.00
load 133 1.00 0.00
load 185 1.00 0.00
load 132 1.00 0.00
load 181 1.00 0.00
load 131 1.00 0.00
load 167 1.00 0.00
load 130 1.00 0.00
load 175 1.00 0.00
load 129 1.00 0.00
load 161 1.00 0.00
load 128 1.00 0.00
load 192 1.00 0.00
load 127 1.00 0.00
load 188 1.00 0.00
load 126 1.00 0.00
load 163 1.00 0.00
load 125 1.00 0.00
load 174 1.00 0.00
load 124 1.00 0.00
load 166 1.00 0.00
load 123 1.00 0.00
load 183 1.00 0.00
load 122 1.00 0.00
load 189 1.00 0.00
load 121 1.00 0.00
load 158 1.00 0.00
load 120 1.00 0.00
load 177 1.00 0.00
load 119 1.00 0.00
load 169 1.00 0.00
load 118 1.00 0.00
load 179 1.00 0.00
load 117 1.00 0.00
load 182 1.00 0.00
load 116 1.00 0.00
load 155 1.00 0.00
load 115 1.00 0.00
load 156 1.00 0.00
load 114 1.00 0.00
load 184 1.00 0.00
load 113 1.00 0.00
load 180 1.00 0.00
load 112 1.00 0.00
load 168 1.00 0.00
load 111 1.00 0.00
load 176 1.00 0.00
load 110 1.00 0.00
load 160 1.00 0.00
load 109 1.00 0.00
load 191 1.00 0.00
load 108 1.00 0.00
load 187 1.00 0.00
load 107 1.00 0.00
load 164 1.00 0.00
load 106 1.00 0.00
load 173 1.00 0.00
load 105 1.00 0.00
load 165 1.00 0.00
load 104 1.00 0.00
load 186 1.00 0.00
load 103 1.00 0.00
load 190 1.00 0.00
load 102 1.00 0.00
load 196 1.00 0.00
load 101 1.00 0.00
load 154 1.00 0.00
load 100 1.00 0.00
load 199 1.00 0.00
load 99 1.00 0.00
load 149 1.00 0.00
load 98 1.00 0.00
load 170 1.00 0.00
load 97 1.00 0.00
load 193 1.00 0.00
load 2 0.50 0.00

puts "Dynamic loading created..."


constraints Penalty 1.e20 1.e20
test NormDispIncr 1e-4 35 1
algorithm ModifiedNewton
numberer RCM
system ProfileSPD
integrator Newmark $gamma $beta
rayleigh $a0 $a1 0.0 0.0
analysis Transient

# perform analysis with timestep reduction loop
set ok [analyze $nSteps $dT]

# if analysis fails, reduce timestep and continue with analysis
if {$ok != 0} {
puts "did not converge, reducing time step"
set curTime [getTime]
puts "curTime: $curTime"
set curStep [expr $curTime/$motiondT ]
puts "curStep: $curStep"
set remStep [expr int(($nSteps-$curStep)*2.0)]
puts "remStep: $remStep"
set motiondT [expr $motiondT /2.0]
puts "motiondT : $motiondT "

set ok [analyze $remStep $motiondT ]

# if analysis fails again, reduce timestep and continue with analysis
if {$ok != 0} {
puts "did not converge, reducing time step"
set curTime [getTime]
puts "curTime: $curTime"
set curStep [expr $curTime/$motiondT ]
puts "curStep: $curStep"
set remStep [expr int(($remStep-$curStep)*2.0)]
puts "remStep: $remStep"
set motiondT [expr $motiondT 2.0]
puts "motiondT : $motiondT "

analyze $remStep $motiondT
}
}
set endT [clock seconds]
puts "Finished with dynamic analysis..."
puts "Analysis execution time: [expr $endT-$startT] seconds"

wipe
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I got a message:

WARNING: CTestNormDispIncr::test() - failed to converge
after: 35 iterations current Norm: 0.000115611 (max: 0.0001, Norm deltaR: 8332.1)
ModifiedNewton::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 1.6
OpenSees > analyze failed, returned: -3 error flag
did not converge, reducing time step
curTime: 1.595000
curStep: 319.0
remStep: 47362
motiondT : 0.0025

.. and then after next 35 iterations:

WARNING: CTestNormDispIncr::test() - failed to converge
after: 35 iterations current Norm: 0.000690046 (max: 0.0001, Norm deltaR: 34676.5)
ModifiedNewton::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 1.605
OpenSees > analyze failed, returned: -3 error flag
did not converge, reducing time step
curTime: 1.602500
curStep: 641.0
remStep: 93442
missing operator at _@_
in expression "0.0025 _@_2.0"

Can anyone help me understand what could go wrong and where should I look for an error.
Many thanks,
Anna
AnnaKowal
Posts: 14
Joined: Thu Oct 25, 2018 12:54 pm
Location: University of Otago

Re: missing operator at _@_ error in dynamic 2D Stress Analysis

Post by AnnaKowal »

That issue has been solved. The mistake was pretty trivial.
In line
set motiondT [expr $motiondT 2.0] ... the operator "/" was missing, so it should be
set motiondT [expr $motiondT/ 2.0].
Post Reply