COMSOL Compiler

The Application Builder has been available to COMSOL Multiphysics users for a few years now. But previously, sharing apps required the second party to own a licensed copy of COMSOL Multiphysics or COMSOL Server in order to run them.

Well, people, those days are over, because the latest release of COMSOL Multiphysics (version 5.4) is compatible with the new COMSOL Compiler, which connects seamlessly with the COMSOL Application Builder and enables users to create their own stand-alone apps.

This means that your apps can now be packaged as an executable file to be shared and used by anyone on the planet with a PC, Mac or Linux-based computer. And the best part is, they don’t even need a copy of COMSOL Multiphysics to run it. In fact, with the new stand-alone apps, you don’t even need to be connected to the Internet to use them.

“Specialists can create simulation applications with the Application Builder that we released a few years ago, said Svante Littmarck, president and CEO of COMSOL.

“This has provided a new way for teams of engineers and scientists to bring the use of simulation to non-specialists. A little later, we released COMSOL Server, which is used to deploy and administrate applications via a web interface. With COMSOL Compiler, we are taking things to the next level by letting specialists compile an application into a single executable file for unlimited use and distribution. This is a level of freedom that the industry has not seen before,” explained Littmarck.

Sounds good, huh? Let’s take a little look under the hood and see exactly how easy it is to compile your own applications.

Getting COMSOL Compiler

First up, you’re going to want to get your hands on the COMSOL Compiler. You can do this via the usual channels, and COMSOL Compiler is available as a single-user license, CPU-locked license, a floating network license, or as an add-on to your existing COMSOL Multiphysics license of the same type.

Once you have your license installed, you can check that it has installed correctly by opening up the Application Builder in version 5.4 (navigate to File > Application Builder), and checking on the top ribbon/panel to see if the “Executable” icon has appeared. You can see an example of this display in Figure 1. 

Figure 1. The Application Builder installation display.

Has it appeared? Great! You’re ready to go.

But first, obviously, you need an app to compile. So, let’s back up a couple of steps and start from the very beginning if you are satisfied that the Compiler has been successfully integrated.

We’re So ‘Appy

You can use a preexisting app from the Application Library, or you can use your own custom-built application. If you’d like to see a video on how to build your own simulation application in COMSOL Multiphysics, then please click this link.

To load up an app, simply select File > Application Library, then select the app you wish to compile.

You may want to check the functionality of your chosen app before you begin compiling. There’s no point compiling if the app is not working properly. Remember the garbage in, garbage out (GIGO) principle? That totally applies here.

To test your app, simply go into Application Builder, locate the Test Application icon (shown in Figure 2) on the top ribbon, and click it.

Figure 2. The Test Application process in Application Builder.

Once you are satisfied that your chosen application is running as you want it to, then you can begin the compiling process.

To begin the process, simply open the Application Builder (if it’s not already open), locate the Executable button on the ribbon that we mentioned previously, and give it a click.

This will do two things:

First, it will create an entry in the file structure panel on the lefthand side (indicated by the orange arrow), and second, it will open the Executable settings panel on the righthand side of the screen (the green arrow), as you can see in Figure 3.

Figure 3. Starting the compiling process in Application Builder.

Let’s take a closer look at the options in the Executable settings pane (see Figure 4).

Figure 4. The Executable Settings pane in Application Builder.

As you can see in Figure 4, most of it is pretty self-explanatory.

The Output directory field is where you would like your compiled .exe file to output to.

“Set path to runtime” allows you to designate where your application’s runtime libraries will be stored when you start your app for the first time (and in most cases, this can be left set to Default).

The Platforms section allows you to select which operating system the compiled .exe file will run on.

The Splash section lets you use a default splash screen to be displayed when you finally run your stand-alone application, or, alternatively, you can select your own custom splash screen from a bitmap or jpeg file.

Finally, the Optional Data section allows you to access the CAD libraries, which are needed if your app requires use of the CAD Import Module, the Design Module, or one of the Livelink products for CAD packages.

Similarly, the Weather data box must be checked if your app needs to use a heat transfer interface, particularly if you have been using the Meteorological option in Ambient Thermal Properties under Component > Definitions.

Get Compiling

Now that you’ve tested your app, and have set your executable settings to your preferences, you can compile the app.

Simply locate the Compile icon in Executable settings (as shown in Figure 5), and give it a click.

Figure 5. Starting the compile process in Application Builder.

A couple of seconds later, and your brand-new stand-alone app will appear in the Output directory.

