alimuradpasa
alimuradpasa

Reputation: 145

Warning : The component is declared multiple times and can not be verified to be identical to other declaration(s) with the same name - Modelica

I get a warning when I model with Modelica on Twin builder. Warning is: The component m_flow_start is declared multiple times and can not be verified to be identical to other declaration(s) with the same name. Even though this warning seems not so important for my model, I would like to learn why this warning occurs and how to avoid it.

Do you know how to deal with this warning?

model Hochdruckreiniger3
    //Declaration(s)
    Real V_max = 2506e-6;
    Real V_tod = 3765e-6;
    Real N = 2800;
    Real opening_NP;
    Real opening_HP;
    Real dp_nominal_ND = (0.7*rho_ND*0.01135*0.01135)/(3600/(2*N*N));
    Real dp_nominal_HD = (0.7*rho_HD*0.01135*0.01135)/(3600/(2*N*N));
    Real rho_ND = 998.388;
    Real rho_HD = 1019.921;
    Real m_flow_ND = rho_ND*0.000113097*0.01135*N/60;
    Real m_flow_HD = rho_HD*0.000113097*0.01135*N/60;
    //Component(s)
    Modelica.Fluid.Machines.SweptVolume Swept1 (
        pistonCrossArea = 0.0001131,
        clearance = 0.00000250621,
        redeclare package Medium = Modelica.Media.Water.StandardWater,
        nPorts = 2,
        use_portsData = false,
        p_start = 1e5,
        use_T_start = true,
        T_start = 293.15,
        V(start = 0.005),
        m(start = 0.005));
    inner Modelica.Fluid.System system;
    Modelica.Mechanics.Translational.Sources.Position Posit1 (exact = true, useSupport = false);
    Modelica.Blocks.Sources.Sine Sine1 (
        amplitude = 0.005567,
        freqHz = 16.66,
        offset = 0.005567,
        phase = -Modelica.Constants.pi/4);
    Modelica.Fluid.Sources.FixedBoundary boundary (p = 4e5, redeclare package Medium = Modelica.Media.Water.StandardWater, nPorts = 1);
    Modelica.Fluid.Pipes.DynamicPipe pipe1 (
        length = 0.5,
        diameter = 0.03,
        redeclare package Medium = Modelica.Media.Water.StandardWater,
        modelStructure = Modelica.Fluid.Types.ModelStructure.av_b);
    Modelica.Fluid.Valves.ValveIncompressible Niederdruckventile (
        dp_nominal = dp_nominal_ND,
        m_flow_nominal = m_flow_ND,
        rho_nominal = rho_ND,
        opening = opening_NP,
        redeclare package Medium = Modelica.Media.Water.StandardWater);
    Modelica.Fluid.Pipes.DynamicPipe pipe2 (
        length = 0.002,
        diameter = 0.011,
        redeclare package Medium = Modelica.Media.Water.StandardWater,
        modelStructure = Modelica.Fluid.Types.ModelStructure.av_b);
    Modelica.Fluid.Pipes.DynamicPipe pipe3 (
        length = 0.019,
        diameter = 0.0055,
        redeclare package Medium = Modelica.Media.Water.StandardWater,
        modelStructure = Modelica.Fluid.Types.ModelStructure.a_vb);
    Modelica.Fluid.Valves.ValveIncompressible Hochdruckventile (
        dp_nominal = dp_nominal_HD,
        m_flow_nominal = m_flow_HD,
        rho_nominal = rho_HD,
        opening = opening_HP,
        redeclare package Medium = Modelica.Media.Water.StandardWater);
    Modelica.Fluid.Pipes.DynamicPipe pipe4 (
        length = 0.5,
        diameter = 0.03,
        redeclare package Medium = Modelica.Media.Water.StandardWater,
        modelStructure = Modelica.Fluid.Types.ModelStructure.a_vb);
    Modelica.Fluid.Sources.FixedBoundary boundary1 (p = 5e5, redeclare package Medium = Modelica.Media.Water.StandardWater, nPorts = 1);
equation
    if der(Sine1.y)>=0 then
            opening_NP=1;
            opening_HP=0;
           else
            opening_NP=0;
            opening_HP=1;
          end if;
    //Connection(s)
    connect(Posit1.flange, Swept1.flange);
    connect(Sine1.y, Posit1.s_ref);
    connect(Niederdruckventile.port_b, pipe2.port_a);
    connect(pipe2.port_b, Swept1.ports[1]);
    connect(boundary.ports[1], pipe1.port_a);
    connect(pipe1.port_b, Niederdruckventile.port_a);
    connect(Swept1.ports[2], pipe3.port_a);
    connect(pipe3.port_b, Hochdruckventile.port_a);
    connect(Hochdruckventile.port_b, pipe4.port_a);
    connect(pipe4.port_b, boundary1.ports[1]);
end  Hochdruckreiniger3;

Thanks in advance!

Upvotes: 0

Views: 91

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 12517

I believe you can just ignore it.

As far as I could see internally in Dymola the issue is in Modelica.Fluid.Pipes.BaseClasses.FlowModels.PartialStaggeredFlowModel inheriting from Modelica.Fluid.Interfaces.PartialDistributedFlow, and both contain definitions of m_flow_start that differ slightly in MSL 3.2.3 - but only in terms of the parameter-dialog:

parameter Medium.MassFlowRate m_flow_start=system.m_flow_start
"Start value of mass flow rates"
    annotation(Dialog(tab="Internal Interface",enable=false,group = "Initialization"));

vs.

  parameter Medium.MassFlowRate m_flow_start=system.m_flow_start
"Start value of mass flow rates"
    annotation(Dialog(tab="Initialization"));

BTW: The model has a number of issues with lack of parameter it should be:

   parameter Real V_max = 2506e-6;
    parameter Real V_tod = 3765e-6;
    parameter Real N = 2800;
     Real opening_NP;
     Real opening_HP;
    parameter Real dp_nominal_ND = (0.7*rho_ND*0.01135*0.01135)/(3600/(2*N*N));
    parameter Real dp_nominal_HD = (0.7*rho_HD*0.01135*0.01135)/(3600/(2*N*N));
    parameter Real rho_ND = 998.388;
    parameter Real rho_HD = 1019.921;
    parameter Real m_flow_ND = rho_ND*0.000113097*0.01135*N/60;
    parameter Real m_flow_HD = rho_HD*0.000113097*0.01135*N/60;

Upvotes: 4

Related Questions