COMSOL Tips & Tricks v5.3: Model Methods Feature

New to version 5.3: Model Method Feature

To help save time and make analysis more streamlined it is common for us to set up physics with parameterized inputs. Unfortunately, this approach can also mean repeating commands multiple times that can be time consuming and may introduce mistakes. Now you can reduce the time that this process takes and ensure uniformity of implementation by using the Model Methods available in COMSOL Multiphysics® version 5.3. Model Methods allow recording and executing strings of commands, similar to a macro which you can then edit or create custom commands to add functionality to your Modeling.
Creating Model Methods in COMSOL is easy. When you click the “Record Code” button, the software records your commands and turns them into JavaScript. Quick Tip: be sure to change the Method type from “Application Method” to “Model Method” if you plan to run the code in the Model Builder window.  You can view, edit, and record additional code in the Application Builder window. You do not need to know Java to build or use Model Methods, but a little bit of programming basics can go a long way if you are interested in further developing robust and/or complex Methods.
Here’s a simple method we developed to create a heat transfer node with initialized temperature and convection coefficients, all in a few clicks. Check it out!
Step 1) Start a new method
Under the Task Ribbon, click "Developer>Record Method". Change the Method type from "Application method" to "Model method". A red box appears around the edge of the model window to indicate code is recording.


Step 2) Create Default Parameters
Add a heat transfer physics node and create the following default parameters the same way you normally would. You can view code created at any time by going to the Application Builder Window.

Step 3) Assign Parameter Values to Physics
Under Heat Transfer, create a heat flux node and change the type to “Convective heat flux.” Enter the parameters into the fields as shown. The following code is automatically generated. Click "Stop Recording".

Step 4) Run Model Method
Copy your code into any new or existing model file and click “Run Model Method.” The physics setup is automatically generated.


Time Saving Summary
  Manual Method Model Method
Number of Entries 10 0
Number of Clicks 18 1
Total Time 90 seconds 1.5 seconds


And there you have it. Repetitive processes that once took up valuable time and introduced possible errors can now be accomplished quickly and easily. We hope this tip is helpful, and as always, we are here to address your modeling needs through our consulting services and/or training.
Happy COMSOLing!

Free Medical Devices Simulation Webinar

Computational Simulation for Medical Devices
Jeff Crompton and Kyle Koppenhoefer founded AltaSim Technologies 15 years ago to help elevate our customers’ technology through the use of advanced computational simulation. Over the last 15 years, we’ve had the opportunity to work with amazing companies from all over the world to develop simulations that impacted their technologies. Many of these companies have designed medical products based on our models, and these models have supported submissions to the FDA. We have successfully assisted our customers with medical technology development in minimally invasive cardiovascular devices, imaging technology, surgical instruments, biotechnology, drug delivery, tissue ablation and diagnostic bioassays as well as other critical areas.We believe there are more companies that could benefit from computational simulations, and we are actively looking to identify those companies that are based in our home state of Ohio.
Computational simulation is widely used in many industries and is increasingly becoming important in the development of medical devices and life science applications.  It can help provide insight into device performance, exploration of design space, examine treatment efficacy, refine ideas faster and more accurately, and reduce expensive prototyping and testing. The FDA recognizes the value of computational simulation and has now begun actively encouraging its use to support device evaluation, verification and validation.
In this 30 minute webinar, we will discuss the benefits of computational simulation for medical devices, and demonstrate its use for devices requiring fluid transport, structural stability, electromagnetic interactions and biological materials. An overview of applications to several medical devices and life science applications will be discussed and at the end of the webinar a Q&A session will be available.
Register for our FREE 30-minute webinar on Wednesday, June 7th at 10:00am.  Seats in this webinar are limited.

COMSOL Conference 2016 Follow Up

Each year we invest some of our time at the annual COMSOL Conference in Boston during the first week of October.  As usual, this investment provided us with the opportunity to grow our relationships with our friends at COMSOL and many of our clients. In addition, we were able to meet many people that were new to COMSOL and the Conference. Below are three specific highlights we wanted to share.


We were fortunate to be able to present some of the work we have conducted with Eric Dunlop of Pan Pacific Technologies in the Simulating Chemical Processes and Devices Session.  The session was chaired by Fulya Akpinar from Bristol-Myers Squibb, and she also presented a paper on her work relating to modeling of mixing in pharmaceutical drug batch reactors. This paper described the use of COMSOL to improve success in scaling up their reactors from the lab to plant. By using the rotating machinery capabilities within COMSOL, Akpinar’s group was able to account for the specific reactor geometry in their models. This model included the flow, reaction/transport of species and heat transfer. Using this Multiphysics model, they were able to predict the crystallization process for a batch reactor. Akpinar, et al. received a well-deserved best paper award for their work at the COMSOL Conference.


