{ "cells": [ { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "# Rolling Disc From Scratch\n", "\n", "Welcome to this model developers tutorial on creating a rolling disc model from scratch using SymBRiM!\n", "\n", "This notebook is a hands-on tutorial on your own models, connections, and load groups in SymBRiM. By the end of this tutorial, you'll have achieved the following learning goals:\n", "\n", "- Create base classes for models and connections.\n", "- Create a submodel.\n", "- Create a parent model.\n", "- Create a connection.\n", "- Create a load group.\n", "\n", "The setup of this tutorial also aims to follow the style guide used in SymBRiM's source code to acustom you with the style expected by SymBRiM developers. An example is the obligated usage of docstrings and type hints in function signatures.\n", "\n", "Before diving into this tutorial, it's recommended that you familiarize yourself with Objected Oriented Programming (OOP), SymPy, the architecture of SymBRiM (refer to the sections on _Software Overview_ to _BRiM Models_ in [the SymBRiM paper](https://doi.org/10.59490/6504c5a765e8118fc7b106c3)), and the [guidelines on implementing components in SymBRiM](https://mechmotum.github.io/symbrim/guides/component_implementation.html). This background information will provide valuable context for what we'll cover here.\n", "\n", "\n", "## Rolling Disc Model\n", "\n", "Shown below is a freebody diagram of the rolling disc we will model in this tutorial. The rolling disc is defined as an infinitesimally thin disc, rolling on the ground without lateral and longitudinal slip. The disc itself is defined with respect to the ground with a subsequent yaw-roll-pitch body-fixed rotation. Its contact point is defined to be in the ground plane at $q_1 \\hat{n}_x + q_2 \\hat{n}_y$ from the origin. As for the generalized speeds used in Kane's method, those are defined as $u_i = \\dot{q}_i$ for $i=1,...,5$. The ground is treated as the Newtonian body, the disc as a rigid body with a specified mass, inertia, and radius. To control the disc three time-varying torques are used: $T_{drive}$ acts about the rotation axis of the disc, $T_{steer}$ acts about the axis going through the contact point and the center of the disc, and $T_{roll}$ acts about the axis perpendicular to both the normal of the ground and the rotation axis.\n", "\n", "