-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Georges Labrèche
committed
Apr 15, 2018
1 parent
c1458ac
commit 1b8165a
Showing
7 changed files
with
57 additions
and
152 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
function dTdt = eclipse(time_eclipse, initial_T) | ||
%ECLIPSE Thermal transient for the satellite's eclipse period. | ||
load('satellite_properties'); | ||
function dTdt = eclipse(time_eclipse, initial_T, satprop) | ||
%ECLIPSE Thermal transient analysis for the satellite's eclipse period. | ||
|
||
% Stefan-Boltzmann constant | ||
sigma = 5.67e-8; % W/(m^2*K^4) | ||
|
||
% No power absorbed by the surface. | ||
% No power absorbed by the surface (qa). | ||
% Because during eclipse the Solar Constant S = 0. | ||
% So sat.qa = 0. | ||
% So qa = 0. | ||
|
||
% Power emitted by the surface: | ||
qe = sat.epsilon * sat.Ae * sigma * initial_T^4; | ||
qe = satprop.coating.epsilon * satprop.Ae * sigma * initial_T^4; | ||
|
||
% No external heating source during eclise so sat.qs = 0. | ||
% This means that (sat.qs / (sat.m * sat.c) = 0 | ||
% No external heating source during eclise so satprop.radiating_heat = 0. | ||
% This means that satprop.radiating_heat / (satprop.mass * satprop.thermal_capacity) = 0 | ||
|
||
% The transient expression becomes: | ||
dTdt = -qe / (sat.m * sat.c); | ||
dTdt = -qe / (satprop.mass * satprop.thermal_capacity); | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
function [time_span, T_C] = simulate(orbit, satprop) | ||
%SIMULATE Simulates the satellite's thermal transience and returns it's | ||
% temperature data over time (in Celsius and minutes respectively). | ||
|
||
% List that will contain data to plott. | ||
time_span = [] | ||
T_K = [] | ||
|
||
% ode45 options. | ||
options = odeset('RelTol', 1e-8, 'AbsTol', 1e-8); % Accuracy. | ||
|
||
m = 0; | ||
n = 0; | ||
|
||
for i = (1: 1: orbit.num) | ||
|
||
% Eclipse phase. | ||
if exist('T_sun', 'var') == 1 | ||
satprop.T0_K = T_sun(end); | ||
end | ||
|
||
tspan = [m * orbit.T_ecl + n * orbit.T_sun_ill: 1: (m+1) * orbit.T_ecl + n * orbit.T_sun_ill]; | ||
[time_eclipse, T_eclipse] = ode45(@(t,y) eclipse(t, y, satprop), tspan, satprop.T0_K, options); | ||
|
||
m = m + 1; | ||
|
||
% Sun illuminated phase. | ||
satprop.T0_K = T_eclipse(end); | ||
tspan = [m * orbit.T_ecl + n * orbit.T_sun_ill: 1: m * orbit.T_ecl + (n+1) * orbit.T_sun_ill]; | ||
[time_sun, T_sun] = ode45(@(t,y) sun(t, y, satprop), tspan, satprop.T0_K, options); | ||
|
||
n = n + 1; | ||
|
||
time_span = [time_span; time_eclipse; time_sun]; | ||
T_K = [T_K; T_eclipse; T_sun]; | ||
end | ||
|
||
% Time span in minutes. | ||
time_span = time_span / 60; | ||
|
||
% Temperature in Celsius. | ||
T_C = T_K - 273; | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
function dTdt = sun(time_sun, initial_T) | ||
%SUN Thermal transient for the satellite's sun illuminated period. | ||
load('satellite_properties'); | ||
|
||
function dTdt = sun(time_sun, initial_T, satprop) | ||
%SUN Thermal transient analysis for the satellite's sun illuminated period. | ||
|
||
% Stefan-Boltzmann constant. | ||
sigma = 5.67e-8; % W/(m^2*K^4) | ||
|
||
% Solar constant. | ||
S = 1378; | ||
|
||
% Power absorbed by the surface. | ||
qa = sat.alpha * sat.Aa * S; | ||
qa = satprop.coating.alpha * satprop.Aa * S; | ||
|
||
% Power emitted by the surface. | ||
qe = sat.epsilon * sat.Ae * sigma * initial_T^4; | ||
qe = satprop.coating.epsilon * satprop.Ae * sigma * initial_T^4; | ||
|
||
dTdt = (1 / (sat.m * sat.c)) * (qa - qe) + (sat.qs / (sat.m * sat.c)); | ||
dTdt = (1 / (satprop.mass * satprop.thermal_capacity)) * (qa - qe) + (satprop.radiating_heat / (satprop.mass * satprop.thermal_capacity)); | ||
end | ||
|