Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7608

Re: How to plot divergence of gradient as contour plot

From Peter Breitfeld <phbrf@t-online.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to plot divergence of gradient as contour plot
Date 2012-01-06 09:20 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <je6ec7$qaa$1@smc.vnet.net> (permalink)
References <je402c$efu$1@smc.vnet.net>

Show all headers | View raw


Szymon Roziewski wrote:

> Hello there,
>
> I am concerning to plot something like that.
>
> ContourPlot[Divergence[Gradient[Sin[x + y]]], {x, -5, 5}, {y, -5, 5}]
>
> Plotting divergence of gradient scalar field.
> How can I manage to do that?
>
> Best regards,
> Szymon Roziewski

Try this:

Needs["VectorAnalysis`"]
SetCoordinates[Cartesian[x,y,z]]   (*usual cartesian coordinates *)

ContourPlot[Evaluate@Div@Grad[Sin[x+y]],{x,-5,5},{y,-5,5}]

You need to include Evaluate, dew to the way Plot works.

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to plot divergence of gradient as contour plot Szymon Roziewski <szymon.roziewski@gmail.com> - 2012-01-05 11:03 +0000
  Re: How to plot divergence of gradient as contour plot wood43 <wood43@comcast.net> - 2012-01-06 09:17 +0000
  Re: How to plot divergence of gradient as contour plot Peter Breitfeld <phbrf@t-online.de> - 2012-01-06 09:20 +0000

csiph-web