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