This user subroutine allows the user to insert his/her own nonlinear equations (also called Multiple Point Constraints or MPC's). The driver routine is ``nonlinmpc.f''. For each new type of equation the user can define a name, e.g. FUN (maximum length 20 characters). To be consistent, the user subroutine should be called umpc_fun and stored in ``umpc_fun.f''. In file ``nonlinmpc.f'' the lines
elseif(labmpc(ii)(1:4).eq.'USER') then call umpc_user(aux,aux(3*maxlenmpc+1),const, & aux(6*maxlenmpc+1),iaux,n)
should be duplicated and user (USER) replaced by fun (FUN).
It is assumed that the nonlinear equation is a function of the displacements only. Then it can generally be written as
![]() |
(56) |
where represents the displacement in node
in direction
. Nonlinear equations are solved by approximating them
linearly and using an iterative procedure. It is the linearization
which must be provided by the user in the subroutine. Assume we
arrived at an itermediate solution
. Then the
above equation can be linearly approximated by:
![]() |
(57) |
To use a user-defined equation its name must be specified on the line beneath the keyword *MPC, followed by a list of all the nodes involved in the MPC. This list of nodes is transferred to the user routine, as specified by the following header and input/output variables of the umpc_user routine:
subroutine umpc_user(x,u,f,a,jdof,n) ! ! updates the coefficients in a user mpc ! ! INPUT: ! ! x(3,n) Carthesian coordinates of the nodes in the ! user mpc. ! u(3,n) Actual displacements of the nodes in the ! user mpc. ! n number of terms in the user mpc ! ! OUTPUT: ! ! f Actual value of the mpc. If the mpc is ! exactly satisfied, this value is zero ! a(n) coefficients of the linearized mpc ! jdof(n) degrees of freedom of the mpc terms !
The subroutine returns the value of f (
),
the coefficients of the linearization (
) and the degrees of freedom involved. An example is given next.