OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
surf_mass.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!|| surf_mass_monv ../engine/source/output/th/surf_mass.F
25!||--- called by ------------------------------------------------------
26!|| hist2 ../engine/source/output/th/hist2.F
27!||--- calls -----------------------------------------------------
28!|| surf_mass_com ../engine/source/output/th/surf_mass.F
29!|| surf_mass_fvm ../engine/source/output/th/surf_mass.F
30!||--- uses -----------------------------------------------------
31!|| groupdef_mod ../common_source/modules/groupdef_mod.F
32!|| th_surf_mod ../common_source/modules/interfaces/th_surf_mod.F
33!||====================================================================
34 SUBROUTINE surf_mass_monv(FSAVSURF, IGRSURF, MONVOL, VOLMON, FR_MV)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE groupdef_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "com01_c.inc"
48#include "com04_c.inc"
49#include "param_c.inc"
50#include "task_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER MONVOL(*), FR_MV(NSPMD+2,NVOLU)
55 my_real fsavsurf(th_surf_num_channel,nsurf), volmon(*)
56 TYPE (SURF_), DIMENSION(NSURF) :: IGRSURF
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER I, N, KAD, ITYP, NCA, IDSURF, PMAIN
61 INTEGER NTG, NTGI, NNT, KIBALE, KRBALE
62 INTEGER K1, K2, KK2, KR5, KR6, KR7, NNS, NNI, NTGT
63 INTEGER :: KR1, KR2, KR3, KR4
64C-----------------------------------------------------------------------
65 k1 = 1
66 k2 = 1+nimv*nvolu
67 kk2 = 1+nrvolu*nvolu
68 kibale=1+nimv*nvolu +licbag+libagjet+libaghol
69 krbale=1+nrvolu*nvolu+lrcbag+lrbagjet+lrbaghol
70 DO n=1,nvolu
71 nca = monvol(k1-1+3)
72 pmain = fr_mv(nspmd+2,n)
73 IF(ispmd+1 == pmain) THEN
74 ityp = monvol(k1-1+2)
75 IF(ityp == 6.OR.ityp == 8) THEN
76 ntgi = monvol(k1-1+69)
77 IF(ntgi == 0) cycle
78 ntg = monvol(k1-1+33)
79 ntgt = ntg + ntgi
80 kad = kibale+monvol(k1-1+18)
81 nns = monvol(k1-1+32)
82 nni = monvol(k1-1+68)
83 nnt = nns + nni
84 kr1=krbale+monvol(k1-1+34)
85 kr2=kr1+nnt
86 kr3=kr2+nnt
87 kr4=kr3+nnt
88 kr5=kr4+3*nnt
89 kr6=kr5+ntgt
90 kr7 = kr6+ntg+ntgi
91 DO i=1,nsurf
92 IF(igrsurf(i)%TH_SURF == 1) THEN
93 IF(monvol(kad) /= 0) CALL surf_mass_fvm(ntgi, monvol(kad),
94 . volmon(kr6), fsavsurf(2,i), volmon(kr7), fsavsurf(3,i),
95 . volmon(kr5))
96 ENDIF
97 kad = kad+ntgi+1
98 ENDDO
99 ELSEIF(ityp == 9 .AND. nca > 0) THEN
100 DO i=1,nsurf
101 IF(igrsurf(i)%TH_SURF /= 1) cycle
102 idsurf=i
103 CALL surf_mass_com(monvol(k2), volmon(kk2), nca, idsurf,
104 . fsavsurf(2,i),fsavsurf(3,i))
105 ENDDO
106 ENDIF
107 ENDIF
108 k1 = k1+nimv
109 k2 = k2+nicbag*nca
110 kk2 = kk2+nrcbag*nca
111 ENDDO
112C
113 RETURN
114 END
115!||====================================================================
116!|| surf_mass_fvm ../engine/source/output/th/surf_mass.F
117!||--- called by ------------------------------------------------------
118!|| surf_mass_monv ../engine/source/output/th/surf_mass.F
119!||====================================================================
120 SUBROUTINE surf_mass_fvm(NTGI, ITAG, ELFMASS, MASS, ELFVEL, VEL, ELSINI)
121C-----------------------------------------------
122C I m p l i c i t T y p e s
123C-----------------------------------------------
124#include "implicit_f.inc"
125C-----------------------------------------------
126C D u m m y A r g u m e n t s
127C-----------------------------------------------
128 INTEGER NTGI, ITAG(*)
129 my_real
130 . elfmass(*), mass, elfvel(*), vel, elsini(*)
131C-----------------------------------------------
132C L o c a l V a r i a b l e s
133C-----------------------------------------------
134 INTEGER I
135 my_real surf
136C-----------------------------------------------
137 mass = zero
138 surf = zero
139 vel = zero
140 DO i=1,ntgi
141 IF(itag(i+1) == 0) cycle
142 mass=mass+elfmass(i)
143 surf=surf+elsini(i)
144 vel =vel +elfvel(i)*elsini(i)
145 ENDDO
146 mass=abs(mass)
147 vel =abs(vel)/surf
148C
149 RETURN
150 END
151!||====================================================================
152!|| surf_mass_com ../engine/source/output/th/surf_mass.F
153!||--- called by ------------------------------------------------------
154!|| surf_mass_monv ../engine/source/output/th/surf_mass.F
155!||====================================================================
156 SUBROUTINE surf_mass_com(ICBAG, RCBAG, NCA, IDSURF, MASS, VEL)
157C-----------------------------------------------
158C I m p l i c i t T y p e s
159C-----------------------------------------------
160#include "implicit_f.inc"
161C-----------------------------------------------
162C C o m m o n B l o c k s
163C-----------------------------------------------
164#include "param_c.inc"
165C-----------------------------------------------
166C D u m m y A r g u m e n t s
167C-----------------------------------------------
168 INTEGER ICBAG(NICBAG,*), NCA, IDSURF
169C REAL
170 my_real
171 . rcbag(nrcbag,*), mass, vel
172C-----------------------------------------------
173C L o c a l V a r i a b l e s
174C-----------------------------------------------
175 INTEGER I, IDCOM
176C-----------------------------------------------
177 DO i=1,nca
178 idcom = icbag(2,i)
179 IF(idcom /= idsurf) cycle
180 mass = mass+rcbag(8,i)
181 vel = vel +rcbag(9,i)
182 ENDDO
183C
184 RETURN
185 END
#define my_real
Definition cppsort.cpp:32
OPTION /TH/SURF outputs of Pressure and Area needed Tabs.
Definition th_surf_mod.F:61
integer, parameter th_surf_num_channel
number of /TH/SURF channels : AREA, VELOCITY, MASSFLOW, P A, MASS
subroutine surf_mass_monv(fsavsurf, igrsurf, monvol, volmon, fr_mv)
Definition surf_mass.F:35
subroutine surf_mass_com(icbag, rcbag, nca, idsurf, mass, vel)
Definition surf_mass.F:157
subroutine surf_mass_fvm(ntgi, itag, elfmass, mass, elfvel, vel, elsini)
Definition surf_mass.F:121