In addition, Bernard McGarvey from Eli Lilly and Company gave an excellent Keynote speech on how modeling can enable thinking about problems from first principals to improve their process and equipment design. AltaSim has had the pleasure of working with Lilly to help design new products, and they have made great progress through the use of computational modeling. Sebastien Perrier from Echologics Engineering also gave a superb keynote talk on how his company has been able to deploy a COMSOL-based simulation app to help non-engineers make decisions about the location of leaking pipes in municipal infrastructure applications. AltaSim believes that Simulation Apps represent an exciting opportunity for extending the benefits of computational simulations and has developed a series of Simulation Apps that will be available for general use shortly.


COMSOL also released a new version of COMSOL Multiphysics, Server and Client at the Conference. AltaSim has experienced significant challenges developing our larger models in earlier version, but with update 2 of v5.2a focusing on performance issues associated with large geometric models, we can see the improvement in rendering and meshing these models. If you have experienced these types of issues with large models, this new version will noticeably speed up performance.


If you were at the conference let us know what you discovered so that we can pass it on to the community.


Until next time…


Thermal mitigation for high power electronics


Changing Electronics Cooling


It has been a while since we have put out a Blog on electronics cooling and there is a very good reason for that – not much has changed, until now.


Progressive companies manufacturing electronic components and circuits consistently challenge the limits of component performance by offering increased functionality in a decreased product size. The associated increase in power density develops significant thermal energy that must be dissipated to maintain accurate long term performance. For components and circuits used in critical applications required to maintain operation such as continuous manufacturing operations and emergency communication systems, passive approaches for dissipating thermal energy are preferred.


But as we have demonstrated in previous blogs, traditional approaches for evaluating the thermal margin of safety are inherently conservative due to the significant assumptions made in calculating dissipation of thermal energy.  Consequently, assessing the thermal response of a new device is generally left until late in the design process – following form and function. From the designer’s standpoint, getting traction on thermal challenges early in the design process is difficult for a few reasons:


  • Estimating heat transfer rates before prototypes are available is not easy
  • Allowable thermal margins may be masked by inherent limitations even after prototypes are made
  • Waiting for sufficient testing can be a time-consuming and expensive process


If accuracy is required, predictive physics based computational analysis can be used but this requires access to skilled personnel, and sophisticated hardware and software. Any one of these could be a significant hindrance, but when all three are combined the resulting obstacle may become insurmountable for all but the largest companies.


A solution we developed following discussions with many of our customers, ranging from large multinational organizations to small individual developers, uses a computational simulation application (CApp) to explore the thermal behavior of power electronic devices. The CApp is HeatSinkSim which provides the accuracy of a physics based computational analysis with the ease of use of a spreadsheet – the first of a series of CApps to provide designers with the capability to examine the effect of heat sink design on thermal dissipation in power electronic components.





HeatSinkSim solves the conjugate heat transfer problem for a vertically oriented plate fin heat sink operating under natural convection. Heat transfer is analyzed as a combination of conduction, convection and radiation with a full solution to the associated thermal and fluid flow problem. Two levels of analysis are available: first, a parametric study of heat sink design, and secondly, an optional detailed analysis that provides highly accurate temperature distributions for the optimum design of heat sink. The second level of analysis is recommended when device specific limits on casing temperature and/or junction temperature are approached. The model was developed and validated in conjunction with detailed experimental measurements that have allowed inclusion of these automated warnings based on the level of accuracy expected from the analysis.


The user inputs the heat sink geometry, materials of construction and operating conditions.




Once the desired geometry, materials and operating conditions are established the associated computational analysis file, including geometry development, meshing, physics set up and solver settings, is automatically generated and submitted for execution. The complexity of the conjugate heat transfer analysis requires significant computational resources to provide an accurate solution and thus HeatSinkSim has been configured to run on cluster computing hardware. The App automatically identifies the computational resources required to complete the analysis and distributes the analysis over the available nodes/cores. On completion of the analysis the user is automatically prompted to review the results and download a standardized report. To allow general access, AltaSim is making HeatSinkSim available for use on personal clusters as well as through secure connection to independent parallel computing resources to ensure confidentiality; further customization for individual users can be performed if needed.






Access to the app and the hardware required to run the simulations is available through AweSim using a variety of payment options ranging from an annual license with unlimited use to pay-per-use options.


