WOLFRAM SYSTEM MODELER
SlidingCarPlaceholder for the SlidingCar example model, available on the Wolfram SystemModeler website. |
![]() |
SystemModel["EducationExamples.MechanicalEngineering.SlidingCar"]
This is a placeholder model. It requires the PlanarMechanics library.
The following documentation is taken from the main example of the downloadable model. Once you have downloaded all the model dependencies, the model can be downloaded here.
This model shows the concept of configurable modeling. The wheels are defined as replaceable models and can easily be changed in the car model.
This model is based on the TwoTrackWithDifferentialGear example from the Planar Mechanics Library. The library can be downloaded here. Four wheels interact with the ground through a friction model. Depending on the type of wheel and ground, different friction coefficients are used. To switch between different setups, use the drop-down menu in the General tab.
To simulate the model, perform this step:
The simulation is set to run for 15 seconds. A constant torque is applied to the back wheels during the simulation. After 7 seconds, the front wheel will turn to the right over 3 seconds and then keep that front wheel angle for the rest of the simulation. See the position of the wheels of the car (as plotted below) or the forces on the wheels in the stored plots.
PlanarMechanics and Multibody systems have visualizers to show what a real-world system would look like.
To show a 3D animation of the model, follow the steps below:
It is also possible to add traces to the wheels to see the path they have taken over time in the animation. To do this, right-click the background in the animation and choose Trace Path, and then choose the components to trace. One option is to trace the different cylinders 2–5 (powerTrain.fixedTranslation2.cylinder) as shown in the following image:
By using the replaceable concept, we can redeclare the Wheel model and effectively change all four wheels of the car model with a drop-down menu. The code that enables this can be seen in the text view of the model. A snippet of this can be seen in the following image:
When redeclaring the Wheel model in the code, the type of the different wheels will be redeclared.