How do I solve a second order ode with time dependent terms?
Ältere Kommentare anzeigen
I am trying to solve the turbulent heat transfer equation and I am not able to make the ode function.

The equation shown above is the one I am trying to solve. I am solving for temperature (T*) and the function f is not explicitly known. I have a matrix which contains the values of f, f' and f'' (the function f, its first and second derivative). The ode function which I made was as follows: (ETA_1 is the independent variable and T_1 is the dependent variable)
function T_out_1 = ODE_1_THERM(ETA_1,i,j,T_1,beta,y_out_1_final,ETAspan_1,Pr,Pr_t)
T_out_1 = zeros(2,1);
T_out_1(:,1) = T_1(:,2);
T_out_1(:,2) = -(y_out_1_final(:,1,j)+beta(1,j)*ETAspan_1(:,i,j).*y_out_1_final(:,3,j)/Pr_t + beta(1,j)*ETAspan_1(:,i,j).^2.*y_out_1_final(:,4,j)/(2*Pr_t))...
*T_1(2)/(1/Pr+beta(1,j)*ETAspan_1(:,i,j).^2.*y_out_1_final(:,3,j)/(2*Pr_t));
end
The vector ETAspan contains values of ETA itself and y_out_1_final is the matrix where I have stored the values of the function f and its derivative at different values of ETA corresponding to ETAspan.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!