Using ode45 for transient analysis

7 vues (au cours des 30 derniers jours)
louis marie
louis marie le 7 Avr 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.

Réponse acceptée

Torsten
Torsten le 8 Avr 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

Plus de réponses (0)

Produits


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by