In this month’s tips and tricks video, I show what an add-in is and how to use by creating a simple model with a cone as my geometry.
Click below to watch me walk you through the process. We have included the video transcription below to help you follow along.
There’s no reason to learn software programs through trial and error, so in addition to our tips and tricks, our upcoming training classes will support you, the COMSOL® user, in utilizing best practices with many of the COMSOL® modules. Please visit our training calendar and find the course that is best for you.
Using Add-Ins with COMSOL Multiphysics®
Hi, my name is Jess, and I’m a research engineer at AltaSim; and today I’m going to show what an Add-in is and how to use it.
So, here I’ve created a really simple model, which all that’s important right now is that I have a cone as my geometry. So, an Add-in is super similar to an application, except with an Add-in you don’t need to have a set GUI or window that you do with the application.
So, let’s look at one as an example. You go to the ‘Developer tab’ and you can see ‘Add-in Libraries’ when you open it, it shows you what ‘Add-in Libraries’ are available. I’m going to choose something called ‘planar_cut’, and I’ll show you what that does.
Now that I’ve added that, you can see that this ‘Add-in’ is no longer grayed out and I can select ‘Planar Cut’. So, so far, nothing has changed in my model builder, but when I select ‘Planar Cut’ from the ‘Add-ins’, I now see ‘Planar Cut 1’ under ‘Global Definitions’. Now you can choose a plane XY, plane XZ, or YZ and then you can remove a side, depending on what you like, coordinate.
Now, I’m going to ‘Create Cut’ into the YZ plane. Now watch the ‘Geometry tab’ when I press this. When this goes you can see that the ‘Geometry 1’ tab changed and created all these different steps. And, you could see in our window that half our geometry is now gone. If I didn’t like this, I can Reset it “Undo Last.” There you go, and all those steps are gone.
At its core, an Add-in is simply an application and so you can create your own. But let’s look under the hood at what these built-in Add-ins look like. If I want to look at the ‘planar_cut’ Add-in, I can simply open up the ‘Planar Cut’ model built by COMSOL®. Not gonna make any changes here, and now we can go to the ‘Developer tab’ and go into ‘Application Builder,’ and now you can see there are a bunch of ‘Forms’, ‘Methods’, and other ‘Methods’ here, and the ‘Main Window’, ‘Toolbar’, etcetera.
So, you can create your own and make an Add-in Library. The only real difference is, that has to be done, is that you have to right-click here, sorry right-click ‘Add-in Definition’ and press ‘Create Add-in’, and then Save it as that. And don’t forget in your ‘Add-in Definitions’ to press ‘Create Add-in’. When you do that, what you can then do, and any model file you have, is when you go to Add-in Libraries you will have something here called ‘User-defined Library’ you can then add that here after you add the Add-in your ‘User-defined’ press done and then you’ll see it as an option under your ‘Add-ins’ and go.
Hope this has been helpful and that you can start using Add-ins soon and that they’re useful to you. Good luck!