Reactions#

Reaction forces#

Reaction Forces#

This module provides functions to calculate reaction forces based on the residual vector and boundary conditions.

phasefieldx.Reactions.reactions_forces.calculate_reaction_forces(J_form, F_form, bcs, u, V, dimension)[source]#

Compute the reaction forces at the constrained degrees of freedom (DOFs).

Parameters:
F_formdolfinx.fem.Form

The residual form.

J_formdolfinx.fem.Form

The Jacobian form.

bcslist of dolfinx.fem.DirichletBC

List of Dirichlet boundary conditions.

udolfinx.fem.Function

The solution function.

dimensionint

The spatial dimension of the problem (1, 2, or 3).

Returns:
reaction_forcesnumpy.ndarray

Array containing the reaction forces at the constrained DOFs.