Skip to content

Commit

Permalink
Merge pull request #13180 from szymag/field_doc
Browse files Browse the repository at this point in the history
curvilinear coordinate system in documentation
  • Loading branch information
Upabjojr committed Aug 23, 2017
2 parents 662cfb8 + 1cb11eb commit b93b73f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/src/modules/vector/fields.rst
Expand Up @@ -255,6 +255,22 @@ Or by using the dedicated function
>>> directional_derivative(C.x*C.y*C.z, 3*C.i + 4*C.j + C.k)
C.x*C.y + 4*C.x*C.z + 3*C.y*C.z

Field operator in orthogonal curvilinear coordinate system
==========================================================

``vector`` package supports calculation in different kind of orthogonal
curvilinear coordinate system. To do that, scaling factor (also known as
Lame coefficients) are used to express ``curl``, ``divergence`` or ``gradient``
in desired type of coordinate system.

For example if we want to calculate ``gradient`` in cylindrical coordinate
system all we need to do is to create proper coordinate system

>>> from sympy.vector import CoordSys3D
>>> c = CoordSys3D('c', transformation='cylindrical', variable_names=("r", "theta", "z"))
>>> gradient(c.r*c.theta*c.z)
c.theta*c.z*c.i + c.r*c.z/c.theta*c.j + c.r*c.theta*c.k

Conservative and Solenoidal fields
==================================

Expand Down

0 comments on commit b93b73f

Please sign in to comment.