OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
tdefo3.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!|| tdefo3 ../engine/source/elements/truss/tdefo3.F
25!||--- called by ------------------------------------------------------
26!|| tforc3 ../engine/source/elements/truss/tforc3.F
27!||====================================================================
28 SUBROUTINE tdefo3(
29 1 V, OFFG, OFF, NC1,
30 2 NC2, EPS, AL, VX1,
31 3 VX2, VY1, VY2, VZ1,
32 4 VZ2, EX, EY, EZ,
33 5 X1, X2, Y1, Y2,
34 6 Z1, Z2, NEL)
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C G l o b a l P a r a m e t e r s
41C-----------------------------------------------
42#include "mvsiz_p.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "com08_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(IN) :: NEL
51 INTEGER NC1(MVSIZ),NC2(MVSIZ)
52 my_real
53 . V(3,*),OFFG(MVSIZ),OFF(MVSIZ),EPS(MVSIZ),AL(MVSIZ),
54 . VX1(MVSIZ),VX2(MVSIZ),VY1(MVSIZ),VY2(MVSIZ),VZ1(MVSIZ),
55 . VZ2(MVSIZ),EX(MVSIZ),EY(MVSIZ),EZ(MVSIZ),X1(MVSIZ),X2(MVSIZ),
56 . y1(mvsiz),y2(mvsiz),z1(mvsiz),z2(mvsiz)
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER I,J
61 my_real
62 . V1(MVSIZ),V2(MVSIZ),RATIO(MVSIZ),OFF_L
63C-----------------------------------------------
64 DO I=1,nel
65 vx1(i)=v(1,nc1(i))
66 vy1(i)=v(2,nc1(i))
67 vz1(i)=v(3,nc1(i))
68 vx2(i)=v(1,nc2(i))
69 vy2(i)=v(2,nc2(i))
70 vz2(i)=v(3,nc2(i))
71 ENDDO
72c
73 DO i=1,nel
74 ex(i)=x2(i)-x1(i)
75 ey(i)=y2(i)-y1(i)
76 ez(i)=z2(i)-z1(i)
77 ENDDO
78c
79 DO i=1,nel
80 al(i)=sqrt(ex(i)*ex(i)+ey(i)*ey(i)+ez(i)*ez(i))
81 ENDDO
82c
83 DO i=1,nel
84 IF (al(i) /= zero) THEN
85 ex(i) = ex(i)/al(i)
86 ey(i) = ey(i)/al(i)
87 ez(i) = ez(i)/al(i)
88 ELSE
89 ex(i) = zero
90 ey(i) = zero
91 ez(i) = zero
92 ENDIF
93 ENDDO
94c
95 DO i=1,nel
96 v1(i)=ex(i)*vx1(i)+ey(i)*vy1(i)+ez(i)*vz1(i)
97 v2(i)=ex(i)*vx2(i)+ey(i)*vy2(i)+ez(i)*vz2(i)
98 ENDDO
99c
100 DO i=1,nel
101 IF (al(i) /= zero) THEN
102 eps(i)= (v2(i)-v1(i))/al(i)
103 ratio(i) = ( (vx2(i)-vx1(i))*(vx2(i)-vx1(i))
104 . +(vy2(i)-vy1(i))*(vy2(i)-vy1(i))
105 . +(vz2(i)-vz1(i))*(vz2(i)-vz1(i)) )
106 . /(al(i)*al(i))
107 ELSE
108 eps(i) = zero
109 ratio(i) = zero
110 ENDIF
111 ENDDO
112c
113 DO i=1,nel
114 eps(i)= eps(i) + half*dt1*( eps(i)*eps(i) - ratio(i) )
115 ENDDO
116c
117 off_l = zero
118 DO i=1,nel
119 off(i) = min(one,abs(offg(i)))
120 off(i) = max(zero,off(i))
121 off_l = min(off_l,offg(i))
122 ENDDO
123c
124 IF (off_l < zero) THEN
125 DO i=1,nel
126 IF (offg(i) < zero) THEN
127 eps(i)=zero
128 ENDIF
129 ENDDO
130 ENDIF
131C-----------------------------------------------
132 RETURN
133 END
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine tdefo3(v, offg, off, nc1, nc2, eps, al, vx1, vx2, vy1, vy2, vz1, vz2, ex, ey, ez, x1, x2, y1, y2, z1, z2, nel)
Definition tdefo3.F:35