For more information on HeatSinkSim, contact Jeff Crompton at AltaSim Technologies (jeff at



Modeling and Simulation: Opportunity

Modeling and Simulation: Opportunity


“It’s not just what you do it’s also why you do it” – Part 2

With all these advantages of modeling and simulation that were documented in Part 1 of this blog where is computational analysis and virtual prototyping being used and what is the opportunity for future use? A 2015 study (1) (Figure 1), suggested that in leading companies computational analysis has made significant inroads into general use but there are many areas where it is not being applied.


Although the data show a reasonably consistent use of modeling and simulation across all company sizes with “dedicated” and “frequent and consistent” use, by far the largest percentage in the study shows “infrequent and inconsistent”. Although it is recognized that modeling and simulation provides value to an organization there are many functional areas where it is not being applied and instead organizations remain reliant on traditional approaches such as “rules of thumb”, experience or spreadsheet based calculations. One reason for this is that computational analysis is viewed as the domain of an expert and in many cases expert knowledge is required to gain access to the appropriate software. Thus a major growth area for the use of modeling and simulation requires that the expertise embedded in computational models be made more readily available for use by personnel with limited expertise in computational modeling. By bridging this gap, design and process engineers can take advantage of predictive physics-based results earlier in the design process, make more accurate decisions about the developments and thereby reduce the extent of prototype testing and evaluation that is required.


To accomplish this objective two primary components of the problem need to be addressed: first, approaches that enable computational analyses developed by experts to be used by scientists and engineers who may have limited experience with computational analysis; and secondly, mechanisms by which computational analyses can be widely distributed without the need to invest in the hardware, software and personnel required to effectively operate them. For the remainder of this article we focus on the first of these areas, a future article will center on the topic of packaging the product for use by a wider audience.


It is estimated that globally there are~750,000 computational simulation experts but there are ~80 million scientists and engineers who can make use of computational analysis. How can computational simulation based tools be made available for use by this large group? One method to facilitate the spread of computational analysis is to package the expert’s knowledge into easy to use computational analysis files that use simplified interfaces to set up analyses of selected problems. This allows design and process engineers to run a series of analyses easily and use the results to aid decisions on developments without having to make direct use of computational analysis domain experts. This approach has recently become a viable option through the release of a number of platforms that allow the development and distribution of packaged Computational Simulation Applications (CApps) that can fall into two categories; first those that are maintained as proprietary within an organization, and secondly, general ones that seek to provide results across a generic industry problem.


Recently, AltaSim has developed a range of CApps to address technology associated with:

  1. Heat sink design
  2. Quenching on metal components
  3. CMC RMI processing
  4. Mass transport through barrier layers
  5. Additive manufacturing
  6. Plasma devices


These CApps are based on computational analyses developed using COMSOL Multiphysics that are then adapted using the COMSOL Application Builder to produce CApps that can be run using a COMSOL Multiphysics or COMSOL Server license. A simplified interface, eg Figure 2, allows the user to quickly and easily define the input parameters and conditions for an analysis to examine the effect of heat sink design on dissipation of thermal energy from electronic components using HeatSinkSim.




Once the problem set up is confirmed, analysis is automatically performed using verified conditions defined by the computational analysis expert. In this case the analysis solves the natural convection problem and incorporates thermal dissipation due to conduction, convection and radiation to the surrounding environment to allow the effect of the design of a heat sink on the thermal distribution to be defined. Previously these calculations incorporated gross assumptions on heat transfer coefficients, extrapolated form 1-D solutions and neglected critical factors such as radiation. Use of HeatSinkSim has enabled designers to identify options and limitations earlier in the design process, and safely operate under conditions that approach component limits thus allowing more functionality and smaller product forms to be utilized.


In summary, the motivation for using computational analysis is becoming clearer and more quantified: integration into the development cycle provides advantages in the critical areas of product launch date, cost of development and product quality. This advantage is being used by leading companies to establish, gain and protect market share at the expense of those companies who ignore the benefits of modeling and simulation. In companies where modeling and simulation is established there remains a significant opportunity to extend its reach by replacing traditional engineering based approximations that may have been codified in company guidelines, industry codes of practice or individual spreadsheets by predictive physics based computational analysis. Computational Applications can capture expert knowledge and present it in a way that it is easily and readily accessible for use by a wider group of scientists and engineers who can then make informed decisions during the development and implementation of new technology.


  1. Hardware design engineering study, Lifecycle Insights, August, 2015
Popular Posts
COMSOL Tips & Tricks v5.3: Model Methods Feature

New to version 5.3: Model Method Feature

To help…

Free Medical Devices Simulation Webinar

Computational Simulation for Medical Devices
Jeff Crompton and Kyle…

COMSOL Conference 2016 Follow Up

Each year we invest some of our time at the…

Receive our Newsletters