OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
r2cum3.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| r2cum3 ../engine/source/elements/spring/r2cum3.F
25!||--- called by ------------------------------------------------------
26!|| r23law108 ../engine/source/elements/spring/r23law108.F
27!|| rforc3 ../engine/source/elements/spring/rforc3.F
28!||====================================================================
29 SUBROUTINE r2cum3(
30 1 F, FORX, FORY, FORZ,
31 2 XM, XMOM, YMOM, ZMOM,
32 3 STI, STIR, STIFN, STIFR,
33 4 FX1, FX2, FY1, FY2,
34 5 FZ1, FZ2, MX1, MX2,
35 6 MY1, MY2, MZ1, MZ2,
36 7 GEO, X1, Y1, Z1,
37 8 X2, Y2, Z2, IEQUIL,
38 9 EXX, EYX, EZX, EXY,
39 A EYY, EZY, EXZ, EYZ,
40 B EZZ, NC1, NC2, NEL)
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C G l o b a l P a r a m e t e r s
47C-----------------------------------------------
48#include "mvsiz_p.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "param_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER, INTENT(IN) :: NEL
57 INTEGER NC1(*),NC2(*),IEQUIL(*)
58C REAL
59 my_real
60 . F(3,*),FORX(*),FORY(*),FORZ(*),XM(3,*),XMOM(*),YMOM(*),
61 . ZMOM(*),STI(3,*),STIR(3,*),STIFN(*),STIFR(*),
62 . FX1(MVSIZ),FY1(MVSIZ),FZ1(MVSIZ),
63 . FX2(MVSIZ),FY2(MVSIZ),FZ2(MVSIZ),
64 . MX1(MVSIZ),MY1(MVSIZ),MZ1(MVSIZ),
65 . MX2(MVSIZ),MY2(MVSIZ),MZ2(MVSIZ),
66 . GEO(NPROPG,*),X1(*),X2(*),Y1(*),Y2(*),
67 . z1(*),z2(*),
68 . exx(mvsiz), eyx(mvsiz), ezx(mvsiz), exy(mvsiz),
69 . eyy(mvsiz), ezy(mvsiz), exz(mvsiz), eyz(mvsiz), ezz(mvsiz)
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER I, J
74C REAL
75 my_real
76 . MMX, MMY, MMZ, XX
77C-----------------------------------------------
78C-------------------------
79C FORCES
80C-------------------------
81 DO I=1,nel
82 fx2(i)=exx(i)*forx(i)+exy(i)*fory(i)+exz(i)*forz(i)
83 fy2(i)=eyx(i)*forx(i)+eyy(i)*fory(i)+eyz(i)*forz(i)
84 fz2(i)=ezx(i)*forx(i)+ezy(i)*fory(i)+ezz(i)*forz(i)
85 fx1(i) = -fx2(i)
86 fy1(i) = -fy2(i)
87 fz1(i) = -fz2(i)
88 ENDDO
89C-------------------------
90C ASSEMBLE
91C-------------------------
92 DO i=1,nel
93 f(1,nc1(i))=f(1,nc1(i))-fx1(i)
94 f(2,nc1(i))=f(2,nc1(i))-fy1(i)
95 f(3,nc1(i))=f(3,nc1(i))-fz1(i)
96 stifn(nc1(i))=stifn(nc1(i))+sti(1,i)
97 f(1,nc2(i))=f(1,nc2(i))-fx2(i)
98 f(2,nc2(i))=f(2,nc2(i))-fy2(i)
99 f(3,nc2(i))=f(3,nc2(i))-fz2(i)
100 stifn(nc2(i))=stifn(nc2(i))+sti(2,i)
101 ENDDO
102C-------------------------
103C MOMENTS
104C-------------------------
105 DO i=1,nel
106 mx2(i)=exx(i)*xmom(i)+exy(i)*ymom(i)+exz(i)*zmom(i)
107 my2(i)=eyx(i)*xmom(i)+eyy(i)*ymom(i)+eyz(i)*zmom(i)
108 mz2(i)=ezx(i)*xmom(i)+ezy(i)*ymom(i)+ezz(i)*zmom(i)
109 mx1(i) = -mx2(i)
110 my1(i) = -my2(i)
111 mz1(i) = -mz2(i)
112 ENDDO
113C
114 DO i=1,nel
115 IF (iequil(i) == 1) THEN
116 mmx = half*((y2(i)-y1(i))*fz2(i) - (z2(i)-z1(i))*fy2(i))
117 mmy = half*((z2(i)-z1(i))*fx2(i) - (x2(i)-x1(i))*fz2(i))
118 mmz = half*((x2(i)-x1(i))*fy2(i) - (y2(i)-y1(i))*fx2(i))
119 mx1(i) = mx1(i) - mmx
120 my1(i) = my1(i) - mmy
121 mz1(i) = mz1(i) - mmz
122 mx2(i) = mx2(i) - mmx
123 my2(i) = my2(i) - mmy
124 mz2(i) = mz2(i) - mmz
125 xx = (x2(i)-x1(i))*(x2(i)-x1(i))
126 . + (y2(i)-y1(i))*(y2(i)-y1(i))
127 . + (z2(i)-z1(i))*(z2(i)-z1(i))
128 stir(1,i) = stir(1,i) + sti(2,i)*xx
129 stir(2,i) = stir(2,i) + sti(1,i)*xx
130 ENDIF
131 ENDDO
132C-------------------------
133C ASSEMBLE
134C-------------------------
135 DO i=1,nel
136 xm(1,nc1(i))=xm(1,nc1(i))-mx1(i)
137 xm(2,nc1(i))=xm(2,nc1(i))-my1(i)
138 xm(3,nc1(i))=xm(3,nc1(i))-mz1(i)
139 stifr(nc1(i))=stifr(nc1(i))+stir(1,i)
140 xm(1,nc2(i))=xm(1,nc2(i))-mx2(i)
141 xm(2,nc2(i))=xm(2,nc2(i))-my2(i)
142 xm(3,nc2(i))=xm(3,nc2(i))-mz2(i)
143 stifr(nc2(i))=stifr(nc2(i))+stir(2,i)
144 ENDDO
145C---
146 RETURN
147 END
subroutine r2cum3(f, forx, fory, forz, xm, xmom, ymom, zmom, sti, stir, stifn, stifr, fx1, fx2, fy1, fy2, fz1, fz2, mx1, mx2, my1, my2, mz1, mz2, geo, x1, y1, z1, x2, y2, z2, iequil, exx, eyx, ezx, exy, eyy, ezy, exz, eyz, ezz, nc1, nc2, nel)
Definition r2cum3.F:41