Talk:Corotational Truss Element: Difference between revisions
(Created page with 'I removed the reference to the doRayleigh flag. That does not seem to be implemented in the source code. corotTruss appears to implement Rayleigh damping by default. Truss do...') |
No edit summary |
||
Line 5: | Line 5: | ||
I used the following (MATLAB) script for verification: | I used the following (MATLAB) script for verification: | ||
<nowiki> | |||
clear all; clc | clear all; clc | ||
%% | %% | ||
Line 78: | Line 79: | ||
figure(1); %clf; | figure(1); %clf; | ||
plot(time,x(:,end),'LineWidth',2); hold all | plot(time,x(:,end),'LineWidth',2); hold all | ||
</nowiki> |
Revision as of 22:22, 5 July 2011
I removed the reference to the doRayleigh flag. That does not seem to be implemented in the source code.
corotTruss appears to implement Rayleigh damping by default. Truss does not. Someone should verify these findings.
I used the following (MATLAB) script for verification:
clear all; clc %% Damp = 1; Corot = 1; fout = fopen('Tester\Driver.tcl','w'); fprintf(fout,'wipe\n'); fprintf(fout,'model BasicBuilder -ndm 2 -ndf 3\n'); fprintf(fout,'file mkdir Data/\n'); fprintf(fout,'node 1 0.0 0.0\n'); fprintf(fout,'node 2 1.0 0.0\n'); fprintf(fout,'node 3 2.0 0.0\n'); fprintf(fout,'node 4 3.0 0.0\n'); fprintf(fout,'fix 1 1 1 1 \n'); fprintf(fout,'fix 2 0 1 1\n'); fprintf(fout,'fix 3 0 1 1\n'); fprintf(fout,'fix 4 0 1 1\n'); fprintf(fout,'mass 2 1.0 0.0 0.0\n'); fprintf(fout,'mass 3 1.0 0.0 0.0\n'); fprintf(fout,'mass 4 1.0 0.0 0.0\n'); fprintf(fout,'uniaxialMaterial Elastic 1 100.0\n'); if Corot fprintf(fout,'element corotTruss 1 1 2 1.0 1\n'); fprintf(fout,'element corotTruss 2 2 3 1.0 1\n'); fprintf(fout,'element corotTruss 3 3 4 1.0 1\n'); else fprintf(fout,'element Truss 1 1 2 1.0 1 -doRayleigh 1 \n'); fprintf(fout,'element Truss 2 2 3 1.0 1 -doRayleigh 1 \n'); fprintf(fout,'element Truss 3 3 4 1.0 1 -doRayleigh 1 \n'); end if Damp fprintf(fout,'region 1 -ele 1 2 3 -rayleigh 0.0 0.1 0.0 0.0\n'); end fprintf(fout,'timeSeries Rectangular 1 0.0 1.0 -factor 1.0e-4\n'); fprintf(fout,'pattern UniformExcitation 1 1 -accel 1\n'); fprintf(fout,'recorder Node -file Data/TestD.txt -time -nodeRange 1 4 -dof 1 disp\n'); fprintf(fout,'recorder Element -file Data/TestF.txt -time -eleRange 1 3 localForce\n'); fprintf(fout,'constraints Penalty 1.0e8 1.0e8\n'); fprintf(fout,'numberer RCM\n'); fprintf(fout,'system ProfileSPD\n'); fprintf(fout,'test EnergyIncr 1.0e-5 30 1\n'); fprintf(fout,'algorithm NewtonLineSearch\n'); fprintf(fout,'analysis Transient\n'); fprintf(fout,'integrator Newmark 0.5 0.25\n'); fprintf(fout,'analyze 500 0.02\n'); %% tic; cd('Tester'); !OpenSees_2_2_2 Driver.tcl toc cd .. %% Read results raw = dlmread('Tester\Data\TestD.txt',' '); time = raw(:,1); x = raw(:,2:end); raw = dlmread('Tester\Data\TestD.txt',' '); N = raw(:,2:end); %% Plot figure(1); %clf; plot(time,x(:,end),'LineWidth',2); hold all