Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GSE cryo dewars, remove cabin heater boilers from cabin fans #1305

Open
wants to merge 2 commits into
base: Orbiter2016
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 68 additions & 35 deletions Config/ProjectApollo/SaturnSystems.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@

# Cryo tanks
<TANK> O2TANK1 <0.5 1.0 -6.0> 133.9387 0.0000001
CHM 0 145149.5584 0.0 16718275.438623158261
VALVE IN 1 0.0001
CHM 0 145149.5584 0.0 16710733.816149236634
VALVE IN 1 0.01
VALVE OUT 1 0.00001
VALVE LEAK 0 1.000 # to O2VENT
</TANK>

<TANK> O2TANK2 <0.5 1.0 -5.0> 133.9387 0.0000001
CHM 0 145149.5584 0.0 16718275.438623158261
VALVE IN 1 0.0001
CHM 0 145149.5584 0.0 16710733.816149236634
VALVE IN 1 0.01
VALVE OUT 1 0.00001
VALVE LEAK 0 1.000 # to O2VENT
</TANK>

<TANK> H2TANK1 <0.5 -1.0 -6.0> 191.1387 0.0000001
CHM 1 12700.58636 0.0 2775233.711418505758
VALVE IN 1 0.001
VALVE IN 1 0.01
VALVE OUT 1 0.0001
</TANK>

<TANK> H2TANK2 <0.5 -1.0 -5.0> 191.1387 0.0000001
CHM 1 12700.58636 0.0 2775233.711418505758
VALVE IN 1 0.001
VALVE IN 1 0.01
VALVE OUT 1 0.0001
</TANK>

Expand All @@ -44,64 +44,64 @@

#<TANK> O2TANK1 <0.5 1.0 -6.0> 200.90805 0.0000001
# CHM 0 217724.3386 0.0 25077413.2731144
# VALVE IN 1 0.0001
# VALVE OUT 1 0.00001
# VALVE LEAK 0 1.000 # to O2VENT
# VALVE IN 1 0.01
# VALVE OUT 1 0.00001
# VALVE LEAK 0 1.000 # to O2VENT
#</TANK>

#<TANK> O2TANK2 <0.5 1.0 -6.0> 200.90805 0.0000001
# CHM 0 217724.3386 0.0 25077413.2731144
# VALVE IN 1 0.0001
# VALVE OUT 1 0.00001
# VALVE LEAK 0 1.000 # to O2VENT
# VALVE IN 1 0.01
# VALVE OUT 1 0.00001
# VALVE LEAK 0 1.000 # to O2VENT
#</TANK>

#<TANK> H2TANK1 <0.5 -1.0 -6.0> 286.70805 0.0000001
# CHM 1 19050.87954 0.0 4162850.56712777
# VALVE IN 1 0.001
# VALVE IN 1 0.01
# VALVE OUT 1 0.0001
#</TANK>

#<TANK> H2TANK2 <0.5 -1.0 -5.0> 286.70805 0.0000001
# CHM 1 19050.87954 0.0 4162850.56712777
# VALVE IN 1 0.001
# VALVE IN 1 0.01
# VALVE OUT 1 0.0001
#</TANK>


# Fuel cell supply
<TANK> O2FUELCELL1MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001
CHM 0 1043.077522913324 0.000000000000 131947.848325455590
<TANK> O2FUELCELL1MANIFOLD <0.0 0.5 -4.0> 0.1 0.0000001
CHM 0 108.249888998237 0.000000000000 12485.288247202603
VALVE IN 1 0.000001
VALVE OUT 1 0.0001
</TANK>

<TANK> H2FUELCELL1MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001
CHM 1 65.606946161759 0.000000000000 14582.851450087715
<TANK> H2FUELCELL1MANIFOLD <0.0 -0.5 -4.0> 0.1 0.0000001
CHM 1 12.339700327149 0.000000000000 2697.919489574218
VALVE IN 1 0.0001
VALVE OUT 1 0.0001
</TANK>

