# Solid Angle subtended by a sphere Approximation

We want to approximate the value of the solid angle subtended by a sphere as seen from any point in space outside of that sphere. This expression will be used in ToFu to compute the radiated power received by a particle of arbitrary radius (small vs plasma volume discretization) from the whole plasma. The expression will allow faster computation.



## Notations



Let’s consider the case of a spherical particle of radius $r$, observed from point $M$ located at a distance $d$ from the center $C$ of the particle, as illustrated in the figure above. By definition, the solid angle $\Omega = \dfrac{S}{d^2}$ , where $S$ is the surface on the sphere of center $M$ intersecting the particle center $C$ and limited by its radius, as represented in the figure below.





## Solid Angle approximation
In our case, we get

$$\Omega = 2\pi \left( 1 - \sqrt{1-\left(\dfrac{r}{d}\right)^2}\right)$$

However, the particle radius is almost always much smaller than the distance between the particle and the observation point $M$. Thus, often $$\dfrac{r}{d} = X \xrightarrow[]{} 0$$

The taylor series of the function $\Omega(X) = 2\pi \left( 1 - \sqrt{1-X^2}\right)$ at $X=0$ is given by 

$$\Omega(X) = \Omega(0) + X\Omega'(0) + \dfrac{X^2}{2}\Omega''(0) + \dfrac{X^3}{6}\Omega^{(3)}(0)+ \dfrac{X^4}{24}\Omega^{(4)}(0) + O(x^4)$$

where

$$
\begin{align}
\Omega(X) &= 2\pi \left( 1 - \sqrt{1-X^2}\right)\\
\Omega'(X) &= 2\pi X \left( 1 - X^2\right)^{-\dfrac{1}{2}}\\
\Omega''(X) &= 2\pi  \left( 1 - X^2\right)^{-\dfrac{3}{2}}\\
\Omega^{(3)}(X) &= 6 \pi X \left( 1 - X^2\right)^{-\dfrac{5}{2}}\\
\Omega^{(4)}(X) &= 6 \pi  \left(4X^2 + 1 \right)\left( 1 - X^2\right)^{-\dfrac{7}{2}}
\end{align}
$$


Thus, we get

$$ \Omega(X) = \pi x^2 + \dfrac{x^4 \pi}{4} + O(x^4) $$

Replacing the variable back

$$ \Omega \approx \pi \left(\dfrac{r}{d}\right)^2 + \dfrac{\pi}{4}\left(\dfrac{r}{d}\right)^4$$

And to the 9-th degree

$$ \Omega \approx \pi \left(\dfrac{r}{d}\right)^2 + \dfrac{\pi}{4}\left(\dfrac{r}{d}\right)^4 + \dfrac{\pi}{8}\left(\dfrac{r}{d}\right)^6 + \dfrac{5 \pi}{64}\left(\dfrac{r}{d}\right)^8$$

## Computation


```python
%matplotlib widget
import ipywidgets as widgets
import matplotlib.pyplot as plt
import numpy as np
```


```python
# set up plot
fig, ax = plt.subplots(figsize=(6, 4))
ax.grid(True)
 

def exact(r, d):
    """
    Return a sine for x with angular frequeny w and amplitude amp.
    """
    return 2*np.pi*(1-np.sqrt(1-(r/d)**2))
 
def approx(r,d):
    """
    Return a sine for x with angular frequeny w and amplitude amp.
    """
    x = r/d
    return np.pi*(x**2 + x**4/4)

# generate x values
d = np.linspace(1, 10, 100)

maxdiff = 0.
for r in np.linspace(0.1,0.8,8):
    diff = abs(exact(r, d) - approx(r,d))
    if r < 0.5:
        maxdiff = max(np.max(diff), maxdiff)
    ax.plot(d, diff, label=str(r))

ax.set_ylim([0, maxdiff])
ax.legend()
ax.set_title("Error with respect to distance for different radius")

```


    Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …





    Text(0.5, 1.0, 'Error with respect to distance for different radius')



0f74ebd3a021c22e79298ffc9e2376ba09ccad98
ipynb
Jupyter Notebook
Notes_Upgrades/SolidAngle/Solid_Angle_Sphere_Approx.ipynb
WinstonLHS/tofu
c95b2eb6aedcf4bac5676752b9635b78f31af6ca
MIT
2017-07-09T10:29:45.000Z
2022-03-31T02:44:50.000Z
Notes_Upgrades/SolidAngle/Solid_Angle_Sphere_Approx.ipynb
WinstonLHS/tofu
c95b2eb6aedcf4bac5676752b9635b78f31af6ca
MIT
2017-07-02T21:06:07.000Z
2022-03-02T08:07:57.000Z
Notes_Upgrades/SolidAngle/Solid_Angle_Sphere_Approx.ipynb
Didou09/tofu
4a4e1f058bab8e7556ed9d518f90807cec605476
MIT
2017-07-02T20:38:53.000Z
2021-12-04T00:12:30.000Z
Qwen/Qwen-72B
1. YES
2. YES