Issue with Mixer Pressure
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Start with the supplied mixer test case and inspect the Mixer design branch, especially Fl_I1_stat_calc, Fl_I2_stat_calc, and MixImpulse.compute. Trace how each subsystem's Ps input is connected to Fl_I1:stat:P or Fl_I2:stat:P, then compare the calculated pressures with the configured inputs. Done means establishing whether the connection is intentional and documenting or testing the expected behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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! :)
- Ngôn ngữ chính
- Python
- Star
- 212
- Fork
- 101
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenMDAO/pyCycle
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
`PsResid` keeps its guess cache outside OpenMDAO's vectors, so `load_case` doesn't reproduce off-design solvesCó thể đã có người làm @Jhawk414 đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
Tất cả issue của OpenMDAO/pyCycle
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày