Created
July 20, 2021 16:22
-
-
Save jabirjamal/be7cad7ea2a9e311cf30ab8566899565 to your computer and use it in GitHub Desktop.
Radiation Calculator 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
while True: | |
try: | |
b = float(input("Enter length of the emitting panel: ")) | |
a = float(input("Enter width of the emitting panel: ")) | |
c = float(input("Enter distance between the emitting panel and the plane element: ")) | |
break | |
except: | |
print("Error! Enter a valid number") | |
while True: | |
e = float(input("Enter emissivity of emitter (0 < e <= 1): ")) | |
if 0 < e <= 1: | |
break | |
print("Error! Enter a valid number between 0 and 1") | |
while True: | |
t = float(input("Enter temperature of the emitter in Kelvin: ")) | |
if t>273.15: | |
break | |
print("Enter a value greater than 273.15 K") | |
X = a/c | |
Y = b/c | |
F = (0.5/math.pi)*(((X/((1+X**2)**0.5))*(math.atan(Y/((1+X**2)**0.5))))+((Y/((1+Y**2)**0.5))*(math.atan(X/((1+Y**2)**0.5))))) | |
print("View factor of the panel is " + str(F)) | |
s = 5.670374*10**(-8) | |
print("The value of Stefan-Boltzman constant is: " + str(s) + "W/m²K\N{SUPERSCRIPT FOUR}") | |
tot_rad_emitted = e*s*t**4 | |
print("Total radiant heat emitted from the radiating panel is: " + str(round(tot_rad_emitted,2)) + " kW/m²") | |
rad_heat_received = tot_rad_emitted * F | |
print("Total radiant heat received at the plane element is: " + str(round(rad_heat_received,2)) + " kW/m²") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment