Simple mass-spring model

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

Moderators: silvia, selimgunay, Moderators

Post Reply
Antrox
Posts: 4
Joined: Fri May 15, 2009 1:28 am
Location: University of Ancona

Simple mass-spring model

Post by Antrox »

Hi Silvia,
I've just downloading the new version 2.2 of Opensees and i'm testing this code:

wipe;
model BasicBuilder -ndm 2 -ndf 3;
node 1 1 1;
node 2 1 1 -mass 10 0 0;

fix 1 1 1 1;

uniaxialMaterial Elastic 1 100;
element zeroLength 1 1 2 -mat 1 -dir 1;

set accelSeriesX "Series -dt 0.01 -filePath 1-X.txt -factor 1";
pattern UniformExcitation 1 1 -accel $accelSeriesX;

recorder Node -file 2.out -time -node 2 -dof 1 2 3 4 5 6 disp;

constraints Plain;
numberer Plain;
system BandSPD
test NormDispIncr 1.0e-8 10;
algorithm Newton; #
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 2710 0.01; # apply 2710 0.01-sec time steps in analysis
puts "Done!"
wipe

But doesn't work:
WARNING BandSPDLinLapackSolver::solve() - the LAPACK routines returned 2
WARNING NewtonRaphson::solveCurrentStep() -the LinearSysOfEqn failed in solve()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 0.01
OpenSees > analyze failed, returned: -3 error flag
Done!

However, if I put nonzero masses in the other directions (es. 1e-6), the solution seems correct.

Another question:
With this new version, the node displacements are absolute while in the old version are relative, is it true?

Thanks
carlos
Posts: 23
Joined: Fri May 05, 2006 8:30 am
Location: Universidad Pais Vasco

Post by carlos »

Hello,

I'm not familiar with Uniformexcitation loads and they do not appear in the post, but I think that there are some wrong things in your code:

Your sample is uniaxial but you are using a 2D model
I think the Y degree it is not fixed (the zerolength is only for X degree).

You could try with
equalDOF 1 2 2
or even:
equalDOF 1 2 2 3

to fix the Y degree of freedom. Another posibility is to include a stiffness for the Y degree. If there are no loads in this direction the displacements and forces should be close to zero.

element zeroLength 1 1 2 -mat 1 1 1 -dir 1 2 3;

Although may be there is not important, you are asking displacements for 6 DOF when the model only has 3

Regards,
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

you have a rigid body mode, i.e. not enough constraints .. fix node 2 in the 2 and 3 directions.
Antrox
Posts: 4
Joined: Fri May 15, 2009 1:28 am
Location: University of Ancona

Post by Antrox »

Thanks!
Post Reply