-
Notifications
You must be signed in to change notification settings - Fork 3
/
thermalmodelSC.py
89 lines (71 loc) · 2.76 KB
/
thermalmodelSC.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- coding: utf-8 -*-
"""
Created on Mon May 30 14:48:46 2016
@author: Chaggai
"""
import numpy as np
import SCpower
import HeatTransferFunctions as trans
import matplotlib.pyplot as plt
def Spacecraftthermal(distsun, abs_solar_SC, e_IR_SC, A_SC_sol, A_SC_plan, A_total, albedo_venus, R_venus, R_orbit, torbit, teclipse, heatcap, mass_SC, P_ins, eff_ins,heater_P,distsun_e,A_rad, e_rad):
#solar fluxincoming
solflux = SCpower.solarflux(distsun)
solfluxinter = SCpower.solarflux(distsun)
Q_abs_sol = solflux*abs_solar_SC*A_SC_sol
#albedo from planet incoming flux
visibility_fac = (R_venus/R_orbit)**2
flux_alb = solflux*albedo_venus*visibility_fac
Q_abs_alb = flux_alb*abs_solar_SC*A_SC_plan
#IR from planet temp
T_backbody_venus = 226.6 #http://nssdc.gsfc.nasa.gov/planetary/factsheet/venusfact.html
flux_IR = 5.670373*10**-8*T_backbody_venus**4
Q_abs_IR = flux_IR*e_IR_SC*A_SC_plan
#interplanetary
Q_abs_solinter = solfluxinter*abs_solar_SC*A_SC_sol+130.
T_SC_inter = (Q_abs_solinter/(5.670373*10**-8*(e_IR_SC*(A_total-A_rad)+e_rad*A_rad)))**(1./4.)-273.15
#time based simulator
time = np.arange(torbit)
timeplot = np.arange(torbit*6)
tempplot = []
Tnew = 295.
tday = torbit-teclipse
for orbit in range(6):
for t in time:
T= Tnew
if t <=tday:
Qin = Q_abs_IR+Q_abs_sol+ Q_abs_alb+P_ins*(1.-eff_ins)
if t>tday:
Qin = Q_abs_IR+P_ins*(1.-eff_ins)+heater_P
Q_out = e_IR_SC*5.670373*10**-8*(A_total-A_rad)*T**4+e_rad*5.670373*10**-8*A_rad*T**4
Qbal = Qin-Q_out
dT = Qbal*1/(mass_SC*heatcap)
Tnew = T+dT
tempplot.append(Tnew-273.15)
plt.plot(timeplot,tempplot)
Tmax_orb = np.max(tempplot)
Tmin_orb = np.min(tempplot)
return(Tmax_orb, Tmin_orb, T_SC_inter)
if __name__=="__main__":
distsun = 108.21*10**6*1000.
A_SC_sol = 2.5*4*1.1
A_SC_plan =A_SC_sol
A_total = 4.*2.5*4+2.*2.5**2
albedo_venus=0.65 #nasa fact sheet
alt_SC = 8427.5*1000.#112022.5*1000.
R_venus = 6051.8*1000.
R_orbit = alt_SC+R_venus
Tmin=273.15
torbit = P_SC = 11.96*3600. #11725.
teclipse = 0.34*3600. #1.5*3600.
P_eff = 0.2
heater_P =240
de = 149597870700
heatcap = 600.
mass_SC = 1148.8100
P_ins = 1000.
e_IR_SC = 0.10#19 blankets kapton
abs_solar_SC = 0.14
e_rad = 0.85
A_rad = 5.5
Tmax_orb, Tmin_orb, T_SC_inter= Spacecraftthermal(distsun, abs_solar_SC, e_IR_SC, A_SC_sol, A_SC_plan, A_total, albedo_venus, R_venus, R_orbit, torbit, teclipse, heatcap, mass_SC, P_ins, P_eff,heater_P,de,A_rad, e_rad)
print Tmax_orb, Tmin_orb, T_SC_inter