Graph Plotting the differential equation

2 visualizaciones (últimos 30 días)
Dhananjay Singh
Dhananjay Singh el 23 de Nov. de 2020
Comentada: Stephan el 23 de Nov. de 2020
How I plot qSol(r) wrt r and TSol(r) wrt r ?
%heat conduction with an electrical heat source in copper wire
clc; clear;
close all;
%parameters
R = 0.2; % radius in m
L = 10; % length of wire in m
ke = 60000000; % electrical conductivity of copper in S/m
k = 401; % thermal conductivity of copper in W/m.K
I = 10; % electrical current in Amp
Se = (I*I)/ke; % rate of heat production per unit volume
T0 = 20 % Temp in Celcius
%Energy Balance in cylindrical shell of thickness del(r) and length L
% Doing the energy balance and taking del(r) common and limiting it to 0, a
% linear differential equation is formed.
% SOLVING DIFFERENTIAL EQUATION
syms q(r) %q is the heat flux
ode = diff(r*q,r) == Se*r
cond = q(0)==0 %B.C at r = 0,q~=inf gives a expression which states that at r = 0 , q = 0
qSol(r)=dsolve(ode,cond)
%Temperature Profile
syms T(r)
ode = diff(T,r) ==(-Se*r/(2*k))
cond = T(R)==T0;
TSol(r)=dsolve(ode,cond)
%Plot Flux profile

Respuesta aceptada

Stephan
Stephan el 23 de Nov. de 2020
Editada: Stephan el 23 de Nov. de 2020
yyaxis left
fplot(qSol,[0, 100])
yyaxis right
fplot(TSol,[0, 100])
  2 comentarios
Dhananjay Singh
Dhananjay Singh el 23 de Nov. de 2020
Thank You
Stephan
Stephan el 23 de Nov. de 2020
Did you notice that you can accept and/or vote for useful answers?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by