OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sdlensh3n.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!|| sdlensh3n ../engine/source/elements/thickshell/solidec/sdlensh3n.F
25!||--- called by ------------------------------------------------------
26!|| s6cforc3 ../engine/source/elements/thickshell/solide6c/s6cforc3.F
27!||====================================================================
28 SUBROUTINE sdlensh3n(
29 1 VOLN, LLSH3N, AREA, X1, X2,
30 2 X3, X4, X5, X6,
31 3 Y1, Y2, Y3, Y4,
32 4 Y5, Y6, Z1, Z2,
33 5 Z3, Z4, Z5, Z6,
34 6 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 D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER, INTENT(IN) :: NEL
47 my_real, DIMENSION(MVSIZ) , INTENT(OUT) :: AREA
48 my_real
49 . VOLN(*),LLSH3N(*),
50 . X1(*), X2(*), X3(*), X4(*), X5(*), X6(*),
51 . Y1(*), Y2(*), Y3(*), Y4(*), Y5(*), Y6(*),
52 . z1(*), z2(*), z3(*), z4(*), z5(*), z6(*)
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER I, J, N
57 my_real
58 . E1X(MVSIZ), E1Y(MVSIZ), E1Z(MVSIZ),
59 . E2X(MVSIZ), E2Y(MVSIZ), E2Z(MVSIZ),
60 . E3X(MVSIZ), E3Y(MVSIZ), E3Z(MVSIZ),
61 . X31(MVSIZ), Y31(MVSIZ), Z31(MVSIZ),
62 . x32(mvsiz), y32(mvsiz), z32(mvsiz),
63 . x21(mvsiz), y21(mvsiz), z21(mvsiz),
64 . x2l(mvsiz), x3l(mvsiz), y3l(mvsiz),
65 . xn(3,mvsiz) , yn(3,mvsiz) , zn(3,mvsiz)
66 my_real
67 . al1,al2,al3,almax,sum
68C=======================================================================
69 DO i=1,nel
70 xn(1,i) = half*(x1(i)+x4(i))
71 yn(1,i) = half*(y1(i)+y4(i))
72 zn(1,i) = half*(z1(i)+z4(i))
73 xn(2,i) = half*(x2(i)+x5(i))
74 yn(2,i) = half*(y2(i)+y5(i))
75 zn(2,i) = half*(z2(i)+z5(i))
76 xn(3,i) = half*(x3(i)+x6(i))
77 yn(3,i) = half*(y3(i)+y6(i))
78 zn(3,i) = half*(z3(i)+z6(i))
79 ENDDO
80 DO i=1,nel
81 x21(i)=xn(2,i)-xn(1,i)
82 y21(i)=yn(2,i)-yn(1,i)
83 z21(i)=zn(2,i)-zn(1,i)
84 x31(i)=xn(3,i)-xn(1,i)
85 y31(i)=yn(3,i)-yn(1,i)
86 z31(i)=zn(3,i)-zn(1,i)
87 x32(i)=xn(3,i)-xn(2,i)
88 y32(i)=yn(3,i)-yn(2,i)
89 z32(i)=zn(3,i)-zn(2,i)
90 ENDDO
91C
92 DO i=1,nel
93 e1x(i)= x21(i)
94 e1y(i)= y21(i)
95 e1z(i)= z21(i)
96 x2l(i) = sqrt(e1x(i)*e1x(i)+e1y(i)*e1y(i)+e1z(i)*e1z(i))
97 e1x(i)=e1x(i)/x2l(i)
98 e1y(i)=e1y(i)/x2l(i)
99 e1z(i)=e1z(i)/x2l(i)
100 ENDDO
101C
102 DO i=1,nel
103 e3x(i)=y31(i)*z32(i)-z31(i)*y32(i)
104 e3y(i)=z31(i)*x32(i)-x31(i)*z32(i)
105 e3z(i)=x31(i)*y32(i)-y31(i)*x32(i)
106 sum = sqrt(e3x(i)*e3x(i)+e3y(i)*e3y(i)+e3z(i)*e3z(i))
107 e3x(i)=e3x(i)/sum
108 e3y(i)=e3y(i)/sum
109 e3z(i)=e3z(i)/sum
110 area(i) = half * sum
111 ENDDO
112C
113 DO i=1,nel
114 e2x(i)=e3y(i)*e1z(i)-e3z(i)*e1y(i)
115 e2y(i)=e3z(i)*e1x(i)-e3x(i)*e1z(i)
116 e2z(i)=e3x(i)*e1y(i)-e3y(i)*e1x(i)
117 sum = sqrt(e2x(i)*e2x(i)+e2y(i)*e2y(i)+e2z(i)*e2z(i))
118 e2x(i)=e2x(i)/sum
119 e2y(i)=e2y(i)/sum
120 e2z(i)=e2z(i)/sum
121 y3l(i)=e2x(i)*x31(i)+e2y(i)*y31(i)+e2z(i)*z31(i)
122 x3l(i)=e1x(i)*x31(i)+e1y(i)*y31(i)+e1z(i)*z31(i)
123 ENDDO
124 DO i=1,nel
125 al1 = x2l(i) * x2l(i)
126 al2 = (x3l(i)-x2l(i)) * (x3l(i)-x2l(i)) + y3l(i) * y3l(i)
127 al3 = x3l(i) * x3l(i) + y3l(i) * y3l(i)
128 almax = max(al1,al2,al3)
129 llsh3n(i)= two*area(i) / sqrt(almax)
130 ENDDO
131C
132 RETURN
133 END
#define max(a, b)
Definition macros.h:21
subroutine sdlensh3n(voln, llsh3n, area, x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6, z1, z2, z3, z4, z5, z6, nel)
Definition sdlensh3n.F:35