public ThermodynamicEngine(ref AtmosphericResourceManager CH4RMS, ref AtmosphericResourceManager H2ORMS, ref AtmosphericResourceManager CO2RMS, ref AtmosphericResourceManager ORMS, ref AtmosphericResourceManager NRMS, Dictionary <string, double> config, double totalVolume) { ch4ResourceManager = CH4RMS; co2ResourceManager = CO2RMS; oResourceManager = ORMS; nResourceManager = NRMS; h2oResourceManager = H2ORMS; double startO, startN, startCO2, initialTemp, initialPressure, startCH4, initialRelativeHumidity; try { config.TryGetValue("starting_Temp", out initialTemp); config.TryGetValue("atmospheric_CO2_start", out startCO2); config.TryGetValue("atmospheric_O_start", out startO); config.TryGetValue("atmospheric_N_start", out startN); config.TryGetValue("atmospheric_CH4_start", out startCH4); config.TryGetValue("starting_Pressure", out initialPressure); config.TryGetValue("atmospheric_relative_humidity", out initialRelativeHumidity); } catch (Exception e) { throw e; } systemVolume = totalVolume; setupEnvironment(startCO2, startO, startN, startCH4, initialPressure, initialTemp, initialRelativeHumidity); }
public Gas(AtmosphericResourceManager rm) { Resource = rm.managedResource; Quantity = rm.getLevel(); PartialPressure = rm.Pressure; Temperature = rm.Temperature; PartialEthalpy = rm.EnthalpyPerUnitMass; PartialInternalEnergy = rm.InternalEnergy; Density = rm.Density; }