OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
afimp3.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!|| afimp3 ../engine/source/ale/ale3d/afimp3.F
25!||--- called by ------------------------------------------------------
26!|| atherm ../engine/source/ale/atherm.F
27!||--- uses -----------------------------------------------------
28!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
29!|| element_mod ../common_source/modules/elements/element_mod.F90
30!||====================================================================
31 SUBROUTINE afimp3(PM ,X, IXS, T,GRAD ,COEF ,ALE_CONNECT ,FV)
33 use element_mod , only : nixs
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C G l o b a l P a r a m e t e r s
40C-----------------------------------------------
41#include "mvsiz_p.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "param_c.inc"
46#include "com04_c.inc"
47#include "vect01_c.inc"
48#include "tabsiz_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52! SPMD CASE : SIXS >= NIXS*NUMELS (SIXS = NIXS*NUMELS_L+NIXS*NSVOIS_L)
53! IXQ(1:NIXS, 1:NUMELS) local elems
54! (1:NIXS, NUMELS+1:) additional elems (also on adjacent domains but connected to the boundary of the current domain)
55!
56! SPMD CASE : SX >= 3*NUMNOD (SX = 3*(NUMNOD_L+NRCVVOIS_L))
57! X(1:3,1:NUMNOD) : local nodes
58! (1:3, NUMNOD+1:) additional nodes (also on adjacent domains but connected to the boundary of the current domain)
59!
60 INTEGER IXS(NIXS,SIXS/NIXS)
61 my_real pm(npropm,nummat), x(3,sx/3), t(*), grad(6,*), coef(*), fv(*)
62 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER JFACE(MVSIZ), JVOIS(MVSIZ), NC1(MVSIZ), NC2(MVSIZ), NC3(MVSIZ), NC4(MVSIZ),
67 . IPERM(4,6), IFIMP, I, II, MAT, IFQ, J, IAD2, LGTH
68 my_real x1(mvsiz), x2(mvsiz), x3(mvsiz), x4(mvsiz), y1(mvsiz), y2(mvsiz), y3(mvsiz), y4(mvsiz),
69 . z1(mvsiz), z2(mvsiz), z3(mvsiz), z4(mvsiz), tflu(mvsiz), xf(mvsiz),
70 . n1x, n1y, n1z, area
71C-----------------------------------------------
72 DATA iperm / 1,2,3,4,
73 . 4,3,7,8,
74 . 8,7,6,5,
75 . 5,6,2,1,
76 . 2,6,7,3,
77 . 1,4,8,5/
78C-----------------------------------------------
79C S o u r c e L i n e s
80C-----------------------------------------------
81
82C---------------------------------------------------------------------
83C CALCULATION OF IMPOSED FLUXES
84C---------------------------------------------------------------------
85 ifimp=0
86 DO i=lft,llt
87 ii =nft+i
88 mat=ixs(1,ii)
89 ifq=nint(pm(44,mat))
90 IF(ifq /= 0)THEN
91 tflu(i)=pm(60,mat)*fv(ifq)
92 xf(i)=one
93 ifimp=1
94 ELSE
95 tflu(i)=zero
96 xf(i)=zero
97 ENDIF
98 ENDDO
99 IF(ifimp == 0)RETURN
100C---------------------------------------------------------------------
101C FINDING RELATED FACE
102C---------------------------------------------------------------------
103 DO i=lft,llt
104 ii =nft+i
105 iad2 = ale_connect%ee_connect%iad_connect(ii)
106 lgth = ale_connect%ee_connect%iad_connect(ii + 1) - iad2
107 DO j=1,lgth
108 jface(i)=j
109 jvois(i) = ale_connect%ee_connect%connected(iad2 + j - 1)
110 IF(jvois(i) <= 0)cycle!next J
111 mat=ixs(1,jvois(i))
112 mtn=nint(pm(19,mat))
113 IF(mtn /= 11)exit!next I
114 enddo!next J
115 enddo!next I
116C-----------------------------------------------
117C SURFACE CALCULATION
118C-----------------------------------------------
119 DO i=lft,llt
120 ii =nft+i
121 nc1(i)=ixs(1+iperm(1,jface(i)),ii)
122 nc2(i)=ixs(1+iperm(2,jface(i)),ii)
123 nc3(i)=ixs(1+iperm(3,jface(i)),ii)
124 nc4(i)=ixs(1+iperm(4,jface(i)),ii)
125
126 x1(i)=x(1,nc1(i))
127 y1(i)=x(2,nc1(i))
128 z1(i)=x(3,nc1(i))
129
130 x2(i)=x(1,nc2(i))
131 y2(i)=x(2,nc2(i))
132 z2(i)=x(3,nc2(i))
133
134 x3(i)=x(1,nc3(i))
135 y3(i)=x(2,nc3(i))
136 z3(i)=x(3,nc3(i))
137
138 x4(i)=x(1,nc4(i))
139 y4(i)=x(2,nc4(i))
140 z4(i)=x(3,nc4(i))
141 ENDDO
142C------------------------------------------
143C NORMAL VECTOR CALCULATION
144C------------------------------------------
145 DO i=lft,llt
146 ii =nft+i
147 n1x=(y3(i)-y1(i))*(z2(i)-z4(i)) - (z3(i)-z1(i))*(y2(i)-y4(i))
148 n1y=(z3(i)-z1(i))*(x2(i)-x4(i)) - (x3(i)-x1(i))*(z2(i)-z4(i))
149 n1z=(x3(i)-x1(i))*(y2(i)-y4(i)) - (y3(i)-y1(i))*(x2(i)-x4(i))
150 area = half * sqrt(n1x**2+n1y**2+n1z**2)
151 t(ii) = (one-xf(i))*t(ii) + xf(i)*t(jvois(i))
152 1 - area*tflu(i)*half*(coef(ii)+coef(jvois(i))) /
153 2 max(em20,coef(ii)*coef(jvois(i))*grad(jface(i),i))
154 ENDDO
155
156 RETURN
157 END
subroutine afimp3(pm, x, ixs, t, grad, coef, ale_connect, fv)
Definition afimp3.F:32
#define my_real
Definition cppsort.cpp:32
subroutine area(d1, x, x2, y, y2, eint, stif0)
#define max(a, b)
Definition macros.h:21