BobLib is a Modelica-based vehicle dynamics library for building modular multibody vehicle models, suspension assemblies, tire models, and standardized simulation workflows.
The codebase is organized as a reusable package tree with separate areas for vehicle structure, parameter records, utilities, standardized test models, and validation cases.
Note: this repository should not be treated as a standard library until it implements VehicleInterfaces and the latest version of the Modelica Standard Library. The current interfaces are a one-off layer targeted at BobDyn consumption.
- Modular vehicle architecture for chassis, suspension, powertrain, electronics, and aero
- Record-based parameterization for clean separation between model structure and data
- Standardized simulation entry points for steady-state and kinematics-and-compliance workflows
- Tire modeling support based on MF5.2-style templates and slip models
- Utility packages for math and multibody helpers
BobLib declares compatibility with:
Modelica 3.2.3
A Modelica toolchain with OpenModelica scripting support is recommended if you want to use the provided build scripts in Generation/scripts/.
BobLib/
├── Vehicle/ # Physical vehicle models and subsystem assemblies
├── Resources/ # Parameter records and visual/vehicle definitions
├── Standards/ # Standard simulation models and build scripts
├── Utilities/ # Shared math and multibody helpers
├── Tests/ # Validation and development test models
├── Generation/ # Active YAML/templates and generator scripts
└── package.mo # Root package definition
Contains the physical modeling layer for complete vehicles and subsystems.
Notable areas include:
Vehicle.ChassisVehicle.Chassis.BodyVehicle.Chassis.SuspensionVehicle.Chassis.Suspension.LinkagesVehicle.Chassis.Suspension.TemplatesVehicle.PowertrainVehicle.Powertrain.BatteryVehicle.Powertrain.DrivetrainVehicle.Powertrain.ElectronicsVehicle.ElectronicsVehicle.Aero
Holds the parameter data and visualization records used by the models.
Notable groups include:
Resources.VehicleDefnResources.VehicleRecordResources.StandardRecordResources.VisualRecord
These records are used to configure different vehicle combinations and test setups without hard-coding parameters into the model definitions.
Contains standardized simulation models and automation scripts.
Key models:
Standards.VehicleSimStandards.FourPostSim
Build scripts:
Generation/generate_vehicle_model.pyGeneration/scripts/build_vehicle_sim.pyGeneration/scripts/build_four_post_sim.py
Shared helper functions and components used throughout the library.
Notable groups include:
Utilities.Math.VectorUtilities.Math.TensorUtilities.Mechanics.MultibodyUtilities.FMI
Validation and development tests for individual subsystems and full vehicle configurations.
Examples:
Tests.TestVehicle.TestChassis.TestSuspension.TestFrAxleDWTests.TestVehicle.TestChassis.TestSuspension.TestRrAxleDWTests.TestVehicle.TestPowertrain.TestPowertrainTests.TestVehicle.TestPowertrain.TestBatteryPackTests.TestUtilities.TestMechanics.TestMultibody.TestGroundPhysics
git clone <repository-url> BobLibAdd the repository root to your Modelica library search path, then load BobLib from OMEdit.
If you prefer to keep the library in the default OpenModelica library directory, place it under:
~/.openmodelica/libraries/BobLibStart with one of these entry points:
BobLib.Standards.VehicleSimBobLib.Standards.FourPostSim
The repository includes OpenModelica script files for common workflows.
Run Standards/BuildVehicleModel.mos to build the configured vehicle simulation target.
Run Standards/FourPostSim.mo as the active FourPost simulation model.
BobLib is intentionally split into a few layers:
Vehicle/defines the model structureResources/provides the data for those modelsStandards/wraps models in repeatable simulation and export workflowsTests/captures regression and development casesUtilities/contains reusable math and mechanics helpers
This separation makes it easier to swap vehicle definitions, reuse subsystem templates, and keep parameter data independent from the physical models.
- The library is still evolving, so some subsystems are more complete than others.
- The chassis and suspension areas are the most mature parts of the tree.
- The build scripts are written for OpenModelica-style command line execution.
Contributions are welcome. Useful areas of work include:
- Model robustness
- Additional suspension and powertrain templates
- Test coverage
- Documentation improvements
BobLib is distributed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.