Skip to content

Commit

Permalink
Changed w_out_temp to w_out_max
Browse files Browse the repository at this point in the history
  • Loading branch information
luca7084 committed Jul 4, 2023
1 parent 2720482 commit 61c8483
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rocket_twin/drivers/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
init_flight = {
"rocket.flying": True,
"rocket.engine.force_command": 1.0,
"rocket.tank.w_out_temp": 3.0,
"rocket.tank.w_out_max": 3.0,
"g_tank.w_in": 0.0,
"g_tank.w_command": 0.0,
}
Expand Down
4 changes: 2 additions & 2 deletions rocket_twin/systems/tank/tank.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup(self):
self.add_inward("w_in", 0.0, desc="Fuel income rate", unit="kg/s")

# Flux control
self.add_inward("w_out_temp", 0.0, desc="Fuel output rate", unit="kg/s")
self.add_inward("w_out_max", 0.0, desc="Fuel output rate", unit="kg/s")
self.add_inward("w_command", 1.0, desc="Fuel output control variable", unit="")

# Transient
Expand All @@ -44,6 +44,6 @@ def setup(self):
self.add_outward("w_out", 0.0, desc="Fuel output rate", unit="kg/s")

def compute(self):
self.w_out = self.w_out_temp * self.w_command
self.w_out = self.w_out_max * self.w_command
self.dw_dt = self.w_in - self.w_out
self.weight = self.weight_s + self.weight_p
2 changes: 1 addition & 1 deletion rocket_twin/tests/test_flying_rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_run_once(self):
"rocket.flying": True,
"rocket.engine.force_command": 1.0,
"rocket.tank.weight_p": "rocket.tank.weight_max",
"rocket.tank.w_out_temp": 3.0,
"rocket.tank.w_out_max": 3.0,
"g_tank.w_in": 0.0,
"g_tank.weight_p": 0.0,
"g_tank.w_command": 0.0,
Expand Down
4 changes: 2 additions & 2 deletions rocket_twin/tests/test_mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def test_run_once(self):
"g_tank.weight_p": "g_tank.weight_max",
"rocket.engine.force_command": 0.0,
"rocket.tank.weight_p": 0.0,
"rocket.tank.w_out_temp": 0.0,
"rocket.tank.w_out_max": 0.0,
"g_tank.w_command": 1.0,
"g_tank.w_in": 0.0,
"g_tank.w_out_temp": 3.0,
"g_tank.w_out_max": 3.0,
}

stop = "rocket.tank.weight_p <= 0."
Expand Down
4 changes: 2 additions & 2 deletions rocket_twin/tests/test_refuel_rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def test_run_once(self):
init = {
"rocket.engine.force_command": 0.0,
"rocket.tank.weight_p": 0.0,
"rocket.tank.w_out_temp": 0.0,
"rocket.tank.w_out_max": 0.0,
"g_tank.w_command": 1.0,
"g_tank.weight_p": "g_tank.weight_max",
"g_tank.w_in": 0.0,
"g_tank.w_out_temp": 3.0,
"g_tank.w_out_max": 3.0,
}

stop = "rocket.tank.weight_p >= rocket.tank.weight_max"
Expand Down
4 changes: 2 additions & 2 deletions rocket_twin/tests/test_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_fuel(self):
{
"name": "fuel",
"type": "transient",
"init": {"g_tank.w_out_temp": 1.0, "g_tank.w_command": 1.0},
"init": {"g_tank.w_out_max": 1.0, "g_tank.w_command": 1.0},
"dt": 0.1,
"stop": "rocket.tank.weight_p == rocket.tank.weight_max",
}
Expand All @@ -58,7 +58,7 @@ def test_flight(self):
"type": "transient",
"init": {
"rocket.flying": True,
"rocket.tank.w_out_temp": 0.5,
"rocket.tank.w_out_max": 0.5,
"g_tank.w_command": 0.0,
"rocket.engine.force_command": 1.0,
"rocket.tank.w_command": 1.0,
Expand Down
4 changes: 2 additions & 2 deletions rocket_twin/tests/test_tank.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_fuel(self):
driver = sys.add_driver(RungeKutta(order=4, dt=0.1))
driver.time_interval = (0, 5)

init = {"w_in": 3.0, "w_out_temp": 0.0, "weight_p": 0.0}
init = {"w_in": 3.0, "w_out_max": 0.0, "weight_p": 0.0}

driver.set_scenario(init=init)

Expand All @@ -25,7 +25,7 @@ def test_flight(self):
driver = sys.add_driver(RungeKutta(order=4, dt=0.1))
driver.time_interval = (0, 5)

init = {"w_in": 0.0, "w_out_temp": 3.0, "weight_p": 15.0}
init = {"w_in": 0.0, "w_out_max": 3.0, "weight_p": 15.0}

driver.set_scenario(init=init)

Expand Down

0 comments on commit 61c8483

Please sign in to comment.