Using ode45 for transient analysis
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
louis marie
am 7 Apr. 2019
Beantwortet: Torsten
am 8 Apr. 2019
Hi,
Quite inexperinced with MATLAB so apologies if the question is obvious but:
I need to use matlab to do a transient analysis of a mixed mode heat transfer (radiation and convection), and calculate time taken for a mass of water to increase to a certain temperature. As temperature increases it changes the heat transfer properites.
The equation I'm trying to use to calculate time is as follows:
dt = (Mw * Cw * dT)/(Adisc * (e*(q2 + q3 - (2 * sig * T^4))-(alp2 + alp3)*(T - Tamb)))
Everything is a constant except 'T' which is the water temperature and will vary while the water is heated. Now my problem is using ode45, because it appears I need to input a time span 'tspan':
[t,y] = ode45(odefun,tspan,y0)
This 'tspan' requires the final time, however, I am obviously trying to calculate the final time so not sure how I should be doing this.
Any help apreciated.
0 Kommentare
Akzeptierte Antwort
Torsten
am 8 Apr. 2019
First possibility:
Use the end time of integration big enough such that the water temperature surely exceeds the one you prescribe. Then read the time required to heat the water to the requested temperature from the t-T - plot.
Second possibility:
Use the event option of ODE45 to stop integration at the time where the water temperature reaches the one you request:
https://de.mathworks.com/help/matlab/math/ode-event-location.html
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!