<p>What is wrong with this computation, plase? I am getting the result of 4291.65 W m^{-2} instead of 1361 W m^{-2}. Thank you very much</p>
<pre><code>import numpy as np

R_S = 6.957e8  # m
au = 149597870700 # m
sigma_SB = 5.670374419e-8 # W m-2 K-4

# Sun parameters
R = 1 * R_S
d = 1 * au
T = 5777.2  # K


Earth_factor = R**2 * np.pi / d**2

E = sigma_SB * T**4 * Earth_factor
print('SB', E)
</code></pre>

CC BY-SA 4.0
2023-11-28T12:41:40.440Z
Here's a tip: What's the ratio between the obtained and the expected result?
pela
CC BY-SA 4.0
2023-11-28T12:43:17.623Z
Also: May I suggest using `astropy.units`? It's great for keeping track of units (although that's not your problem here).
pela
CC BY-SA 4.0
2023-11-28T15:23:45.317Z
Thank you, pi. is the factor, but I do not know why.
Anna-Kat
CC BY-SA 4.0
2023-11-28T20:20:17.963Z
Your `Earth_factor` is the ratio between the surface area of the Sun and the surface area of the sphere at which the Earth revolves (so to speak). The former is $4\pi R_\odot^2$, the latter is $4\pi(1\,\mathrm{AU})^2$, so both the 4's _and_ the π's cancel. That is, `Earth_factor = (R_S/d)**2`.
pela
<the-sun><astrophysics>
Flux from the Sun on the Earth using the Stefan-Boltzmann law
Anna-Kat
# Flux from the Sun on the Earth using the Stefan-Boltzmann law

(Asked by: username_0 on 2023-11-28)

What is wrong with this computation, plase? I am getting the result of 4291.65 W m^{-2} instead of 1361 W m^{-2}. Thank you very much
import numpy as np

R_S = 6.957e8  # m
au = 149597870700 # m
sigma_SB = 5.670374419e-8 # W m-2 K-4

# Sun parameters
R = 1 * R_S
d = 1 * au
T = 5777.2  # K


Earth_factor = R**2 * np.pi / d**2

E = sigma_SB * T**4 * Earth_factor
print('SB', E)

**Tags:** the-sun, astrophysics
> **Comments:**
> **username_1**: Here's a tip: What's the ratio between the obtained and the expected result?  
> **username_1**: Also: May I suggest using `astropy.units`? It's great for keeping track of units (although that's not your problem here).  
> **username_0**: Thank you, pi. is the factor, but I do not know why.  
> **username_1**: Your `Earth_factor` is the ratio between the surface area of the Sun and the surface area of the sphere at which the Earth revolves (so to speak). The former is $4\pi R_\odot^2$, the latter is $4\pi(1\,\mathrm{AU})^2$, so both the 4's _and_ the π's cancel. That is, `Earth_factor = (R_S/d)**2`.  

---

## 0 answers