<TANK> O2FUELCELL2MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001
CHM 0 1037.477918035462 0.000000000000 131151.068692949397
<TANK> O2FUELCELL2MANIFOLD <0.0 0.5 -4.0> 0.1 0.0000001
CHM 0 108.249888998237 0.000000000000 12485.288247202603
VALVE IN 1 0.000001
VALVE OUT 1 0.0001
</TANK>

<TANK> H2FUELCELL2MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001
CHM 1 65.606946161759 0.000000000000 14582.851450087715
<TANK> H2FUELCELL2MANIFOLD <0.0 -0.5 -4.0> 0.1 0.0000001
CHM 1 12.339700327149 0.000000000000 2697.919489574218
VALVE IN 1 0.0001
VALVE OUT 1 0.0001
</TANK>

<TANK> O2FUELCELL3MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001
CHM 0 1043.077174288020 0.000000000000 131947.808112456172
<TANK> O2FUELCELL3MANIFOLD <0.0 0.5 -4.0> 0.1 0.0000001
CHM 0 108.249888998237 0.000000000000 12485.288247202603
VALVE IN 1 0.000001
VALVE OUT 1 0.0001
</TANK>

<TANK> H2FUELCELL3MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001
CHM 1 65.606946161759 0.000000000000 14582.851450087715
<TANK> H2FUELCELL3MANIFOLD <0.0 -0.5 -4.0> 0.1 0.0000001
CHM 1 12.339700327149 0.000000000000 2697.919489574218
VALVE IN 1 0.0001
VALVE OUT 1 0.0001
</TANK>
Expand Down Expand Up @@ -217,17 +217,33 @@
N2FUELCELL3BLANKET:OUT N2VENTFUELCELL3:IN BURST 386106.0 379212.0 ONEWAY
</PIPE>

# GSE Oxygen

# GSE Tanks
<TANK> GSEO2TANK <0.0 0.0 0.0> 30000.0 0.0000001
CHM 0 2434732.8812879900 2432298.1484067000 471776112.7860329
CHM 0 2434732.88128799 2432298.1484067 471776112.7860329
VALVE IN 0 0.1
VALVE OUT 0 0.1
</TANK>

<TANK> GSECRYOO2DEWAR <0.0 0.0 0.0> 1170.0 0.0000001
CHM 0 1321289.48713327 0.0 137545922.171345
VALVE IN 0 0.1
VALVE OUT 1 0.001
VALVE OUT2 1 0.001
</TANK>

<TANK> GSECRYOH2DEWAR <0.0 0.0 0.0> 3000.0 0.0000001
CHM 1 336383.40223074 0.0 71673876.8049215
VALVE IN 0 0.1
VALVE OUT 1 0.001
VALVE OUT2 1 0.001
</TANK>


# Suit/cabin
<TANK> CABIN <0.0 0.0 0.5> 6173.07 0.001
CHM 0 1718.361485634 1716.643124149 332965.4401969372 ##21% O2 at 14.7psi and 70F
CHM 3 5659.333862670 5653.674528807 1237828.7537219035 ##79% N2 at 14.7psi and 70F
CHM 0 2819.212810261253 2818.230787193268 542220.332599931047 ##21% O2 at 14.7psi and 70F
CHM 3 5036.197605570263 5035.306331507107 1093724.244797177147 ##79% N2 at 14.7psi and 70F
VALVE IN 1 0.3 # to SUITCIRCUITRETURNVALVE (SUITRELIEFVALVE), from CABINPRESSUREREGULATOR, CABINPRESSURERELIEFINLET1/2
VALVE OUT 0 0.6 # to SUITCIRCUITRETURNVALVE (SUITCIRCUITRETURNINLET)
VALVE OUT2 0 0.001 # to CABINVENT
Expand All @@ -247,7 +263,7 @@
</VALVE>

