How to Calculate Divergence in Curvilinear Coordinates
At a glance
- 1. Identify the coordinates
Determine the coordinate variables and whether the system is orthogonal.
- 2. Find scale factors
Compute the metric scale factors h₁, h₂, and h₃ from the coordinate transformation.
- 3. Insert components
Use physical vector components with the orthogonal-coordinate divergence formula.
- 4. Differentiate and simplify
Differentiate each flux term, include the scale factors, and combine the results.
Divergence measures the net outward flux of a vector field per unit volume. In Cartesian coordinates, its familiar form is
In curvilinear coordinates, coordinate surfaces may have different spacings and different areas. The scale factors that describe this geometry must therefore appear in the formula. This article gives the general formula, the especially useful orthogonal-coordinate version, and worked cylindrical and spherical examples.
The general coordinate formula
Let be coordinates, and let be the metric tensor. Write
If the vector field is expressed using contravariant components , then its divergence is
where repeated indices are summed over . Written without index summation notation, this is
The components here are contravariant coordinate components. They are not always the same as the components measured along unit vectors. This distinction is the source of many errors in curvilinear-coordinate calculations.
Orthogonal coordinates and scale factors
Most physics and vector-calculus applications use orthogonal coordinates. Let the line element be
where are the scale factors. In this case,
If denote the physical components of the vector field along the corresponding local unit vectors, then
This is the standard divergence formula for an orthogonal curvilinear coordinate system.
The physical and contravariant components are related by
Thus, if you use the scale-factor formula above, use physical components consistently.
Cylindrical coordinates
Cylindrical coordinates are defined by
Their scale factors are
For
the divergence is therefore
Cylindrical example
Take
Thus , , and . Substitute into the formula:
The answer is
Spherical coordinates
Use the convention in which is radius, is the polar angle measured from the positive -axis, and is the azimuthal angle in the -plane:
The scale factors are
For
the divergence becomes
Spherical example
Consider the radial field
Here and . Therefore
Hence
More generally, for a purely radial spherical field ,
For example, has zero divergence wherever , although it has a singular source at the origin in the distributional sense.
Common mistakes
Differentiating components without scale factors
The expression is not the divergence in spherical coordinates. The coordinate directions and area elements change with position.
Confusing angle conventions
Some books call the azimuthal angle and the polar angle , reversing the names used above. The formula must follow the definitions of the coordinates, not merely their symbols.
Mixing component types
The orthogonal formula uses components along unit vectors, such as . The metric-determinant formula uses contravariant components . Substituting one type into the other without the appropriate scale factors gives an incorrect result.
Ignoring singular coordinate locations
Cylindrical formulas contain , and spherical formulas contain . These factors reflect coordinate singularities at the axis or origin. A formula valid away from those locations may need separate analysis there, especially for fields with point or line sources.
References
- Mathematical Methods for Physicists, George B. Arfken, Hans J. Weber, and Frank E. Harris
- Mathematical Methods in the Physical Sciences, Mary L. Boas
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.