Opened 15 years ago

Last modified 15 years ago

#1183 closed defect (fixed)

Compilation of Fourbar Multibody model fails without errors

Reported by: Per Östlund Owned by: Per Östlund
Priority: normal Milestone:
Component: Version: 1.5.0RC2
Keywords: Cc: Per Östlund,

Description

The following model is flattened, but DAE.lower2 fails (possibly due to components with ET_COMPLEX type?). This causes the compiler to fail without any error messages (except for the standard "Error encountered!" and such).

This model does not seem to be MSL 3.0 compatible, and needs MSL 2.2 to flatten.

model Fourbar1
  ModelicaAdditions.MultiBody.Parts.InertialSystem IS;
  ModelicaAdditions.MultiBody.Parts.FrameTranslation FT(r = {3, -0.5,0});
  Modelica.Blocks.Sources.Constant C;
  ModelicaAdditions.MultiBody.Joints.Revolute R;
  ModelicaAdditions.MultiBody.Joints.Revolute R2;
  ModelicaAdditions.MultiBody.Joints.Revolute R3;
  Modelica.Mechanics.Rotational.Speed S;
  ModelicaAdditions.MultiBody.Parts.CylinderBody CB(r = {0,1,0});
  ModelicaAdditions.MultiBody.Parts.CylinderBody CB2(r = {3,0,0});
  ModelicaAdditions.MultiBody.Parts.CylinderBody Cb3(r = {0, -1.5,0});
  ModelicaAdditions.MultiBody.CutJoints.Revolute2Dloop CR;
equation
  connect(C.y,S.w_ref);
  connect(S.flange_b,R.axis);
  connect(IS.frame_b,R.frame_a);
  connect(R.frame_b,CB.frame_a);
  connect(CB.frame_b,R2.frame_a);
  connect(R2.frame_b,CB2.frame_a);
  connect(CB2.frame_b,R3.frame_a);
  connect(R3.frame_b,Cb3.frame_a);
  connect(IS.frame_b,FT.frame_a);
  connect(FT.frame_b,CR.frame_a);
  connect(CR.frame_b,Cb3.frame_b);
end Fourbar1;

Change History (2)

comment:1 by Per Östlund, 15 years ago

After some investigation it turns out that ModelicaAdditions.MultiBody is an old library that uses the non-standard constrain function. Since constrain is not standard Modelica it seems unlikely that we will implement it, but OMC should at least print out a proper error message about it. I will therefore leave the bug open, but with lower priority.

comment:2 by Per Östlund, 15 years ago

I have now "fixed" this by removing constrain from the initial environment, since support for it was not implemented in the compiler. The compiler will now print an error message that says that the constrain function was not found when compiling the above model, which should be correct.

Note: See TracTickets for help on using tickets.