Problem about element stress (strain) output

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

Moderators: silvia, selimgunay, Moderators

Post Reply
michaelshu
Posts: 7
Joined: Mon Oct 30, 2006 5:24 am
Location: zhe jiang university

Problem about element stress (strain) output

Post by michaelshu »

I'm a beginner.when I runned the program downloaded form the site with opensees version 1.73,I cann't get the element results by recorder command as the example showed.It didn't create the files ,such as stress1.out ,strain1.out and so on.The script is posted below,what's wrong with it?Thank you very much!

Code: Select all

#SI units (m, s, KN, ton)
#
#         4     3
#         ------- 
#         |     |
#         |     |
#         |     |
#        1-------2   (nodes 1 and 2 fixed)
#         ^     ^
#          <--> input motion: sinusoidal acceleration at base
wipe
#
#some user defined variables
# 
set accMul   9.81     ;
set massDen  2.000      ;# solid mass density
set fluidDen 1.0        ;# fluid mass density
set massProportionalDamping   0.0 ;
set stiffnessProportionalDamping 0.001 ;
set cohesion 30 ;
set peakShearStrain 0.1 ;
set E1      90000.0      ;#Young's modulus
set poisson1 0.40 ;
set G [expr $E1/(2*(1+$poisson1))] ;
set B [expr $E1/(3*(1-2*$poisson1))] ;
set press    0        ;# isotropic consolidation pressure on quad element(s)
set period   1        ;# Period of applied sinusoidal load
set deltaT   0.01     ;# time step for analysis
set numSteps 2000     ;# Number of analysis steps
set gamma    0.5      ;# Newmark integration parameter
set pi 3.1415926535     ;
set inclination 0       ;
set unitWeightX [expr  ($massDen-$fluidDen)*9.81*sin($inclination/180.0*$pi)] ;# buoyant unit weight in X direction
set unitWeightY [expr -($massDen-$fluidDen)*9.81*cos($inclination/180.0*$pi)] ;# buoyant unit weight in Y direction
#############################################################

#create the ModelBuilder
model basic -ndm 2 -ndf 2

# define material and properties
nDMaterial PressureIndependMultiYield 2 2 $massDen $G $B  $cohesion $peakShearStrain
nDMaterial FluidSolidPorous 1 2 2 2.2e6

updateMaterialStage -material 1 -stage 0
updateMaterialStage -material 2 -stage 0
    
# define the nodes
node 1   0.0 0.0 
node 2   1.0 0.0 
node 3   1.0 1.0 
node 4   0.0 1.0

# define the element      thick  material      maTag   press    mDensity   gravity 
element quad  1  1 2 3 4  1.0   "PlaneStrain"     2   $press      0.       $unitWeightX  $unitWeightY  

# fix the base in vertical direction
fix 1 1 1 
fix 2 1 1

#############################################################
# GRAVITY APPLICATION (elastic behavior)
# create the SOE, ConstraintHandler, Integrator, Algorithm and Numberer
system ProfileSPD
test NormDispIncr 1.e-12 25 0
constraints Transformation
integrator LoadControl 1 1 1 1
algorithm Newton 
numberer RCM

# create the Analysis
analysis Static

#analyze 
analyze 2

#############################################################
# NOW APPLY LOADING SEQUENCE AND ANALYZE (plastic)
# rezero time
setTime 0.0
wipeAnalysis

equalDOF 3 4   1 2    ;#tie nodes 3 and 4

# create a LoadPattern
pattern UniformExcitation 1 1 -accel "Sine 0 10 $period -factor $accMul"

# create the Analysis
constraints Penalty 1.0e18 1.0e18  ;# Transformation;  # 
test NormDispIncr 1.e-12 25 0
algorithm Newton 
numberer RCM
system ProfileSPD
integrator Newmark $gamma  [expr pow($gamma+0.5, 2)/4]  \
	$massProportionalDamping 0.0 $stiffnessProportionalDamping 0.
analysis VariableTransient 

#create the recorder
recorder Node -file disp.out   -time  -node 1 2 3 4 -dof 1 2 -dT  0.01 disp
recorder Node -file acce.out  -time  -node 1 2 3 4 -dof 1 2 -dT 0.01 accel
recorder Element 1 -time -file stress1.out material 1 stress -dT 0.01
recorder Element 1 -time -file strain1.out material 1 strain -dT 0.01
recorder Element 1 -time -file stress3.out material 3 stress -dT 0.01
recorder Element 1 -time -file strain3.out material 3 strain -dT 0.01

#analyze 
set startT [clock seconds]
analyze $numSteps $deltaT [expr $deltaT/100] $deltaT 10
set endT [clock seconds]
puts "Execution time: [expr $endT-$startT] seconds."

wipe  #flush ouput stream
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

i think it is because, in your recorder command line, your editor replaced the - with longer dashes, which opensees can't read.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply