problem with panel zone
Moderators: silvia, selimgunay, Moderators
problem with panel zone
Hi every one,i posted my problem and there were no replies,plz help me,thanks
I've modeled an steel frame 1bay 1story with out panel zone and it was ok.but, when i used panel zone it gets some errors while running and i do not know why!!!!
meanwhile i used joint 2d element with this format
element Joint2D $eleTag $Nd1 $Nd2 $Nd3 $Nd4 $NdC <$Mat1 $Mat2 $Mat3 $Mat4> $MatC $LrgDspTag
for <$Mat1 $Mat2 $Mat3 $Mat4> if i assign 0 for each mat, it runs for some iterations.but when i assign some defined material to them the algorithm failed at first iteration.plz help me.
here is the code:
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 2;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
recorder Node -file data/DFree.out -time -node 2 3 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file data/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform -32; #distributed superstructure-weight on beam 32 kg/cm
eleLoad -ele 3 -type -beamUniform -32;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
puts "Model Built";
I've modeled an steel frame 1bay 1story with out panel zone and it was ok.but, when i used panel zone it gets some errors while running and i do not know why!!!!
meanwhile i used joint 2d element with this format
element Joint2D $eleTag $Nd1 $Nd2 $Nd3 $Nd4 $NdC <$Mat1 $Mat2 $Mat3 $Mat4> $MatC $LrgDspTag
for <$Mat1 $Mat2 $Mat3 $Mat4> if i assign 0 for each mat, it runs for some iterations.but when i assign some defined material to them the algorithm failed at first iteration.plz help me.
here is the code:
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 2;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
recorder Node -file data/DFree.out -time -node 2 3 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file data/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform -32; #distributed superstructure-weight on beam 32 kg/cm
eleLoad -ele 3 -type -beamUniform -32;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
puts "Model Built";
Re: problem with panel zone
joint2D is a contributed material that I never used so I do not have any experience with it. I suggest you to read the reference material related to that element if you still have problems with it try contacting the author of the element.
Re: problem with panel zone
hi mohamadR,
i am master student that search on beam column joint.
i write 2D frame with beam column program joint in opensees and it has error.
please send me your email that we could have conference.
my email:hamed739maz@yahoo.com
thanks.
i am master student that search on beam column joint.
i write 2D frame with beam column program joint in opensees and it has error.
please send me your email that we could have conference.
my email:hamed739maz@yahoo.com
thanks.
-
- Posts: 5
- Joined: Sun Oct 21, 2012 3:39 am
Re: problem with panel zone
Dear Mohamad,
I have solved your problem
Please Mail me
Mtaherinasab@gmail.com
Best regards
Mohammad
I have solved your problem
Please Mail me
Mtaherinasab@gmail.com
Best regards
Mohammad
-
- Posts: 5
- Joined: Sun Oct 21, 2012 3:39 am
Re: problem with panel zone
Run This code
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 1;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
recorder Node -file DataBalendra/DFree.out -time -node 13 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file DataBalendra/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform 0.000032;
eleLoad -ele 3 -type -beamUniform -0.000032;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
puts "Model Built";
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 1;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
recorder Node -file DataBalendra/DFree.out -time -node 13 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file DataBalendra/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform 0.000032;
eleLoad -ele 3 -type -beamUniform -0.000032;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
puts "Model Built";
Last edited by ahadizadeh on Fri Dec 28, 2012 9:35 pm, edited 1 time in total.
-
- Posts: 5
- Joined: Sun Oct 21, 2012 3:39 am
Re: problem with panel zone
Run this code and its source
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
source DisplayModel2D.tcl; # procedure for displaying a 2D perspective of model
source DisplayPlane.tcl; # procedure for displaying a plane in a model
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 1;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
#display the model with the node numbers
DisplayModel2D NodeNumbers;
recorder Node -file DataBalendra/DFree.out -time -node 13 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file DataBalendra/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform 0.000032;
eleLoad -ele 3 -type -beamUniform -0.000032;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
# display deformed shape:
set ViewScale 5;
DisplayModel2D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model
puts "Model Built";
source this code
#########################################################
proc DisplayPlane {ShapeType dAmp viewPlane {nEigen 0} {quadrant 0}} {
######################################################################################
## DisplayPlane $ShapeType $dAmp $viewPlane $nEigen $quadrant
######################################################################################
## setup display parameters for specified viewPlane and display
## Silvia Mazzoni & Frank McKenna, 2006
##
## ShapeType : type of shape to display. # options: ModeShape , NodeNumbers , DeformedShape
## dAmp : relative amplification factor for deformations
## viewPlane : set local xy axes in global coordinates (XY,YX,XZ,ZX,YZ,ZY)
## nEigen : if nEigen not=0, show mode shape for nEigen eigenvalue
## quadrant: quadrant where to show this figure (0=full figure)
##
######################################################################################
set Xmin [lindex [nodeBounds] 0]; # view bounds in global coords - will add padding on the sides
set Ymin [lindex [nodeBounds] 1];
set Zmin [lindex [nodeBounds] 2];
set Xmax [lindex [nodeBounds] 3];
set Ymax [lindex [nodeBounds] 4];
set Zmax [lindex [nodeBounds] 5];
set Xo 0; # center of local viewing system
set Yo 0;
set Zo 0;
set uLocal [string index $viewPlane 0]; # viewPlane local-x axis in global coordinates
set vLocal [string index $viewPlane 1]; # viewPlane local-y axis in global coordinates
if {$viewPlane =="3D" } {
set uMin $Zmin+$Xmin
set uMax $Zmax+$Xmax
set vMin $Ymin
set vMax $Ymax
set wMin -10000
set wMax 10000
vup 0 1 0; # dirn defining up direction of view plane
} else {
set keyAxisMin "X $Xmin Y $Ymin Z $Zmin"
set keyAxisMax "X $Xmax Y $Ymax Z $Zmax"
set axisU [string index $viewPlane 0];
set axisV [string index $viewPlane 1];
set uMin [string map $keyAxisMin $axisU]
set uMax [string map $keyAxisMax $axisU]
set vMin [string map $keyAxisMin $axisV]
set vMax [string map $keyAxisMax $axisV]
if {$viewPlane =="YZ" || $viewPlane =="ZY" } {
set wMin $Xmin
set wMax $Xmax
} elseif {$viewPlane =="XY" || $viewPlane =="YX" } {
set wMin $Zmin
set wMax $Zmax
} elseif {$viewPlane =="XZ" || $viewPlane =="ZX" } {
set wMin $Ymin
set wMax $Ymax
} else {
return -1
}
}
set epsilon 1e-3; # make windows width or height not zero when the Max and Min values of a coordinate are the same
set uWide [expr $uMax - $uMin+$epsilon];
set vWide [expr $vMax - $vMin+$epsilon];
set uSide [expr 0.25*$uWide];
set vSide [expr 0.25*$vWide];
set uMin [expr $uMin - $uSide];
set uMax [expr $uMax + $uSide];
set vMin [expr $vMin - $vSide];
set vMax [expr $vMax + 2*$vSide]; # pad a little more on top, because of window title
set uWide [expr $uMax - $uMin+$epsilon];
set vWide [expr $vMax - $vMin+$epsilon];
set uMid [expr ($uMin+$uMax)/2];
set vMid [expr ($vMin+$vMax)/2];
# 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 1 0 0; # direction of outward normal to view plane
prp 10000. $uMid $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 =="ZY" } {
vpn -1 0 0; # direction of outward normal to view plane
prp -10000. $vMid $uMid ; # 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 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 =="XZ" } {
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 =="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.25*$vWide] [expr $vMax]
} else {
viewWindow $uMin $uMax $vMin $vMax
}
projection 1; # projection mode, 0:prespective, 1: parallel
fill 1; # fill mode; needed only for solid elements
if {$quadrant == 0} {
port -1 1 -1 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 1} {
port 0 1 0 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 2} {
port -1 0 0 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 3} {
port -1 0 -1 0 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 4} {
port 0 1 -1 0 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
}
if {$ShapeType == "ModeShape" } {
display -$nEigen 0 [expr 5.*$dAmp]; # display mode shape for mode $nEigen
} elseif {$ShapeType == "NodeNumbers" } {
display 1 -1 0 ; # display node numbers
} elseif {$ShapeType == "DeformedShape" } {
display 1 2 $dAmp; # display deformed shape the 2 makes the nodes small
}
}; #
######################################################################################
and sorce this cod
####################################################################
proc DisplayModel2D { {ShapeType nill} {dAmp 5} {xLoc 10} {yLoc 10} {xPixels 900} {yPixels 900} {nEigen 1} } {
######################################################################################
## DisplayModel2D $ShapeType $dAmp $xLoc $yLoc $xPixels $yPixels $nEigen
######################################################################################
## display Node Numbers, Deformed or Mode Shape in 2D problem
## Silvia Mazzoni & Frank McKenna, 2006
##
## ShapeType : type of shape to display. # options: ModeShape , NodeNumbers , DeformedShape
## dAmp : relative amplification factor for deformations
## xLoc,yLoc : horizontal & vertical location in pixels of graphical window (0,0=upper left-most corner)
## xPixels,yPixels : width & height of graphical window in pixels
## nEigen : if nEigen not=0, show mode shape for nEigen eigenvalue
##
#######################################################################################
global TunitTXT; # load time-unit text
global ScreenResolutionX ScreenResolutionY; # read global values for screen resolution
if { [info exists TunitTXT] != 1} {set TunitTXT ""}; # set blank if it has not been defined previously.
if { [info exists ScreenResolutionX] != 1} {set ScreenResolutionX 1600}; # set default if it has not been defined previously.
if { [info exists ScreenResolutionY] != 1} {set ScreenResolutionY 900}; # set default if it has not been defined previously.
if {$xPixels == 0} {
set xPixels [expr int($ScreenResolutionX/2)];
set yPixels [expr int($ScreenResolutionY/2)];
set xLoc 20
set yLoc 20
}
if {$ShapeType == "nill"} {
puts ""; puts ""; puts "------------------"
puts "View the Model? (N)odes, (D)eformedShape, anyMode(1),(2),(#). Press enter for NO."
gets stdin answer
if {[llength $answer]>0 } {
if {$answer != "N" & $answer != "n"} {
puts "Modify View Scaling Factor=$dAmp? Type factor, or press enter for NO."
gets stdin answerdAmp
if {[llength $answerdAmp]>0 } {
set dAmp $answerdAmp
}
}
if {[string index $answer 0] == "N" || [string index $answer 0] == "n"} {
set ShapeType NodeNumbers
} elseif {[string index $answer 0] == "D" ||[string index $answer 0] == "d" } {
set ShapeType DeformedShape
} else {
set ShapeType ModeShape
set nEigen $answer
}
} else {
return
}
}
if {$ShapeType == "ModeShape" } {
set lambdaN [eigen $nEigen]; # perform eigenvalue analysis for ModeShape
set lambda [lindex $lambdaN [expr $nEigen-1]];
set omega [expr pow($lambda,0.5)]
set PI [expr 2*asin(1.0)]; # define constant
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
set fmt1 "Mode Shape, Mode=%.1i Period=%.3f %s "
set windowTitle [format $fmt1 $nEigen $Tperiod $TunitTXT]
} elseif {$ShapeType == "NodeNumbers" } {
set windowTitle "Node Numbers"
} elseif {$ShapeType == "DeformedShape" } {
set windowTitle "Deformed Shape"
}
set viewPlane XY
recorder display $windowTitle $xLoc $yLoc $xPixels $yPixels -wipe ; # display recorder
DisplayPlane $ShapeType $dAmp $viewPlane $nEigen 0
after 3000; #pause for 2 seconds to display
}
########################################################################
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
file mkdir DataBalendra; # create data directory
source DisplayModel2D.tcl; # procedure for displaying a 2D perspective of model
source DisplayPlane.tcl; # procedure for displaying a plane in a model
node 1 0. 0.;
node 4 320. 0.;
node 5 258.75 280.;
node 6 320 210;
node 7 285.3 249.6;
node 8 142.36 125.1;
############
node 9 320. 275;
node 10 326.25 280.;
node 11 320 285; # external nodes defined around for joint 2d element
node 12 313.75 280.;
node 13 -6.25 280.;
node 14 0. 275.;
node 15 6.25 280;
node 16 0. 285.;
#############
fix 1 1 1 1;
fix 4 1 1 1;
mass 14 5120. 0 0; #dead load=2400kg/m live load=800kg/m
mass 9 5120. 0 0;
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
uniaxialMaterial Steel02 4 3500 19e5 .007 18 .925 .15; #material for beam and columns
uniaxialMaterial Elastic 7 10e-15;
uniaxialMaterial Steel02 8 217022.34 79655800 0 18 .925 .15;
uniaxialMaterial Steel02 9 765135.507 7021687.5 0.37037 18 .925 .15;
uniaxialMaterial Parallel 10 8 9; #material for panel zone
uniaxialMaterial Steel02 11 258335 86111666 .007 .03 0 18 .925 .15; #material for spring at the end of beam and columns
# FIBER SECTION properties -------------------------------------------------------------
section Fiber 1 { #define section of beam element WF section 10.0*10.0
patch rect 4 5 15 -5 -5 5 -4.2
patch rect 4 15 5 -.3 -4.2 .3 4.2
patch rect 4 5 15 -5 4.2 5 5
}
section Fiber 2 { #define section of column elements WF section 12.5*12.5
patch rect 4 5 15 -6.25 -6.25 6.25 -5.35
patch rect 4 15 5 -.325 -5.35 .325 5.35
patch rect 4 5 15 -6.25 5.35 6.25 6.25
}
section Fiber 3 { #define section of bracings c-chanells 10.0*5.0
patch rect 4 5 15 -5 -5 5 -4.25
patch rect 4 15 5 -.5 -4.25 .5 4.25
patch rect 4 5 15 -5 4.25 5 5
}
section Fiber 4 { #define section of knee links 6.0*6.0*.45
patch rect 4 5 15 -3 -3 3 -2.55
patch rect 4 15 5 -3 -2.55 -2.55 2.55
patch rect 4 15 5 2.55 -2.55 3 2.55
patch rect 4 5 15 -3 2.55 3 3
}
# define geometric transformation:
geomTransf PDelta 1; #columns and knee links can have PDelta effects
geomTransf Linear 2; #beam has a linear transformation
geomTransf Corotational 3; #two bracings have corotational transformation
set numIntgrPt 5;
element nonlinearBeamColumn 1 1 14 $numIntgrPt 2 1;
element nonlinearBeamColumn 2 15 5 $numIntgrPt 1 2;
element nonlinearBeamColumn 3 5 12 $numIntgrPt 1 1;
element nonlinearBeamColumn 4 9 6 $numIntgrPt 2 1;
element nonlinearBeamColumn 5 6 4 $numIntgrPt 2 1;
element elasticBeamColumn 6 5 7 9.99 19e5 51.623 1;
element elasticBeamColumn 7 7 6 9.99 19e5 51.623 1;
element nonlinearBeamColumn 8 1 8 $numIntgrPt 3 3;
element nonlinearBeamColumn 9 8 7 $numIntgrPt 2 1;
element Joint2D 10 13 14 15 16 2 11 11 11 11 10 2;
element Joint2D 11 9 10 11 12 3 11 11 11 11 10 2;
#display the model with the node numbers
DisplayModel2D NodeNumbers;
recorder Node -file DataBalendra/DFree.out -time -node 13 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file DataBalendra/RBase.out -time -node 1 4 -dof 1 2 3 reaction; # support reaction
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform 0.000032;
eleLoad -ele 3 -type -beamUniform -0.000032;
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-5; # convergence tolerance for test
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system UmfPack; #how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 1000; # determine if convergence has been achieved at the end of an iteration step
algorithm ModifiedNewton ; # 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 0.0
# display deformed shape:
set ViewScale 5;
DisplayModel2D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model
puts "Model Built";
source this code
#########################################################
proc DisplayPlane {ShapeType dAmp viewPlane {nEigen 0} {quadrant 0}} {
######################################################################################
## DisplayPlane $ShapeType $dAmp $viewPlane $nEigen $quadrant
######################################################################################
## setup display parameters for specified viewPlane and display
## Silvia Mazzoni & Frank McKenna, 2006
##
## ShapeType : type of shape to display. # options: ModeShape , NodeNumbers , DeformedShape
## dAmp : relative amplification factor for deformations
## viewPlane : set local xy axes in global coordinates (XY,YX,XZ,ZX,YZ,ZY)
## nEigen : if nEigen not=0, show mode shape for nEigen eigenvalue
## quadrant: quadrant where to show this figure (0=full figure)
##
######################################################################################
set Xmin [lindex [nodeBounds] 0]; # view bounds in global coords - will add padding on the sides
set Ymin [lindex [nodeBounds] 1];
set Zmin [lindex [nodeBounds] 2];
set Xmax [lindex [nodeBounds] 3];
set Ymax [lindex [nodeBounds] 4];
set Zmax [lindex [nodeBounds] 5];
set Xo 0; # center of local viewing system
set Yo 0;
set Zo 0;
set uLocal [string index $viewPlane 0]; # viewPlane local-x axis in global coordinates
set vLocal [string index $viewPlane 1]; # viewPlane local-y axis in global coordinates
if {$viewPlane =="3D" } {
set uMin $Zmin+$Xmin
set uMax $Zmax+$Xmax
set vMin $Ymin
set vMax $Ymax
set wMin -10000
set wMax 10000
vup 0 1 0; # dirn defining up direction of view plane
} else {
set keyAxisMin "X $Xmin Y $Ymin Z $Zmin"
set keyAxisMax "X $Xmax Y $Ymax Z $Zmax"
set axisU [string index $viewPlane 0];
set axisV [string index $viewPlane 1];
set uMin [string map $keyAxisMin $axisU]
set uMax [string map $keyAxisMax $axisU]
set vMin [string map $keyAxisMin $axisV]
set vMax [string map $keyAxisMax $axisV]
if {$viewPlane =="YZ" || $viewPlane =="ZY" } {
set wMin $Xmin
set wMax $Xmax
} elseif {$viewPlane =="XY" || $viewPlane =="YX" } {
set wMin $Zmin
set wMax $Zmax
} elseif {$viewPlane =="XZ" || $viewPlane =="ZX" } {
set wMin $Ymin
set wMax $Ymax
} else {
return -1
}
}
set epsilon 1e-3; # make windows width or height not zero when the Max and Min values of a coordinate are the same
set uWide [expr $uMax - $uMin+$epsilon];
set vWide [expr $vMax - $vMin+$epsilon];
set uSide [expr 0.25*$uWide];
set vSide [expr 0.25*$vWide];
set uMin [expr $uMin - $uSide];
set uMax [expr $uMax + $uSide];
set vMin [expr $vMin - $vSide];
set vMax [expr $vMax + 2*$vSide]; # pad a little more on top, because of window title
set uWide [expr $uMax - $uMin+$epsilon];
set vWide [expr $vMax - $vMin+$epsilon];
set uMid [expr ($uMin+$uMax)/2];
set vMid [expr ($vMin+$vMax)/2];
# 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 1 0 0; # direction of outward normal to view plane
prp 10000. $uMid $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 =="ZY" } {
vpn -1 0 0; # direction of outward normal to view plane
prp -10000. $vMid $uMid ; # 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 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 =="XZ" } {
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 =="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.25*$vWide] [expr $vMax]
} else {
viewWindow $uMin $uMax $vMin $vMax
}
projection 1; # projection mode, 0:prespective, 1: parallel
fill 1; # fill mode; needed only for solid elements
if {$quadrant == 0} {
port -1 1 -1 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 1} {
port 0 1 0 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 2} {
port -1 0 0 1 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 3} {
port -1 0 -1 0 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
} elseif {$quadrant == 4} {
port 0 1 -1 0 # area of window that will be drawn into (uMin,uMax,vMin,vMax);
}
if {$ShapeType == "ModeShape" } {
display -$nEigen 0 [expr 5.*$dAmp]; # display mode shape for mode $nEigen
} elseif {$ShapeType == "NodeNumbers" } {
display 1 -1 0 ; # display node numbers
} elseif {$ShapeType == "DeformedShape" } {
display 1 2 $dAmp; # display deformed shape the 2 makes the nodes small
}
}; #
######################################################################################
and sorce this cod
####################################################################
proc DisplayModel2D { {ShapeType nill} {dAmp 5} {xLoc 10} {yLoc 10} {xPixels 900} {yPixels 900} {nEigen 1} } {
######################################################################################
## DisplayModel2D $ShapeType $dAmp $xLoc $yLoc $xPixels $yPixels $nEigen
######################################################################################
## display Node Numbers, Deformed or Mode Shape in 2D problem
## Silvia Mazzoni & Frank McKenna, 2006
##
## ShapeType : type of shape to display. # options: ModeShape , NodeNumbers , DeformedShape
## dAmp : relative amplification factor for deformations
## xLoc,yLoc : horizontal & vertical location in pixels of graphical window (0,0=upper left-most corner)
## xPixels,yPixels : width & height of graphical window in pixels
## nEigen : if nEigen not=0, show mode shape for nEigen eigenvalue
##
#######################################################################################
global TunitTXT; # load time-unit text
global ScreenResolutionX ScreenResolutionY; # read global values for screen resolution
if { [info exists TunitTXT] != 1} {set TunitTXT ""}; # set blank if it has not been defined previously.
if { [info exists ScreenResolutionX] != 1} {set ScreenResolutionX 1600}; # set default if it has not been defined previously.
if { [info exists ScreenResolutionY] != 1} {set ScreenResolutionY 900}; # set default if it has not been defined previously.
if {$xPixels == 0} {
set xPixels [expr int($ScreenResolutionX/2)];
set yPixels [expr int($ScreenResolutionY/2)];
set xLoc 20
set yLoc 20
}
if {$ShapeType == "nill"} {
puts ""; puts ""; puts "------------------"
puts "View the Model? (N)odes, (D)eformedShape, anyMode(1),(2),(#). Press enter for NO."
gets stdin answer
if {[llength $answer]>0 } {
if {$answer != "N" & $answer != "n"} {
puts "Modify View Scaling Factor=$dAmp? Type factor, or press enter for NO."
gets stdin answerdAmp
if {[llength $answerdAmp]>0 } {
set dAmp $answerdAmp
}
}
if {[string index $answer 0] == "N" || [string index $answer 0] == "n"} {
set ShapeType NodeNumbers
} elseif {[string index $answer 0] == "D" ||[string index $answer 0] == "d" } {
set ShapeType DeformedShape
} else {
set ShapeType ModeShape
set nEigen $answer
}
} else {
return
}
}
if {$ShapeType == "ModeShape" } {
set lambdaN [eigen $nEigen]; # perform eigenvalue analysis for ModeShape
set lambda [lindex $lambdaN [expr $nEigen-1]];
set omega [expr pow($lambda,0.5)]
set PI [expr 2*asin(1.0)]; # define constant
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
set fmt1 "Mode Shape, Mode=%.1i Period=%.3f %s "
set windowTitle [format $fmt1 $nEigen $Tperiod $TunitTXT]
} elseif {$ShapeType == "NodeNumbers" } {
set windowTitle "Node Numbers"
} elseif {$ShapeType == "DeformedShape" } {
set windowTitle "Deformed Shape"
}
set viewPlane XY
recorder display $windowTitle $xLoc $yLoc $xPixels $yPixels -wipe ; # display recorder
DisplayPlane $ShapeType $dAmp $viewPlane $nEigen 0
after 3000; #pause for 2 seconds to display
}
########################################################################