Hello,vesna, i want to analysis a 3d truss ,i consider the node have zerolength elements,but when i run the below code,i found the results is not correct.
i guess the equalDOF command is not correct assign.I changed the $dof which is in the equalDOFcommand many times,but i can't get the right result.
i consider the zerolength have a big E,so the result consider the zerolength should the same as the result not consider the zerolength.
I need you help
the code is:
wipe;
model BasicBuilder -ndm 3 -ndf 6; # 3 spacial dimensions, 6 DOF's per node
file mkdir TRussData; # create data directory
set numModes 3; # define the specified number of eigenvalues
set L 30; #define length
############################ MODEL BUILDING ########################################
# define nodal coordinates;
# detail: #tag #x #y #z
node 1 0.0 $L 0.0; #x,y,z coordinates (0,0,0) of node 1
node 101 0.0 $L 0.0
node 102 0.0 $L 0.0
node 103 0.0 $L 0.0
node 2 [expr 1*$L] $L 0.0; #x,y,z coordinates (0,30,0) of node 2 , the unit is mm.
node 201 [expr 1*$L] $L 0.0
node 202 [expr 1*$L] $L 0.0
node 203 [expr 1*$L] $L 0.0
node 204 [expr 1*$L] $L 0.0
node 205 [expr 1*$L] $L 0.0
node 206 [expr 1*$L] $L 0.0
node 3 [expr 2*$L] $L 0.0
node 301 [expr 2*$L] $L 0.0
node 302 [expr 2*$L] $L 0.0
node 303 [expr 2*$L] $L 0.0
node 4 [expr 2*$L] 0.0 0.0
node 401 [expr 2*$L] 0.0 0.0
node 402 [expr 2*$L] 0.0 0.0
node 403 [expr 2*$L] 0.0 0.0
node 404 [expr 2*$L] 0.0 0.0
node 5 [expr 1*$L] 0.0 0.0
node 501 [expr 1*$L] 0.0 0.0
node 502 [expr 1*$L] 0.0 0.0
node 503 [expr 1*$L] 0.0 0.0
node 504 [expr 1*$L] 0.0 0.0
node 6 0.0 0.0 0.0
node 601 0.0 0.0 0.0
node 602 0.0 0.0 0.0
node 603 0.0 0.0 0.0
node 604 0.0 0.0 0.0
node 7 [expr 1*$L] $L $L
node 701 [expr 1*$L] $L $L
node 702 [expr 1*$L] $L $L
node 703 [expr 1*$L] $L $L
node 704 [expr 1*$L] $L $L
node 8 [expr 1*$L] 0.0 $L
node 801 [expr 1*$L] 0.0 $L
node 802 [expr 1*$L] 0.0 $L
node 803 [expr 1*$L] 0.0 $L
node 804 [expr 1*$L] 0.0 $L
puts "node defined"
#Boundary Conditions:#Node no.,Dx,Dy,DZ,RX,RY,RZ,
# Single point constraints -- Boundary Conditions
# tag Dx Dy Dz Rx Ry Rz
fix 1 1 1 1 1 1 1 ; # there is 6 DOF and all will be constrained.
fix 3 1 1 1 1 1 1 ; #fixX 0.0 1 1 1 1 1 1 -tol
fix 4 1 1 1 1 1 1 ; #fixX [expr 2*$L] 1 1 1 1 1 1 -tol
fix 6 1 1 1 1 1 1
fix 7 0 1 0 1 1 1
fix 8 0 0 0 1 1 1
fix 2 0 0 0 1 1 1
fix 5 0 0 0 1 1 1
puts "boundary conditons assigned! "
# ndr ndc dofs
equalDOF 1 101 1
equalDOF 1 102 1 3
equalDOF 1 103 2
equalDOF 2 201 1
equalDOF 2 202 1
equalDOF 2 203 1
equalDOF 2 204 1
equalDOF 2 205 1
equalDOF 2 206 1
equalDOF 3 301 1
equalDOF 3 302 1
equalDOF 3 303 1
equalDOF 4 401 1
equalDOF 4 402 1
equalDOF 4 403 1
equalDOF 4 404 1
equalDOF 5 501 1
equalDOF 5 502 1
equalDOF 5 503 1
equalDOF 5 504 1
equalDOF 6 601 1
equalDOF 6 602 1
equalDOF 6 603 1
equalDOF 6 604 1
equalDOF 7 701 2
equalDOF 7 702 1
equalDOF 7 703 1
equalDOF 7 704 3
equalDOF 8 801 1
equalDOF 8 802 1
equalDOF 8 803 1
equalDOF 8 804 1
puts "spring stiffnesses defined"
#Specifying material: #Material Tag,Stiffness value
#Define force-deformation relationship for spring
uniaxialMaterial Elastic 1 10e10
uniaxialMaterial Elastic 2 300000.0
#element truss $eleTag $iNode $jNode $A $matTag;
#the truss element considers strain-rate effects
#define zerolength id ndi ndJ mat dir
element zeroLength 17 1 101 -mat 1 -dir 1
element zeroLength 18 1 102 -mat 1 -dir 2
element zeroLength 19 1 103 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 20 2 201 -mat 1 -dir 1
element zeroLength 21 2 202 -mat 1 -dir 1 -orient 1 1 0 -1 1 0
element zeroLength 22 2 203 -mat 1 -dir 2
element zeroLength 23 2 204 -mat 1 -dir 1 -orient 1 1 0 -1 1 0
element zeroLength 24 2 205 -mat 1 -dir 1
element zeroLength 25 2 206 -mat 1 -dir 3
element zeroLength 26 3 301 -mat 1 -dir 2
element zeroLength 27 3 302 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 28 3 303 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 29 4 401 -mat 1 -dir 1
element zeroLength 30 4 402 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 31 4 403 -mat 1 -dir 1
element zeroLength 32 4 404 -mat 1 -dir 2 -orient 1 1 0 -1 1 0
element zeroLength 33 5 501 -mat 1 -dir 1
element zeroLength 34 5 502 -mat 1 -dir 2
element zeroLength 35 5 503 -mat 1 -dir 1
element zeroLength 36 5 504 -mat 1 -dir 3
element zeroLength 37 6 601 -mat 1 -dir 1
element zeroLength 38 6 602 -mat 1 -dir 2
element zeroLength 39 6 603 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 40 6 604 -mat 1 -dir 1 -orient 1 1 0 -1 1 0
element zeroLength 41 7 701 -mat 1 -dir 2
element zeroLength 42 7 702 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 43 7 703 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 44 7 704 -mat 1 -dir 3
element zeroLength 45 8 801 -mat 1 -dir 2
element zeroLength 46 8 802 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 47 8 803 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 48 8 804 -mat 1 -dir 3
#define normal element
element truss 1 101 201 0.472 2
element truss 2 205 303 0.472 2
element truss 3 301 401 0.472 2
element truss 4 403 503 0.472 2
element truss 5 501 601 0.472 2
element truss 6 601 102 0.472 2
element truss 7 604 202 0.472 2
element truss 8 203 502 0.472 2
element truss 9 204 404 0.472 2
element truss 10 103 703 0.472 2
element truss 11 206 704 0.472 2
element truss 12 302 702 0.472 2
element truss 13 402 802 0.472 2
element truss 14 504 804 0.472 2
element truss 15 603 803 0.472 2
element truss 16 701 801 0.472 2
puts "element defined"
# nodal masses--( # node#, Mx My Mz, Mass=Weight/g. )
# mass node ,Mx, My, Mz, Rx, Ry, Rz Mass=Weight/g. Mass is a invariant #unit:lb
#mass 1 18.114 18.114 18.114 10e-10 10e-10 10e-10
mass 2 10.611 10.611 10.611 10e-10 10e-10 10e-10
#mass 3 18.114 18.114 18.114 10e-10 10e-10 10e-10
#mass 4 25.617 25.617 25.617 10e-10 10e-10 10e-10
mass 5 18.114 18.114 18.114 10e-10 10e-10 10e-10
#mass 6 10.611 10.611 10.611 10e-10 10e-10 10e-10
mass 7 18.114 18.114 18.114 10e-10 10e-10 10e-10
mass 8 25.617 25.617 25.617 10e-10 10e-10 10e-10
#======================================Define recorders===============================================
#recorder Node <-file $fileName><-xml $fileName><-time><-node($node1 node2...)><-nodeRange $startNode $endNode>
# <-region $RegionTag><-node all> -dof ($dof1 $dof2....)$respType
for { set k 1 } { $k <= $numModes } { incr k } {
recorder Node -file [format "modes/mode%i.out" $k] -nodeRange 1 36 -dof 1 2 3 4 5 6 "eigen $k"
}
# ===============================【Perform eigenvalue analysis 】====================================
set lambda [eigen $numModes];
#the eigenvalues are calculated using eigen command and stored in lambda variable
# calculate frequencies and periods of the structure
#---------------------------------------------------
#the periods and frequencies of the structure are calculated next.
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
puts "periods are $T"
# write the output file cosisting of periods
#--------------------------------------------
set period "TRussData/Periods.txt"
set Periods [open $period "w"]
foreach t $T {
puts $Periods " $t"
}
close $Periods
engin analysis consider zerolength in 3d TRUSS
Moderators: silvia, selimgunay, Moderators
Re: engin analysis consider zerolength in 3d TRUSS
For example, your zeroLenght element 17 is defined in the following way:
element zeroLength 17 1 101 -mat 1 -dir 1
It is a spring between nodes 1 and 101 with nonlinear characteristics in X direction. But you have defined node 101 to have the same displacement in X direction as node 1 (equalDOF 1 101 1) that is fixed in X direction. Thus, node 101 can not move in X and your zeroLength element does nothing.
element zeroLength 17 1 101 -mat 1 -dir 1
It is a spring between nodes 1 and 101 with nonlinear characteristics in X direction. But you have defined node 101 to have the same displacement in X direction as node 1 (equalDOF 1 101 1) that is fixed in X direction. Thus, node 101 can not move in X and your zeroLength element does nothing.
Re: engin analysis consider zerolength in 3d TRUSS
Hi,vesna,
Now i have a question.
in my element,could you help me explain the below zerolength -dir and -orient meaning?
element zeroLength 17 1 101 -mat 1 -dir 1 .
element zeroLength 18 1 102 -mat 1 -dir 2 .
element zeroLength 19 1 103 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
if the global coord is :
z
! -
! -
! -
! ------------------------------ x
! --
! --
! --
y-
And the element 19 is in x-z plane,and there is 45 degrees in x-aixs,
what can i do if i want use the <-orient $x1 $x2 $x3 $yp1 $yp2 $yp3>?
Now i have a question.
in my element,could you help me explain the below zerolength -dir and -orient meaning?
element zeroLength 17 1 101 -mat 1 -dir 1 .
element zeroLength 18 1 102 -mat 1 -dir 2 .
element zeroLength 19 1 103 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
if the global coord is :
z
! -
! -
! -
! ------------------------------ x
! --
! --
! --
y-
And the element 19 is in x-z plane,and there is 45 degrees in x-aixs,
what can i do if i want use the <-orient $x1 $x2 $x3 $yp1 $yp2 $yp3>?
Re: engin analysis consider zerolength in 3d TRUSS
What you explained to me is correct.