MapleSim in Engineering Education

This is a reminder that presentation applications for the Maple Conference are due July 17, 2024.

The conference is a a free virtual event and will be held on October 24 and 25, 2024.

We are inviting submissions of presentation proposals on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. We also encourage submission of proposals related to Maple Learn. You can find more information about the themes of the conference and how to submit a presentation proposal at the Call for Participation page.

I encourage all of you here in the Maple Primes community to consider joining us for this event, whether as a presenter or an attendee!

Kaska Kowalska
Contributed Program Co-Chair

Explorer 1 was the first satellite sent into space by the United States. It was a scientific instrument that led to the discovery of the Van Allen radiation belt. In order to keep its orientation, the satellite was spin stabilized. Unexpectedly, shortly after launch, Explorer 1 flipped the axis of rotation. The animation below shows, on the left, Explorer 1 in its initial state after launch, rotating about the axis of minimum moment of inertia. On the right side, 100 minutes later in the simulation, Explorer 1 rotates about the axis of maximum moment of inertia. This unintended behavior could not be explained immediately. Finally, structural damping in the four whip-like antennas was made responsible for the flip (explained here).

The flip can be reproduced with MapleSim using flexible beam components with damping enabled. Without damping and without slight angular misalignment at launch the flip does not manifest.

The simulation is only of qualitative nature since data of the antennas could not be found. On images of Explorer 1, the antennas look prebend and show large deflections of about 45 degrees under gravity. Since rotation of the satelite stretches the antennas, no modeling of large deflections needed to be considered in the simulation and rather stiff antennas (2 mm in diameter) without spheres at their ends were used. (Modeling large deflections with high fidelity might only be considered if the unfolding process of the antennas at launch is of interest. This should be modeled with several flexible beam components.)  

The graph bellow shows the evolution of the angular velocity in x direction. Conservation of angular momentum reduces the angular velocity when the satellite starts flipping towards a rotation about the axis of maximum moment of inertia.

Not long ago such simulations would have been worth a doctoral thesis. Today its rather straight forward to reproduce the flip with MapleSim.

Not so easy is the calculation of energy and angular momentum (for the purpose of observing how well numerics preserve physical quantities in rather long calculations. After all, the solver does not know the physical context). Such calculations would require access to the inertia matrix of the cylinder component including a coordinate transform into the frame of reference where the vector of rotation can be measured.

In case such calculations are possible with MapleSim, it would be nice if someone can update the model or at least indicate how calculations can be done.

Explorer_1_Parameters_and_links.mw

Explorer_1.msim

On a side note: I learned from the flip in an excellent series of lectures on dynamics. Wherever our professor could, he came up with animation in hardware. In this case, he could only provide an exciting story about the space race and sometimes fruitful mistakes in science. That’s why I still remember it.

Dear all,

The November issue of Maple Transactions is now up (we will be adding a few more items to that issue over the course of the month).  See https://mapletransactions.org/index.php/maple/index for the articles.

More importantly, Maple Primes seems to have a great many interesting posts, some of which could well be worked up into a paper (or a video).  Maple Transactions accepts worksheets (documents, workbooks) for publication, as well, although we want a high standard of readability for that.  I invite you to contribute.

The next issue of Maple Transactions will be the Special Issue that is the Proceedings of the Maple Conference 2021 (see my previous post :)

-r

 

As a student I came across an amazing lab experimentA T-type structure with two masses attached to it showed a sudden change in oscillation mode.  

 

With MapleSim I was able to reproduce the experiment.

At the time I was told that this perplexing phenome happens because there are always imperfections. 

 

Today we would probably say that the symmetry has to be broken. The attached example has two parameter sets that a) break symmetry of boundary conditions and b) by structural asymmetry (i.e imperfection). Asymmetry in the initial conditions should also be possible (but I could make work with flexible beams). 

Compared to coupled oscillators that exchange energy via a coupling spring, this example exchanges energy via masses. In fact in its simplest implementation only one mass and two elastic structures are required for this type of mode coupling. MapleSim multibody library offers plenty of possibilities to demonstrate thisFlexible beams are not required. However, flexible beams show mode coupling beautifully and allow a simple reproduction in real life. For that the worksheet contains a parameter set to build a real model with steel wires. Tuning by adjusting the length of the vertical post is required since nonlinearities already shift frequencies in the model. 

 

I would be interested in other cool examples of mode coupling. I am also interested in solutions for flexible beams that impose asymmetry in the initial conditions. To keep it realistic at the start, the T should be bend as one would bend it with a fingertip in x direction. It would be even more realistic if the arms are flexed by gravity with zero velocity at the start of the simulation. How can this be done? 

 

Flexible_beam_mode_coupling.msim

Hi everyone! It's been a remarkably long time since I posted on MaplePrimes -- I should probably briefly reintroduce myself to the community here. My name is Erik Postma. I manage the mathematical software group at Maplesoft: the team that writes most of the Maple-language code in the Maple product, also known as the math library. You can find a longer introduction at this link.

