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 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