Curvilinear Coordinates

Programs using curvilinear coordinates, and tensor concepts are given.
2.5K Downloads
Updated 15 Apr 2014

View License

Programs and utility functions employing the Symbolic Math Toolbox are provided to analyze vectors and tensors in general curvilinear coordinates. The programs perform the following functions:
1) runcoord plots intersecting coordinate surfaces for several typical coordinate systems
2) runmetric computes and prints metric tensor properties for a general curvilinear coordinate system specified in a user defined function such as sphr.m
3) rundivcrl verifies agreement of numerical values of divergence and curl of an arbitrary vector computed in both cartesian and curvilinear coordinates
4) runconic plots surfaces illustrating how intersections of a cone and a plane produce conic section curves.
5) Testmetric computes properties for nine different coordinate systems and places the output in runmetric.tst. The symbolic equations from some of the examples are fairly lengthy.

The programs employ a number of other functions to define several coordinate systems (such as cylindrical, spherical, toroidal, conical, parabolic, ellipsoidal, and oblate spheroidal) and to compute base vectors, metric tensors, Christoffel symbols, covariant derivatives, divergence, and curl.

Functions readme.m and listequations.m describe the workspace contents and governing equations. These files, consisting mainly of comments, can be examined by typing their names or using the editor. A longer pdf file, accessible with the command open('TensorNotes.pdf'), develops the classical ideas of curvilinear coordinates and tensor analysis.

Cite As

Howard Wilson (2024). Curvilinear Coordinates (https://www.mathworks.com/matlabcentral/fileexchange/15903-curvilinear-coordinates), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Coordinate Systems in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

The code has been updated to run under MATLAB 8.3(R2014a) using the Symbolic Math Toolbox

1.1.0.0

Several code changes were made to improve compatibility with MATLAB 2011. A pdf document presenting tensor analysis concepts was also added.

1.0.0.0