|
NAME
userc - subroutine frame for the definition of a function C
SYNOPSIS
- SUBROUTINE USERC (
-
T, GROUP, LAST, NELIS,
NRSP, RSPARM, NRVP, RVP1, RVPARM,
NISP, ISPARM, NIVP, IVP1, IVPARM,
L, DIM, X, NU, U, DUDX, NOP, NOPARM, DNOPDX, NC, C)
- INTEGER
-
GROUP, LAST, NELIS, NRSP, NRVP, RVP1, NISP, NIVP, IVP1,
L, DIM, NU, NOP, NC
- INTEGER
-
ISPARM(NISP), IVPARM(IVP1,NIVP)
- DOUBLE PRECISION
-
T, RSPARM(NRSP), RVPARM(RVP1,NRVP), X(L,DIM), U(L,NU), DUDX(L,NU,DIM),
NOPARM(L,NOP), DNOPDX(L,NOP,DIM), C(L,NC)
PURPOSE
userc is the subroutine which defines a NC-valued function C
on the inner elements (CLASS=DIM). You have to
enter the statements which define the function C into a subroutine
with the argument list of userc. The name of the routine may
be changed. The name has to be declared by the EXTERNAL statement and
has to be entered instead of userc into the argument list of
vemu03, vemu04, vemu05
and vemu06. The function C depends
on the location in the elements, on an input solution U and its derivatives and
the parameter sets in an arbitrary way. By one call the values
of the function C have to be set for a set (called stripe)
of NELIS points which are in different
elements. Normally we have NELIS<>NE, and
so userc is called several
times for one group. Therefore, it is very important that the vector parameters
are selected with the offset LAST.
ARGUMENTS
- T double precision, scalar, input
-
Current time.
- GROUP integer, scalar, input
-
Current group.
- LAST integer, scalar, input
-
Number of elements in the preceding stripes.
- NELIS integer, scalar, input
-
Number of elements in the current stripe.
- NRSP integer, scalar, input
-
Number of real scalar parameters of the current group.
- RSPARM double precision, array: RSPARM(NRSP), input
-
Set of the real scalar parameters of the current group.
- NRVP integer, scalar, input
-
Number of real vector parameters of the current group.
- RVP1 integer, scalar, input
-
Leading dimension of the real vector parameters of the current group.
- RVPARM double precision, array: RVPARM(RVP1,NRVP), input
-
Set of the real vector parameters of the current group.
RVPARM(LAST+z,*) is the parameter
Set of the z-th element in the stripe.
- NISP integer, scalar, input
-
Number of integer scalar parameters of the current group.
- ISPARM integer, array: ISPARM(NISP), input
-
Set of the real scalar parameters of the current group.
- NIVP integer, scalar, input
-
Number of integer vector parameters of the current group.
- IVP1 integer, scalar, input
-
Leading dimension of the integer vector parameters of the current group.
- IVPARM integer, array: IVPARM(IVP1,NIVP), input
-
Set of the integer vector parameters of the current
group. IVPARM(LAST+z,*) is the parameter set of
the z-th element in the stripe.
- L integer, scalar, input
-
Leading dimension.
- DIM integer, scalar, input
-
Space dimension.
- X double precision, array: X(L,DIM), input
-
Coordinates of the points where C is evaluated. X(z,.) lies in
the z-th element in the current stripe.
- NU integer, scalar, input
-
Number of components of the input solution.
- U double precision, array: U(L,NU), input
-
The values of the input solution. U(z,j) is
the j-th component of the input solution at the point
X(z,.). If the input solution has to be specified at the
global nodes (see vemu03, vemu04,
vemu05), U has undefined values for
the components with NELTYP=0 in the current group.
- DUDX double precision, array: DUDX(L,NU,DIM), input
-
Derivatives of the input solution. DUDUX(z,i,j) is the derivative of
the i-th component of the input solution with respect to the j-th space
direction at point X(z,.). If the input solution has to be specified
at the global nodes (see vemu03, vemu04,
vemu05) DUDX has undefined values for
the components with NELTYP=0 in the current group.
- NOP integer, scalar, input
-
Number of node parameters.
- NOPARM double precision, array: NOPARM(L,NOP), input
-
Interpolation of the node parameters. NOPARM(z,i) is
the i-th node parameter at point X(z,.).
- DNOPDX double precision, array: DNOPDX(L,NOP,DIM), input
-
Derivative of the interpolation of the node parameters. DNOPDX(z,i,j)
is the derivative of the i-th node parameter with respect
to the j-th space direction at point X(z,.).
- NC integer, scalar, input
-
Number of components of the function C.
- C double precision, array: C(L,NC), output
-
The values of the function C. C(z,j)
is the j-th component of the function C at the point X(z,.). Only
nonzero entries of C have to be defined.
EXAMPLES
See also vemexamples.
1st Example
The components of C are the derivative of U
and its divergence (NU=1 and DIM=3). We set
NC=NU+1=4. The following statements have to be
entered into userc:
DO 10 Z=1,NELIS
C(Z,1)=DUDX(Z,1,1)
C(Z,2)=DUDX(Z,1,2)
C(Z,3)=DUDX(Z,1,3)
C(Z,4)=DUDX(Z,1,1) + DUDX(Z,1,2) + DUDX(Z,1,3)
10 CONTINUE
2nd Example
The components of C are the
stress components in a plane stress analysis problem. In this
case, NU=DIM=2, U gives the displacements
in the x1- and x2-direction, and NC=3. The Poisson's ratio
NY is constant for a group (given as the first real scalar parameter),
but the elastic modulus E depends on the element number
(it is given as the first real vector parameter). The following
statements have to be entered into userc:
NY=RSPARM(1)
DO 10 Z=1,NELIS
E=RVPARM(LAST+Z,1)
C(Z,1)=( DUDX(Z,1,1)+NY*DUDX(Z,2,2))*E/(1.D0-NY**2)
C(Z,2)=(NY*DUDX(Z,1,1)+ DUDX(Z,2,2))*E/(1.D0-NY**2)
C(Z,3)=( DUDX(Z,1,2)+ DUDX(Z,2,1))/2*E/(1.D0+NY)
10 CONTINUE
3rd Example
The function C is used to interpolate values from the global nodes
to the geometrical nodes by vemu05 or
to interpolate values from the geometrical nodes
to the global nodes by vemu06. In this cases set NC=NU and
enter the following statements into userc:
DO 10 I=1,NC
DO 10 Z=1,NELIS
C(Z,I)=U(Z,I)
10 CONTINUE
SEE ALSO
VECFEM, mesh, vemexamples,
vemu03, vemu04, vemu05, vemu06.
COPYRIGHTS
Copyrights by Universitaet Karlsruhe 1989-1996.
Copyrights by Lutz Grosz 1996.
All rights reserved. More details see VECFEM.
by L. Grosz, Auckland , 6. June, 2000. |