Computing Accurate Fluxes
Flux Computation Methods
The COMSOL Multiphysics software provides three ways to compute accurate fluxes and reaction forces:
The first approach involves the reaction force operator (reacf) that makes it possible to compute integrals of reaction forces or fluxes during results analysis. See reacf for details.
Some physics interfaces provide a third way of computing accurate fluxes. 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.
The reaction forces are computed from the value of the residual vector at every node point where a constraint is applied. Therefore, the reaction forces should be thought of as discrete values at each node point rather than continuous fields.
The boundary flux variables are computed in a similar way to the reaction forces but with two important differences: