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
  • Index
  • » Users
  • » Camelot
  • » Profile

Posts

Posts

Mar-11-22 15:57:07
singularity error and strange warnings trying to set up basic pump flow cycle

Hi folks,

I'm pretty new in modelica (especially openmodelica), so please excuse some probably stupid questions.

I'm trying to simulate some very basic pump cycles with different setups, but already my first approach with just a pump and a pipe doesn't work...

My code:


model PumpeFilter
replaceable package Medium = Modelica.Media.Incompressible.Examples.Glycol47
    constrainedby Modelica.Media.Interfaces.PartialMedium;
  Modelica.Fluid.Machines.ControlledPump pump(redeclare package Medium = Medium, N(fixed = false, start = 1500), N_nominal = 1500, T_start = system.T_start, V = 0, V_flow_single(fixed = false), allowFlowReversal = false, checkValveHomotopy = Modelica.Fluid.Types.CheckValveHomotopyType.Open, control_m_flow = false, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal = 3, m_flow_start = 3, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, p_a_nominal = 100000, p_a_start = 100000, p_b_nominal = 500000, p_b_start = 500000, rho_nominal = 1030, s(fixed = false), use_HeatTransfer = false, use_powerCharacteristic = false)  annotation(
    Placement(visible = true, transformation(origin = {-12, -26}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  inner Modelica.Fluid.System system(T_ambient = 293.15, T_start (displayUnit = "K") = 293.15,energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal = 3,m_flow_start = 3, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, p_start(displayUnit = "Pa") = 500000)  annotation(
    Placement(visible = true, transformation(origin = {-68, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium, allowFlowReversal = false, diameter = 0.05, length = 800)  annotation(
    Placement(visible = true, transformation(origin = {-8, 12}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
equation
  connect(pipe.port_a, pump.port_b) annotation(
    Line(points = {{2, 12}, {24, 12}, {24, -26}, {-2, -26}}, color = {0, 127, 255}));
  connect(pipe.port_b, pump.port_a) annotation(
    Line(points = {{-18, 12}, {-44, 12}, {-44, -26}, {-22, -26}}, color = {0, 127, 255}));
  annotation(
    uses(Modelica(version = "4.0.0")));
end PumpeFilter;

So as you can see I used the "Controlled Pump" and "Static Pipe" models from MSL.

When I try to compile I get the following errors and warnings:


[2] 16:26:03 Übersetzung Warnung
Alias set with conflicting start values
* Candidate: pump.medium.p(start = pump.p_start = 500000.0, confidence number = 2)
* Candidate: pump.port_b.p(start = pump.p_b_start = 500000.0, confidence number = 2)
* Candidate: pipe.port_a.p(start = 100000.0, confidence number = 8)
=> Select value from pump.port_b.p(start = pump.p_b_start = 500000.0) for variable: pump.heatTransfer.states[1].p

[3] 16:26:03 Übersetzung Warnung
Alias set with conflicting start values
* Candidate: pump.heatTransfer.Ts[1](start = 288.15, confidence number = 8)
* Candidate: pump.heatTransfer.heatPorts[1].T(start = 288.15, confidence number = 9)
* Candidate: pump.heatTransfer.states[1].T(start = 288.15, confidence number = 9)
* Candidate: pump.medium.state.T(start = 288.15, confidence number = 9)
* Candidate: pump.monitoring.state.T(start = 288.15, confidence number = 9)
* Candidate: pump.medium.T(start = pump.T_start = 293.15, confidence number = 2)
=> Select value from pump.medium.T(start = pump.T_start = 293.15) for variable: pump.heatTransfer.Ts[1]

[4] 16:26:03 Übersetzung Fehler
Internal error IndexReduction.pantelidesIndexReduction failed! Found empty set of continuous equations. Use -d=bltdump to get more information.

[5] 16:26:03 Symbolisch Fehler
[Modelica.Fluid.Machines: 487:5-487:44]: Model is structurally singular, error found sorting equations
  13: 0.0 = 0.0
for variables
  24: pump.dp_pump:VARIABLE(unit = "Pa" )  "Pressure change" type: Real

[6] 16:26:03 Übersetzung Fehler
Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!

Concerning the singularity the mentioned pressure drop switches to an enthalpie when I use power characteristic instead of efficiency characteristic for the pump, so I assumed that there is some problem here? But I couldn't find anything and I actually didn't change anything in the standard model.

Regarding the alias conflicts (I don't know if this could be the basic problem too?) I really don't get were the problem is, since I don't even use the heat transfer of the pump. Or is this just a warning I can ignore in my case?

Additionally when checking the code I get the following strange warning:


[2] 16:50:40 Übersetzung Warnung
The units of following sub-expressions need to be equal:
- sub-expression "pump.V_flow_single_init * 1.1" has unit "m"
- sub-expression "PumpeFilter.pump.flowCharacteristic().V_flow" has unit "m3/s"

I don't know how a wrong unit can occure, since I only changed some values in the standard parameters of the components and am not even able to change units there?!

I'd be very thankful if you could help me out here or giving me some hints where to have a closer look current/smile
Thanks!

  • Index
  • » Users
  • » Camelot
  • » Profile
You are here: