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

1 回表示 (過去 30 日間)
Shubham
Shubham 2021 年 9 月 22 日
コメント済み: Jan 2021 年 9 月 22 日
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 件のコメント
Jan
Jan 2021 年 9 月 22 日
You forgot to mention, what the problem is.
Currently you call deriv from inside itself. This recursion is not wanted.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical 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