Skip to content

Visual representation of scalar and vector fields using Numpy's contour and quiver functions. Comparison of vector field computed using Numpy's gradient function with the same vector field plotted using analytically deduced expressions for the gradient. Wrote a program for plotting vector field arrows originating only from contour lines.

Notifications You must be signed in to change notification settings

strangequarkkk/Scalar-and-Vector-Fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Scalar and Vector fields in Python

Python libraries used: Numpy, Matplotlib.pyplot.

In this Coursework/Project:

  1. Wrote a program to represent a scalar field h as discrete contours in 2d using .contour function of matplotlib.pyplot.

  2. Used analytically deduced expressions for 'Grad h' to plot the vector field as arrows (using .quiver function of matplotlib.pyplot).

  3. Used Numpy's gradient function to compute 'Grad h' numerically and then plotted the numerically calculated vector field 'grad h' as arrows using .quiver function of matplotlib.pyplot.

  4. Compared the plots of analytically determined 'grad h' and numerically computed 'grad h'.

  5. Wrote a program so that the vector field arrows only originate from contour lines.

I have attached the relevant question sheet and recommend that it be read while you're looking at the code. The programs were written in a Jupyter Notebook which has also been attached.

If you need any more information/explanation related to the code, don't hesitate to contact me.

About

Visual representation of scalar and vector fields using Numpy's contour and quiver functions. Comparison of vector field computed using Numpy's gradient function with the same vector field plotted using analytically deduced expressions for the gradient. Wrote a program for plotting vector field arrows originating only from contour lines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published