Hello,
I want to know if the modal shape can be appeared correctly in 3D (version 2.5.0, rev 6345).
I checked the "DisplayPlane.tcl" and "DisplayModel3D.tcl" in http://opensees.berkeley.edu/wiki/index ... oldid=5097
I just made a very simple structure but it seems that the modal shape is not shown as expected. The code is provided as follow. I wonder if there is any mistake in the code?
# ---------------------------------------------------------------------------------------------------------------- Modal Analysis in 3D
puts "3D Model built"
set modenumber 1; # 1 = first mode
set nEigen $modenumber;
set dAmp 10;
global TunitTXT; # load time-unit text (just added to omit error message from 'format')
if { [info exists TunitTXT] != 1} {set TunitTXT ""}; # set blank if it has not been defined previously.(just added to omit error message from 'format')
set lambdaN [eigen $nEigen];
set lambda [lindex $lambdaN [expr $nEigen-1]];
set omega [expr pow($lambda,0.5)]
set PI [expr 2*asin(1.0)];
set Tperiod [expr 2*$PI/$omega];
set fmt1 "Mode Shape, Mode=%.1i Period=%.3f %s "
set windowTitle [format $fmt1 $nEigen $Tperiod $TunitTXT]
recorder display $windowTitle 10 10 500 500 -wipe; # display recorder
prp 0. 0. 0.;
vup 0. 0. 1.;
vpn 0. -10. 1.;
viewWindow -20 20 -20 20
display -$nEigen 0 $dAmp;
# ---------------------------------------------------------------------------------------------------------------- Complete analysis
Modal Shape in 3D
Moderators: silvia, selimgunay, Moderators
-
- Posts: 3
- Joined: Wed Sep 09, 2015 11:05 am
- Location: Istanbul Technical University
Re: Modal Shape in 3D
@ suusie
Dear suusie I tested this template and it works well but you should know that the global axis in this code might be different than you consider in your 3D model so you can change view plots axis for example : from XY to YX to have a better view to do this open the DisplayModel3D.tcl
I had change my file like this:
# keep the following general, as change the X and Y and Z for each view plane
# next three commmands define viewing system, all values in global coords
vrp $Xo $Yo $Zo; # point on the view plane in global coord, center of local viewing system
if {$vLocal == "X"} {
vup 1 0 0; # dirn defining up direction of view plane
} elseif {$vLocal == "Y"} {
vup 0 1 0; # dirn defining up direction of view plane
} elseif {$vLocal == "Z"} {
vup 0 0 1; # dirn defining up direction of view plane
}
if {$viewPlane =="YZ" } {
vpn 2 0.5 0.; # direction of outward normal to view plane
prp $vMid $uMid 10000.; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="ZY" } {
vpn -1 0.5 0.2; # direction of outward normal to view plane
prp $vMid $uMid -10000.; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="XY" } {
vpn 0 0 1; # direction of outward normal to view plane
prp $uMid $vMid 10000; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="YX" } {
vpn 0.2 -0.2 -0.7; # direction of outward normal to view plane
prp $uMid $vMid -10000 ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="XZ" } {
vpn 2 0.5 0; # direction of outward normal to view plane
prp $vMid $uMid -10000 ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="ZX" } {
vpn 0 1 0; # direction of outward normal to view plane
prp $uMid 10000 $vMid ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="3D" } {
vpn 1 0.25 1.25; # direction of outward normal to view plane
prp -100 $vMid -10000; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} else {
return -1
}
# next three commands define view, all values in local coord system
if {$viewPlane =="3D" } {
viewWindow [expr $uMin-$uWide/4] [expr $uMax/2] [expr $vMin-0.15*$vWide] [expr $vMax]
} else {
viewWindow $uMin $uMax $vMin $vMax
}
projection 0; # projection mode, 0:prespective, 1: parallel
fill 1; # fill mode; needed only for solid elements
Dear suusie I tested this template and it works well but you should know that the global axis in this code might be different than you consider in your 3D model so you can change view plots axis for example : from XY to YX to have a better view to do this open the DisplayModel3D.tcl
I had change my file like this:
# keep the following general, as change the X and Y and Z for each view plane
# next three commmands define viewing system, all values in global coords
vrp $Xo $Yo $Zo; # point on the view plane in global coord, center of local viewing system
if {$vLocal == "X"} {
vup 1 0 0; # dirn defining up direction of view plane
} elseif {$vLocal == "Y"} {
vup 0 1 0; # dirn defining up direction of view plane
} elseif {$vLocal == "Z"} {
vup 0 0 1; # dirn defining up direction of view plane
}
if {$viewPlane =="YZ" } {
vpn 2 0.5 0.; # direction of outward normal to view plane
prp $vMid $uMid 10000.; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="ZY" } {
vpn -1 0.5 0.2; # direction of outward normal to view plane
prp $vMid $uMid -10000.; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="XY" } {
vpn 0 0 1; # direction of outward normal to view plane
prp $uMid $vMid 10000; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="YX" } {
vpn 0.2 -0.2 -0.7; # direction of outward normal to view plane
prp $uMid $vMid -10000 ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="XZ" } {
vpn 2 0.5 0; # direction of outward normal to view plane
prp $vMid $uMid -10000 ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="ZX" } {
vpn 0 1 0; # direction of outward normal to view plane
prp $uMid 10000 $vMid ; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} elseif {$viewPlane =="3D" } {
vpn 1 0.25 1.25; # direction of outward normal to view plane
prp -100 $vMid -10000; # eye location in local coord sys defined by viewing system
plane 10000 -10000; # distance to front and back clipping planes from eye
} else {
return -1
}
# next three commands define view, all values in local coord system
if {$viewPlane =="3D" } {
viewWindow [expr $uMin-$uWide/4] [expr $uMax/2] [expr $vMin-0.15*$vWide] [expr $vMax]
} else {
viewWindow $uMin $uMax $vMin $vMax
}
projection 0; # projection mode, 0:prespective, 1: parallel
fill 1; # fill mode; needed only for solid elements
-
- Posts: 3
- Joined: Wed Sep 09, 2015 11:05 am
- Location: Istanbul Technical University
Re: Modal Shape in 3D
I'm using this only for Display DeformedShape, I checked others (NodeNumber and ModeShape) but unfortunately they didn't work at all in both 3D Building and simple cantilever column,I also checked your Code but as you said it didn't work.you can download and run Example 8 code but change 3Ddisplay to Mode shape you'll see it doesn't work
I prefer to use Matlab for post processing, take a look at this website (http://users.ntua.gr/divamva/software.html)
I prefer to use Matlab for post processing, take a look at this website (http://users.ntua.gr/divamva/software.html)