I´m just trying to understand some very basic characteristics of Modelica (and also Dymola). This is my first question (out of a few...):
Look at this example. There is a constant torque connected to a inertia. I´ve used the
connect(constantTorque.flange, inertia.flange_a)
for the model on top and then I wanted to replace this by
constantTorque1.flange.phi=inertia1.flange_a.phi;
constantTorque1.flange.tau+inertia1.flange_a.tau=0;
which is not possible. I can leave out one of these equations but I still get the error that "The Real part has 26 unknowns and 27 equations." What is so special about the connection? There must be a way to write equations instead of connect()!?
Can you give me some hints?
CODE
model ConnectTest
annotation (Diagram);
Modelica.Mechanics.Rotational.Inertia inertia
annotation (extent=[0,50; 20,70]);
Modelica.Mechanics.Rotational.ConstantTorque constantTorque
annotation (extent=[-40,50; -20,70]);
Modelica.Mechanics.Rotational.Inertia inertia1
annotation (extent=[0,-20; 20,0]);
Modelica.Mechanics.Rotational.ConstantTorque constantTorque1
annotation (extent=[-40,-20; -20,0]);
equation
connect(constantTorque.flange, inertia.flange_a)
annotation (points=[-20,60; 0,60], style(color=0, rgbcolor={0,0,0}));
constantTorque1.flange.phi=inertia1.flange_a.phi;
// constantTorque1.flange.tau+inertia1.flange_a.tau=0;
end ConnectTest;
Click to view attachment
