Hello everyone,
Recently, I edit a Hybrid Simulation with Opensees and OpenFresco, the procedure is similar with those successful examples. But, when I run this script, the recorder couldn't work right, I am looking for the wrong many many times, but I couldn't solve it... If someone want connect me, please sent the e-mail with yx19880226@sina.com Thank you!
---------------------------------------------------------------------------------------------
Client
model BasicBuilder -ndm 2 -ndf 3
loadPackage OpenFresco
file mkdir DATA
set mm 1
set N 1
set t 1
set Kg 1
set Gpa [expr $N/pow($mm,2)]
set g [expr 9.8*pow(10,3)/pow($t,2)]
set E [expr 210*pow(10,3)*$Gpa]
set A [expr 3240*pow($mm,2)]
set I [expr 1.33*pow(10,7)*pow($mm,4)]
set L [expr 2700*$mm]
node 1 0 0
node 2 0 2700 -mass [expr 1000*$Kg] [expr 1000*$Kg] 0
node 3 4200 2700 -mass [expr 1000*$Kg] [expr 1000*$Kg] 0
node 4 4200 0
fix 1 1 1 1
fix 4 1 1 1
fix 2 0 1 0
fix 3 0 1 0
geomTransf Linear 1
geomTransf Corotational 2
element elasticBeamColumn 2 1 2 $A $E $I 2
element elasticBeamColumn 3 2 3 $A $E $I 1
expElement beamColumn 1 4 3 2 -server 8090 -initStif [expr $E*$A/$L] 0 0 0 [expr 12*$E*$I/pow($L,3)] [expr -6*$E*$I/pow($L,2)] 0 [expr -6*$E*$I/pow($L,2)] [expr 4*$E*$I/$L]
set dt 0.01
set scale 0.2*$g
timeSeries Path 1 -filePath GM.txt -dt $dt -factor [expr $scale]
pattern UniformExcitation 1 1 -accel 1
set xDamp 0.02
set MpropSwitch 1
set KcurrSwitch 0
set KcommSwitch 1
set KinitSwitch 0
set nEigenI 1
set nEigenJ 3
set lambdaN [eigen [expr $nEigenJ]]
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]
set omegaI [expr pow($lambdaI,0.5)]
set omegaJ [expr pow($lambdaJ,0.5)]
set alphaM [expr $MpropSwitch*$xDamp*(2*$omegaI*$omegaJ)/($omegaI+$omegaJ)]
set betaKcurr [expr $KcurrSwitch*2*$xDamp/($omegaI+$omegaJ)]
set betaKcomm [expr $KcommSwitch*2*$xDamp/($omegaI+$omegaJ)]
set betaKinit [expr $KinitSwitch*2*$xDamp/($omegaI+$omegaJ)]
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm
system BandGeneral
numberer Plain
constraints Plain
test EnergyIncr 1.0e-5 10
integrator NewmarkExplicit 0.5
algorithm Linear
analysis Transient
recorder Node -file DATA/Node_Dsp.out -time -node 2 3 -dof 1 disp
recorder Node -file DATA/Node_Vel.out -time -node 2 3 -dof 1 vel
recorder Node -file DATA/Node_Acc.out -time -node 2 3 -dof 1 accel
recorder Element -file DATA/Elmt_Frc.out -time -ele 1 forces
recorder Element -file DATA/Elmt_ctrlDsp.out -time -ele 1 ctrlDisp
recorder Element -file DATA/Elmt_daqDsp.out -time -ele 1 daqDisp
# Finally perform the analysis
# ------------------------------
# perform an eigenvalue analysis
set pi [expr acos(-1.0)]
set lambda [eigen -fullGenLapack 2]
puts "\nEigenvalues at start of transient:"
puts "| lambda | omega | period | frequency |"
foreach lambda $lambda {
set omega [expr pow($lambda,0.5)]
set period [expr 2.0*$pi/$omega]
set frequ [expr 1.0/$period]
puts [format "| %5.3e | %8.4f | %7.4f | %9.4f |" $lambda $omega $period $frequ]
}
# open output file for writing
set outFileID [open elapsedTime.txt w]
# perform the transient analysis
set tTot [time {
for {set i 1} {$i < 1600} {incr i} {
set t [time {analyze 1 $dt}]
puts $outFileID $t
#puts "step $i"
}
}]
puts "\nElapsed Time = $tTot \n"
# close the output file
close $outFileID
wipe
exit
--------------------------------------end--------------------------------------------------
Server
model BasicBuilder -ndm 2 -ndf 3
set mm 1
set N 1
set t 1
set Kg 1
set Gpa [expr $N/pow($mm,2)]
set E [expr 210*pow(10,3)*$Gpa]
set A [expr 3240*pow($mm,2)]
set I [expr 1.33*pow(10,7)*pow($mm,4)]
set L [expr 2700*$mm]
node 3 4200 2700 -mass [expr 1000*$Kg] [expr 1000*$Kg] 0
node 4 4200 0
geomTransf Corotational 2
uniaxialMaterial Steel01 1 235 $E 0.01 0 1 0 1
expControl SimUniaxialMaterials 1 1
expSetup OneActuator 1 -control 1 1 -sizeTrialOut 3 3
expSite LocalSite 1 1
expElement beamColumn 1 4 3 2 -site 1 -initStif [expr $E*$A/$L] 0 0 0 [expr 12*$E*$I/pow($L,3)] [expr -6*$E*$I/pow($L,2)] 0 [expr -6*$E*$I/pow($L,2)] [expr 4*$E*$I/$L]
startSimAppSiteServer 1 8090
Hybrid Simulation: Opensees+OpenFresco. can't record
Moderators: silvia, selimgunay, Moderators