필터 지우기
필터 지우기

Create a variable from excel data points which can then be used in ODE45 solver

조회 수: 2 (최근 30일)
Hello, For my Problem i have to solve the given 2nd order ODE. It describes the Motion of the crank assembly of an engine. My question is about the variable "Q_E". Q_E contains the Forces acting on the assembly, including the Forces from the combustion. Those Forces depend on the combustion pressure. The pressure depends on the crank angle (q(t)) which itself depends on the time. The pressure data has been given to me in form of an Excel sheet consisting of 2 colums of data; 1 column for the crank angle and the 2nd row for the corresponding pressure.Crank angle has an interval in degree [-360:1:360]. So, my Question : Is there a way to create a "pressure function" depending on q(t) (the crank angle) which can then be used by the ODE solver ? Right now the term "Q_E" contains a fixed value for the pressure and the ODE solver works fine. I'm Aware that my Problem is a very unprecise idea, but i hope it describes what i want to do. I would be very thankful for some suggestions ! Thanks in advance !
D1q = diff(q,t); D2q = diff(q,t,2); BewGL=D2q-(1/Theta)*[Q_E-1/2*Theta_strich*D1q^2] == 0;
ODE_BewGL=odeToVectorField(BewGL); ODE_BewGL_fcn = matlabFunction(ODE_BewGL, 'Vars' , [t Y]);
tspan = [0 10]; Y0 = [0 1];
[t,q]=ode45(ODE_BewGL_fcn, tspan, Y0);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by