zerolength problems

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

Moderators: silvia, selimgunay, Moderators

Post Reply
yyleno
Posts: 33
Joined: Wed Sep 15, 2010 4:50 am
Location: Shanghai University

zerolength problems

Post by yyleno »

Hi,

I have a simple 3D truss with simply consider all node have zerolength element.all zerolength elements are connected by equalDOF command in horizontal and vertical directions and 45 degrees in x-y plane. The connectivity for the l degree of freedom is enforced by zeroLength elements with elastic uniaxial material properties. When I run modal analysis for this structure, there were 7 warningsLAPACK routine returned 2 . I copied the code below. Could you please take a look and let me know where the problem 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 2 3
equalDOF 1 102 1 3
equalDOF 1 103 2
equalDOF 2 201 2 3
equalDOF 2 202 3
equalDOF 2 203 1 3
equalDOF 2 204 3
equalDOF 2 205 2 3
equalDOF 2 206 1 2
equalDOF 3 301 2 3
equalDOF 3 302 1 3
equalDOF 3 303 2
equalDOF 4 401 1 3
equalDOF 4 402 3
equalDOF 4 403 2 3
equalDOF 4 404 2
equalDOF 5 501 2 3
equalDOF 5 502 1 3
equalDOF 5 503 2 3
equalDOF 5 504 1 2
equalDOF 6 601 2 3
equalDOF 6 602 3
equalDOF 6 603 1 3
equalDOF 6 604 2
equalDOF 7 701 2
equalDOF 7 702 1 2
equalDOF 7 703 2
equalDOF 7 704 1 3
equalDOF 8 801 2
equalDOF 8 802 1 2
equalDOF 8 803 2
equalDOF 8 804 1 3

puts "spring stiffnesses defined"


#Specifying material: #Material Tag,Stiffness value
#Define force-deformation relationship for spring
uniaxialMaterial ElasticPP 1 1000000.0 0
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 1
element zeroLength 27 3 302 -mat 1 -dir 2
element zeroLength 28 3 303 -mat 1 -dir 1 -orient -1 0 1 -1 0 1
element zeroLength 29 4 401 -mat 1 -dir 2
element zeroLength 30 4 402 -mat 1 -dir 1 -orient -1 1 0 -1 1 0
element zeroLength 31 4 403 -mat 1 -dir 1
element zeroLength 32 4 404 -mat 1 -dir 2 -orient -1 0 1 -1 0 1
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 1 -orient 1 1 0 -1 1 0
element zeroLength 39 6 603 -mat 1 -dir 2
element zeroLength 40 6 604 -mat 1 -dir 1 -orient 1 0 1 -1 0 1
element zeroLength 41 7 701 -mat 1 -dir 2 -orient -1 0 -1 -1 0 1
element zeroLength 42 7 702 -mat 1 -dir 3
element zeroLength 43 7 703 -mat 1 -dir 1 -orient 1 0 -1 1 0 1
element zeroLength 44 7 704 -mat 1 -dir 2
element zeroLength 45 8 801 -mat 1 -dir 1 -orient -1 0 -1 -1 0 1
element zeroLength 46 8 802 -mat 1 -dir 3
element zeroLength 47 8 803 -mat 1 -dir 1 -orient 1 0 -1 1 0 1
element zeroLength 48 8 804 -mat 1 -dir 2

#define normal element
element truss 1 101 201 0.472 2
element truss 2 205 301 0.472 2
element truss 3 302 401 0.472 2
element truss 4 403 503 0.472 2
element truss 5 501 601 0.472 2
element truss 6 603 102 0.472 2
element truss 7 602 202 0.472 2
element truss 8 203 502 0.472 2
element truss 9 204 402 0.472 2
element truss 10 103 701 0.472 2
element truss 11 206 702 0.472 2
element truss 12 303 703 0.472 2
element truss 13 404 801 0.472 2
element truss 14 504 802 0.472 2
element truss 15 604 803 0.472 2
element truss 16 704 804 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
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: zerolength problems

Post by vesna »

In most of your zeroLength elements local x axis and vector yp are the same (defined by -orient). They have to be different in order to define local x-y plane. Try to fix it and see if it is going to work.
yyleno
Posts: 33
Joined: Wed Sep 15, 2010 4:50 am
Location: Shanghai University

Re: zerolength problems

Post by yyleno »

Hi,vesna,i have tried it,but there are some warning .so i send a email to you in your email box,pls help me and let me know where is the problem?
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: zerolength problems

Post by vesna »

Your scrip is too long for me to be able to find the error. I suggest you to build your model like this:
1. build your model without zeroLength elements and make sure it runs.
2. Add zeroLength elements to to one element and and make sure it runs.
3. Proceed with adding the elements one by one and checking if the model runs.
yyleno
Posts: 33
Joined: Wed Sep 15, 2010 4:50 am
Location: Shanghai University

Re: zerolength problems

Post by yyleno »

Thank you ,vesna,the problem has been resolved.thanks
yyleno
Posts: 33
Joined: Wed Sep 15, 2010 4:50 am
Location: Shanghai University

Re: zerolength problems

Post by yyleno »

And I find another question,
for example,i assigned "uniaxialMaterial Elastic 2 $E "
set E 1000.
Now if the E is a variable,and E is a assay,for example,E={10000,100002,10005,10010,10058}
IF i want to get different engin result to different E
what can i write the code?
Can you tell me the respect command about TCL/TK?
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: zerolength problems

Post by vesna »

You can use foreach loop to do this.

For example:

foreach E {10000 100002 10005 10010 10058} {

...
the code you already have
...

}
Post Reply