Exemple #1
0
    def setup(self):
        nn = self.options['num_nodes']

        self.add_subsystem(name='cp',
                           subsys=PCM_Cp(num_nodes=nn),
                           promotes_inputs=['T'],#, 'T_lo', 'T_hi'],
                           promotes_outputs=['cp_pcm'])

        self.add_subsystem(name='bulk',
                           subsys=PCM_props(num_nodes=nn),
                           promotes_inputs=['cp_pcm'],
                           promotes_outputs=['cp_bulk'])

        self.add_subsystem(name='ps',
                           subsys=PCM_PS(num_nodes=nn),
                           promotes_inputs=['T', 'T_lo', 'T_hi'],
                           promotes_outputs=['PS'])

        self.add_subsystem(name='rate',
                           subsys=TempRateComp(num_nodes=nn),
                           promotes_inputs=[('c_p', 'cp_bulk'), 'q', 'mass'],
                           promotes_outputs=['Tdot'])
Exemple #2
0
    def setUp(self):
        p1 = self.prob = Problem(model=Group())
        p1.model.add_subsystem('props', subsys=PCM_props(num_nodes=1))

        p1.setup(force_alloc_complex=True)
        p1.run_model()