Conversation
… of hydrogen gas production, and rate of oxygen gas production
…minimum spin requirement and minimum water height), also changed some parameters and state variables to account for non-constant electrolyzing rate
…critical conditions
tmf97
left a comment
There was a problem hiding this comment.
Solid start. Let's make sure that the model we're implementing is representative of the propulsion system architecture.
| # log the critical chamber temperature | ||
| if (chamber_temp <= np.array(self._parameters.temperature_min) or | ||
| chamber_temp >= np.array(self._parameters.temperature_max)): | ||
| log.critical("Chamber temp is out of range") |
There was a problem hiding this comment.
For all these log.critical calls, we should set the electrolysis rate to 0 (instead of just logging) to tell the sim that we can't electrolyze.
There was a problem hiding this comment.
Maybe implementing that functionality is for another time, though. Leave a comment with a jira ticket number to track this TODO
| # fuel tank | ||
| self.tank_volume = 1 | ||
| self.electolyzer_rate = 10.0 * (1/1000) | ||
| self.tank_length = 1 # m |
There was a problem hiding this comment.
A 1x1x1 meter cube of water is 1000 liters. The 12U design is big, but not that big. Ask prop team what the current best approximate dimensions/geometry of the prop tanks are and update these values.
| self.min_ang_vel = 0.0 | ||
| self.min_height = 0.0 | ||
|
|
||
| self.temperature_min = 5 |
There was a problem hiding this comment.
Let's edit this variable name to specify that this is specifically the electrolyzer temp min/max
| force_propulsion_thrusters: float = 0.0 | ||
| fuel_mass: float = 0.0 | ||
| chamber_temp: float = 0.0 | ||
| fuel_mass: float = 0.0 # mass of water |
There was a problem hiding this comment.
I don't know if the prop architecture has changed since I graduated, but from what I remember there are three states that we need to keep track of in the sim:
- mass of liquid water in the propellant tank
- mass of gaseous H2/O2 in the propellant tank
- Mass of gaseous H2/O2 in the combustion chamber
I hope there's some better documentation than a review comment by a graduated student, but the flow of propellant through the propulsion systems goes like so:
Inside the propellant tank:
- liquid water gets electrolyzed into gaseous h2/o2.
- the gaseous h2/o2 bubbles up through the water into an open space above the surface of the water, but still in the propellant tank (called the "ullage")
Between propellant tank and combustion chamber:
- the gas in the propellant tank flows through a one-way check valve into the combustion chamber until the pressure in the propellant tank equals the pressure in the combustion chamber.
Inside the combustion chamber:
- gas accumulates until we stop electrolyzing
- once we fire the thruster, the mass of gas in the combustion chamber gets expelled into space (i.e. goes to 0 from the spacecraft's perspective). The mass of the liquid and gaseous water in the propellant tank remains unchanged through this event.
Sorry if this is way too ramble-y. Double check with prop team first to make sure that the model you're writing is representative of the prop system.
| "Electrolyzer rate (kg/s)": self._electrolyzer_rate, "H2 Production Rate (Moles/s)": h2Rate, | ||
| "O2 Production Rate (moles/s)": o2Rate, "Time it was on": onTime |
There was a problem hiding this comment.
Do the keys of this dictionary need to match the variable names of the corresponding state in state.py?
| D_T = 0.1 # timestep in seconds | ||
| D_T = 250 # timestep in seconds |
There was a problem hiding this comment.
This comment is definitely beyond the scope of this PR, but I'm not a fan of setting the integrator's delta-T in the constants.py file, we should probably feed it in as part of a given sim's parameters JSON. Please make a jira ticket to track this change.
Summary
This PR addresses Jira ticket CISLUNAR-446
Testing
Notes
Comments