Professional Documents
Culture Documents
P=I2*R
INTRODUCTION
Electricity while create heat as it travels through a metal.
This process is called joule heating. The amount of heating can
be found using an energy and heat equation. If you assume a
constant thermal conductivity and a 1 dimensional Cartesian
coordinates you can use a steady state conduction analysis to
find the temperature of the metal relative to its location. If you
assume a time-dependent temperature profile you can use a
transient conduction analysis to find the temperature of the
metal dependent on the location and the time. I found the
temperature profile of a 5 ft length of 25 AWG Nichrome wire
with an electrical current of 500 amps put through the wire. One
end of the wire was held at a constant temperature of -150
degrees Celsius and the other was held at a constant temperature
of 20 degrees Celsius.
(2)
(3)
(4)
Nichrome
(1)
TRANSIENT CONDUCTION
To find the transient time-dependent temperature
profile, I had to use an equation that discretized the time and
spatial variable.
Tit+1 = Tit +t/(*Cp)*(k*( Tti-1 2*Tit + Tti+1)/x2 +q)
(6)
APPENDIX
ALL OF MY CODES USED
count=0;
Steady_State_Numerical.cpp
#include <iostream>
#include <math.h>
using namespace std;
// Nodes
N = 500;
// s dt
dt = 0.;
int main ()
{
//meters delta x
dx = 1.524/N;
// initiate variables
double P,p,Cp,I,R,pR,L,A,D,dx,k,dt,q,err,temp,tol;
int N,count;
// Solve for q
//thermal generation term J
q=P/(L*A);
// kg/m^3 density
p= 8.65e3;
// J/(kg*K) specific heat
Cp= 500.;
// amps current
I = 500.;
// ohms*m resistivity
pR = 240.e-8;
// m Length
L = 1.524;
}
// m diameter
D = 0.000455;
// m^2 Area
A = (1./4.)*3.141592659*D*D;
while (err>tol)
{
count++;
// ohms Resistance
R= pR*L/A;
//set T old to T
for (int i=0; i<N; i++)
{
T_old[i]=T[i];
}
// watts Power
P=(I*I*R)*1.e-9;
// watts/(m*K) thermal conductivity
k=17;
//equation 6
for (int i=0; i<N; i++)
{
T[i]=(0.5*(T[i-1]+T[i+1]))+(dx*dx*q/(2.*k));
T[0]=123.15;
// tolerence
tol=10e-8;
// iterations
T[N-1]=293.15;
}
//array err
err=0.0;
for (int i=0; i<N; i++)
{
temp=fabs((T[i]-T_old[i])/T[i]);
if (temp > err)
{
err=temp;
}
}
}
//output
for (int i=0;i<N;i++)
{
// output temperatures
cout << T[i] << endl;
// output x
// cout << i*dx << endl;
// output to command prompt
// cout << i*dx << " " << T[i] << endl;
}
// output itterations
// cout << count << endl;
return 0;
}
Steady_State_Analytical.cpp
#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
double P,p,Cp,I,R,pR,L,A,D,x,dx,k,dt,q,err,temp,tol;
int N,count;
// kg/m^3 density
p= 8.65e3;
// J/(kg*K) specific heat
Cp= 500.;
// amps current
I = 500.;
// ohms*m resistivity
pR = 240.e-8;
T[i]= -q/(2*k)*x*x+(T[N-1]-T[0]-(q/(2*k))*L*L)/L*x+T[0];
// m Length
L = 1.524;
// output temperature analytical
cout << T[i] << endl;
// m diameter
D = 0.000455;
// m^2 Area
A = (1./4.)*3.141592659*D*D;
}
// ohms Resistance
R= pR*L/A;
return 0;
}
// watts Power
P=(I*I*R)*1.e-9;
// watts/(m*K) thermal conductivity
k=17;
// tolerence
tol=10e-8;
// iterations
count=0;
// Nodes
N = 500;
// s dt
dt = 1000.;
//meters delta x
dx = 1.524/N;
Transient.cpp
#include <iostream>
#include <math.h>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
int main ()
{
double P,p,Cp,I,R,pR,L,A,D,dx,k,dt,q,err,temp,tol;
int N,count;
//s delta t
dt= 50.;
// kg/m^3 density
p= 8.65e3;
ostringstream filename;
// amps current
I = 500.;
// ohms*m resistivity
pR = 240.e-8;
ofstream output;
int
Nt=ceil(200000.0/dt),Nstop=ceil(10000.0/dt),f_count=0;
for (int tm=0; tm<Nt; tm++)
// m Length
L = 1.524;
{
for (int i=1; i < N-1; i++)
{
// m diameter
D = 0.000455;
T[i]=T[i]+dt/(p*Cp)*(k*(T[i-1]2*T[i]+T[i+1])/(dx*dx)+q);
}
// m^2 Area
A = (1./4.)*3.141592659*D*D;
if (tm%Nstop==0||tm==0)
{
// ohms Resistance
R= pR*L/A;
f_count++;
filename.str("");
// watts Power
P=(I*I*R)*1.e-9;
filename.clear();
// Nodes
N = 50;
//meters delta x
dx = 1.524/N;
{
output << (double)i*dx << " " << T[i] << endl;
}
output.close();
}
}
return 0;
}