Clear Filters
Clear Filters

Simulation time in simulink seems to be unending

2 views (last 30 days)
Samrat
Samrat on 19 Apr 2023
Edited: Ranjeet on 5 May 2023
I have developed a ball bearing mathematical model in simulink considering a number of subsystem for each bearing component,but while I am trying to run it using ODE45 solver(as it is the best solver to analysis dynamic behaviour of bearing) , it's taking unlimited time with a very slow progress,like after 5 hrs. it's still showing zero percent but the simulation is going on.Please suggest a solution .
Following is the Matlab sample code to generate input value for angular speed of shaft which will be the input for running the inner race.
global M_s;
global K_s;
global R_s;
global J_c;
global M_c;
global K_pin;
global R_pin;
global M_b;
global k_ball;
global J_b;
global r_ball;
global M_p;
global K_p;
global R_p;
global r_c;
global r_b;
global r_i;
global n_b;
global omega;
global ecc;
global g;
global R_f;
global RPM;
if (isempty(whos('global','first_time')))
global first_time;
first_time=1;
M_s = VALUE;
K_s = VALUE;
R_s = VALUE;
J_c = VALUE;
M_c = VALUE;
K_pin = VALUE;
R_pin = VALUE;
J_b = VALUE;
M_b = VALUE;
k_ball = VALUE;
r_ball = VALUE;
r_b = VALUE;
r_i = VALUE;
r_c = VALUE;
n_b = VALUE;
M_p = VALUE;
R_p = VALUE;
K_p= VALUE;
R_f = VALUE;
g=9.81;
end
prompt = {'RPM'};
dlg_title = 'Shaft rotating speed';
num_lines = 1;
def = {num2str(RPM)};
answer = inputdlg(prompt,dlg_title,num_lines,def);
if isempty(answer)
return; %i.e, use default values
else
RPM=str2num(answer{1});
end
omega = RPM/60*2*pi;
  1 Comment
Ranjeet
Ranjeet on 3 May 2023
Edited: Ranjeet on 5 May 2023
Hi Samrat,
Can you provide the Simulink model so that the issue can be regenerated and checked for the never-ending simulation time you pointed out. Also, sharing the solver configuration parameters might help to understand the issue if sharing the model is not a possiblity.
The parameters of the ball bearing model and RPM has been provided but it is not clear what is being solved at each timestep.
I suggest referring to the following answer facing similar issues:
Also, you can refer/use ball bearing model in Simscape Multibody Contact Forces Library.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!