SimpleDomains - Translational

Gallery
Tutorial
Click on the image to view it full size

The Modelica By Example target code is:


connector Translational
     Modelica.SIunits.Position x;
     flow Modelica.SIunits.Force f;
end Translational;

Unfortunately, we can't just use LMomFlowElement and FlowingLMom from the SysPhS , because FlowingLMom is based on velocity rather than position, which is not how the Modelica By Example chooses to approach it:

DomainThrough VariableAcross Variable
ElectricalCurrent [A]Voltage [V]
ThermalHeat [W]Temperature [K]
TranslationalForce [N]Position [m]
RotationalTorque [N.m]Angle [rad]

Therefore for this trail position-based FlowingLinearMomentum and LinearMomentumFlowElement are introduced, from which an equivalent Modelica connector can then be generated via SysPhS as part of a minimal translational system:


model TranslationalContext
  TranslationalContext _TranslationalContext;
  model TranslationalContext
    TranslationalA a;
    TranslationalB b;
  equation
    connect(a.io,b.io);
  end TranslationalContext;
  model TranslationalA
    LinearMomentumFlowElement io;
  end TranslationalA;
  model TranslationalB
    LinearMomentumFlowElement io;
  end TranslationalB;

  connector LinearMomentumFlowElement
    flow Force f;
    Position p;
  end LinearMomentumFlowElement;

  type Force=Real(unit="N");
  type Position=Real(unit="m");
end TranslationalContext;
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)
External links