OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
nodalt.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "vect01_c.inc"
#include "param_c.inc"
#include "inter22.inc"
#include "tabsiz_c.inc"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ nodalt()

subroutine nodalt ( integer, intent(in) ifunc,
real, dimension(swa4), intent(inout) wa4,
real, dimension(airbags_total_fvm_in_h3d), intent(inout) wa4_fvm,
integer, dimension(*), intent(in) iflow,
dimension(*), intent(in) rflow,
integer, dimension(nparg,ngroup), intent(in) iparg,
type (elbuf_struct_), dimension(ngroup), intent(in), target elbuf_tab,
integer, dimension(nix,numel), intent(in) ix,
integer, intent(in) nix,
integer, intent(in) numel,
integer, dimension(numnod), intent(in) itab,
integer, intent(in) nv46,
integer, dimension(smonvol), intent(in) monvol,
dimension(svolmon), intent(in) volmon,
integer, intent(in) airbags_total_fvm_in_h3d,
integer, dimension(numnod), intent(inout) is_written_node,
integer, dimension(airbags_total_fvm_in_h3d), intent(inout) is_written_node_fvm,
integer, intent(in) ispmd,
type(fvbag_data), dimension(nfvbag), intent(in) fvdata_p,
integer, intent(in) swa4,
integer, intent(in) airbags_node_id_shift )

Definition at line 39 of file nodalt.F.

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
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)
#define my_real
Definition cppsort.cpp:32
integer airbags_total_fvm_in_h3d
Definition fvbag_mod.F:191
integer nfvbag
Definition fvbag_mod.F:127
type(brick_entity), dimension(:,:), allocatable, target brick_list