<TANK> SUITCIRCUITMANIFOLD <0.0 0.0 1.0> 5.0 0.001
CHM 0 1386.1 1386.0 258207.42580077233
CHM 0 7.403869320457 7.403085995771 1381.542462292341
VALVE IN 1 0.1 # from SUITCOMPRESSORCO2ABSORBER
VALVE OUT 1 0.1 # to SUIT
VALVE OUT2 0 0.01 # Suit-Cabin Flow 300
Expand All @@ -259,14 +275,14 @@
</VALVE>

<TANK> SUIT <0.0 0.0 1.0> 1000.0 0.001
CHM 0 1386.1 1386.0 258207.42580077233
CHM 0 1478.576423726808 1478.453254181854 275524.080367444200
VALVE IN 1 0.1 # from SUITCIRCUITMANIFOLD
VALVE OUT 1 2.0 # to SUITCIRCUITRETURNVALVE
VALVE OUT2 0 0.1 # from O2DEMANDREGULATOR (SUITTESTVALVE)
</TANK>

<TANK> SUITCIRCUITRETURNVALVE <0.0 0.0 1.0> 100.0 0.001
CHM 0 1386.1 1386.0 258441.62182570685
CHM 0 148.297619998598 148.272717691376 27715.751268357122
VALVE IN 1 0.3 # to CABIN (SUITCIRCUITRETURNINLET), from O2DEMANDREGULATOR, DIRECTO2VALVE
VALVE OUT 1 0.1 # to SUITCOMPRESSORCO2ABSORBER
VALVE LEAK 0 4.0 # to CABIN (SUITRELIEFVALVE)
Expand Down Expand Up @@ -343,6 +359,23 @@
GSEO2TANK:OUT CABIN:IN ONEWAY
</PIPE>

<PIPE> GSECRYOO2FILL1
GSECRYOO2DEWAR:OUT O2TANK1:IN PREG 6205284 0.0 ONEWAY # 900 psi
</PIPE>

<PIPE> GSECRYOO2FILL2
GSECRYOO2DEWAR:OUT2 O2TANK2:IN PREG 6205284 0.0 ONEWAY # 900 psi
</PIPE>

<PIPE> GSECRYOH2FILL1
GSECRYOH2DEWAR:OUT H2TANK1:IN PREG 1723689 0.0 ONEWAY # 250 psi
</PIPE>

<PIPE> GSECRYOH2FILL2
GSECRYOH2DEWAR:OUT2 H2TANK2:IN PREG 1723689 0.0 ONEWAY # 250 psi
</PIPE>


# Cryo pipes
<PIPE> H2FUELCELL1INLET1
H2TANK1:OUT H2FUELCELL1MANIFOLD:IN ONEWAY
Expand Down Expand Up @@ -424,7 +457,7 @@
</PIPE>

<PIPE> O2SURGETANKRELIEF
O2SURGETANK:OUT CABIN:IN BURST 7205022 0.0 ONEWAY # 900 psi
O2SURGETANK:OUT CABIN:IN BURST 7205022 0.0 ONEWAY #1045 psi
</PIPE>

<PIPE> O2REPRESSPACKAGEINLET1
Expand Down Expand Up @@ -1079,7 +1112,7 @@
<BOILER> BMAGHEATER2 -1 DC_DUMMY 800.0 42.4 TEMP 0 0 HYDRAULIC:PRIMRADIATORINLET

# ECS dummy devices
<BOILER> CABINHEATER 0 DC_DUMMY 30.0 0.0 TEMP 293.0 294.0 HYDRAULIC:CABIN
<BOILER> CABINHEATER 1 DC_DUMMY 30.0 0.0 TEMP 293.0 294.0 HYDRAULIC:CABIN
<BOILER> SUITHEATER 0 DC_DUMMY 30.0 0.0 TEMP 282.0 283.0 HYDRAULIC:SUIT
<BOILER> SUITCIRCUITHEATER 0 DC_DUMMY 30.0 0.0 TEMP 282.0 283.0 HYDRAULIC:SUITCIRCUITRETURNVALVE

