OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
nodalt.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!|| nodalt ../engine/source/output/anim/generate/nodalt.F
25!||--- called by ------------------------------------------------------
26!|| genani ../engine/source/output/anim/generate/genani.F
27!|| h3d_nodal_scalar ../engine/source/output/h3d/h3d_results/h3d_nodal_scalar.F
28!||--- calls -----------------------------------------------------
29!|| anim_nodal_contour_fvmbags ../engine/source/output/anim/generate/anim_nodal_contour_fvmbags.f
30!||--- uses -----------------------------------------------------
31!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
32!|| fvbag_mod ../engine/share/modules/fvbag_mod.F
33!|| groupdef_mod ../common_source/modules/groupdef_mod.F
34!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
35!|| i22edge_mod ../common_source/modules/interfaces/cut-cell-buffer_mod.F
36!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
37!|| initbuf_mod ../engine/share/resol/initbuf.F
38!||====================================================================
39 SUBROUTINE nodalt(IFUNC , WA4 , WA4_FVM, IFLOW , RFLOW,
40 . IPARG , ELBUF_TAB, IX , NIX , NUMEL,
41 . ITAB , NV46 , MONVOL , VOLMON , AIRBAGS_TOTAL_FVM_IN_H3D,
42 . IS_WRITTEN_NODE,IS_WRITTEN_NODE_FVM, ISPMD, FVDATA_P,
43 . SWA4 , AIRBAGS_NODE_ID_SHIFT)
44C-----------------------------------------------
45C D e s c r i p t i o n
46C-----------------------------------------------
47C This subroutine defines & writes nodal temperature requested by Engine keywords /H3D/NODA/TEMP or /ANIMNODA/TEMP
48C application : /MONVOL/FVMBAG* (temperature from polyhedra, specific buffer).
49C ELEMS (values expanded to adjacent nodes)
50C-----------------------------------------------
51C P r e - C o n d i t i o n s
52C-----------------------------------------------
53C Tested below during NG LOOP : IALEL > 0
54C where IALEL =IPARG(7,NG)+IPARG(11,NG)
55C-----------------------------------------------
56C M o d u l e s
57C-----------------------------------------------
58 USE initbuf_mod
59 USE elbufdef_mod
61 USE i22edge_mod
62 USE i22tri_mod
63 USE fvbag_mod , only:fvbag_data,nfvbag
64 USE groupdef_mod , only:group_
65C-----------------------------------------------
66C I m p l i c i t T y p e s
67C-----------------------------------------------
68#include "implicit_f.inc"
69C-----------------------------------------------
70C C o m m o n B l o c k s
71C-----------------------------------------------
72#include "com01_c.inc"
73#include "com04_c.inc"
74#include "vect01_c.inc"
75#include "param_c.inc"
76#include "inter22.inc"
77#include "tabsiz_c.inc"
78C-----------------------------------------------
79C D u m m y A r g u m e n t s
80C-----------------------------------------------
81 INTEGER,INTENT(IN) :: NUMEL, IFUNC, NIX, NV46,ITAB(NUMNOD), ISPMD, SWA4, AIRBAGS_NODE_ID_SHIFT
82 INTEGER,INTENT(IN) :: IFLOW(*),IPARG(NPARG,NGROUP),IX(NIX,NUMEL)
83 my_real,INTENT(IN) :: RFLOW(*)
84 INTEGER,INTENT(IN) :: AIRBAGS_TOTAL_FVM_IN_H3D
85 REAL,INTENT(INOUT) :: WA4(SWA4),WA4_FVM(AIRBAGS_TOTAL_FVM_IN_H3D)
86 TYPE (ELBUF_STRUCT_), INTENT(IN), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
87 INTEGER,INTENT(IN) :: MONVOL(SMONVOL)
88 my_real,INTENT(IN) :: volmon(svolmon)
89 INTEGER,INTENT(INOUT) :: IS_WRITTEN_NODE_FVM(AIRBAGS_TOTAL_FVM_IN_H3D),IS_WRITTEN_NODE(NUMNOD)
90 TYPE(fvbag_data),INTENT(IN) :: FVDATA_P(NFVBAG)
91C-----------------------------------------------
92C L o c a l V a r i a b l e s
93C-----------------------------------------------
94 INTEGER IADI, IADR, I, ITYP, NINOUT, NNO, NEL, NELv,II1, II2,
95 . IR1, IR2, J, JJ, NNO_L, NNI_L, II3, II4, JJJ, NNI,
96 . IALEL,NNOD,IPOS,IV,NGv,IDLOCv,J1,J2,IBV
97 INTEGER MLW, NG, KCVT, II(6), NBF, NBL, IB, ICELL, NIN, MCELL
98 TYPE(g_bufel_) ,POINTER :: GBUF,GBUFv
99 my_real, ALLOCATABLE, DIMENSION(:) :: COUNT_VOL
100 my_real V,T
101 INTEGER,DIMENSION(:,:), POINTER :: pAdjBRICK
102 INTEGER G_VOL
103 INTEGER G_TEMP
104C-----------------------------------------------
105C S o u r c e L i n e s
106C-----------------------------------------------
107
108 nnod = nix-3 !8-node brick or 4-node quad
109
110 IF(int22==0)THEN
111C------------------------------------------------------------------
112C DEFAULT - ALL ELEMS (HEXA,PENTA, SHELL, QUAD, ..)
113C expand elem temperature to its nodes
114C------------------------------------------------------------------
115 ALLOCATE(count_vol(numnod))
116 count_vol(:) = 0
117 DO ng = 1, ngroup
118 nel =iparg(2,ng)
119 nft =iparg(3,ng)
120 ityp =iparg(5,ng)
121 ialel =iparg(7,ng)+iparg(11,ng)
122 IF(ityp/=1 .AND. ityp/=2)cycle
123 !IF(IALEL==0)CYCLE
124 gbuf => elbuf_tab(ng)%GBUF
125 g_vol=elbuf_tab(ng)%GBUF%G_VOL
126 g_temp = elbuf_tab(ng)%GBUF%G_TEMP
127 DO i=1,nel
128 IF (g_vol > 0 .AND. g_temp > 0)THEN
129 t = gbuf%TEMP(i)
130 v = gbuf%VOL(i)
131 ELSE ! Volume is not computet with Void properties
132 t=zero
133 v=zero
134 ENDIF
135 DO j=2,nnod+1
136 jj=ix(j,nft+i)
137 wa4(jj)=wa4(jj)+v*t !cumulated quantity
138 count_vol(jj) = count_vol(jj) + v !cumulated volume
139 is_written_node(jj)=1
140 ENDDO
141 ENDDO
142 ENDDO
143 !applying weight factor
144 DO i=1,numnod
145 IF(count_vol(i)/=zero)THEN
146 wa4(i)=wa4(i)/count_vol(i)
147 ENDIF
148 ENDDO
149 DEALLOCATE(count_vol)
150
151C------------------------------------------------------------------
152C CUT CELLS (INTER TYPE 22)
153C------------------------------------------------------------------
154 ELSEIF(int22>0)THEN
155 !---------------------------------------------------------!
156 ! /INTER/TYPE22 !
157 !---------------------------------------------------------!
158 !1. TAG FOR CUT CELLS !
159 !2. COMPUTE NODAL TEMPERATURE !
160 ! NOT INTERSECTED : NODAL T COMPUTED FROM GLOBAL BUF !
161 ! INTERSECTED : NODAL T COMPUTED FROM SUBVOLUME !
162 !---------------------------------------------------------!
163 ALLOCATE(count_vol(numnod))
164 count_vol = 0
165 nbf = 1
166 nbl = nb
167 nin = 1
168 !---1. COMPUTE NODAL PRESSURE---!
169 DO ng = 1, ngroup
170 nel =iparg(2,ng)
171 nft =iparg(3,ng)
172 ityp =iparg(5,ng)
173 ialel =iparg(7,ng)+iparg(11,ng)
174 IF(ityp/=1 .AND. ityp/=2)cycle
175 IF(ialel==0)cycle
176 gbuf => elbuf_tab(ng)%GBUF
177 DO i=1,nel
178 ib = nint(gbuf%TAG22(i))
179 !---------------------------!
180 ! NOT A CUT CELL !
181 !---------------------------!
182 IF(ib>0)THEN
183 IF(brick_list(nin,ib)%NBCUT==0)ib=0 !in cut cell buffer but not partitioned (because it is adjacent to a cut cell)
184 ENDIF
185 IF(ib==0)THEN
186 t = gbuf%TEMP(i)
187 v = gbuf%VOL(i)
188 DO j=2,nnod+1
189 jj=ix(j,nft+i)
190 wa4(jj)=wa4(jj)+ t*v !cumulated quantity
191 count_vol(jj) = count_vol(jj) + v !cumulated volume
192 is_written_node(jj)=1
193 ENDDO
194 !---------------------------!
195 ! CUT CELL !
196 !---------------------------!
197 ELSE
198 nin = 1
199 ib = nint(gbuf%TAG22(i))
200 mcell = brick_list(nin,ib)%MainID
201 nel = iparg(2,ng)
202 DO j=2,nnod+1
203 jj=ix(j,nft+i)
204 is_written_node(jj)=1
205 icell=brick_list(nin,ib)%NODE(j-1)%WhichCell
206 IF(icell == mcell)THEN
207 t = gbuf%TEMP(i)
208 v = gbuf%VOL(i)
209 ELSE
210 padjbrick => brick_list(nin,ib)%Adjacent_Brick(1:6,1:5)
211 ipos = brick_list(nin,ib)%POLY(icell)%WhereIsMain(1)
212 IF(ipos<=nv46)THEN
213 iv = brick_list(nin,ib)%Adjacent_Brick(ipos,1)
214 ngv = brick_list(nin,ib)%Adjacent_Brick(ipos,2)
215 idlocv = brick_list(nin,ib)%Adjacent_Brick(ipos,3)
216 nelv = iparg(2,ngv)
217 ELSE
218 j1 = ipos/10
219 j2 = mod(ipos,10)
220 ibv = brick_list(nin,ib )%Adjacent_Brick(j1,4)
221 iv = brick_list(nin,ibv)%Adjacent_Brick(j2,1)
222 ngv = brick_list(nin,ibv)%Adjacent_Brick(j2,2)
223 idlocv = brick_list(nin,ibv)%Adjacent_Brick(j2,3)
224 nelv = iparg(2,ngv)
225 ENDIF
226 gbufv => elbuf_tab(ngv)%GBUF
227 t = gbufv%TEMP(idlocv)
228 v = gbufv%VOL(idlocv)
229 ENDIF
230 wa4(jj)=wa4(jj)+t*v
231 count_vol(jj) = count_vol(jj) + v
232 ENDDO
233 ENDIF
234 ENDDO
235 ENDDO
236 !applying weight factor
237 DO i=1,numnod
238 IF(count_vol(i)/=zero)THEN
239 wa4(i)=wa4(i)/count_vol(i)
240 ENDIF
241 ENDDO
242 DEALLOCATE(count_vol)
243 ENDIF
244
245C------------------------------------------------------------------
246C /MONVOL/FVMBAG*
247C set temperature from polyhedra centroids
248C------------------------------------------------------------------
249 IF(nfvbag > 0 .AND. ispmd == 0 .AND. airbags_total_fvm_in_h3d > 0)THEN
250 CALL anim_nodal_contour_fvmbags('TEMP', wa4_fvm, monvol , volmon , fvdata_p ,
251 . nfvbag, smonvol, svolmon, airbags_total_fvm_in_h3d, is_written_node_fvm,
252 . airbags_node_id_shift)
253
254 ENDIF
255
256
257 RETURN
258 END
subroutine anim_nodal_contour_fvmbags(key, wa4, monvol, volmon, fvdata_p, nfvbag, smonvol, svolmon, airbags_total_fvm, is_written_node_fvm, airbags_node_id_shift)
integer nfvbag
Definition fvbag_mod.F:127
type(brick_entity), dimension(:,:), allocatable, target brick_list
subroutine nodalt(ifunc, wa4, wa4_fvm, iflow, rflow, iparg, elbuf_tab, ix, nix, numel, itab, nv46, monvol, volmon, airbags_total_fvm_in_h3d, is_written_node, is_written_node_fvm, ispmd, fvdata_p, swa4, airbags_node_id_shift)
Definition nodalt.F:44