2
$\begingroup$

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]"}]
$\endgroup$
  • 3
    $\begingroup$ You need to add the option Exclusions -> None $\endgroup$ – rm -rf Mar 15 '13 at 18:33
  • $\begingroup$ Thank you very much that fixed it. I cannot up vote this because it's a comment. $\endgroup$ – user1543042 Mar 15 '13 at 19:02
  • $\begingroup$ You're welcome :) There was a previous question on the same issue that has the exact same answer, so I marked this as a duplicate of that instead. $\endgroup$ – rm -rf Mar 15 '13 at 19:06
  • $\begingroup$ That's okay I didn't think to use the keyword "omit" when I was searching because 75% of my plot was missing. $\endgroup$ – user1543042 Mar 15 '13 at 19:53

Browse other questions tagged or ask your own question.