To determine response using ode45 for a time dependent forcing at specific nodes

1 次查看(过去 30 天)
function [qdot] = deriv(t,q,A,B)
F(9,1) = 100*sin(100*t); % There are total 7 nodes (4 dof at each node). I want to apply these 2 forces
F(10,1) = 100*cos(100*t); % at 3rd node in x and y direction
qdot = A*q +B*F ; % state space eqn - A - 56x56 | q - 56x1 | B - 56x28 | F - 28x1 (all zeroes except 9th/10th row)
% How to write this time dependent force vector the way I have
% written is not correct. In simple
% system we used to directly write
% the force eqn. But in this
% assembled system I dont know how
% to proceed the way I have written
% is not showing any error but it is
% incorrect as I am getting weird
% response.
% All the matrix A B are pre defined and are constant. Force vector is a
% function of time (28x1) with only two values in 9th and 10th row. How to incorporate this in the state space eqn ?
options = odeset;
[time,q]=ode45(@deriv,Time0,zeros(2*ndof,1),options,A,B);
time = time';
response = C*q';
return
I am doing FEM formulation of a rotordynamics problem. Please help me regarding this.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by