Skip to content

Issue with Mixer Pressure #84

@ArnaultT

Description

@ArnaultT

Hi,

I've been working on building a mixed turbofan model and encountered some issues with the mixer.
While investigating the mixer module, I noticed something unusual when printing the incoming flow properties.

Consider the following test case:

def test_mix_air_with_airfuel(self):
    p = Problem()

    cycle = p.model = Cycle()
    cycle.options['thermo_method'] = 'CEA'
    cycle.options['thermo_data'] = janaf

    cycle.set_input_defaults('start1.P', 22.838, units='psi')
    cycle.set_input_defaults('start1.T', 1718.825, units='degR')
    cycle.set_input_defaults('start1.MN', 0.800)
    cycle.set_input_defaults('start1.W', 187.893, units='lbm/s')

    cycle.set_input_defaults('start2.P', 11.708, units='psi')
    cycle.set_input_defaults('start2.T', 522.821, units='degR')
    cycle.set_input_defaults('start2.MN', 0.600)
    cycle.set_input_defaults('start2.W', 66.176, units='lbm/s')

    cycle.add_subsystem('start1', FlowStart(composition=CEA_AIR_FUEL_COMPOSITION))
    cycle.add_subsystem('start2', FlowStart(composition=CEA_AIR_COMPOSITION))

    cycle.add_subsystem('mixer', Mixer(design=True, designed_stream=1))

    cycle.pyc_connect_flow('start1.Fl_O', 'mixer.Fl_I1')
    cycle.pyc_connect_flow('start2.Fl_O', 'mixer.Fl_I2')

    p.setup(force_alloc_complex=True)
    p.set_solver_print(level=-1)
    p.run_model()

    tol = 1e-6
    print(p['mixer.Fl_O:stat:area'])
    print(p['mixer.Fl_O:tot:P'])
    print(p['mixer.ER'])
    print(p['mixer.Fl_O:stat:MN'])

When printing the variables used in the MixImpulse class compute function:

def compute(self, inputs, outputs):
    outputs['impulse_mix'] = (inputs['Fl_I1:stat:P'] * inputs['Fl_I1:stat:area'] + inputs['Fl_I1:stat:W'] * inputs['Fl_I1:stat:V']) + \
                             (inputs['Fl_I2:stat:P'] * inputs['Fl_I2:stat:area'] + inputs['Fl_I2:stat:W'] * inputs['Fl_I2:stat:V'])

    print("Mix Impulse computations:")
    print('Fl_I1:stat:W', inputs['Fl_I1:stat:W'])
    print('Fl_I1:stat:P', inputs['Fl_I1:stat:P'])
    print('Fl_I1:stat:V', inputs['Fl_I1:stat:V'])
    print('Fl_I1:stat:area', inputs['Fl_I1:stat:area'])
    print('Fl_I2:stat:W', inputs['Fl_I2:stat:W'])
    print('Fl_I2:stat:P', inputs['Fl_I2:stat:P'])
    print('Fl_I2:stat:V', inputs['Fl_I2:stat:V'])
    print('Fl_I2:stat:area', inputs['Fl_I2:stat:area'])

I get the following output:

Mix Impulse computations:
Fl_I1:stat:W [85.22683118]
Fl_I1:stat:P [63282.44448509]
Fl_I1:stat:V [461.46240572]
Fl_I1:stat:area [0.43591669]
Fl_I2:stat:W [30.01692868]
Fl_I2:stat:P [63282.44448509]
Fl_I2:stat:V [198.01842072]
Fl_I2:stat:area [0.18629003]
[964.42234196]
[19.03367286]
[1.95063205]
[0.90091354]

Both incoming flows have the same pressure. I'm not sure if this is expected, but I don't fully understand the physics behind it.

Looking further into the Mixer class code, I found this:

if design:
    ...
    self.add_subsystem('Fl_I1_stat_calc', Fl1_stat,
                       promotes_inputs=[('composition', 'Fl_I1:tot:composition'), ('S', 'Fl_I1:tot:S'),
                                        ('ht', 'Fl_I1:tot:h'), ('W', 'Fl_I1:stat:W'), ('Ps', 'Fl_I2:stat:P')],
                       promotes_outputs=['Fl_I1_calc:stat*'])
    ...
else:
    ...
    self.add_subsystem('Fl_I2_stat_calc', Fl2_stat,
                       promotes_inputs=[('composition', 'Fl_I2:tot:composition'), ('S', 'Fl_I2:tot:S'),
                                        ('ht', 'Fl_I2:tot:h'), ('W', 'Fl_I2:stat:W'), ('Ps', 'Fl_I1:stat:P')],
                       promotes_outputs=['Fl_I2_calc:stat:*'])
    ...

After modifying the connections between Ps and Fl_Ix:stat:P, I obtained the following output:

Mix Impulse computations:
Fl_I1:stat:W [85.22683118]
Fl_I1:stat:P [104599.90621965]
Fl_I1:stat:V [461.46240572]
Fl_I1:stat:area [0.43591669]
Fl_I2:stat:W [30.01692868]
Fl_I2:stat:P [63282.44448509]
Fl_I2:stat:V [198.01842072]
Fl_I2:stat:area [0.18629003]
[964.42234196]
[19.03367286]
[1.95063205]
[0.90091354]

Now, the pressure of flow_1 is nearly twice that of flow_2, which matches the input values I initially set.

Is this a potential issue, or am I simply misunderstanding something?

Thanks! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions