From f2e939765f1682e775cd6829d18d9fb3ff2358a7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 16 Oct 2024 09:13:58 -0600 Subject: [PATCH 1/2] Implement GSE cryo dewars, remove cabin heater boilers from cabin fans --- Config/ProjectApollo/SaturnSystems.cfg | 87 +++++++++++++------ .../ProjectApollo/src_csm/satsystems.cpp | 26 +++++- 2 files changed, 84 insertions(+), 29 deletions(-) diff --git a/Config/ProjectApollo/SaturnSystems.cfg b/Config/ProjectApollo/SaturnSystems.cfg index a4e56edd9..d5d37bac5 100644 --- a/Config/ProjectApollo/SaturnSystems.cfg +++ b/Config/ProjectApollo/SaturnSystems.cfg @@ -14,28 +14,28 @@ # Cryo tanks 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 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 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 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 @@ -70,38 +70,38 @@ # Fuel cell supply - O2FUELCELL1MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001 - CHM 0 1043.077522913324 0.000000000000 131947.848325455590 + 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 - H2FUELCELL1MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001 - CHM 1 65.606946161759 0.000000000000 14582.851450087715 + 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 - O2FUELCELL2MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001 - CHM 0 1037.477918035462 0.000000000000 131151.068692949397 + 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 - H2FUELCELL2MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001 - CHM 1 65.606946161759 0.000000000000 14582.851450087715 + 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 - O2FUELCELL3MANIFOLD <0.0 0.5 -4.0> 1.0 0.0000001 - CHM 0 1043.077174288020 0.000000000000 131947.808112456172 + 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 - H2FUELCELL3MANIFOLD <0.0 -0.5 -4.0> 1.0 0.0000001 - CHM 1 65.606946161759 0.000000000000 14582.851450087715 + 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 @@ -217,17 +217,33 @@ N2FUELCELL3BLANKET:OUT N2VENTFUELCELL3:IN BURST 386106.0 379212.0 ONEWAY - # GSE Oxygen + + # GSE Tanks 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 + + + 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 + + + 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 + # Suit/cabin 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 @@ -247,7 +263,7 @@ 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 @@ -259,14 +275,14 @@ 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) 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) @@ -343,6 +359,23 @@ GSEO2TANK:OUT CABIN:IN ONEWAY + GSECRYOO2FILL1 + GSECRYOO2DEWAR:OUT O2TANK1:IN PREG 6205284 0.0 ONEWAY # 900 psi + + + GSECRYOO2FILL2 + GSECRYOO2DEWAR:OUT2 O2TANK2:IN PREG 6205284 0.0 ONEWAY # 900 psi + + + GSECRYOH2FILL1 + GSECRYOH2DEWAR:OUT H2TANK1:IN PREG 1723689 0.0 ONEWAY # 250 psi + + + GSECRYOH2FILL2 + GSECRYOH2DEWAR:OUT2 H2TANK2:IN PREG 1723689 0.0 ONEWAY # 250 psi + + + # Cryo pipes H2FUELCELL1INLET1 H2TANK1:OUT H2FUELCELL1MANIFOLD:IN ONEWAY @@ -424,7 +457,7 @@ O2SURGETANKRELIEF - O2SURGETANK:OUT CABIN:IN BURST 7205022 0.0 ONEWAY # 900 psi + O2SURGETANK:OUT CABIN:IN BURST 7205022 0.0 ONEWAY #1045 psi O2REPRESSPACKAGEINLET1 @@ -1079,7 +1112,7 @@ BMAGHEATER2 -1 DC_DUMMY 800.0 42.4 TEMP 0 0 HYDRAULIC:PRIMRADIATORINLET # ECS dummy devices - CABINHEATER 0 DC_DUMMY 30.0 0.0 TEMP 293.0 294.0 HYDRAULIC:CABIN + CABINHEATER 1 DC_DUMMY 30.0 0.0 TEMP 293.0 294.0 HYDRAULIC:CABIN SUITHEATER 0 DC_DUMMY 30.0 0.0 TEMP 282.0 283.0 HYDRAULIC:SUIT SUITCIRCUITHEATER 0 DC_DUMMY 30.0 0.0 TEMP 282.0 283.0 HYDRAULIC:SUITCIRCUITRETURNVALVE diff --git a/Orbitersdk/samples/ProjectApollo/src_csm/satsystems.cpp b/Orbitersdk/samples/ProjectApollo/src_csm/satsystems.cpp index 6eb750e16..06800f4c6 100644 --- a/Orbitersdk/samples/ProjectApollo/src_csm/satsystems.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_csm/satsystems.cpp @@ -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; @@ -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"); @@ -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(); } From 232bf4f65e4d6daa6ada8cb9e0de415229d8b5f5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 16 Oct 2024 10:37:23 -0600 Subject: [PATCH 2/2] Add commented out J mission valve sizes --- Config/ProjectApollo/SaturnSystems.cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Config/ProjectApollo/SaturnSystems.cfg b/Config/ProjectApollo/SaturnSystems.cfg index d5d37bac5..0a8018137 100644 --- a/Config/ProjectApollo/SaturnSystems.cfg +++ b/Config/ProjectApollo/SaturnSystems.cfg @@ -44,27 +44,27 @@ # 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 # # 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 # # 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 # # 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 #