Solve divergence using r, theta, and phi inputs. Choose direct derivatives or numeric sampling mode. Download results as CSV or PDF for reports fast.
For a vector field A = Ar e_r + Aθ e_θ + Aφ e_φ, the divergence in spherical coordinates is:
This calculator uses the expanded numeric form: 2Ar/r + ∂Ar/∂r + (cosθ·Aθ)/(r sinθ) + (1/r)∂Aθ/∂θ + (1/(r sinθ))∂Aφ/∂φ, where angular derivatives are interpreted per radian internally.
| r | θ | φ | Unit | Ar | Aθ | Aφ | ∂Ar/∂r | ∂Aθ/∂θ | ∂Aφ/∂φ | ∇·A |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 60 | 30 | Degrees | 1.2 | 0.5 | -0.3 | 0.4 | 0.2 (per rad) | -0.1 (per rad) | 1.786603 |
Note: If you select degrees, enter angular derivatives per degree; the calculator converts them to per-radian internally.
Divergence is the net “outflow” of a vector field from a tiny volume. This calculator evaluates ∇·A at one point (r, θ, φ) using your component values Ar, Aθ, and Aφ. It also reports radial, theta, and phi terms so you can see which direction dominates the result. Exports to CSV and PDF make documentation easy, and the term breakdown is useful for checking symmetry, units, and sign conventions quickly later.
r is distance from the origin and must be positive. θ is the polar angle from the +z axis, and φ is the azimuth angle in the x–y plane from +x. Trigonometric factors use radians internally, and the tool converts when you choose degrees.
The calculator follows the standard identity:
An expanded view separates 2Ar/r and ∂Ar/∂r, the cotangent factor (cosθ/sinθ)·Aθ/r, plus the angular derivative terms.
Direct mode uses ∂Ar/∂r, ∂Aθ/∂θ, and ∂Aφ/∂φ at the point. Numeric mode estimates them from nearby samples using central differences: dA/dx ≈ (A(x+h) − A(x−h)) / (2h). This supports simulation outputs and measured datasets.
Angular derivatives must be per radian inside the formula. If you enter degrees, the tool converts your ∂/∂degree values using 180/π ≈ 57.2958 before computing the theta and phi terms.
The theta and phi terms include 1/(r sinθ). When θ is near 0 or π, sinθ is near zero and the expression can be undefined or unstable. The warning helps you recognize pole behavior in spherical coordinates.
With r=2, θ=60°, φ=30°, Ar=1.2, Aθ=0.5, Aφ=−0.3, ∂Ar/∂r=0.4, ∂Aθ/∂θ=0.2 per rad, and ∂Aφ/∂φ=−0.1 per rad, the tool returns ∇·A ≈ 1.786603. Use it for fluid sources/sinks, electric flux checks, and validating conservation constraints in models.
Divergence is the net outflow rate of a vector field from a tiny volume around a point. Positive divergence suggests a source; negative divergence suggests a sink.
No. This calculator works at a single point. Provide component values at that point and either the partial derivatives or nearby samples for numeric estimation.
Enter derivatives per degree. The calculator converts them to per radian using 180/π before evaluating the divergence formula.
The formula contains 1/(r sinθ). When θ is near 0 or π, sinθ is near zero, causing division blow‑ups and undefined behavior at the coordinate pole.
Choose small steps that reflect how smooth your data is. Too large reduces accuracy; too small can amplify rounding noise. A practical start is 0.1–1% of the local variable scale.
The radial term depends on Ar and ∂Ar/∂r, the theta term depends on Aθ and ∂Aθ/∂θ, and the phi term depends on ∂Aφ/∂φ. Their sum equals ∇·A.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.