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


Groups > comp.soft-sys.math.mathematica > #7594 > unrolled thread

How to plot divergence of gradient as contour plot

Started bySzymon Roziewski <szymon.roziewski@gmail.com>
First post2012-01-05 11:03 +0000
Last post2012-01-06 09:20 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#7594 — How to plot divergence of gradient as contour plot

FromSzymon Roziewski <szymon.roziewski@gmail.com>
Date2012-01-05 11:03 +0000
SubjectHow to plot divergence of gradient as contour plot
Message-ID<je402c$efu$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#7597

Fromwood43 <wood43@comcast.net>
Date2012-01-06 09:17 +0000
Message-ID<je6e6f$q7o$1@smc.vnet.net>
In reply to#7594
On Jan 5, 4:03 am, Szymon Roziewski <szymon.roziew...@gmail.com>
wrote:

> 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?

<< VectorAnalysis`

SetCoordinates[Cartesian[x, y, z]];

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

Div[Grad[Sin[x + y], Cartesian[x, y, z]]]

[toc] | [prev] | [next] | [standalone]


#7608

FromPeter Breitfeld <phbrf@t-online.de>
Date2012-01-06 09:20 +0000
Message-ID<je6ec7$qaa$1@smc.vnet.net>
In reply to#7594
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web