fedoo.Problem.get_ext_forces

Problem.get_ext_forces(name='all', include_mpc=True)

Return the nodal Forces in global coordinates system.

The resulting forces are the sum of : - External forces (associated to Neumann boundary conditions) - Node reaction (associated to Dirichelet boundary conditions) - Inertia forces

Parameters:
  • name (str) – Can be either the name of a variable associated to the requested force, the name of a vector or ‘all’.

  • include_mpc (bool (default = True)) – if True, the multi_point_constraint (mpc) are included in the returned ext forces. This make the external force accessible on mpc global dof (dof only used in mpc and not linked to a mesh). A direct consequence is that the external force can’t be accessed on the mpc slave dof.

Returns:

The external forces. If a vector name is given, the function returns the external force of every vector component. if name == ‘all’, return a 1d numpy array containing the external forces associated to every dof. In this case, the returned array may be easily reshaped to separated components by using: pb.get_ext_forces().reshape(pb.space.nvar,-1)

Return type:

np.ndarray

Notes

The “force” mentionned here must be seen as a generic term. The true physical meanings of the “external forces” depends on the problem and the nature of the dof (for instance moment for rotational dof or heat flux for temperature).

NonLinear returns the latest evaluated residual balance: custom loops must update the vector after applying a correction. Linear implicit dynamics retain the completed integrator balance. ExplicitDynamic evaluates A @ X - D on demand (A * X - D for a diagonal operator); extract its forces after solve or update, before the next preparation. Explicit rollback does not restore the previous solved system’s forces. Generalized-alpha enforces equilibrium at its evaluation point, so the recovered balance need not represent the end-step state. This getter does not update constitutive history. The returned vector contains both nodal loads and reactions, rather than constraint reactions alone.