2

I am trying to plot a relationship using Plot3D and for a reason I cannot figure out the function is not evaluated in the middle of my range. If I take a 2D slice using plot it works.

Bare bones code:

Clear["Global`*"]

k = 8.6173324*10^-5; (* [eV-K] Boltzmann constant *)
A0 = 1.20173*10^6; (* [(A/(m^2 K^2))] Richardson's Constant *)
e = 1; (* [e] Fundamental Charge *)
φc = 4.53;(* [eV] Work function of Tungsten *)
φa = 3.2; (* [eV] Work function of Calcium *)
Ta = 500; (* [K] Temperature of the Anode *)

J[T_,V_] = 
  Piecewise[{
    {A0*T^2*Exp[-(φc/(k*T))], V <= (φc-φa)/e}, 
    {A0*T^2*Exp[-((e*V+φa)/(k*T))], V > (φc-φa)/e}}];

J[T,V]

Plot3D[J[T,V], {V,0,3}, {T, 1500, 1800},
  PlotRange->Full,
  AxesLabel->{"Load Voltage [V]","Cathode Temperature [K]", "Current Density [A/m^2]"}]

Plot[J[1600, V], {V, 0, 3},
  PlotRange->Full,
  AxesLabel->{"Load Voltage [V]", "Current Density [A/m^2]"}]
m_goldberg
  • 107,779
  • 16
  • 103
  • 257
user1543042
  • 385
  • 1
  • 8

0 Answers0