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
clear; | |
clc; | |
close all; | |
V = zeros(100); | |
P = zeros(100); | |
ST = zeros(100); | |
H = zeros(100); | |
Hnet = zeros(100); |
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
clear; | |
clc; | |
close all; | |
hold off; | |
dt = 1.19; | |
time = 50; | |
n_steps = round(time/dt); | |
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
%rendering of gravity model, Gapcynski et al., 1969 | |
%coefficients taken from https://arc.aiaa.org/doi/10.2514/3.5479 | |
clear; | |
clc; | |
close all; | |
resolution =75; | |
GM = 4902.58; |
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
clear; | |
clc; | |
Temp = 477; | |
power_load = 2198; | |
A = 0.023951368224792 * Temp + 23.9241562583015; | |
B = 0.003480859912024 * Temp - 2.19986938582928; | |
C = -0.0001779207513 * Temp + 0.104916556604259; | |
D = 5.0656524872309E-06 * Temp - 0.002885372247954; |
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
##clear; | |
##clc; | |
powerdraw = 700; #nominal watts at 28V | |
RL = 28^2/powerdraw; %Load Resistance | |
R1 = 0.014; %Wire Resistance | |
R2 = 0.015; %Wire Resistance | |
R3 = 0.012; %Wire Resistance | |
R4 = 0.015; %Wire Resistance |
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
%Van der Waals | |
clear; | |
clc; | |
Tvdw = linspace(0,3.5,150); | |
V = linspace(0.25,5,202); | |
[TT,VV] = meshgrid(Tvdw,V); | |
P = 8/3.*(TT./(VV-1/3))-3./(VV.^2); |
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
clear; | |
clc; | |
pkg load symbolic; | |
sympref display unicode; | |
syms R0 R1 R2 R3 R4 R5 real; | |
syms V1 V2 V3 V4 V5 real; | |
ImpedanceMatrix5 = [R1+R0, -R1, 0, 0, 0;... | |
-R1, R1+R2, -R2, 0, 0;... |
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
#include <iostream> | |
#include <cmath> | |
#include <mutex> | |
#include <thread> | |
#include <Windows.h> | |
void sinusoid(bool &die, double &t, double &val, std::mutex &m) | |
{ | |
while (!die) | |
{ |
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
clear; | |
clc; | |
Temp = linspace(0,200,20); | |
R_CONST = 8314.4621; | |
MMASS = 31.998; | |
vapor_mass = linspace(0,300,20); | |
air_volume = 0.5; | |
a = 1.382/101300; | |
b = 0.03186; |
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
#NASSP SPSDK Tank simulator; | |
#inital conditions are set up to demo a CSM O2 Tank | |
clear all; | |
clc; | |
close all; | |
n_itterations = 1000; | |
itteration = 0; | |
global delta_time = 0.01; |
OlderNewer