## Using Python and MapleSim for teaching ODE

This research work demonstrates the use of the MapleSim and Python scientific packages for the correct use of differential equations for engineering students, in the face of the pandemic generated by COVID-19. The main objective is to visualize the teaching and learning process of the subject presented. The methodology used is block diagrams using graphic programming and the one-dimensional symbolic structure. The results are totally optimal since automation was achieved in the differential equations applied to different engineering cases. The applications generated by the scientific software are fully upgradeable and available in the cloud.

Ponencia_CIMAC_2021.pdf

Lenin AC

## How can I generate differential algebraic equation...

Hi,

I'm new to Maplesim and Maple. I've modeled a planar slider-crank mechanism in Maplesim and it works.

Now I want to extract the equations of motion (DAE) for further analysis. From 'Template' --> 'Worksheet', I used A:-GetEquations() to try to get the DAE. However, the equations are too long and not shown. Moreover, I don't know what coordinates Maplesim used to generated those 'unseen' equations. Here are the equations that can be hand-derived:

where I and m represent inertia and mass respectively. Theta, beta and s are the chosen generalized coordiantes, s_theta is sin(theta), c_theta is cos(theta)s_beta is sin(beta), c_beta is cos(beta). Rx and Ry are lagrange multipliers representing the reaction force in the pin between the crank and the connecting rod.

How can I generate such DAEs using Maplesim? Thank you very much.

## How to inverse interpolate a 2D lookup table in Ma...

Dear Community,

I would like to have an inverse interpolation with a 2D lookup table in MapleSim. The usual 2D lookup interpolation has u1 column values, and u2 row values, and a corresponding   y   table values, i.e. y = f(u1,u2). Now I would like to go the reverse way. Suppose I know y, and u2, and I would like to get u1. How can I implement this in MapleSim? An additional information is, that the 3D surface represented by the f(u1, u2) function is a smooth, slightly curved, monotonically sloping surface, so to any  y  value a unique pair of u1 and u2 values belong.

With my specific data, which are attached in the TestVLP.xlsx file:

• u2 values are: 1st row, cells 2 .. 14
• u1 values are  1st column, rows 2 .. 11
• tabulated values are all the rest, i.e. from cell(2,2) .. cell(11,14)

Now for my case:

• u2 = 42000.0
• y   = 94.5614

How much is u1? I know the correct answer from elsewhere, it should be something very close to u1 ~ 85. This  y  value is in the rectangle bordered by columns 7 .. 8  and rows 5 .. 6 in the Excel file.

So my question is how do I correctly implement this in MapleSim? As visible from the attached TestInverse2DInterpolation.msim file I tried to do it with an Inverse Block Constraints component and a horizontally flipped 2D Lookup Table (VLP) and Constants for y and u2, but upon running MapleSim I get an error message that no solution is found, although the solution is relatively easy and straightforward. May I ask you to have a look at it, what can be the problem here, what do I do wrong? I’m using MapleSim 2019.2.

best regards

Andras

TestInverse2DInterpolation.msim

TestVLP.xlsx

## How to compare measured and calculated data in Map...

Dear Community,

I have a simulation in MapleSim, and I have a probe in the system, for which measured data are also available. How can I load these measured data into MapleSim and compare them to the calculated results (probe data) visually? (Preferably in the "Analysis Window: Simulation Results" which pops up by pressing F6)

Tx for the kind help in advance,

best regards,

Andras

Hi,

I'm trying to change with a Maple Worksheet the parameters of a MapleSim Model in Real-matrices format.

is there any way to do that?

actually i get the failure note:

<<Error, (in SetParameters) non-vectorized values in vector parameters: [list= ""]>>

Thank You

Regards
Johann

## why can't install maplesim2019 in maple2020?...

Maple2020 was installed in windows 10 home. When installing maplesim 2019, it was looking for maple2019. Do I have to install maple 2019 before maplesim 2019?

## Optimizing Mini Golf in MapleSim

Playing mini-golf recently, I realized that my protractor can only help me so far since it can't calculate the speed of the swing needed.  I decided a more sophisticated tool was needed and modeled a trick-shot in MapleSim.

To start, I laid out the obstacles, the ball and club, the ground, and some additional visualizations in the MapleSim environment.

When running the simulation, my first result wasn't even close to the hole (similar to when I play in real life!).

The model clearly needed to be optimized. I went to the Optimization app in MapleSim (this can be found under Add Apps or Templates  on the left hand side).

Inside the app I clicked "Load System" then selected the parameters I wanted to optimize.

For this case, I'm optimizing 's' (the speed of the club) and 'theta' (the angle of the club). For the Objective Function I added a Relative Translation Sensor to the model and attached a probe to the Vector Norm of the output.

Inside the app, I switched to the Objective Function section.  Selecting Probes, I added the new probe as the Objective Function by giving it a weight of 1.

Scrolling down to "Execute Parameter Optimization", I checked the "Use Global Optimization Toolbox" checkbox, and clicked Run Parameter Optimization.

Following a run time of 120 seconds, the app returns the graph of the objective function.

Below the plot, optimal values for the parameters are given. Plugging these back into the parameter block for the simulation we see that the ball does in fact go into the hole. Success!

Mini_golf_Global_Optimization.msim

## User's Guide example, Simple Hydraulic System Net...

I am a beginner of MapleSim. I study the MapleSim User Guide. I follow the Tutor 8:Modeling Hydraulic System. But the following issue occurs, as shown in the picture. I bet I follow the guide carefully.

Also, I find that if I open the User's Guide example,Chapter 6, Analysis of Simple Hydraulic System Network, which is the standard example,I simulate it and it works well. But if I delete the probe, and attach a probe at the same place , selecting same values to measure, and simulate again, it failed, giving the same error description. I need your help,please.

problem_with_Analysis_of_Simple_Hydraulic_Network.msim

by: Maple 2019 , MapleSim 2019

Maple 2019.2 includes corrections and improvements to a variety of areas in the product, including a new “Go to page ____” option in print preview (that am personally quite pleased about), sections are expanded by default when printing or exporting, a fix to a problem using non-executable math with text in document mode that sometimes made it impossible to advance to a new line using Enter, improvements to VectorCalculus, select, abs and other math functions, support for macOS Catalina, and more.  We recommend that all Maple 2019 users install these updates.

This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2019.2 download page, where you can also find more details.

## MapleSim 2019 is now available!

We’re excited to announce that we have just released a new version of MapleSim. The MapleSim 2019 family of products helps you get the answers you need from your models, with improved performance, increased modeling scope, and more ways to connect to your existing toolchain. Improvements include:

• Faster simulation speeds, both within MapleSim and when using exported MapleSim models in other tools

• More simulation options are now available when running models imported from other systems

• Additional options for FMI connectivity, including support for variable-step solvers with imported FMUs, and exporting models using variable step solvers using the MapleSim FMI Connector add-on

• Improved interactive analysis apps for Monte Carlo analysis, Optimization, and Parameter Sweep

• Expanded modeling scope in hydraulics, electrical, multibody, and more, with new built-in components and support for more external Modelica libraries

• New add-on library: MapleSim Engine Dynamics Library from Modelon provides specialized tools for modeling, simulating, and analyzing the performance of combustion engines

• New add-on connector: The B&R MapleSim Connector gives automation projects a powerful, model-based ability to test and visualize control strategies from within B&R Automation Studio