Computing Accurate Fluxes
Flux Computation Methods
The COMSOL Multiphysics software provides three ways to compute accurate fluxes and reaction forces. See below for more information about each method.
The first approach involves the reaction force operator (reacf) that makes it possible to compute integrals of reaction forces or fluxes during results analysis. The reacf operator gives the value of constraint forces per node, which is a discrete version of the Lagrange multipliers. It can be summed over per node and is the traditional way of computing reaction forces in FEA. The reacf operator always gives the “exact” reaction force of the discretized version of the problem.
In a case where you have one type of constraint acting on the same dependent variable (DOF variable) then Lagrange multipliers (see below) and reacf are more or less the same. In a case where you have several types of constraints acting on the same dependent variable (DOF variable) — for example, some kind of control system mechanism — then Lagrange multipliers give you individual control over each constraint force whereas reacf will only give you control over the sum of all constraint forces.
The reacf operator is a pure postprocessing operation and does not affect the matrix structure or solvers.
See reacf for details.
Some physics interfaces provide a second way of computing accurate fluxes. Those accurate fluxes are like a continuous version of the reacf operator and have similar properties: they are pure postprocessing operations and do not affect the matrix structure or solvers. They reconstruct a, typically continuous, field instead of giving the “exact” reaction force per node for the discretized problem. So, although these fluxes will be nice and continuous, as opposed to those computed using reacf, they may sometimes not be as accurate as reacf. They also have to be integrated using some numerical quadrature rule, which can introduce numerical errors. Also note that the flux variables are only accurate if the residual is small; a small solution error normally means a small residual.
Under the Discretization section (if Advanced Physics Options is selected in the Show More Options dialog box), select the Compute boundary fluxes check box. The solver then computes variables storing an accurate boundary flux from each boundary into the adjacent domain (in addition to the standard extrapolated value). On interior boundaries, there are two flux variables corresponding to the flux into the domains on either side of the boundary. Unlike the other methods, these variables are available also on unconstrained boundaries. This method is active by default in Coefficient Form PDE, General Form PDE, heat transfer, and mass transport interfaces. There is also an Apply smoothing to boundary fluxes check box that is selected by default. The smoothing can provide a more well-behaved flux value close to singularities. See also Boundary Flux Operators: uflux and dflux.
When using weak constraints in interfaces, the Lagrange multipliers are additional dependent variables in those physics interfaces. When using the reaction force operator, the reaction force operator of a certain dependent variable corresponds to the Lagrange multiplier of that dependent variable. The Lagrange multipliers correspond to the following quantities in the physics interfaces:
The sign of the Lagrange multiplier is the same as the one used when applying the corresponding quantity explicitly in a flux condition. As a general rule, the sign corresponds to an action by the surroundings on the model, rather than the opposite.
The program computes only the part of the boundary flux captured by the Lagrange multiplier. You might have additional flux coming from boundary sources or nonidentity constraint matrices. This should not happen in the physics interfaces, though.