def test_dynamic_io_spec(self): p3 = Problem(model=Group()) subsystem = p3.model.add_subsystem('battery', subsys=BatteryGroup(num_nodes=1, cell_type='AMPRIUS')) p3.setup() p3.run_model() #subsystem = BatteryGroup(num_nodes=1) subsystem.list_inputs(prom_name=True) assert_match_spec(subsystem, 'ODE_specs/battery_comp.json')
def test_FHP_io_spec(self): p1 = self.prob = Problem(model=Group()) self.prob.model.set_input_defaults('ref_len', 240.) self.prob.model.set_input_defaults('req_flux', 50.) p1.model.add_subsystem('fhp', subsys=FHP(num_nodes=1), promotes_inputs=['ref_len','req_flux', ('d_init','d_{init}'),('tot_len','L_{pack}'),('rho_FHP','rho_{HP}') ], promotes_outputs=[('fhp_mass','mass_{HP}'),('t_hp','t_{HP}')]) p1.setup() #p1.model.list_inputs(prom_name=True) assert_match_spec(p1.model, 'Design_specs/heat_pipe.json')
def skip_test_io_spec(self): p1 = self.prob = Problem(model=Group()) # self.prob.model.set_input_defaults('frac_absorb', 240.) # self.prob.model.set_input_defaults('req_flux', 50.) self.prob.model.set_input_defaults('frame_mass', 0.) self.prob.model.set_input_defaults('cell_mass', 0.) self.prob.model.set_input_defaults('cell_h', 0.) self.prob.model.set_input_defaults('ext_cooling', 0.) self.prob.model.set_input_defaults('dur', 0.) self.prob.model.set_input_defaults('t_HP', 0.) self.prob.model.set_input_defaults('cell_l', 0.) self.prob.model.set_input_defaults('ext_cool_mass', 0.) self.prob.model.set_input_defaults('runawayJ', 0.) self.prob.model.set_input_defaults('W', 0.) self.prob.model.set_input_defaults('LH_PCM', 0.) self.prob.model.set_input_defaults('rho_PCM', 0.) self.prob.model.set_input_defaults('cell_s_l', 0.) self.prob.model.set_input_defaults('q_max', 0.) self.prob.model.set_input_defaults('cell_s_h', 0.) self.prob.model.set_input_defaults('L', 0.) self.prob.model.set_input_defaults('frac_absorb', 0.) self.prob.model.set_input_defaults('v_n_c', 0.) self.prob.model.set_input_defaults('energy', 0.) self.prob.model.set_input_defaults('cell_s_w', 0.) self.prob.model.set_input_defaults('cell_w', 0.) self.prob.model.set_input_defaults('missionJ', 0.) p1.model.add_subsystem('size', subsys=SizingGroup(num_nodes=1), promotes_inputs=[ 'frame_mass', 'cell_mass', 'cell_h', 'ext_cooling', 'dur', 't_HP', 'cell_l', 'ext_cool_mass', 'runawayJ', 'W', 'LH_PCM', 'rho_PCM', 'cell_s_l', 'q_max', 'cell_s_h', 'L', 'frac_absorb', 'v_n_c', 'energy', 'cell_s_w', 'cell_w', 'missionJ', ('n_cpb', 'n_{cpk}'), ('n_bps', 'n_{kps}') ]) p1.setup() p1.model.list_inputs(prom_name=True) assert_match_spec(p1.model, 'Design_specs/PCM.json')
def test_batt_statics_io_spec(self): subsystem = BatteryStaticsGroup() assert_match_spec(subsystem, 'design_specs/battery_comp.json')
def test_io_spec(self): subsystem = packMass(num_nodes=1) assert_match_spec(subsystem, 'Design_specs/struct.json')