Expand Down
26 changes: 24 additions & 2 deletions Orbitersdk/samples/ProjectApollo/src_csm/satsystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,12 @@ void Saturn::SystemsTimestep(double simt, double simdt, double mjd) {
*(int*) Panelsdk.GetPointerByString("HYDRAULIC:SECEVAPGSEHEATEXCHANGER:PUMP") = SP_PUMP_OFF;
*(int*) Panelsdk.GetPointerByString("ELECTRIC:GSECHILLER:PUMP") = SP_PUMP_OFF;

// Close Service Module GSE Cryogenic Valves
O2Tanks[0]->IN_valve.Close();
O2Tanks[1]->IN_valve.Close();
H2Tanks[0]->IN_valve.Close();
H2Tanks[1]->IN_valve.Close();

// Next state
systemsState = SATSYSTEMS_READYTOLAUNCH;
lastSystemsMissionTime = MissionTime;
Expand Down Expand Up @@ -1141,6 +1147,22 @@ void Saturn::SystemsTimestep(double simt, double simdt, double mjd) {
// Various debug prints
//------------------------------------------------------------------------------------

//GSE Cryo Debug Lines
/*
double *GSEO2CryoPress = (double *)Panelsdk.GetPointerByString("HYDRAULIC:GSECRYOO2DEWAR:PRESS");
double *GSEO2CryoTemp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:GSECRYOO2DEWAR:TEMP");
double *O2Tank1Temp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:O2TANK1:TEMP");
double *O2Tank2Temp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:O2TANK2:TEMP");

double *GSEH2CryoPress = (double *)Panelsdk.GetPointerByString("HYDRAULIC:GSECRYOH2DEWAR:PRESS");
double *GSEH2CryoTemp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:GSECRYOH2DEWAR:TEMP");
double *H2Tank1Temp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:H2TANK1:TEMP");
double *H2Tank2Temp = (double *)Panelsdk.GetPointerByString("HYDRAULIC:H2TANK2:TEMP");

//sprintf(oapiDebugString(), "GSEPress: %.3f GSETemp: %.3f O2T1Temp: %.3f O2T2Temp: %.3f", *GSEO2CryoPress *PSI, KelvinToFahrenheit(*GSEO2CryoTemp), KelvinToFahrenheit(*O2Tank1Temp), KelvinToFahrenheit(*O2Tank2Temp));
//sprintf(oapiDebugString(), "GSEPress: %.3f GSETemp: %.3f H2T1Temp: %.3f H2T2Temp: %.3f", *GSEH2CryoPress *PSI, KelvinToFahrenheit(*GSEH2CryoTemp), KelvinToFahrenheit(*H2Tank1Temp), KelvinToFahrenheit(*H2Tank2Temp));
*/

// FC Nitrogen system.
//h_Tank* pHeader = (h_Tank*)Panelsdk.GetPointerByString("HYDRAULIC:N2FUELCELL1HEADERTANK");
//h_Tank* pBlanket = (h_Tank*)Panelsdk.GetPointerByString("HYDRAULIC:N2FUELCELL1BLANKET");
Expand Down Expand Up @@ -2660,14 +2682,14 @@ void Saturn::CabinFansSystemTimestep()

PrimCabinHeatExchanger->SetPumpAuto();
SecCabinHeatExchanger->SetPumpAuto();
CabinHeater->SetPumpAuto();
//CabinHeater->SetPumpAuto();

CabinFanSound();
}
else {
PrimCabinHeatExchanger->SetPumpOff();
SecCabinHeatExchanger->SetPumpOff();
CabinHeater->SetPumpOff();
//CabinHeater->SetPumpOff();

StopCabinFanSound();
}
Expand Down