next up previous contents
Next: Mean rotation MPC. Up: User subroutines. Previous: Elastically anisotropic material with   Contents

user-defined nonlinear equations

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


\begin{displaymath}
f(u_1,u_2,u_3,....,u_n)=0
\end{displaymath} (56)

where $u_i$ represents the displacement in node $n_i$ in direction $l_i$. 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 $u^0_1,u^0_2,....u^0_n$. Then the above equation can be linearly approximated by:


\begin{displaymath}
f(u^0_1,u^0_2,....,u^0_n)+\sum_{i=1}^{i=n}\left. \frac{df}{du_i} \right\vert _0 (u_i-u^0_i)
\end{displaymath} (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 ( $f(u^0_1,u^0_2,....,u^0_n)$), the coefficients of the linearization ( $\left. \frac{df}{du_i}
\right\vert _0$) and the degrees of freedom involved. An example is given next.



Subsections
next up previous contents
Next: Mean rotation MPC. Up: User subroutines. Previous: Elastically anisotropic material with   Contents
Guido Dhondt 2003-08-06