diff --git a/@SSR/FRC.m b/@SSR/FRC.m index 0434af1..d16103d 100644 --- a/@SSR/FRC.m +++ b/@SSR/FRC.m @@ -6,7 +6,8 @@ N = nan(length(om),1); for j = 1:length(om) if ~isempty(cont_sol{j}) - N(j) = O.dt*norm(cont_sol{j},'fro'); + O.T = 2*pi/om(j); + N(j) = sqrt(O.dt)*norm(cont_sol{j}(1:end/2,:),'fro')/O.T; end end end \ No newline at end of file diff --git a/examples/motiv_example.m b/examples/motiv_example.m index b2ff10b..95201c0 100644 --- a/examples/motiv_example.m +++ b/examples/motiv_example.m @@ -71,11 +71,11 @@ SSfull.T = 2*pi/Omega_arrayf(j); [x_lin, xd_lin] = SSfull.LinearResponse(); LinSol = [x_lin; xd_lin]; - Nlin(j) = SSfull.dt*norm(LinSol,'fro'); + Nlin(j) = sqrt(SSfull.dt)*norm(LinSol(1:end/2,:),'fro')/SSfull.T; end figure(2); semilogy(Omega_arrayf,Nf,'-k','DisplayName', 'Full','linewidth',1); axis tight; grid on; hold on; -xlabel('$$\Omega$$ [rad/s]'); ylabel('$$||q||_2$$') +xlabel('$$\Omega$$ [rad/s]'); ylabel('$$\Vert q \Vert_{L^2}/T$$') legend('show') semilogy(Omega_arrayf,Nlin,'-b', 'DisplayName', 'Linear','linewidth',1); semilogy(Omega_array1,N1,'--g', 'DisplayName', 'Reduced $$I_1$$','linewidth',2); diff --git a/examples/vonKarman/example_curvedbeam.m b/examples/vonKarman/example_curvedbeam.m index ae738aa..88da452 100644 --- a/examples/vonKarman/example_curvedbeam.m +++ b/examples/vonKarman/example_curvedbeam.m @@ -74,7 +74,7 @@ %% Sequential continuation omega1 = SSfull.omega(1); -Omega_range = [0.7 1.3]*omega1; +Omega_range = [0.55 1.3]*omega1; T_range = 2*pi./Omega_range; ncontsteps = 100; @@ -87,11 +87,11 @@ SSfull.T = 2*pi/Omega_arrayf(j); [x_lin, xd_lin] = SSfull.LinearResponse(); LinSol = [x_lin; xd_lin]; - Nlin(j) = SSfull.dt*norm(LinSol,'fro'); + Nlin(j) = sqrt(SSfull.dt)*norm(LinSol(1:end/2,:),'fro')/SSfull.T; end figure(2); semilogy(Omega_arrayf,Nf,'-k','DisplayName', 'Full','linewidth',1); axis tight; grid on; hold on; -xlabel('$$\Omega$$ [rad/s]'); ylabel('$$||q||_2$$') +xlabel('$$\Omega$$ [rad/s]'); ylabel('$$\Vert q \Vert_{L^2}/T$$') legend('show') semilogy(Omega_arrayf,Nlin,'-b', 'DisplayName', 'Linear','linewidth',1); semilogy(Omega_array1,N1,'--g', 'DisplayName', 'Reduced $$I_1$$','linewidth',2); diff --git a/examples/vonKarman/example_straightbeam.m b/examples/vonKarman/example_straightbeam.m index d8567c0..8935459 100644 --- a/examples/vonKarman/example_straightbeam.m +++ b/examples/vonKarman/example_straightbeam.m @@ -85,14 +85,14 @@ else [x2,xd2] = SS1.NewtonRaphson('init',x2,'tol',tol,'maxiter',maxiter); end - N1(j) = SS1.dt*norm([x2; xd2],'fro'); + N1(j) = sqrt(SS1.dt)*norm([x2; xd2],'fro'); if j == 1 [x3,xd3] = SS2.NewtonRaphson('tol',tol,'maxiter',maxiter); % find out response using Picard iteration else [x3,xd3] = SS2.NewtonRaphson('init',x3,'tol',tol,'maxiter',maxiter); end - N2(j) = SS2.dt*norm([x3; xd3],'fro'); + N2(j) = sqrt(SS2.dt)*norm([x3; xd3],'fro'); if j == 1 @@ -101,10 +101,10 @@ [xf,xdf] = SS.NewtonRaphson('init',xf,'tol',tol,'maxiter',maxiter); end - NF(j) = SS.dt*norm([xf; xdf],'fro'); + NF(j) = sqrt(SS.dt)*norm([xf; xdf],'fro'); [x_lin, xd_lin] = SS.LinearResponse(); - NL(j) = SS.dt*norm([x_lin; xd_lin],'fro'); + NL(j) = sqrt(SS.dt)*norm([x_lin; xd_lin],'fro'); disp(vpa(A(j))) end @@ -126,13 +126,13 @@ %% forcing amp - response amp curve figure plot(A,NF,'-k','DisplayName', 'Full','linewidth',1); axis tight; hold on; -xlabel('$$F$$ [N]'); ylabel('$$||q||_2$$') +xlabel('$$F$$ [N]'); ylabel('$$\Vert q \Vert_{L^2}$$') lgd = legend('show'); lgd.Location = 'southeast'; plot(A,NL,'-b', 'DisplayName', 'Linear','linewidth',1); plot(A,N1,'--g', 'DisplayName', 'Reduced $$I_1$$','linewidth',2); plot(A,N2,'--r','DisplayName', 'Reduced $$I_2$$','linewidth',2); -ylim([0 0.032]) +ylim([0 0.65])