## Methods for Enforcing Inequality Constraints

##### Temesgen Kindo September 17, 2018

How do you find the shortest overland distance between two points across a lake? Such obstacles and bounds on solutions are often called inequality constraints. Requirements for nonnegativity of gaps between objects in contact mechanics, species concentrations in chemistry, and population in ecology are some examples of inequality constraints. Previously in this series, we discussed equality constraints on variational problems. Today, we will show you how to implement inequality constraints when using equation-based modeling in COMSOL Multiphysics®.

Read More##### Temesgen Kindo September 11, 2018

In the first part of this blog series, we discussed how to solve variational problems with simple boundary conditions. Next, we proceeded to more sophisticated constraints and used Lagrange multipliers to set up equivalent unconstrained problems. Today, we focus on the numerical aspects of constraint enforcement. The method of Lagrange multipliers is theoretically exact, yet its use in numerical solutions poses some challenges. We will go over these challenges and show two mitigation strategies: the penalty and augmented Lagrangian methods.

Read More##### Temesgen Kindo September 7, 2018

In the first part of this blog series, we discussed variational problems and demonstrated how to solve them using the COMSOL Multiphysics® software. In that case, we used simple built-in boundary conditions. Today, we will discuss more general boundary conditions and constraints. We will also show how to implement these boundary conditions and constraints in the COMSOL® software using the same variational problem from Part 1: (the soap film) — and just as much math.

Read More##### Temesgen Kindo September 4, 2018

What do soap films, catenary cables, and light beams have in common? They behave in ways that minimize certain quantities. Such problems are prevalent in science and engineering fields such as biology, economics, elasticity theory, material science, and image processing. You can simulate many such problems using the built-in physics interfaces in the COMSOL Multiphysics® software, but in this blog series, we will show you how to solve variational problems using the equation-based modeling features.

Read More##### Temesgen Kindo June 28, 2017

You solved a model under certain assumptions. When you analyze the results, you find out that those assumptions do not hold. Now, you have to amend your analysis by incorporating new physics features or changing the study type. What if you could automate such processes? Today, we will discuss how to do so easily using the Model Method feature introduced in version 5.3 of the COMSOL Multiphysics® software.

Read More##### Temesgen Kindo May 17, 2017

Sometimes a simulation runs longer than needed, not giving us a way to monitor intermediate results or stop conditionally. This can leave us staring at the monitor, ready to pounce. In this blog post, we discuss how to automate this process in the COMSOL Multiphysics® software. This way, we can work on something else while the software checks the conditions after each step. We also have the option to see what happens the first time the conditions are violated.

Read More##### Temesgen Kindo May 9, 2017

When your simulations consume significant memory, do you buy a bigger computer? When they take too long to solve, do you just run them overnight? Often, you don’t have another option. But sometimes, if you have the right tools, you can find a better approach by exploiting the mathematical structure. Today, we will show you how to use the so-called maximum principles to save computational resources and time in the COMSOL Multiphysics® software.

Read More##### Temesgen Kindo October 6, 2016

In a previous blog post, we discussed integration methods in time and space, touching on how to compute antiderivatives using integration coupling operators. Today, we’ll expand on that idea and show you how to analyze spatial integrals over variable limits, whether they are prescribed explicitly or defined implicitly. The technique that we will describe can be helpful for analyzing results as well as for solving integral and integro-differential equations in the COMSOL Multiphysics® software.

Read More##### Temesgen Kindo October 5, 2016

Cylindrical coordinates are useful for efficiently solving and postprocessing rotationally symmetric problems. The COMSOL Multiphysics® software has built-in support for cylindrical coordinates in the axisymmetry physics interfaces. When defining custom partial differential equations (PDEs) using the mathematical interfaces, paying close attention to their meaning is important. The PDE interfaces assume partial differentiation in a Cartesian system, requiring manual coordinate transformations to change to a cylindrical system. See how to account for such coordinate transformations when using your own PDEs.

Read More##### Temesgen Kindo September 1, 2016

Suppose you take a piece of metal — a thin sheet, for example — and apply some mechanical loads. The metal will deform and take on a new shape that differs from the original undeformed configuration. Say you now want to use this deformed object as part of a new geometry construction. You can then solve another physics problem on the new composite domain. Today, we’ll demonstrate how to use a deformed object as an input to a geometry sequence.

Read More##### Temesgen Kindo August 30, 2016

Have you ever wanted to integrate your COMSOL® software apps with external data files? These files can contain material properties, geometric dimensions, or other model inputs, and such data can derive from internal company standards or be provided by a vendor. Built-in methods in the Application Builder simplify reading from these files and displaying options read. To show this procedure, we will build an app that populates a combo box with material properties from a comma-separated values (CSV) file.

Read More