OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pevec3.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!|| pevec3 ../engine/source/elements/beam/pevec3.F
25!||--- called by ------------------------------------------------------
26!|| pforc3 ../engine/source/elements/beam/pforc3.F
27!||====================================================================
28 SUBROUTINE pevec3(
29 1 RLOC, R, AL, NC1,
30 2 NC2, NC3, X1, X2,
31 3 X3, Y1, Y2, Y3,
32 4 Z1, Z2, Z3, RX1G,
33 5 RX2G, RY1G, RY2G, RZ1G,
34 6 RZ2G, E1X, E1Y, E1Z,
35 7 E2X, E2Y, E2Z, E3X,
36 8 E3Y, E3Z, NEL)
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C G l o b a l P a r a m e t e r s
43C-----------------------------------------------
44#include "mvsiz_p.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com08_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER, INTENT(IN) :: NEL
53 INTEGER NC1(MVSIZ), NC2(MVSIZ), NC3(MVSIZ)
54 my_real
55 . RLOC(3,*),R(3,*),AL(*),X1(MVSIZ),X2(MVSIZ),X3(MVSIZ),
56 . Y1(MVSIZ),Y2(MVSIZ),Y3(MVSIZ),Z1(MVSIZ),Z2(MVSIZ),
57 . Z3(MVSIZ),RX1G(MVSIZ),RX2G(MVSIZ),RY1G(MVSIZ),RY2G(MVSIZ),
58 . RZ1G(MVSIZ),RZ2G(MVSIZ),RX1(MVSIZ),RX2(MVSIZ),
59 . E1X(MVSIZ),E1Y(MVSIZ),E1Z(MVSIZ),E2X(MVSIZ),
60 . e2y(mvsiz),e2z(mvsiz),e3x(mvsiz),e3y(mvsiz),e3z(mvsiz)
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER I
65 my_real
66 . SUM(MVSIZ),
67 . THETA, SUM2(MVSIZ), SUM3(MVSIZ), COST(MVSIZ),
68 . SINT(MVSIZ)
69C--------------------------------------------
70 DO I=1,nel
71 rx1g(i)=r(1,nc1(i))
72 ry1g(i)=r(2,nc1(i))
73 rz1g(i)=r(3,nc1(i))
74 rx2g(i)=r(1,nc2(i))
75 ry2g(i)=r(2,nc2(i))
76 rz2g(i)=r(3,nc2(i))
77 ENDDO
78C
79 DO i=1,nel
80 e2x(i)=rloc(1,i)
81 e2y(i)=rloc(2,i)
82 e2z(i)=rloc(3,i)
83 ENDDO
84C
85 DO i=1,nel
86 e1x(i)=x2(i)-x1(i)
87 e1y(i)=y2(i)-y1(i)
88 e1z(i)=z2(i)-z1(i)
89 ENDDO
90C
91 DO i=1,nel
92 al(i)=sqrt(e1x(i)**2+e1y(i)**2+e1z(i)**2)
93 ENDDO
94C
95 DO i=1,nel
96 e1x(i)=e1x(i)/al(i)
97 e1y(i)=e1y(i)/al(i)
98 e1z(i)=e1z(i)/al(i)
99 ENDDO
100C
101 DO i=1,nel
102 e3x(i)=e1y(i)*e2z(i)-e1z(i)*e2y(i)
103 e3y(i)=e1z(i)*e2x(i)-e1x(i)*e2z(i)
104 e3z(i)=e1x(i)*e2y(i)-e1y(i)*e2x(i)
105 ENDDO
106C
107 DO i=1,nel
108 e2x(i)=e3y(i)*e1z(i)-e3z(i)*e1y(i)
109 e2y(i)=e3z(i)*e1x(i)-e3x(i)*e1z(i)
110 e2z(i)=e3x(i)*e1y(i)-e3y(i)*e1x(i)
111 ENDDO
112C--------------------------------------------
113C TORSION MOYENNE EN COORDONNEES GLOBALES
114C--------------------------------------------
115 DO i=1,nel
116 rx1(i)=e1x(i)*rx1g(i)+e1y(i)*ry1g(i)+e1z(i)*rz1g(i)
117 rx2(i)=e1x(i)*rx2g(i)+e1y(i)*ry2g(i)+e1z(i)*rz2g(i)
118 theta=(rx1(i)+rx2(i))/two*dt1
119 sum2(i)=sqrt(e2x(i)**2+e2y(i)**2+e2z(i)**2)
120 sum3(i)=sqrt(e3x(i)**2+e3y(i)**2+e3z(i)**2)
121 cost(i)=cos(theta)/sum2(i)
122 sint(i) =sin(theta)/sum3(i)
123 ENDDO
124C
125C ... it is modified.
126C
127 DO i=1,nel
128 e2x(i)=e2x(i)*cost(i)+e3x(i)*sint(i)
129 e2y(i)=e2y(i)*cost(i)+e3y(i)*sint(i)
130 e2z(i)=e2z(i)*cost(i)+e3z(i)*sint(i)
131 ENDDO
132C
133 DO i=1,nel
134 sum(i)=sqrt(e2x(i)**2+e2y(i)**2+e2z(i)**2)
135 ENDDO
136C
137 DO i=1,nel
138 e2x(i)=e2x(i)/sum(i)
139 e2y(i)=e2y(i)/sum(i)
140 e2z(i)=e2z(i)/sum(i)
141 ENDDO
142C
143 DO i=1,nel
144 e3x(i)=e1y(i)*e2z(i)-e1z(i)*e2y(i)
145 e3y(i)=e1z(i)*e2x(i)-e1x(i)*e2z(i)
146 e3z(i)=e1x(i)*e2y(i)-e1y(i)*e2x(i)
147 ENDDO
148C
149 DO i=1,nel
150 sum(i)=sqrt(e3x(i)**2+e3y(i)**2+e3z(i)**2)
151 e3x(i)=e3x(i)/sum(i)
152 e3y(i)=e3y(i)/sum(i)
153 e3z(i)=e3z(i)/sum(i)
154 ENDDO
155C
156 DO i=1,nel
157 rloc(1,i)=e2x(i)
158 rloc(2,i)=e2y(i)
159 rloc(3,i)=e2z(i)
160 ENDDO
161C--------------------------------------------
162 RETURN
163 END
subroutine pevec3(rloc, r, al, nc1, nc2, nc3, x1, x2, x3, y1, y2, y3, z1, z2, z3, rx1g, rx2g, ry1g, ry2g, rz1g, rz2g, e1x, e1y, e1z, e2x, e2y, e2z, e3x, e3y, e3z, nel)
Definition pevec3.F:37