Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Error when using Prescribed Pump from MSL

Error when using Prescribed Pump from MSL

Hello together,

I hope you can help me. I´m trying to simulate heat losses in a simple fluid network that consists of two dynamic pipes and a prescribes pump from the Standard Library. The components are connected in a closed loop. After setting initial values, I checked the model. However, I always get an error which probably has to do with the pump. It tells me that I have incompatible units in my model and I don´t seem to understand why that happens. See below for the full error message:

Incompatible units in
pump.flowCharacteristic_Unique'"pump"'(0, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0})+pump.delta_head_init* pump.V_flow_single

The unit issue reported appeared in the equation
pump.head = homotopy((pump.N/pump.N_nominal)^2*pump.flowCharacteristic_Unique'"pump"' (pump.V_flow_single*pump.N_nominal/pump.N, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}), pump.N/pump.N_nominal*( pump.flowCharacteristic_Unique'"pump"'(0, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0})+pump.delta_head_init* pump.V_flow_single));

Incompatible units in
pump.flowCharacteristic_Unique'"pump"'(0, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0})+pump.delta_head_init* pump.V_flow_single

The unit issue reported appeared in the equation
pump.head = homotopy((if pump.s > 0 then (pump.N/pump.N_nominal)^2* pump.flowCharacteristic_Unique'"pump"'(pump.V_flow_single*pump.N_nominal/ pump.N, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}) else (pump.N/pump.N_nominal)^2*pump.flowCharacteristic_Unique'"pump"'(0, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0})- pump.s*pump.unitHead), pump.N/pump.N_nominal*(pump.flowCharacteristic_Unique'"pump"' (0, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}) +pump.delta_head_init*pump.V_flow_single));

The unit issue reported appeared in the equation
if ( not pump.checkValve) then
pump.head = homotopy((pump.N/pump.N_nominal)^2*pump.flowCharacteristic_Unique'"pump"' (pump.V_flow_single*pump.N_nominal/pump.N, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}), pump.N/pump.N_nominal*( pump.flowCharacteristic_Unique'"pump"'(0, {0, pump.V_flow_op, 1.5* pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0})+pump.delta_head_init* pump.V_flow_single));
pump.s = 0;
else
pump.head = homotopy((if pump.s > 0 then (pump.N/pump.N_nominal)^2* pump.flowCharacteristic_Unique'"pump"'(pump.V_flow_single*pump.N_nominal/ pump.N, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}) else (pump.N/pump.N_nominal)^2*pump.flowCharacteristic_Unique'"pump"' (0, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}) -pump.s*pump.unitHead), pump.N/pump.N_nominal*(pump.flowCharacteristic_Unique'"pump"' (0, {0, pump.V_flow_op, 1.5*pump.V_flow_op}, {2*pump.head_op, pump.head_op, 0}) +pump.delta_head_init*pump.V_flow_single));
pump.V_flow_single = homotopy((if pump.s > 0 then pump.s*pump.unitMassFlowRate /pump.rho else 0), pump.s*pump.unitMassFlowRate/pump.rho_nominal);
end if;


Did anyone of you have that problem before and can help me to solve it?

Thanks in advance!

There are 0 guests and 0 other users also viewing this topic
You are here: