
To demonstrate how the residual operator can provide insight into how numerical disturbances can enter and propagate in a finite element model, consider the Turbulent Flow Over a Backward Facing Step example model from the Application Gallery. Using the Residual Operator in COMSOL Multiphysics: A Fluid Dynamics Example Settings for specifying the storage of the last residual values. Storing the residual in the output so that you can use it in plots and for general postprocessing requires additional memory resources, but this is not necessary if you want to plot the residual while solving only. To compute the residual, choose While solving, or to compute it and store it in the output for postprocessing, choose While solving and in output. By default, the Store latest residual setting is Off. To add the residual operator to the model, you need to activate it using a setting in the Advanced subnode to a stationary or time-dependent solver. The residual operator is available for stationary and time-dependent simulations.
#Residual formula how to#
How to Add the Algebraic Residual to a Model Let’s see exactly how to plot and evaluate the algebraic residual in your model with the residual operator.

Insufficient mesh resolution in that part of the modeling domain.The spatial distribution helps you pinpoint where in the modeling domain the residual is relatively large and therefore will hamper convergence of the solution. The residual is the latest-computed residual vector from the finite element discretization, but interpreted as a continuous spatial field quantity. It also shows a spatial distribution of the residual for that quantity. However, if you run into convergence issues, the algebraic residual is not small and can reveal where the cause of the issue resides in your model.Ĭontrary to the related information that COMSOL Multiphysics already provides, such as convergence numbers, which are scaled global numbers, the residual operator provides an unscaled residual value for each variable in a model. Normally, the algebraic error is (and should be) much smaller than the truncation error.


This is the error that you can access using the residual operator.

The quadrature error made by using numerical methods to approximate the finite element integrals.The truncation error (also called the Galerkin error for the finite element method).The following sources contribute to the computation error: Depending on the mesh (the discretization) and the nature of the equations for which you solve, the algebraic residual is only one of several error sources. When solving a finite element model, it is important to know how accurate the results are. This blog post demonstrates the use of the residual operator for visualizing and understanding the convergence properties of a turbulent flow simulation. You can use the residual operator, new with COMSOL Multiphysics version 5.2, to evaluate and plot your model’s algebraic residual in order to troubleshoot convergence issues.
