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
#Vapor Pressure | |
clear; | |
clc; | |
res = 75; | |
R_CONST = 8314.4621 ##(L*Pa)/(mol*K) | |
MMASS = [31.998, 2.01588, 18.01528, 28.0134, 44.01, 33.434432, 92.146, 92.01, 4.00260]; #g/mol | |
VAPENTH = [213.13, 445.46, 2260.0, 198.83, 347.0, 1769.195, 991.01556, 414.3, 0.0829 ]; #J/g | |
VAPPRESS = [1314841.0, 4925221.0, 39441.0, 1528361.0, 493284.0, 25639.45, 21722.212986, 206782.99342, 14778377.09 ]; #Pa @ 273.00K |
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; | |
res = 300; | |
H = linspace(0,75,res); | |
O = linspace(0,75,res); | |
[HH,OO] = meshgrid(H,O); |
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 re | |
import glob | |
import os | |
### THIS SCRIPT HAS NO UNDO BUTTON. IT UPDATES ALL. SCENERIOS IN THE CURRENT DIRECTORY ### | |
### BACK UP YOUR FILES. KNOW WHAT DIRECTORY THIS IS RUNNING IN. | |
### I WILL DO THE UPDATE FOR YOU, BUT I CAN'T FIX AN INCORRECTLY PERFORMED UPDATE THAT YOU DO | |
### PM ME ON ORBITER-FORUM.COM (@n72.75) | |
all_scn_files = glob.glob('./*.scn') |
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 <thread> | |
#include <vector> | |
#include <mutex> | |
#include <functional> | |
#include <cmath> | |
void JobFunction(double dt) { | |
double dtTemp = cos(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
#include <iostream> | |
#include <thread> | |
#include <vector> | |
#include <mutex> | |
#include <functional> | |
#include <cmath> | |
//simple test function to give the CPU something to do | |
void JobFunction(double dt) { | |
double dtTemp = 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
function [V] = BatVoltage(ChargeLevel,MaxChargeVoltage) | |
## ChargeLevel = 0.0 -- 1.0 | |
## MaxChargeVoltage, voltage when ChargeLevel == 1.0 | |
V = (1.007921192669853 - 0.009537198357788667./(ChargeLevel+0.09727407714017093).^2).*MaxChargeVoltage; | |
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
clear; | |
clc; | |
#O2 and H2 density | |
O2Tcrit = 154.7; | |
H2Tcrit = 33.2; | |
N2crit = 126.2; | |
temp1 = linspace(0,O2Tcrit,75); | |
temp2 = linspace(O2Tcrit,500,100); | |
temp3 = linspace(0,H2Tcrit,15); |
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; | |
T = linspace(0,500,2000); | |
V1 = []; | |
V2 = []; | |
V3 = []; | |
R = 8.31446261815324E-2; #L.bar.K^-1.mol^-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
%Tank Heater | |
clear; | |
clc; | |
nominal_heat = 200; %Watts | |
ramp_rate = 10.0; | |
Dt = .1; | |
heat = 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
#Flow rate | |
clear; | |
clc; | |
size = 0.00500; | |
dt = .005; | |
Volume1 = 120; | |
Volume2 = 240; | |
mass = 300; |