OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
amass3p.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!||====================================================================
25!|| amass3p ../engine/source/elements/solid/solide/amass3p.f
26!||--- called by ------------------------------------------------------
27!|| multi_fvm2fem ../engine/source/multifluid/multi_fvm2fem.F
28!|| sforc3 ../engine/source/elements/solid/solide/sforc3.F
29!|| szforc3 ../engine/source/elements/solid/solidez/szforc3.F
30!||--- uses -----------------------------------------------------
31!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
32!||====================================================================
33 SUBROUTINE amass3p(
34 1 FSKYM, RHO, VOLGP, TAG22,
35 2 VOLU, IADS, OFF, IXS,
36 3 NEL, NFT, JEUL)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C G l o b a l P a r a m e t e r s
47C-----------------------------------------------
48#include "mvsiz_p.inc"
49#include "param_c.inc"
50#include "inter22.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER, INTENT(IN) :: NEL
55 INTEGER, INTENT(IN) :: NFT
56 INTEGER, INTENT(IN) :: JEUL
58 . fskym(*), rho(*),volu(*),volgp(lveul,*), off(*),tag22(*)
59 INTEGER IADS(8,*),IXS(NIXS,*)
60C-----------------------------------------------
61C C o m m o n B l o c k s
62C-----------------------------------------------
63#include "com01_c.inc"
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER I,IFLAG,II, K, NIN, NCELL, ICELL, IB, J,MCELL
68 my_real TNOD(MVSIZ,8)
69 my_real DMASS(MVSIZ),FAC
70C-----------------------------------------------
71 iflag=integ8*jeul
72 nin = 1
73 fac = zero
74
75 !--------------------------------------------------------------------------!
76 ! COMPUTE ELEMENTARY MASS AND ITS DISTRIBUTION ON NODES. !
77 ! FOR CUT CELL TNOD(1:8,I) ENABLE TO DISTRIBUTE MASS TO RELATED NODES ONLY !
78 !--------------------------------------------------------------------------!
79 IF(iflag/=1)THEN
80 IF(int22==0)THEN
81 !DEFAULT FORMULATION
82 tnod(1:nel,1:8) = one
83 DO i=1,nel
84 dmass(i)=one_over_8*rho(i)*volu(i)*off(i)
85 ENDDO
86 !INTERFACE 22 : CUT CELLS
87 ELSE
88 DO i=1,nel
89 ib = nint(tag22(i))
90 IF(ib>0)THEN
91 ncell = brick_list(nin,ib)%NBCUT
92 IF(ncell==0)THEN
93 tnod(i,1:8) = one
94 dmass(i)=one_over_8*rho(i)*volu(i)*off(i)
95 cycle
96 ENDIF
97 tnod(i,1:8) = zero
98 mcell = brick_list(nin,ib)%mainID
99 IF(mcell==0)cycle ! next Main Cell
100 fac = brick_list(nin,ib)%POLY(mcell)%NumNOD
101 IF(fac>0)THEN
102 fac=one/fac
103 DO j=1,8
104 icell=brick_list(nin,ib)%NODE(j)%WhichCell
105 IF(icell/=mcell)cycle
106 tnod(i,j) = one !this node is used by polyhedron
107 ENDDO
108 ELSE
109 fac = zero
110 ENDIF
111 ELSE
112 fac = one_over_8
113 tnod(i,1:8) = one !uncut cell distributes centroid mass to all 8 nodes
114 ENDIF
115 dmass(i)=fac*rho(i)*volu(i)*off(i)
116 ENDDO
117 ENDIF
118 endif!IFLAG=1
119
120
121
122 !---------------------------------------------!
123 ! NODAL MASS : ELEMENTARY MASS IS DISTRIBUTED !
124 !---------------------------------------------!
125 IF(iflag==1)THEN
126 tnod(1:nel,1:8) = one
127 DO i=1,nel
128 dmass(i)=rho(i)*volgp(1,i)*off(i)
129 ENDDO
130 ENDIF
131 DO i=1,nel
132 ii = i +nft
133 k = iads(1,ii)
134 fskym(k)= tnod(i,1)*dmass(i) !by default all nodes are tagged. For cut cells only nodes defining the polyhedron is tagged
135 ENDDO
136C
137 IF(iflag==1)THEN
138 DO i=1,nel
139 dmass(i)=rho(i)*volgp(2,i)*off(i)
140 ENDDO
141 ENDIF
142 DO i=1,nel
143 ii = i +nft
144 k = iads(2,ii)
145 fskym(k)= tnod(i,2)*dmass(i)
146 ENDDO
147C
148 IF(iflag==1)THEN
149 DO i=1,nel
150 dmass(i)=rho(i)*volgp(3,i)*off(i)
151 ENDDO
152 ENDIF
153 DO i=1,nel
154 ii = i +nft
155 k = iads(3,ii)
156 fskym(k)= tnod(i,3)*dmass(i)
157 ENDDO
158C
159 IF(iflag==1)THEN
160 DO i=1,nel
161 dmass(i)=rho(i)*volgp(4,i)*off(i)
162 ENDDO
163 ENDIF
164 DO i=1,nel
165 ii = i +nft
166 k = iads(4,ii)
167 fskym(k)= tnod(i,4)*dmass(i)
168 ENDDO
169C
170 IF(iflag==1)THEN
171 DO i=1,nel
172 dmass(i)=rho(i)*volgp(5,i)*off(i)
173 ENDDO
174 ENDIF
175 DO i=1,nel
176 ii = i +nft
177 k = iads(5,ii)
178 fskym(k)= tnod(i,5)*dmass(i)
179 ENDDO
180C
181 IF(iflag==1)THEN
182 DO i=1,nel
183 dmass(i)=rho(i)*volgp(6,i)*off(i)
184 ENDDO
185 ENDIF
186 DO i=1,nel
187 ii = i +nft
188 k = iads(6,ii)
189 fskym(k)= tnod(i,6)*dmass(i)
190 ENDDO
191C
192 IF(iflag==1)THEN
193 DO i=1,nel
194 dmass(i)=rho(i)*volgp(7,i)*off(i)
195 ENDDO
196 ENDIF
197 DO i=1,nel
198 ii = i +nft
199 k = iads(7,ii)
200 fskym(k)= tnod(i,7)*dmass(i)
201 ENDDO
202C
203 IF(iflag==1)THEN
204 DO i=1,nel
205 dmass(i)=rho(i)*volgp(8,i)*off(i)
206 ENDDO
207 ENDIF
208 DO i=1,nel
209 ii = i +nft
210 k = iads(8,ii)
211 fskym(k)= tnod(i,8)*dmass(i)
212 ENDDO
213C
214 RETURN
215 END
subroutine amass3p(fskym, rho, volgp, tag22, volu, iads, off, ixs, nel, nft, jeul)
Definition amass3p.F:37
#define my_real
Definition cppsort.cpp:32
type(brick_entity), dimension(:,:), allocatable, target brick_list