Spline Derivatives and Root Finding

4 vues (au cours des 30 derniers jours)
Ttill
Ttill le 8 Nov 2016
Commenté : Ttill le 8 Nov 2016
A reactor is thermally stratified as in the following table:
Depth, m= [0 0.5 1 1.5 2 2.5 3]
Temperature, ◦C= [70 70 55 22 13 10 10]
Based on these temperatures, the tank can be idealized as two zones separated by a strong temperature gradient or thermocline. The depth of the thermocline can be defined as the inflection point of the temperature-depth curve — at is, the point at which d^2T/dz^2=0.
At this depth, the heat flux from the surface to the bottom layer can be computed with Fourier’s law:q=k*(dT/dz)
Use a clamped cubic spline fit with zero end derivatives to determine the thermocline depth. If k =0.01 cal/(s · cm · ◦C) compute the flux across this interface.
So I know I need a spline function and I understand the typical format is yy= spline(x,Y,xx) but I am very confused about labeling. If someone could help me break this down or point me in the right direction thatd be great
  1 commentaire
Ttill
Ttill le 8 Nov 2016
this is what i have thus far
%hw8_1 d= 0:3; y= [70 70 55 22 13 10 10]; dd= 0:.5:3; k=0.01 cs= spline(dd,[0 y 0]);
M= diag(0:.5:3,1);
%first derivative cs1= cs; cs1.coefs=cs1.coefs.*M;
%second derivative cs2= cs1; cs2.coefs=cs2.coefs.*M;
x= linspace(dd(1),dd(end),1001);
q= k.*cs1 q

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Splines dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by