To determine response using ode45 for a time dependent forcing at specific nodes
1 view (last 30 days)
Show older comments
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.
1 Comment
Jan
on 22 Sep 2021
You forgot to mention, what the problem is.
Currently you call deriv from inside itself. This recursion is not wanted.
Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!