Cloned SEACAS for EXODUS library with extra build files for internal package management.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.6 KiB

2 years ago
C Copyright(C) 1999-2020 National Technology & Engineering Solutions
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
C See packages/seacas/LICENSE for details
SUBROUTINE DVOL3D( COORD, DISP, LSTSN, NSEG, DELVOL, NDIM, NUMNP)
C***********************************************************************
C DESCRIPTION:
C This routine computes the change in volume of a cavity formed
C by the boundary of an element side set flag
C FORMAL PARAMETERS:
C COORD REAL Nodal Coordinates
C DISP REAL Nodal Displacements
C LSTSN INTEGER List of nodes on this boundary
C LSTLEN INTEGER Length of node list
C NSEG INTEGER Number of segments in this boundary
C DELVOL REAL Change in volume of this cavity
C NDIM INTEGER Number of Nodes
C CALLED BY:
C***********************************************************************
DIMENSION COORD(NUMNP, *), DISP(NUMNP, *), LSTSN(*)
DELVOL = 0.0
DO 100 KSEG = 1 , NSEG
L = LSTSN(4*KSEG)
K = LSTSN(4*KSEG - 1)
J = LSTSN(4*KSEG - 2)
I = LSTSN(4*KSEG - 3)
Y1 = COORD(I,2)
Y2 = COORD(J,2)
Y3 = COORD(K,2)
Y4 = COORD(L,2)
Y5 = COORD(I,2) + DISP(I,2)
Y6 = COORD(J,2) + DISP(J,2)
Y7 = COORD(K,2) + DISP(K,2)
Y8 = COORD(L,2) + DISP(L,2)
Z1 = COORD(I,3)
Z2 = COORD(J,3)
Z3 = COORD(K,3)
Z4 = COORD(L,3)
Z5 = COORD(I,3) + DISP(I,3)
Z6 = COORD(J,3) + DISP(J,3)
Z7 = COORD(K,3) + DISP(K,3)
Z8 = COORD(L,3) + DISP(L,3)
Z24 = Z2 - Z4
Z52 = Z5 - Z2
Z45 = Z4 - Z5
B11 = ( Y2*(Z6-Z3-Z45) + Y3*Z24 + Y4*(Z3-Z8-Z52)
* + Y5*(Z8-Z6-Z24) + Y6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* + COORD(K,1) * B31
* + COORD(L,1) * B41
* + (COORD(I,1) + DISP(I,1)) * B51
* + (COORD(J,1) + DISP(J,1)) * B61
* + (COORD(K,1) + DISP(K,1)) * B71
* + (COORD(L,1) + DISP(L,1)) * B81
DELVOL = DELVOL + VOL
100 CONTINUE
RETURN
END