One of my tasks at Maplesoft is the following. When a request for tech support comes in, our tech support team can usually answer the request by themselves. But no single person can know everything, and when specialized knowledge of Maple's mathematical library is needed, they ask my team for help. I screen such requests, answer what I can by myself, and send the even more specialized requests to the experts responsible for the appropriate part of the library.

Yesterday I received a request from a user asking how to unwrap angles occurring in an expression. This is the general idea of taking the fact that sin(phi) = 'sin'(phi + 2*Pi), and similarly for the other trig functions; and using it to modify an expression of the form sin(phi) to make it look "nicer" by adding or subtracting a multiple of 2*Pi to the angle. For a constant, real value of phi you would simply make the result be as close to 0 as possible; this is discussed in e.g. this MaplePrimes question, but the expressions that this user was interested in had arguments for the trig functions that involved variables, too.

In such cases, the easiest solution is usually to write a small piece of custom code that the user can use. You might think that we should just add all these bits and pieces to the Maple product, so that everyone can use them -- but there are several reasons why that's not usually a good idea:

  • Such code is often too specialized for general use.
  • Sometimes it is reliable enough to use if we can communicate a particular caveat to the user -- "this will not work if condition XYZ occurs" -- but if it's part of the Maple library, an unsuspecting user might try it under condition XYZ and maybe get a wrong answer.
  • This type of code code generally doesn't undergo the careful interface design, the testing process, and the documentation effort that we apply to the code that we ship as part of the product; to bring it up to the standards required for shipping it as part of Maple might increase the time spent from, say, 15 minutes, to several days.

That said, I thought this case was interesting enough to post on MaplePrimes, so that the community can take a look - maybe there is something here that can help you with your own code.

So here is the concrete question from the user. They have expressions coming from an inverse Laplace transform, such as:

with(inttrans):
F := -0.3000*(-1 + exp(-s))*s/(0.0500*s^2 + 0.1*s + 125);
f := invlaplace(F, s, t)*u(t);
# result: (.1680672269e-1*exp(1.-1.*t)*Heaviside(t-1.)*(7.141428429*sin(49.98999900*t-
#         49.98999900)-357.*cos(49.98999900*t-49.98999900))+.1680672269e-1*(-7.141428429*sin
#         (49.98999900*t)+357.*cos(49.98999900*t))*exp(-1.*t))*u(t)

I interpreted their request for unwrapping these angles as replacing the expressions of the form sin(c1 * t + c0) with versions where the constant term was unwrapped. Thinking a bit about how to be safe if unexpected expressions show up, I came up with the following solution:

unwrap_trig_functions := module()
local ModuleApply := proc(expr :: algebraic, $)
  return evalindets(expr, ':-trig', process_trig);
end proc;

local process_trig := proc(expr :: trig, $)
  local terms := convert(op(expr), ':-list', ':-`+`');
  local const, nonconst;
  const, nonconst := selectremove(type, terms, ':-complexcons');
  const := add(const);
  local result := add(nonconst) + (
    if is(const = 0) then
      0;
    else
      const := evalf(const);
      if type(const, ':-float') then
        frem(const, 2.*Pi);
      else
        frem(Re(const), 2.*Pi) + I*Im(const);
      end if;
    end if);
  return op(0, expr)(result);
end proc;
end module;

# To use this, with f defined as above:
f2 := unwrap_trig_functions(f);
# result: (.1680672269e-1*exp(1.-1.*t)*Heaviside(t-1.)*(7.141428429*sin(49.98999900*t+
#         .27548346)-357.*cos(49.98999900*t+.27548346))+.1680672269e-1*(-7.141428429*sin(
#         49.98999900*t)+357.*cos(49.98999900*t))*exp(-1.*t))*u(t)

Exercise for the reader, in case you expect to encounter very large constant terms: replace the calls to frem above with the code that Alec Mihailovs wrote in the question linked above!

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

Ambassador Maple

Using Python and MapleSim versus Basic Science Teaching in Times of Pandemic

Abastract

In the following research work entitled Use of Python and MapleSim against the teaching of Basic Sciences in times of pandemic, due to the social immobility imposed by the government, we saw the need to use scientific software to train our students with modern approaches. The purpose is to raise the learning achievement in the subjects of Mathematics and Physics for engineering. The methodology we used was native syntax programming and graphic component programming. The results that we obtained in modeling and simulation are quite exact, with respect to the traditional results. Finally, all the material can be updated and managed at any time because it is available on maplecloud.

Keywords: Python, MapleSim, modeling, simulation

Ponencia_UNTumbes.pdf

Lenin AC

Ambassador Maple

Hi Mapleprimes,

Per your request.

A_prime_producing_quadratic_expression_2019_(2).pdf

bye

