MapleSim User's Guide
Contents
Introduction
MapleSim Overview
Related Products
Related Resources
Getting Help
Customer Feedback
1 Getting Started with MapleSim
1.1 Physical Modeling in MapleSim
Topological or “Acausal” System Representation
Mathematical Model Formulation and Simplification
Advanced Differential Algebraic Equation Solvers
Acausal and Causal Modeling
Causal Modeling
Acausal Modeling
Through and Across Variables
1.2 The MapleSim Window
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor
Building an RLC Circuit Model
Specifying Component Properties
Adding a Probe
Simulating the RLC Circuit Model
Building a Simple DC Motor Model
Simulating the DC Motor Model
2 Building a Model
2.1 The MapleSim Component Library
Viewing Help Topics for Components
Updating Models Created in a Previous Release of MapleSim
2.2 Browsing a Model
Model Tree
Model Navigation Controls
2.3 Defining How Components Interact in a System
2.4 Specifying Component Properties
Specifying Parameter Units
Specifying Initial Conditions
Specifying How Initial Conditions are Enforced
2.5 Creating and Managing Subsystems
Example: Creating a Subsystem
Viewing the Contents of a Subsystem
Adding Multiple Copies of a Subsystem to a Model
Example: Adding Subsystem Definitions and Shared Subsystems to a Model
Editing Subsystem Definitions and Shared Subsystems
Example: Editing Shared Subsystems that are Linked to the Same Subsystem Definition
Example: Removing the Link between a Shared Subsystem and Its Subsystem Definition
Working with Standalone Subsystems
Example: Resolving Warning Messages in the Debugging Console
Example: Copying and Pasting a Standalone Subsystem
2.6 Global and Subsystem Parameters
Global Parameters
Example: Defining and Assigning a Global Parameter
Subsystem Parameters
Example: Assigning a Subsystem Parameter to a Shared Subsystem
Using Parameter Blocks for Subsystem Parameters
Example: Creating and Using a Parameter Block
Saving Parameter Sets
Using Advanced Parameter and Variable Settings
Advanced Parameter Settings
Advanced Variable Settings
Example: Creating a Parameter Override
Specifying Initial Condition Overrides
2.7 Attaching Files to a Model
2.8 Creating and Managing Custom Libraries
Example: Creating a Custom Library from an Existing Model
2.9 Annotating a Model
Example: Adding Text Annotation to a Model
2.10 Entering Text in 2-D Math Notation
2.11 Creating a Data Set for an Interpolation Table Component
Example: Creating a Data Set in Maple
2.12 Best Practices: Building a Model
Best Practices: Laying Out and Creating Subsystems
Create Subsystems for Component Groups That You Plan to Reuse
Create Subsystems for Component Groups That You Plan to Analyze
Use Icon View to Control Subsystem Port Layout and Customize Subsystem Icon
Use the Debugging Console to Identify Subsystem Copies and Unconnected Lines
Best Practices: Building Electrical Models
Include a Ground Component in Electrical Circuits
Verify the Connections of Current and Voltage Sources
Best Practices: Building 1-D Translational Models
Verify That All Force Arrows Are Pointed in the Same Direction
Best Practices: Building Multibody Models
Connect the Inboard Port of a Rigid Body Frame to a Center-of-mass Frame
Best Practices: Building Hydraulic Models
Define Fluid Properties
Best Practices: Enforcing Initial Conditions
3 Creating Custom Modeling Components
3.1 Understanding Custom Components
Creating a Simple Custom Component
Typical Uses
Using The Custom Component Template
3.2 Creating Custom Components with Signal-Flow Behavior
Creating a Simple Signal-Flow Custom Component
Advantages of Acausal Mapping
Using Differential Equations in Custom Components
3.3 Creating Custom Components with Physical Connections
Deriving the System Equations for a Resistor
3.4 Working with Custom Components in MapleSim
Save a Custom Component as Part of the Current Model
Add a Custom Component to a Custom Library
Edit a Custom Component
3.5 Example: Creating a Nonlinear Spring-Damper Custom Component
Opening the Custom Component Template
Defining the Component Name and Equations
Defining Component Ports
Checking Dimensions
Generating the Custom Component
4 Simulating and Visualizing a Model
4.1 How MapleSim Simulates a Model
Modelica Description
Model Description
System Equations
Simplified Equations
Integration and Event Handling
Simulation Results
4.2 Simulating a Model
Simulation and Advanced Simulation Settings
Simulation Settings
Advanced Simulation Settings
Editing Probe Values
Storing Parameter Sets to Compare Simulation Results
4.3 Simulation Progress Messages
4.4 Managing Simulation Results and Snapshots
Storing Results
Saving and Using Snapshots
4.5 Customizing Plot Window Configurations
Example: Plotting Multiple Quantities in Individual Graphs
Example: Plotting One Quantity versus Another
4.6 Visualizing a Multibody Model
3-D Visualization and Multibody Settings
Animation Settings
Multibody Settings
Visualization Settings
The 3-D Workspace
Viewing and Browsing 3-D Models
Adding Shapes to a 3-D Model
Adding Implicit Geometry
Adding Attached Shapes
Example: Adding Attached Shapes to a Double Pendulum Model
Building a Model in the 3-D Workspace
Moving Objects in the 3-D Workspace
Assembling a 3-D Model
Using the Unenforced Constraints Button to Manipulate Joints in the 3-D Workspace
Displaying Attached Shapes as You Build a 3-D Model
Example: Building and Animating a Double Pendulum Model in the 3-D Workspace
Adding and Moving Objects in the 3-D Workspace
Connecting 3-D Objects
Setting Initial Conditions for the Joint Components
Animating the 3-D Model
4.7 Best Practices: Simulating and Visualizing a Model
Use an External C Compiler to Run Simulations with Longer Durations
Compare Results Generated by Sections of Your Model
5 Analyzing and Manipulating a Model
5.1 Overview
MapleSim Apps
Working with Apps
Working with Templates and Scripting Worksheets
Working with MapleSim Equations and Properties in a Maple Worksheet
Using Subsystems
5.2 Retrieving Equations and Properties from a Model
5.3 Analyzing Linear Systems
Linear System Analysis
5.4 Optimizing Parameters
5.5 Generating and Exporting C Code from a Model
Preparing the Model for Export in MapleSim
Initialization
Opening the Code Generation App
Loading the Subsystem
Customizing, Defining, and Assigning Parameter Values to Specific Ports
Selecting the Code Export Options
Solver Options
Baumgarte Constraint Stabilization
Constraint Handling Options
Event Handling Options
Generating and Saving the C code
5.6 Generating a Custom Component from External C Code/Library Definition
Opening the External C Code/Library Definition App
Specifying the C/Library Code Location and Options
Defining the C/Library Code Location and Options
Component Generation
5.7 Working with the MapleSim API and Maple Commands
5.8 Working with Maple Embedded Components
6 MapleSim Tutorials
6.1 Tutorial 1: Modeling a DC Motor with a Gearbox
Adding a Gearbox to a DC Motor Model
Simulating the DC Motor with the Gearbox Model
Grouping the DC Motor Components into a Subsystem
Assigning Global Parameters to a Model
Rerunning the Simulation with Different Parameter Values
Changing Input and Output Values
6.2 Tutorial 2: Modeling a Cable Tension Controller
Building a Cable Tension Controller Model
Simulating the Cable Tension Controller
6.3 Tutorial 3: Modeling a Nonlinear Damper
Generating a Spring Damper Custom Component
Providing Damping Coefficient Values
Building the Nonlinear Damper Model
Assigning a Parameter to a Subsystem
Simulating the Nonlinear Damper with Linear Spring Model
6.4 Tutorial 4: Modeling a Planar Slider-Crank Mechanism
Creating a Planar Link Subsystem
Defining and Assigning Parameters
Creating the Crank and Connecting Rod Elements
Adding the Fixed Frame, Sliding Mass, and Joint Elements
Simulating the Planar Slider-Crank Mechanism
6.5 Tutorial 5: Using the Custom Component Template
Example: Modeling a Temperature Dependent Resistor
Example: Compliant Contact and Piecewise Functions
Example: Custom Ports
Create Custom Ports
Create Engine Model
Create Monitor Model
Complete Model
Advanced Uses for Custom Components
Example: Modeling a Centrifugal Pump from a Head Flow Rate Curve
6.6 Tutorial 6: Using the External C Code/DLL Custom Component App
6.7 Tutorial 7: Using the Equation Extraction App
App Description
Subsystem Selection
Equation Details
View Equations
Generating the Equations
Generating the System Equations
6.8 Tutorial 8: Modeling Hydraulic Systems
Computational Issues
Basic Hydraulic Library Components
Basic Hydraulic Equations
Bernoulli Equation
Darcy Equation
Friction Factor
Analysis of Simple Hydraulic Networks
Flow Through a Pipe
Confirming the Modeling Results from First Principles
Overview of Controlling Hydraulic Flow Path
Mechanical and Hydraulic Systems
Simulating Translational Motion with a Fixed Flow Rate Source
Simulating Translational Motion with a Fixed Pressure Source
Overview of Actuating Multibody Systems with Hydraulic Components
Pascal's Principle
Overview of Compressibility of Hydraulic Liquids
Overview of Fluid Inertia Models
System without Fluid Inertia
System with Fluid Inertia
Overview of Water Hammer Models
Example: Water Hammer
Example: Attenuating Water Hammer with an Accumulator
Overview of Hydraulic Custom Components
Centrifugal Pumps
Vertical Pipes
7 Reference: MapleSim Keyboard Shortcuts
Glossary
Index
List of Figures
Figure 1.1: Causal Model Block Diagram
Figure 1.2: Acausal Model Block Diagram
Figure 1.3: Simple Through and Across Variable Model
Figure 1.4: Simple Through and Across Variable Electrical Model
Figure 1.5: RLC Circuit
Figure 1.6: RLC MapleSim Circuit
Figure 1.7: MapleSim Window
Figure 1.8: Voltage Response Plot
Figure 1.9: EMF and Inertia connections
Figure 1.10: Plots of DC Motor Torque and Speed
Figure 2.1: Components view in the Model Tree
Figure 2.2: Component selection using the Model Tree
Figure 2.3: Exploring a subsystem
Figure 2.4: Model Navigational Controls
Figure 2.5: Specifying Units using the Conversion Block
Figure 2.6: Initial Conditions
Figure 2.7: Subsystem Group
Figure 2.8: Creating a Subsystem
Figure 2.9: Creating Multiple Subsystems
Figure 2.10: Subsystem Definition
Figure 2.11: Adding Multiple Subsystems to a Model
Figure 2.12: DC Motor Subsystem
Figure 2.13: Copy Subsystem Dialog
Figure 2.14: Attachments
Figure 2.15: Verifying Force Arrows
Figure 2.16: Center of Mass Placement Best Practice
Figure 2.17: Hydraulic Model
Figure 3.1: The Add Apps or Templates tab
Figure 3.2: Equations Defining a Custom Component
Figure 3.3: Port Mappings
Figure 3.4: Variable to Port Mapping
Figure 3.5: Generated Custom Component
Figure 3.6: Completed Custom Component Model
Figure 3.7: Double Mass-Spring-Damper Equations
Figure 3.8: Port Mapping for Double Mass-Spring-Damper
Figure 3.9: Resistor Port Mapping
Figure 3.10: Nonlinear Spring-Damper Custom Component
Figure 4.1: Simulation Process
Figure 4.2: Simulation Results Progress Messages
Figure 4.3: Snapshots in the Advanced Simulation Settings
Figure 4.4: The Stored Results Palette and Snapshots
Figure 4.5: Simulation Graphs
Figure 4.6: Custom Plot Window
Figure 4.7: Plot One Quantity Versus Another
Figure 4.8: 3-D Workspace
Figure 4.9: 3-D View Controls
Figure 4.10: Perspective View Double Pendulum
Figure 4.11: Orthographic View Double Pendulum
Figure 4.12: Implicit Geometry Double Pendulum
Figure 4.13: Attached Shapes
Figure 6.1: Cable Tension Controller
Figure 6.2: Nonlinear Damper Model
Figure 6.3: Planar Slider-Crank Mechanism
Figure 6.4: Temperature Dependent Resistor
Figure 6.5: Falling Ball
Figure 6.6: Bouncing Ball Dynamics
Figure 6.7: Bouncing Ball
Figure 6.8: Bouncing Ball Result
Figure 6.9: Custom Ports
Figure 6.10: Using a Custom Port
Figure 6.11: Centrifugal Pump Head Flow Rate Curve
Figure 6.12: Centrifugal Pump Custom Component
Figure 6.13: External C Code Definition for Windows
Figure 6.14: External C Code Definition for Unix
Figure 6.15: Flow Through a Pipe
Figure 6.16: Controlling Flow Path
Figure 6.17: Fixed Flow Rate Source
Figure 6.18: Translational Motion with Fixed Pressure Source
Figure 6.19: Fixed Pressure Source Results
Figure 6.20: Translational Fixed Flange Hydraulic component
Figure 6.21: Rotational Fixed Flange Hydraulic component
Figure 6.22: Pascal's Principle Example
Figure 6.23: Hydraulic Liquids Compressibility
Figure 6.24: System without Fluid Inertia
Figure 6.25: System with Fluid Inertia
Figure 6.26: System with and without Fluid Inertia
Figure 6.27: Water Hammer
Figure 6.28: Discretized Pipeline Segment
Figure 6.29: Water Hammer Pressure Flow Rate
Figure 6.30: Pressure Surge with an Accumulator
Figure 6.31: Head Flow Rate
Figure 6.32: Centrifugal Pump Custom Component Equations
Figure 6.33: Gravity Head Custom Component Equations
List of Tables
Table 1.1: Through and Across Variable Domain Types
Table 1.2: MapleSim Window Components
Table 2.1: MapleSim Component Library
Table 2.2: Model Navigation Controls
Table 2.3: Domain-Specific Connection Line Colors
Table 2.4: 2-D Math Notation Key Combinations
Table 3.1: Port Map
Table 3.2: Signal Flow Components
Table 3.3: Characteristics of Through and Across Variables
Table 3.4: Through and Across Variable Mathematical Relationship
Table 3.5: Resistor Variables and Parameters
Table 4.1: Simulation Settings
Table 4.2: Advanced Simulation Settings
Table 4.3: Multibody Parameter Values
Table 4.4: 3-D Visualization Parameter Values
Table 4.5: 3-D Workspace Controls
Table 5.1: MapleSim Apps
Table 5.2: MapleSim Templates
Table 6.1: Temperature Dependent Resistor Components
Table 6.2: Bouncing Ball Multibody Components
Table 6.3: Centrifugal Pump Data
Table 6.4: Circular Pipe Parameters
Table 6.5: Centrifugal Pump Components
Table 6.6: External C Code DLL Custom Components and Required Settings
Table 6.7: Basic Hydraulic Library Components
Table 6.8: Bernoulli and Darcy Equation Notation
Table 6.9: Circular Pipe Parameters
Table 6.10: Hydraulic Components
Table 6.11: Spool Valve
Table 6.12: Translational Motion with Fixed Flow Rate Sources
Table 6.13: Translational Motion with a Fixed Pressure Source
Table 6.14: Actuating Multibody Components
Table 6.15: Hydraulic Liquids Compressibility Components
Table 6.16: Confined Hydraulic System Components
Table 6.17: Fluid Inertia
Table 6.18: Fluid Properties Values
Table 6.19: Water Hammer Parameters
Table 6.20: Accumulator Parameters Custom Component
Table 7.1: Operations on a File
Table 7.2: Building a Model in the Block Diagram View
Table 7.3: Adding Annotations to a Model
Table 7.4: Browsing a Model in the Block Diagram View
Table 7.5: Browsing a Model in the 3-D View
Table 7.6: Simulating a Model
Table 7.7: Navigating the Console Pane
Table 7.8: Modifying the Plot Window Layout
Table 7.9: Editing a Modelica Custom Component
Table 7.10: Miscellaneous
Download Help Document