I want to plot the Van der Waals-equations, specifically the part in which the Van der Waals loop is shown. First I tried plotting it with the Plot3D[]
function, tho the upper edges are very uneven and even with MaxRecursion
set to 15 I couldn't get rid of the problem.
R=8.314;
a=363.7*10^-3;
b=42.7*10^-6;
Plot3D[p, {V, 0, 0.001}, {T, 290, 320}, PlotTheme -> "Scientific",
PlotRange -> {0, 12000000}, AxesLabel -> {"V", "T", "p"},
ImageSize -> 1100, Exclusions -> {V == 0, T == 0}, MaxRecursion -> 8,
ViewPoint -> {0, -\[Infinity], 0}, ColorFunction -> Green]
When I used the ContourPlot3D[]
, I didn't had that problem.
ContourPlot3D[(R T)/(V - b) - a/V^2 == p, {V, 0, 0.001}, {T, 280,
340}, {p, 0, 12000000}, AxesLabel -> {"V", "T", "p"},
ImageSize -> Large, AspectRatio -> 0.8]
Now I want to have a graph which a specific value for T (such graphs are called isotherms), which is plotted in the same ContourPlot3D
. Also, I want to create a slider, in which I specify the value for T.
I do know, that the Show[]
function can be used, but don't know how to use it in this scenario since I want to plot two different things (a plane and graph) in one 3D plot.
Is there a way to to that? If yes, I'd be very thankful for your help :)
Thank you kglr! Tho does anyone understand why these uneven edges occur when using the Plot3D function and why there's a hole in the function plotted using ContourPlot3D?
R
,a
andb
? $\endgroup$Show
to combine the plots and atManipulate
for the slider. $\endgroup$