3
$\begingroup$

The output of the following code is the same as the input.

waals = (P + a/V^2) (V - b) == R T;

ContourPlot3D[waals /. {a -> 1, b -> 1, R -> 1},
 {P, 0, 100}, {V, 0, 100}, {T, 0, 100}]

But

ContourPlot3D[(P + 1/V^2) (-1 + V) == T,
 {P, 0, 100}, {V, 0, 100}, {T, 0, 100}]

works fine.

What's wrong? Do I have to specify all the parameters in the equation?

$\endgroup$
4
$\begingroup$

enter image description hereYou need to evaluate it before Plot to get placements done.

ContourPlot3D[
 Evaluate[waals /. {a -> 1, b -> 1, R -> 1}], {P, 0, 100}, {V, 0, 
  100}, {T, 0, 100}]

As suggested by @rcollyer, ContourPlot3d has HoldAll attribute, which can be seen as ,Attributes[ContourPlot3D] (*{HoldAll, Protected, ReadProtected}*)

$\endgroup$
  • 3
    $\begingroup$ The more complete answer is it has the HoldAll attribute. $\endgroup$ – rcollyer Aug 8 '13 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.