补充test_mql PNL0003双端温度导数诊断
This commit is contained in:
1 parent
137a4cf7d6
commit
890bf1d483
2 files changed
+88
No files matched your search
@@ -472,6 +472,14 @@ class TestMqlPnl0003EnergyDiagnostic:
|
||||
python_port_2_reference_center_enthalpy_flow_w: float
|
||||
python_port_2_reference_storage_enthalpy_sum_w: float
|
||||
python_port_2_reference_storage_enthalpy_error_w: float
|
||||
amesim_port_1_external_enthalpy_dtemp_component_k_s: float
|
||||
amesim_port_1_center_enthalpy_dtemp_component_k_s: float
|
||||
amesim_port_1_mass_offset_dtemp_component_k_s: float
|
||||
amesim_port_1_heat_dtemp_component_k_s: float
|
||||
python_port_1_external_enthalpy_dtemp_component_k_s: float
|
||||
python_port_1_center_enthalpy_dtemp_component_k_s: float
|
||||
python_port_1_mass_offset_dtemp_component_k_s: float
|
||||
python_port_1_heat_dtemp_component_k_s: float
|
||||
amesim_port_2_external_enthalpy_dtemp_component_k_s: float
|
||||
amesim_port_2_center_enthalpy_dtemp_component_k_s: float
|
||||
amesim_port_2_mass_offset_dtemp_component_k_s: float
|
||||
@@ -1913,12 +1921,34 @@ def _pnl0003_energy_diagnostic(
|
||||
def dtemp_component(flow_w: float, mass_kg: float) -> float:
|
||||
return flow_w / (mass_kg * line.gas.cv)
|
||||
|
||||
amesim_port_1_mass_offset_flow_w = (
|
||||
line.gas.cp * reference_temperature_k - line.gas.cv * amesim_t1
|
||||
) * amesim_sdm1_kg_s
|
||||
amesim_port_2_mass_offset_flow_w = (
|
||||
line.gas.cp * reference_temperature_k - line.gas.cv * amesim_t2
|
||||
) * amesim_sdm2_kg_s
|
||||
python_port_1_mass_offset_flow_w = (
|
||||
line.gas.cp * reference_temperature_k - line.gas.cv * port_1.T
|
||||
) * (port_1_flow - center_flow)
|
||||
python_port_2_mass_offset_flow_w = (
|
||||
line.gas.cp * reference_temperature_k - line.gas.cv * port_2.T
|
||||
) * (port_2_flow + center_flow)
|
||||
amesim_port_1_external_dtemp_component = dtemp_component(
|
||||
amesim_dh1,
|
||||
amesim_mass_1,
|
||||
)
|
||||
amesim_port_1_center_dtemp_component = dtemp_component(
|
||||
amesim_dhctr,
|
||||
amesim_mass_1,
|
||||
)
|
||||
amesim_port_1_mass_offset_dtemp_component = dtemp_component(
|
||||
amesim_port_1_mass_offset_flow_w,
|
||||
amesim_mass_1,
|
||||
)
|
||||
amesim_port_1_heat_dtemp_component = dtemp_component(
|
||||
heat_flow_1,
|
||||
amesim_mass_1,
|
||||
)
|
||||
amesim_port_2_external_dtemp_component = dtemp_component(
|
||||
amesim_dh2,
|
||||
amesim_mass_2,
|
||||
@@ -1935,6 +1965,22 @@ def _pnl0003_energy_diagnostic(
|
||||
heat_flow_2,
|
||||
amesim_mass_2,
|
||||
)
|
||||
python_port_1_external_dtemp_component = dtemp_component(
|
||||
python_port_1_dh,
|
||||
line.state_1.m,
|
||||
)
|
||||
python_port_1_center_dtemp_component = dtemp_component(
|
||||
python_center_dh_1,
|
||||
line.state_1.m,
|
||||
)
|
||||
python_port_1_mass_offset_dtemp_component = dtemp_component(
|
||||
python_port_1_mass_offset_flow_w,
|
||||
line.state_1.m,
|
||||
)
|
||||
python_port_1_heat_dtemp_component = dtemp_component(
|
||||
python_heat_flow_1,
|
||||
line.state_1.m,
|
||||
)
|
||||
python_port_2_external_dtemp_component = dtemp_component(
|
||||
python_port_2_dh,
|
||||
line.state_2.m,
|
||||
@@ -2086,6 +2132,26 @@ def _pnl0003_energy_diagnostic(
|
||||
python_port_2_reference_storage_enthalpy_error_w=(
|
||||
python_port_2_dh + python_center_dh_2 - amesim_sdh2
|
||||
),
|
||||
amesim_port_1_external_enthalpy_dtemp_component_k_s=(
|
||||
amesim_port_1_external_dtemp_component
|
||||
),
|
||||
amesim_port_1_center_enthalpy_dtemp_component_k_s=(
|
||||
amesim_port_1_center_dtemp_component
|
||||
),
|
||||
amesim_port_1_mass_offset_dtemp_component_k_s=(
|
||||
amesim_port_1_mass_offset_dtemp_component
|
||||
),
|
||||
amesim_port_1_heat_dtemp_component_k_s=amesim_port_1_heat_dtemp_component,
|
||||
python_port_1_external_enthalpy_dtemp_component_k_s=(
|
||||
python_port_1_external_dtemp_component
|
||||
),
|
||||
python_port_1_center_enthalpy_dtemp_component_k_s=(
|
||||
python_port_1_center_dtemp_component
|
||||
),
|
||||
python_port_1_mass_offset_dtemp_component_k_s=(
|
||||
python_port_1_mass_offset_dtemp_component
|
||||
),
|
||||
python_port_1_heat_dtemp_component_k_s=python_port_1_heat_dtemp_component,
|
||||
amesim_port_2_external_enthalpy_dtemp_component_k_s=(
|
||||
amesim_port_2_external_dtemp_component
|
||||
),
|
||||
@@ -2824,6 +2890,14 @@ def format_test_mql_pnvo_event_window_summary(
|
||||
f"python_ref_ctr2={pnl0003_energy.python_port_2_reference_center_enthalpy_flow_w}, "
|
||||
f"python_ref_sdh2={pnl0003_energy.python_port_2_reference_storage_enthalpy_sum_w}, "
|
||||
f"python_ref_sdh2_error={pnl0003_energy.python_port_2_reference_storage_enthalpy_error_w}, "
|
||||
f"amesim_dT1_ext_h={pnl0003_energy.amesim_port_1_external_enthalpy_dtemp_component_k_s}, "
|
||||
f"amesim_dT1_ctr_h={pnl0003_energy.amesim_port_1_center_enthalpy_dtemp_component_k_s}, "
|
||||
f"amesim_dT1_m_offset={pnl0003_energy.amesim_port_1_mass_offset_dtemp_component_k_s}, "
|
||||
f"amesim_dT1_heat={pnl0003_energy.amesim_port_1_heat_dtemp_component_k_s}, "
|
||||
f"python_dT1_ext_h={pnl0003_energy.python_port_1_external_enthalpy_dtemp_component_k_s}, "
|
||||
f"python_dT1_ctr_h={pnl0003_energy.python_port_1_center_enthalpy_dtemp_component_k_s}, "
|
||||
f"python_dT1_m_offset={pnl0003_energy.python_port_1_mass_offset_dtemp_component_k_s}, "
|
||||
f"python_dT1_heat={pnl0003_energy.python_port_1_heat_dtemp_component_k_s}, "
|
||||
f"amesim_dT2_ext_h={pnl0003_energy.amesim_port_2_external_enthalpy_dtemp_component_k_s}, "
|
||||
f"amesim_dT2_ctr_h={pnl0003_energy.amesim_port_2_center_enthalpy_dtemp_component_k_s}, "
|
||||
f"amesim_dT2_m_offset={pnl0003_energy.amesim_port_2_mass_offset_dtemp_component_k_s}, "
|
||||
|
||||
Reference in new issue
Block a user