Laboratorio de Termodinámica. Curso 2012-2013
Práctica 9. Flujo de calor en barras metálicas    


Para ejecutar un comando, posiciona sobre él el cursor  y aprieta mayúsculas - ENTER.
Las líneas subrayadas en amarillo  son comentarios de texto (no son ejecutables).

Primero introduce todos los datos experimentales en forma de pares de valores {x/m,t/ºC}

datosxtAl={{0.04,34.5},{.08,34.2},{.12,32.5},{.16,31.7},{.2,31.2},{.24,30.4},{.28,30},{.32,29.6},{.36,29.2},{.4,29},{.44,28.9},{.48,28.8}};

datosxtCu={{0.04,34.5},{.08,34.2},{.12,32.5},{.16,31.7},{.2,31.2},{.24,30.4},{.28,30},{.32,29.6},{.36,29.2},{.4,29},{.44,28.9},{.48,28.8}};

Despues introduce la temperatura ambiente {ta/ºC}

ta=20.3;

Ahora ajusta los datos del Al y los representas.

L=.5;Clear[t0,tL,p];{t0,tL,p}={t0,tL,p}/.FindFit[datosxtAl,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{tL,28},{p,1}},x]

Show[Plot[ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{x,0,L},AxesLabel->{" x / m","t / °C"},AxesOrigin->{0,Floor[tL]},PlotRange->{{0,.5},{Floor[tL],Floor[t0]+1}},BaseStyle->FontSize->14],ListPlot[datosxtAl],Graphics[Text["(Subscript[p, Al]) = "<>ToString[NumberForm[p,4]]<>" (m^(-1))",{.25,Floor[t0]-1}]]]

Ahora ajustas los datos del Cu y los representas.

Clear[t0,tL,p];{t0,tL,p}={t0,tL,p}/.FindFit[datosxtCu,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{tL,28},{p,1}},x]

Show[Plot[ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{x,0,L},AxesLabel->{" x / m","t / °C"},AxesOrigin->{0,Floor[tL]},PlotRange->{{0,.5},{Floor[tL],Floor[t0]+1}},BaseStyle->FontSize->14],ListPlot[datosxtCu],Graphics[Text["(Subscript[p, Cu]) = "<>ToString[NumberForm[p,4]]<>" (m^(-1))",{.25,Floor[t0]-1}]]]

Ahora calculas los errores (Asymp. SE) de los ajustes anteriores.

Needs["NonlinearRegression`"]

Clear[t0,tL,p];NonlinearRegress[datosxtAl,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{tL,28},{p,1}},x,RegressionReport->{ParameterTable}]

Clear[t0,tL,p];NonlinearRegress[datosxtCu,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{tL,28},{p,1}},x,RegressionReport->{ParameterTable}]

Ajuste alternativa con un parámetro de ajuste menos (tL) lo cual hace más preciso el valor de p (es decir, reduce su error)

L=.5;Clear[t0,p,tL];tL=ta+(t0-ta)/Cosh[p L];{t0,p}={t0,p}/.FindFit[datosxtAl,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{p,1}},x]

Show[Plot[ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{x,0,L},AxesLabel->{" x / m","t / °C"},AxesOrigin->{0,Floor[tL]},PlotRange->{{0,.5},{Floor[tL],Floor[t0]+1}},BaseStyle->FontSize->14],ListPlot[datosxtAl],Graphics[Text["(Subscript[p, Al]) = "<>ToString[NumberForm[p,4]]<>" (m^(-1))",{.25,Floor[t0]-1}]]]

Clear[t0,p];tL=ta+(t0-ta)/Cosh[p L];NonlinearRegress[datosxtAl,ta+((t0-ta)Sinh[p(L-x)]+(tL-ta)Sinh[p x])/Sinh[p L],{{t0,36},{p,1}},x,RegressionReport->{ParameterTable}]

Para solicitar ayuda sobre el uso de este notebook Mathematica puedes contactarme en : Jose.A.Manzanares@uv.es

Segunda Parte : Comprensión de la práctica. Analogía eléctrica

Res={{0,0},{3.5`,0},{3.5`,0},{3.75`,1},{4.`,0},{4.25`,-1},{4.5`,0},{4.75`,1},{5.`,0},{5.25`,-1},{5.5`,0},{5.75`,1},{6.`,0},{6.25`,-1},{6.5`,0},{6.5`,0},{10,0}};Resv=Table[RotationMatrix[Pi/2].Res[[i]],{i,1,Length[Res]}];Show[Graphics[{AbsoluteThickness[2],Line[{{-6,-1},{-6,1}}],AbsoluteThickness[1],Line[{{-5,-2.5},{-5,2.5}}],Line[{{-6,0},{-10,0},{-10,10},{-12,10}}],Line[{{-12,8.5},{-12,11.5}}],Line[{{-12.5,9},{-12.5,11}}],Line[{{-13,9.5},{-13,10.5}}],Line[{{-10,10},{30,10}}],Line[{{0,0},{-5,0}}],Line[{{90,0},{90,10},{55,10}}],Line[{{55,0},{60,0}}],Line[Res],Line[Resv],Line[Res+Table[{10,0},{i,1,Length[Res]}]],Line[Resv+Table[{10,0},{i,1,Length[Res]}]],Line[Res+Table[{20,0},{i,1,Length[Res]}]],Line[Resv+Table[{20,0},{i,1,Length[Res]}]],Line[Res+Table[{80,0},{i,1,Length[Res]}]],Line[Resv+Table[{80,0},{i,1,Length[Res]}]],Line[Res+Table[{60,0},{i,1,Length[Res]}]],Line[Resv+Table[{60,0},{i,1,Length[Res]}]],Line[Res+Table[{70,0},{i,1,Length[Res]}]],Line[Resv+Table[{70,0},{i,1,Length[Res]}]],FontSize->10,Black,Text["r",{2.5,5}],Text["r",{12.5,5}],Text["r",{22.5,5}],Text["r",{62.5,5}],Text["r",{72.5,5}],Text["r",{82.5,5}],Text["R",{5,2.5}],Text["R",{15,2.5}],Text["R",{25,2.5}],Text["R",{65,2.5}],Text["R",{75,2.5}],Text["r",{85,2.5}],Text["(Subscript[V, 1])",{0,-2}],Text["(Subscript[V, 2])",{10,-2}],Text["(Subscript[V, 3])",{20,-2}],Text["(Subscript[V, 4])",{30,-2}],Text["(Subscript[V, N])",{80,-2}],Text["(Subscript[V, N-1])",{70,-2}],Text["(Subscript[V, N-2])",{60,-2}],Text["(Subscript[I, 1])",{5,-2.5}],Text["(Subscript[I, 2])",{15,-2.5}],Text["(Subscript[I, 3])",{25,-2.5}],Text["(Subscript[I, N])",{85,-2.5}],Text["(Subscript[I, N-1])",{75,-2.5}],Text["(Subscript[I, N-2])",{65,-2.5}],Text["(Subscript[i, 1])",{-2.5,5}],Text["(Subscript[i, 2])",{7.5,5}],Text["(Subscript[i, 3])",{17.5,5}],Text["(Subscript[i, N])",{77.5,5}],Text["(Subscript[i, N-1])",{67,5}],Text["(Subscript[i, N-2])",{56.5,5}],PointSize[.01],Point[{0,0}],Point[{10,0}],Point[{20,0}],Point[{30,0}],Point[{60,0}],Point[{70,0}],Point[{80,0}],Opacity[.2],Rectangle[{-2,-3.5},{82,2.5}]}],ImageSize->{Automatic,100}]

NN=12;Rn=Table[0,{n,1,NN}];Vn=Table[1,{n,1,NN}];(* x = R/r *)Manipulate[Rn[[NN]]=x/2;Do[Rn[[n]]=1/(1+1/(x+Rn[[n+1]])),{n,NN-1,1,-1}];Do[Vn[[n]]=Vn[[n-1]]/(1+x/Rn[[n]]),{n,2,NN}];Show[ListPlot[Vn,PlotRange->{{0,NN+.5},{0,1.05}},PlotStyle->Red,Joined->True,InterpolationOrder->6,AxesLabel->{"n","(Subscript[V, n])/(Subscript[V, 1])"},BaseStyle->FontSize->14,Ticks->{Table[i,{i,1,12}],Automatic}],ListPlot[Vn,PlotStyle->Red]],{{x,0.05,"(Subscript[R, cond])/(Subscript[r, conv+rad])"},.0001,.15,Appearance->"Labeled"}]