Faster Physical Modelling for Mathcad

Like many engineers, I use Mathcad as a scratchpad to jot down equations, model physical systems and explore technical ideas. My specialty is fluid dynamics and heat transfer, but I also dabble in electromechanical modelling.

But deriving equations for dynamic engineering systems demands time and skill. I’ll be the first to admit that I often lack both.

I recently discovered I already had the tools to translate an initial schematic of an engineering system to a Mathcad function (but my own lack of foresight prevented me from connecting the dots earlier).  The technology lets me

  • model multidomain engineering systems by connecting physical components on a virtual workspace,
  • and convert these block-diagram models to Mathcad functions.

The technology is a software tool called MapleSim. It has blocks for modelling electrical, mechanical, multibody, hydraulic, thermal and magnetic systems, as well as signal-flow functionality. The equations are already programmed in, so I don’t need to derive them.

MapleSim also generates C code from your model (simply point-and-click). The code can be parameterised with any set of properties (for example, resistances, inertias etc) and includes a solver.

This code can also be compiled to a Mathcad-compatible DLL.

This, for example, is a MapleSim model of a DC motor with backlash and a PI controller. The model was created by dragging physical components on a workspace, then connecting them together.

And this is the compiled function (after code generation) implemented in Mathcad.

I’ve parameterised the Mathcad function with respect to the set point and controller gains, but I could have picked any other combination of properties.

Compiling MapleSim code to a Mathcad-compatible DLL sounds tricky. You need some awareness of C coding, but you don’t need to be an expert or even consider yourself a competent programmer. Once you know the steps to follow, it’s simple and is mostly copy and paste. For anyone who wants to try, I’ve prepared a Visual Studio example project to make this easier (email me for the link).

Converting block-diagram physical models to Mathcad functions is novel and has the potential to save countless hours. Given that the volume of coffee I drink is positively correlated with the amount of algebra I do, this approach could lower my blood pressure as well.


What do our Customers say about us?

I am very grateful for your prompt and kind answers to my problems. It is rarely a pleasure to complain about something, but this time it has been both pleasant and helpful. I can only regret that I did not use Swedish with Linda, men vi kan s

HV, Helsinki, Finland

It was about as perfect as a teaching seminar could be. Moved at the correct pace and encompasses a good amount of information

Thank you very much for your efforts and quick reply that saved my week (and work) – I really appreciate this!

DP, London, UK

“Looking online for a software that would perform the particular task we need at the moment (resolution of overlapped Gaussian-shaped peaks), I was glad to find out that a fully functional trial version of OriginPro was made available by your company. Also, watching one of the tutorial videos, all commands and short-cuts I needed to get my results were shown there. Very handy and a time-saver.”

Mauricio Morais, LCT, M.Sc. - Sr. Research Assistant - NEPS Lab Jean Mayer USDA Human Nutrition Research Center on Aging at TUFTS Univers

For the time being we are unable to offer the following product ranges although we are currently working hard to increase the number of products we can offer in the future. Please contact us to talk about alternative products that we may be able to offer you.