Go ahead and click the .exe, and it will open in front of your very eyes. There is no need for you to have COMSOL Multiphysics or COMSOL Server as was previously the case. Just run it wherever you like, on the platform that you designated. It’s that easy.

And that’s it. That’s how you compile your own app with COMSOL Compiler.

The good news is, the COMSOL Software Licence Agreement (SLA) also allows you to sell your creation for hard cash! So not only can you share your apps with colleagues and buddies, but you can also make some moolah off them too. Hurrah!

And where can you sell them? Anywhere you like.

“Our users can offer their stand-alone executable applications for unlimited use and distribution, which they can do for free or for a fee—it’s their choice. To do so, they just have to distribute their applications through the channels they prefer. We want them to be free to operate their business model as they please without the need for a platform maintained by us,” said Valerio Marra, marketing director at COMSOL.

Now that you know how to compile your apps, let’s take a look at some of the custom apps, and find out what people are saying about how they are using them.

TriboMesh

Technical University of Munich (TUM) has been busy using Application Builder to design tribology analysis applications that provide a better understanding of friction and wear on machinery.

“We used the Application Builder to create a simulation app called TriboMesh that made our work even simpler to use and distribute it within the research center,” said Thomas Lohner from the EHL-Tribological-Contact and Efficiency group, Gear Research Centre, at TUM.

“Apps allows our colleagues to use simulation in practical ways to search for new solutions.”

The use of TriboMesh to illustrate surface topology and pressure on friction is shown in Figure 6.

Figure 6. TriboMesh shows the effects of surface topology and pressure on friction. (Image courtesy of TUM.)

SpreaderCalc: Heat Spreader Sizing Tool

GrafTech is headquartered in the state of Ohio in the U.S. and has been developing graphite electrode products for over a century. Thermal management is critical to developing these products, and GrafTech has found that the Application Compiler is very useful indeed. The company’s own SpreaderCalc app is shown in Figure 7.

“When using our simulation apps, one hour of an application engineer’s time is sufficient to screen an array of configurations,” said Rick Beyerle, senior development engineer, Advanced Energy Technologies LLC, at GrafTech.

Figure 7. SpreaderCalc helps with the thermal management of graphite products. (Image courtesy of GrafTech.)

GrafTech’s own app enables engineers to test a variety of parameters, including heat sources, the number of heat spreader layers, and spreader layer dimensions to help optimize their designs.

Apps for Electrical Optimization

Cornell Dubilier, which designs and manufactures capacitors for the power electronics industry, has designed a number of stand-alone applications with Application Builder, including an app that calculates effective series inductance (ESL) of a single-tab film capacitor, as you can see in Figure 8.

Figure 8. Capacitor flux stress visualization (not to be confused with the "Flux Capacitor"). (Image courtesy of Cornell Dubilier.)

I create apps for other departments to let them test different configurations for their particular requirements and pick the best design,” said Sam Parler, research director at Cornell Dubilier.

Peab Asfalt AB Uses Simulation Apps for a Novel Approach to Test Asphalt Material Properties

Swedish construction and civil engineering company PEAB Asfalt is using simulation applications to better our roads and highways. In order to develop well-functioning asphalt, it is important to be able to measure and characterize the asphalt and then choose a coating type with optimized material properties. The results of the measurement analysis are directly related to the coating quality. The knowledge can then be used to streamline future dimensioning. This makes it possible to minimize costs and to optimize life expectancy.

“We want as many [people] as possible to use the new method, [so] I developed a simulation application in COMSOL Multiphysics. Instead of making time-consuming traditional measurements in the lab, a user can now make a faster and easier measurement of the asphalt's properties instead,” Anders Gudmarsson, R&D Manager at Peab Asfalt, said.

Figure 9. Left: Experimental setup for testing the stiffness of asphalt. Right: Simulation app used to calculate the stiffness of asphalt concrete. The app reads measurements from experimental tests for measuring asphalt material properties and lets engineers and technicians quickly determine if the material has the ideal stiffness for the environment in which it is being used.

So, there you have it. COMSOL has some happy customers who are using apps already, and the company is building and sharing apps, and benefiting from productivity gains from the start!

COMSOL Multiphysics 5.4 with COMSOL Compiler is available now.

You can get a trial version at this link. Just follow the instructions and request a trial code, and then you can see how you like it for yourself.

COMSOL has sponsored this post. They have had no editorial input to this post. Unless otherwise stated, all opinions are mine. — Phil Keane