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

julia
using MultibodyComponents #hide
using ModelingToolkit #hide
@variables d #hide
@named sys = MultibodyComponents.PlanarMechanics.examples.dyad_balans.SimpleMotor(d=d) #hide
full_equations(sys) #hide
<< @example-block not executed in draft mode >>

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