Skip to content
LIBRARY
PlanarMechanics.examples.dyad_balans.SimpleMotor.md

PlanarMechanics.examples.dyad_balans.SimpleMotor

This component extends from MultibodyComponents.PlanarMechanics.PartialTwoFrames

Usage

MultibodyComponents.PlanarMechanics.examples.dyad_balans.SimpleMotor(d=0.0)

Parameters:

NameDescriptionUnitsDefault value
ddamping coefficientN.m.s/rad0

Connectors

  • frame_a - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

  • frame_b - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

  • torqueinput - This connector represents a real signal as an input to a component (RealInput)

Behavior

[connect(torquesource+spline,motorrotation+flange_a,damper1+splinea)connect(framea,motorrotation+frame_a)connect(motorrotation+frame_b,frameb)connect(torquesource+support,damper1+splineb,fixed+spline)connect(torqueinput,torquesource+tau)torquesource.support.phi(t)=torquesource.phisupport(t)torquesource.support.tau(t)=torquesource.spline.tau(t)torquesource.phi(t)=torquesource.spline.phi(t)torquesource.phisupport(t)torquesource.spline.tau(t)=torquesource.tau(t)motorrotation.w(t)=dmotorrotation.phi(t)dtmotorrotation.alpha(t)=dmotorrotation.w(t)dtmotorrotation.frame_a.x(t)=motorrotation.frame_b.x(t)motorrotation.frame_a.y(t)=motorrotation.frame_b.y(t)motorrotation.phi(t)+motorrotation.frame_a.phi(t)=motorrotation.frame_b.phi(t)motorrotation.frame_b.fx(t)+motorrotation.frame_a.fx(t)=0motorrotation.frame_a.fy(t)+motorrotation.frame_b.fy(t)=0motorrotation.frame_b.tau(t)+motorrotation.frame_a.tau(t)=0motorrotation.frame_a.tau(t)=motorrotation.tau(t)motorrotation.flange_a.phi(t)=motorrotation.phi(t)motorrotation.flange_a.tau(t)=motorrotation.tau(t)motorrotation.shape.r(t)=arrayliteral([3],motorrotation.frame_a.x(t),motorrotation.frame_a.y(t),motorrotation.z_position)motorrotation.shape.R(t)=arrayliteral([33],cos(motorrotation.frame_a.phi(t)),sin(motorrotation.frame_a.phi(t)),0,sin(motorrotation.frame_a.phi(t)),cos(motorrotation.frame_a.phi(t)),0,0,0,1)motorrotation.shape.r_shape(t)=arrayliteral([3],0,0,12motorrotation.cylinder_length)motorrotation.shape.length_direction(t)=[001]motorrotation.shape.width_direction(t)=[100]motorrotation.shape.length(t)=motorrotation.cylinder_lengthmotorrotation.shape.width(t)=2motorrotation.radiusmotorrotation.shape.height(t)=2motorrotation.radiusdamper1.phirel(t)=damper1.splinea.phi(t)+damper1.splineb.phi(t)damper1.splineb.tau(t)=damper1.tau(t)damper1.splinea.tau(t)=damper1.tau(t)ddamper1.phirel(t)dt=damper1.wrel(t)ddamper1.wrel(t)dt=damper1.arel(t)damper1.tau(t)=damper1.ddamper1.wrel(t)fixed.spline.phi(t)=fixed.phi0]

Source

dyad
example component SimpleMotor
  extends MultibodyComponents.PlanarMechanics.PartialTwoFrames
  torquesource = RotationalComponents.Sources.TorqueSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 590, "x2": 550, "y2": 690, "rot": 270}
      },
      "tags": []
    }
  }
  motor_rotation = MultibodyComponents.PlanarMechanics.Revolute(render = false) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 280, "x2": 550, "y2": 380, "rot": 0}
      },
      "tags": []
    }
  }
  damper1 = RotationalComponents.Components.Damper(d = d) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 560, "y1": 460, "x2": 660, "y2": 560, "rot": 90}
      },
      "tags": []
    }
  }
  torqueinput = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 460, "y1": 700, "x2": 540, "y2": 780, "rot": 270}
      },
      "tags": []
    }
  }
  fixed = RotationalComponents.Components.Fixed() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 670, "y1": 590, "x2": 770, "y2": 690, "rot": 270}
      },
      "tags": []
    }
  }
  "damping coefficient"
  parameter d::RotationalDampingConstant = 0.0
relations
  connect(torquesource.spline, motor_rotation.flange_a, damper1.spline_a) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [{"x": 610, "y": 420}], "E": -1}
      ],
      "junctions": [{"x": 500, "y": 420}],
      "renderStyle": "standard"
    }
  }
  connect(frame_a, motor_rotation.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 280, "y": 500}, {"x": 280, "y": 330}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(motor_rotation.frame_b, frame_b) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 720, "y": 330}, {"x": 720, "y": 500}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(torquesource.support, damper1.spline_b, fixed.spline) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 610, "y": 640}], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [], "E": -1}
      ],
      "junctions": [{"x": 610, "y": 640}],
      "renderStyle": "standard"
    }
  }
  connect(torqueinput, torquesource.tau) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Revolute.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 200,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
example component SimpleMotor
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  torquesource = RotationalComponents.Sources.TorqueSource() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 590, "x2": 550, "y2": 690, "rot": 270}
      },
      "tags": []
    }
  }
  motor_rotation = MultibodyComponents.PlanarMechanics.Revolute(render = false) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 280, "x2": 550, "y2": 380, "rot": 0}
      },
      "tags": []
    }
  }
  damper1 = RotationalComponents.Components.Damper(d = d) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 560, "y1": 460, "x2": 660, "y2": 560, "rot": 90}
      },
      "tags": []
    }
  }
  torqueinput = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 460, "y1": 700, "x2": 540, "y2": 780, "rot": 270}
      },
      "tags": []
    }
  }
  fixed = RotationalComponents.Components.Fixed() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 670, "y1": 590, "x2": 770, "y2": 690, "rot": 270}
      },
      "tags": []
    }
  }
  "damping coefficient"
  parameter d::RotationalDampingConstant = 0.0
relations
  connect(torquesource.spline, motor_rotation.flange_a, damper1.spline_a) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [{"x": 610, "y": 420}], "E": -1}
      ],
      "junctions": [{"x": 500, "y": 420}],
      "renderStyle": "standard"
    }
  }
  connect(frame_a, motor_rotation.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 280, "y": 500}, {"x": 280, "y": 330}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(motor_rotation.frame_b, frame_b) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 720, "y": 330}, {"x": 720, "y": 500}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(torquesource.support, damper1.spline_b, fixed.spline) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 610, "y": 640}], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [], "E": -1}
      ],
      "junctions": [{"x": 610, "y": 640}],
      "renderStyle": "standard"
    }
  }
  connect(torqueinput, torquesource.tau) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Revolute.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 200,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses