Dymola 2014 (Modelica)를 사용하고 모델 코드를 쓰려고합니다. 모델을 "확인할"수 없습니다. Dymola가 다음 메시지를 전합니다. Dymola를 사용하는 누군가는 누락 된 "else"에서 오는 문제 일 수 있다고 말했지만 누락 된 것이 아무것도 표시되지 않습니다.Modelica "해결 오류 : 오버로드 된 이항 연산자에 일치하지 않음"
모든 "if"의 시작 부분에있는 xxx.activePort 조건은 코드의 stateGraph 루프에서옵니다. 모든 코드가 여기에있는 것은 아니지만 필요한 경우 게시 할 수 있습니다. 수표는 코드의 해당 부분 만 반환하므로 여기에 문제가 있다고 가정합니다. 전체 코드에는 방정식과 알고리즘 섹션이 모두 포함되어 있습니다. 아래 코드는 방정식 섹션의 일부입니다.
저는 Modelica의 멍청한 놈입니다. 그래서 단순 할 수도 있지만 인터넷에서 내 문제를 해결할만한 것을 찾지 못했습니다.
감사합니다.
로맹
Check of CHP.Composants.Stirling:
Resolve error: No match for overloaded binary operator
in the equation
if (PR1.activePort or PR2.activePort or PR3.activePort) then
if (PR1.activePort) then
Q_HX = 0;
P_brut = 0;
P_net = P_brut-P_auxiliaires-P_electronique;
elseif (PR2.activePort) then
Q_HX = Q_HX_nom*(1-exp(-(time-tps_debut_PR2)/Tau_PR_Q));
P_brut = 0;
P_net = P_brut-P_auxiliaires-P_electronique;
elseif (PR3.activePort) then
Q_HX = Q_HX_nom*(1-exp(-(time-tps_debut_PR2)/Tau_PR_Q));
P_net = P_net_nom*(1-exp(-(time-tps_debut_PR3)/Tau_PR_P));
P_brut = P_net+P_auxiliaires+P_electronique;
else
Q_HX = 0;
P_net = 0;
P_brut = 0;
end if;
mdot_comb = P_comb_nom/PCS_J_kg;
mdot_condensats_max = mdot_comb*H2O_kg;
V_H2O_exh = V_H2O*(1-mdot_condensats/mdot_condensats_max);
DH_N2_exh = (H_Texh[1, 5]-H_T0[1, 5])*pc_N2_exh_w;
DH_CO2_exh = (H_Texh[1, 6]-H_T0[1, 6])*pc_CO2_exh_w;
DH_O2_exh = (H_Texh[1, 9]-H_T0[1, 9])*pc_O2_exh_w;
DH_H2O_exh = (H_Texh[1, 10]-H_T0[1, 10])*pc_H2O_exh_w;
dH_exh_sens = (DH_N2_exh+DH_CO2_exh+DH_O2_exh+DH_H2O_exh)/Mm_exh*1000;
mdot_air = mdot_comb*V_a_kg*(1+exces_air);
mdot_exh = mdot_comb+mdot_air;
P_comb = mdot_comb*PCS_J_kg;
Hdot_comb = mdot_comb*dH_comb;
Hdot_air = mdot_air*cp_air*(T_air-T_0);
Hdot_exh_sen = mdot_exh*dH_exh_sens;
Hdot_exh_lat = L_v_H2O*(mdot_condensats_max-mdot_condensats);
mdot_CO2 = mdot_comb*i_CO2_comb;
elseif (Fct_normal.activePort) then
Q_HX = Q_HX_nom+C_charge*g+(T_cwi-T_cwi_nom)*c1+(T_cwi-T_cwi_nom)^2*c2+(mdot_cw-mdot_cw_nom)*d1+(mdot_cw-mdot_cw_nom)^2*d2;
P_net = P_net_nom+C_charge*h+(T_cwi-T_cwi_nom)*e1+(T_cwi-T_cwi_nom)^2*e2+(mdot_cw-mdot_cw_nom)*f1+(mdot_cw-mdot_cw_nom)^2*f2;
P_comb = P_comb_nom+C_charge*j+(T_cwi-T_cwi_nom)*a1+(T_cwi-T_cwi_nom)^2*a2+(mdot_cw-mdot_cw_nom)*b1+(mdot_cw-mdot_cw_nom)^2*b2;
P_brut = P_net+P_auxiliaires+P_electronique;
mdot_comb = P_comb/PCS_J_kg;
mdot_condensats_max = mdot_comb*H2O_kg;
V_H2O_exh = V_H2O*(1-mdot_condensats/mdot_condensats_max);
DH_N2_exh = (H_Texh[1, 5]-H_T0[1, 5])*pc_N2_exh_w;
DH_CO2_exh = (H_Texh[1, 6]-H_T0[1, 6])*pc_CO2_exh_w;
DH_O2_exh = (H_Texh[1, 9]-H_T0[1, 9])*pc_O2_exh_w;
DH_H2O_exh = (H_Texh[1, 10]-H_T0[1, 10])*pc_H2O_exh_w;
dH_exh_sens = (DH_N2_exh+DH_CO2_exh+DH_O2_exh+DH_H2O_exh)/Mm_exh*1000;
mdot_air = mdot_comb*V_a_kg*(1+exces_air);
mdot_exh = mdot_comb+mdot_air-mdot_condensats;
Hdot_comb = mdot_comb*dH_comb;
Hdot_air = mdot_air*cp_air*(T_air-T_0);
Hdot_exh_sen = mdot_exh*dH_exh_sens;
Hdot_exh_lat = L_v_H2O*(mdot_condensats_max-mdot_condensats);
mdot_CO2 = mdot_comb*i_CO2_comb;
elseif (RF.activePort) then
Q_HX = Q_HX_nom*exp(-(time-tps_debut_RF)/Tau_RF);
P_brut = E_elec_RF/t_fin_RF;
P_net = P_brut-P_auxiliaires-P_electronique;
mdot_comb = 0;
mdot_air = P_comb_nom/PCS_J_kg*V_a_kg*(1+exces_air);
mdot_exh = mdot_air;
P_comb = 0;
Hdot_comb = 0;
Hdot_air = mdot_air*cp_air*(T_air-T_0);
Hdot_exh_sen = mdot_exh*cp_air*(T_exh-T_0);
Hdot_exh_lat = 0;
mdot_CO2 = 0;
mdot_condensats_max = 0;
V_H2O_exh = 0;
DH_N2_exh = 0;
DH_CO2_exh = 0;
DH_O2_exh = 0;
DH_H2O_exh = 0;
dH_exh_sens = (DH_N2_exh+DH_CO2_exh+DH_O2_exh+DH_H2O_exh)/Mm_exh*1000;
elseif (Arret.activePort) then
Q_HX = 0;
P_brut = 0;
P_net = P_brut-P_electronique;
mdot_comb = 0;
mdot_air = 0;
mdot_exh = 0;
P_comb = 0;
Hdot_comb = 0;
Hdot_air = 0;
Hdot_exh_sen = 0;
Hdot_exh_lat = 0;
mdot_CO2 = 0;
mdot_condensats_max = 0;
V_H2O_exh = 0;
DH_N2_exh = 0;
DH_CO2_exh = 0;
DH_O2_exh = 0;
DH_H2O_exh = 0;
dH_exh_sens = (DH_N2_exh+DH_CO2_exh+DH_O2_exh+DH_H2O_exh)/Mm_exh*1000;
else
Q_HX = 0;
P_brut = 0;
P_net = P_brut-P_electronique;
mdot_comb = 0;
mdot_air = 0;
mdot_exh = 0;
P_comb = 0;
Hdot_comb = 0;
Hdot_air = 0;
Hdot_exh_sen = 0;
Hdot_exh_lat = 0;
mdot_CO2 = 0;
mdot_condensats_max = 0;
V_H2O_exh = 0;
DH_N2_exh = 0;
DH_CO2_exh = 0;
DH_O2_exh = 0;
DH_H2O_exh = 0;
dH_exh_sens = (DH_N2_exh+DH_CO2_exh+DH_O2_exh+DH_H2O_exh)/Mm_exh*1000;
end if;
Missing declarations.
Check aborted.
ERROR: 1 error was found