OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
qnorm2.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!|| qnorm2 ../engine/source/multifluid/qnorm2.F
25!||--- called by ------------------------------------------------------
26!|| multi_face_elem_data ../engine/source/multifluid/multi_face_data_elem.F
27!||--- uses -----------------------------------------------------
28!|| element_mod ../common_source/modules/elements/element_mod.F90
29!||====================================================================
30 SUBROUTINE qnorm2 (NEL, NFT, JALE, SYM, IXQ, XGRID, WGRID,
31 . NORM, WFAC, SURF)
32 use element_mod , only : nixq
33C-----------------------------------------------
34C D e s c r i p t i o n
35C-----------------------------------------------
36C Computes normal vector to the faces of each element in a group
37C for a 3d solid element (hence Snorm3)
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45! NIXQ
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER, INTENT(IN) :: NEL, NFT, JALE, SYM, IXQ(NIXQ, *)
50 my_real, INTENT(IN) ::
51 . xgrid(3, *), wgrid(*)
52 my_real, INTENT(OUT) :: wfac(3, 4, nel), surf(4, nel)
53 my_real, INTENT(OUT), TARGET :: norm(3, 4, nel)
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER :: II, NODE1, NODE2, NODE3, NODE4, KFACE
58 my_real ::
59 . x1(3), x2(3), x3(3), x4(3),
60 . w1(3), w2(3), w3(3), w4(3)
61 my_real, POINTER :: ny, nz
62
63
64 DO ii = 1, nel
65 node1 = ixq(2, ii + nft)
66 node2 = ixq(3, ii + nft)
67 node3 = ixq(4, ii + nft)
68 node4 = ixq(5, ii + nft)
69 x1(1:3) = xgrid(1:3, node1)
70 x2(1:3) = xgrid(1:3, node2)
71 x3(1:3) = xgrid(1:3, node3)
72 x4(1:3) = xgrid(1:3, node4)
73 IF (jale /= 0) THEN
74C Node grid velocities
75 w1(1:3) = wgrid(3 * (node1 - 1) + 1 : 3 * (node1 - 1) + 3)
76 w2(1:3) = wgrid(3 * (node2 - 1) + 1 : 3 * (node2 - 1) + 3)
77 w3(1:3) = wgrid(3 * (node3 - 1) + 1 : 3 * (node3 - 1) + 3)
78 w4(1:3) = wgrid(3 * (node4 - 1) + 1 : 3 * (node4 - 1) + 3)
79 ELSE ! Euler
80 w1(1:3) = zero
81 w2(1:3) = zero
82 w3(1:3) = zero
83 w4(1:3) = zero
84 ENDIF
85C Face normal
86C Face 1
87 kface = 1
88 norm(1, kface, ii) = zero
89 norm(2, kface, ii) = x2(3) - x1(3)
90 norm(3, kface, ii) = -(x2(2) - x1(2))
91 ny => norm(2, kface, ii)
92 nz => norm(3, kface, ii)
93 surf(kface, ii) = sqrt(ny * ny + nz * nz)
94 ny = ny / surf(kface, ii)
95 nz = nz / surf(kface, ii)
96 IF (sym == 1) THEN
97 surf(kface, ii) = surf(kface, ii) * half * (x1(2) + x2(2))
98 ENDIF
99C Face 2
100 kface = 2
101 norm(1, kface, ii) = zero
102 norm(2, kface, ii) = x3(3) - x2(3)
103 norm(3, kface, ii) = -(x3(2) - x2(2))
104 ny => norm(2, kface, ii)
105 nz => norm(3, kface, ii)
106 surf(kface, ii) = sqrt(ny * ny + nz * nz)
107 ny = ny / surf(kface, ii)
108 nz = nz / surf(kface, ii)
109 IF (sym == 1) THEN
110 surf(kface, ii) = surf(kface, ii) * half * (x2(2) + x3(2))
111 ENDIF
112C Face 3
113 kface = 3
114 norm(1, kface, ii) = zero
115 norm(2, kface, ii) = x4(3) - x3(3)
116 norm(3, kface, ii) = -(x4(2) - x3(2))
117 ny => norm(2, kface, ii)
118 nz => norm(3, kface, ii)
119 surf(kface, ii) = sqrt(ny * ny + nz * nz)
120 ny = ny / surf(kface, ii)
121 nz = nz / surf(kface, ii)
122 IF (sym == 1) THEN
123 surf(kface, ii) = surf(kface, ii) * half * (x3(2) + x4(2))
124 ENDIF
125C Face 4
126 kface = 4
127 norm(1, kface, ii) = zero
128 norm(2, kface, ii) = x1(3) - x4(3)
129 norm(3, kface, ii) = -(x1(2) - x4(2))
130 ny => norm(2, kface, ii)
131 nz => norm(3, kface, ii)
132 surf(kface, ii) = sqrt(ny * ny + nz * nz)
133 ny = ny / surf(kface, ii)
134 nz = nz / surf(kface, ii)
135 IF (sym == 1) THEN
136 surf(kface, ii) = surf(kface, ii) * half * (x4(2) + x1(2))
137 ENDIF
138C Face grid velocity 1
139 wfac(1:3, 1, ii) = half * (w1(1:3) + w2(1:3))
140C Face grid velocity 2
141 wfac(1:3, 2, ii) = half * (w2(1:3) + w3(1:3))
142C Face grid velocity 3
143 wfac(1:3, 3, ii) = half * (w3(1:3) + w4(1:3))
144C Face grid velocity 4
145 wfac(1:3, 4, ii) = half * (w4(1:3) + w1(1:3))
146 ENDDO
147 END SUBROUTINE qnorm2
#define my_real
Definition cppsort.cpp:32
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
subroutine qnorm2(nel, nft, jale, sym, ixq, xgrid, wgrid, norm, wfac, surf)
Definition qnorm2.F:32