Skip to content
Closed
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
5 changes: 4 additions & 1 deletion src/hyperloop/hyperloop_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ def configure(self):
#Mission -> Pod
self.connect('mission.time','pod.time_mission')
self.connect('mission.energy', 'pod.energy')
#Pod -> Mission. This closes a solver-managed cycle: Mission supplies
#the travel time and energy used by Pod, while Pod supplies its net
#force back to Mission.
self.connect('pod.net_force', 'mission.net_force')

#Add Solver
solver = self.add('solver',BroydenSolver())
Expand Down Expand Up @@ -172,4 +176,3 @@ def pretty_print(data):
print "Performance"
print "======================"
pretty_print(output_data)

8 changes: 2 additions & 6 deletions src/hyperloop/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Mission(Component):
tube_length = Float(563270, iotype="in", units="m", desc="length of one trip")
pwr_marg = Float(.3, iotype="in", desc="fractional extra energy requirement")
pwr_req = Float(420, iotype="in", units="kW", desc="average power requriment for the mission")
net_force = Float(0., iotype="in", units="N",
desc="net force available to accelerate the pod")
#Outputs
time = Float(iotype="out", units="s", desc="travel time for a pod to make one trip")
energy = Float(iotype="out", units="kW*h", desc="total energy storage requirements")
Expand All @@ -51,11 +53,6 @@ def execute(self):

self.energy = (self.pwr_req*self.time/3600.)*(1+self.pwr_marg) #convert to hours

print self.itername
print " W_in: ", self.parent.compress.W_in, 10*(self.parent.compress.W_in-self.parent.flow_limit.W_excess)
print " R_tube: ", self.parent.pod.radius_tube_inner, .01*(self.parent.pod.area_compressor_bypass-self.parent.compress.area_c1_out)
print " Bearing_Ps: ", self.parent.compress.c2_PR_des, self.parent.compress.Ps_bearing_residual
print

if __name__ == "__main__":

Expand All @@ -67,4 +64,3 @@ def execute(self):