In the present work we are going to demonstrate the importance of the study of vector analysis, with modeling and simulation criteria, using the MapleSim scientific software from MapleSoft. Nowadays, the majority of higher education centers direct their teaching of vector analysis in an abstract way and there are few or no teachers who carry out applications using modeling and simulation. (In spanish)

IPN_CICATA_2020.pdf

Expo_MapleSim_CICATA.zip

 

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

Application of MapleSim in Science and Engineering: a simulationbased approach

In this research work I show the methods of embedded components together with modeling and simulation carried out with Maple and MapleSim for the main areas of science and engineering (mathematics, physics, civil, mechanical etc); These two latest scientific softwares belonging to the company Maplesoft. Designed to be generated and used by teachers of education, as well as by university teachers and engineers; the results are highly optimal since the times saved in calculations are invested in analyzes and interpretations; among other benefits; in this way we can use our applications in the cloud since web technology supports Maple code with procedural and component syntax.

FAST_UNT_2020.pdf

kinematics_curvilinear_updated_2020.mw

Lenin AC

Ambassador of Maple

Application developed using Maple and MapleSim. You can observe the vector analysis using Maple and the simulation using MapleSim. Also included a video of the result. It is a simple structure. A pole fastened by two cables and a force applied to the top. The results are to calculate tensions one and two. Consider the mass of each rope. In spanish.

POSTE_PARADO.zip

Lenin Araujo Castillo

Ambassador of Maple

 

Analysis in Dynamics of Structures with Maplesim for Engineering
Here is the power of Maplesim in modeling and simulation. With Maplesim you can model structures at rest and dynamics. Considering real patterns of our world for better optimization.Project developed for students of Civil Engineering, Architecture, Mechatronics and all those professional careers related to structures.

CIMAC_UNALM_2019.pdf

Lenin Araujo Castillo

Ambassador of Maple

The Railway Challenge is a competition designed by the Institute of Mechanical Engineers (IMechE), aimed at engaging young engineers with the rail industry.  The challenge, now in its seventh successive year, brings together teams of university students, as well as apprentices and graduates working in industry across the world to test their business knowledge, design ability and technical skills in a live test environment.

The Railway Challenge at Sheffield (RCAS) is an extracurricular student-led activity within the Mechanical Engineering department at the university of Sheffield, that designs, codes and manufactures a 10 1/4 inch gauge miniature locomotive to compete in the IMechE’s  Railway Challenge.  The locomotive is assessed in accordance with a set of strict rules and a detailed technical specification, such as traction, ride comfort, and a business case. The locomotives are tested live at a competition, which takes place in June at the Stapleford Miniature Railway in Leicestershire, where several categories of winners and an overall Railway Challenge champion is crowned.

The team consists of around twenty members, and students studying Mechanical Engineering and even cross discipline can get involved as soon as they come to the University, getting into to the design of components within the suspension or braking systems for example, before proceeding to manufacture and test; allowing the students to experience all the stages of an engineering product as well as skills gained by working in the team such as effective communication, time management and financial planning.

Last year the team was granted a sponsorship from Maplesoft, and as a result, huge improvements were made within the team. Overall the team jumped from finishing in 7th place to in the summer winning the maintainability challenge and finishing in 4th place overall – mostly down to the electronics working for the first year ever!

 

Using Maplesoft’s donation the team switched form a central CRIO control system to a distributed network using I2C protocols and Arduino hardware. This did away with some of the electrical teething problems the team has suffered in previous years. It also introduced our Mechanical Engineers to coding that they would otherwise not do in their course.

This year Maplesoft have again sponsored RCAS. The team is hoping to use the licenses to perform their structures calculations in an easy way to keep track of them for use in the design report. They are also hoping to use MapleSim for dynamics modelling, to assist with suspension design, and designing any electronics or control elements, such as filter design and motor control.

We have just released a major update to MapleSim and the MapleSim family of products. This update includes significant enhancements in the areas of model development and toolchain connectivity, including:

  • Live simulations let you see results as the simulation is running, so you can track progress and react to problems immediately.
  • A new 3-D overlay option lets you easily compare simulation visualizations by overlaying one visualization on top of another
  • Tools for revision control enable a structured approach to managing and tracking changes to your model, making it easier to manage projects when multiple engineers are working on the same model and reducing development risk.
  • MapleSim now supports direct import of models created in other FMI-compatible software, providing even greater cross-tool compatibility and opportunities for co-simulation.
  • The MapleSim Connector, for connectivity with Simulink®, and the MapleSim Connector for FMI, for exporting MapleSim models to other FMI-compatible tools, have been expanded to allow you to explore simulation results involving exported MapleSim models from within MapleSim, even though the simulation was done in the target tool.

 

This update is being distributed through the automatic Check for Updates system, and is also available from our website. See the MapleSim 2016.2  downloads page for details on obtaining this update.

eithne

 

1 2 3 Page 1 of 3