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