OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anim_nodal_contour_fvmbags.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!|| anim_nodal_contour_fvmbags ../engine/source/output/anim/generate/anim_nodal_contour_fvmbags.f
25!||--- called by ------------------------------------------------------
26!|| nodald ../engine/source/output/anim/generate/nodald.f
27!|| nodaldt ../engine/source/output/anim/generate/nodaldt.F
28!|| nodalp ../engine/source/output/anim/generate/nodalp.F
29!|| nodalssp ../engine/source/output/anim/generate/nodalssp.F
30!|| nodalt ../engine/source/output/anim/generate/nodalt.F
31!|| nodalvol ../engine/source/output/anim/generate/nodalvol.F
32!||--- uses -----------------------------------------------------
33!|| fvbag_mod ../engine/share/modules/fvbag_mod.F
34!|| groupdef_mod ../common_source/modules/groupdef_mod.F
35!||====================================================================
36 SUBROUTINE anim_nodal_contour_fvmbags(KEY, WA4, MONVOL,VOLMON, FVDATA_P, NFVBAG, SMONVOL, SVOLMON, AIRBAGS_TOTAL_FVM,
37 . IS_WRITTEN_NODE_FVM, AIRBAGS_NODE_ID_SHIFT)
38C-----------------------------------------------
39C D e s c r i p t i o n
40C-----------------------------------------------
41C This suroutine computes nodal contour from fvmbag polyhedra (fvm case)
42C Done when requested by Engine keyword
43C pressure : /ANIM/NODA/P or /H3D/NODA/P
44C density : /ANIM/NODA/DENS or /H3D/NODA/DENS
45C temperature : /ANIM/NODA/TEMP or /H3D/NODA/TEMP
46C volume : /ANIM/NODA/ZVOL or /H3D/NODA/ZVOL
47C-----------------------------------------------
48C P r e - C o n d i t i o n s
49C-----------------------------------------------
50C none
51C-----------------------------------------------
52C M o d u l e s
53C-----------------------------------------------
54 USE fvbag_mod , only:fvbag_data !data structure definition
55 USE groupdef_mod , only:group_
56C-----------------------------------------------
57C I m p l i c i t T y p e s
58C-----------------------------------------------
59#include "implicit_f.inc"
60C-----------------------------------------------
61C C o m m o n B l o c k s
62C-----------------------------------------------
63#include "com01_c.inc"
64#include "com04_c.inc"
65#include "vect01_c.inc"
66#include "param_c.inc"
67#include "inter22.inc"
68C-----------------------------------------------
69C D u m m y A r g u m e n t s
70C-----------------------------------------------
71 CHARACTER*4, INTENT(IN) :: KEY
72 INTEGER,INTENT(IN) :: NFVBAG, SMONVOL,SVOLMON, AIRBAGS_TOTAL_FVM, AIRBAGS_NODE_ID_SHIFT
73 REAL,INTENT(INOUT) :: WA4(AIRBAGS_TOTAL_FVM)
74 my_real,INTENT(IN) :: volmon(svolmon)
75 INTEGER,INTENT(IN) :: MONVOL(SMONVOL)
76 TYPE(fvbag_data), INTENT(IN) :: FVDATA_P(NFVBAG)
77 INTEGER,INTENT(INOUT) :: IS_WRITTEN_NODE_FVM(AIRBAGS_TOTAL_FVM)
78C-----------------------------------------------
79C L o c a l V a r i a b l e s
80C-----------------------------------------------
81 INTEGER :: K1 !< index shift for MONVOL ARRAY
82 INTEGER :: NN, II !< loop
83 INTEGER :: ITYP !< monvol type (refer to read_monvol.F)
84 INTEGER :: IH3D_FLAG !< node group identifier
85 INTEGER :: NNODES !< number of nodes in group
86 INTEGER :: IFV !< FVMBAG identifier in [1, NFVBAG] where NFVBAG <= NVOLU
87 my_real :: VALUE !< polyhedron value
88 INTEGER :: K_SHIFT !< shift value for index : sum of previous NPOLH
89 INTEGER :: INDX
90C-----------------------------------------------
91C S o u r c e L i n e s
92C-----------------------------------------------
93
94
95 !loop over all airbags, skip ones which are not FVMBAG (no internal mesh)
96 ! then if grnod_id is provided get corresponding value in the output buffer WA4 depending on KEY value (pressure, temperature, density ...)
97 k1=1
98 k_shift=0
99 DO nn=1,nvolu
100 ityp=monvol(k1-1+2)
101 IF (ityp == 6.OR.ityp == 8 .OR. ityp == 11) THEN ! /MONVOL/FVMBAG, or FVMBAG1, or FVMBAG2
102 ih3d_flag = monvol(k1-1 +75) !GRNOD internal identifier in [1:NGRNOD]
103 ifv = monvol(k1-1 +45)
104 !check if grnod_id was provided, otherwise skip
105 IF(ih3d_flag == 1 .AND. ifv /= 0)THEN
106
107 IF(fvdata_p(ifv)%NPOLH > 0)THEN !if GRNOD is not empty and if there are any polyhedron
108
109 SELECT CASE (trim(key))
110
111 CASE('P','PRES')
112 DO ii=1,fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
113 VALUE = fvdata_p(ifv)%PPOLH(ii)
114 wa4(k_shift+ii) = VALUE
115 is_written_node_fvm(k_shift+ii) = 1
116 enddo! next I (next polyhedron)
117
118 CASE('T','TEMP')
119 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
120 VALUE = fvdata_p(ifv)%TPOLH(ii)
121 wa4(k_shift+ii) = VALUE
122 is_written_node_fvm(k_shift+ii) = 1
123 enddo! next I (next polyhedron)
124
125 CASE('D','DENS')
126 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
127 VALUE = fvdata_p(ifv)%RPOLH(ii)
128 wa4(k_shift+ii) = VALUE
129 is_written_node_fvm(k_shift+ii) = 1
130 enddo! next I (next polyhedron)
131
132 CASE('SSP')
133 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
134 VALUE = fvdata_p(ifv)%SSPPOLH(ii)
135 wa4(k_shift+ii) = VALUE
136 is_written_node_fvm(k_shift+ii) = 1
137 enddo! next I (next polyhedron)
138
139 CASE('DT')
140 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
141 VALUE = fvdata_p(ifv)%DTPOLH(ii)
142 wa4(k_shift+ii) = VALUE
143 is_written_node_fvm(k_shift+ii) = 1
144 enddo! next I (next polyhedron)
145
146 CASE('V', 'VOL', 'ZVOL')
147 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
148 VALUE = zero
149 IF(abs(fvdata_p(ifv)%RPOLH(ii)) > em20 )THEN
150 VALUE = fvdata_p(ifv)%MPOLH(ii) / fvdata_p(ifv)%RPOLH(ii)
151 ENDIF
152 wa4(k_shift+ii) = VALUE
153 is_written_node_fvm(k_shift+ii) = 1
154 enddo! next I (next polyhedron)
155
156 END SELECT
157
158
159
160 ENDIF !NPOLH>0>0
161 ENDIF !IH3D_FLAG>0
162 k_shift = k_shift + fvdata_p(ifv)%NPOLH
163 ENDIF ! ITYP
164 k1=k1+nimv
165
166 ENDDO !next NN
167
168 ! set minimum value to other nodes in the group (otherwise visualization may lead to unsuitable color legend/gradient)
169 IF(k_shift < airbags_total_fvm)THEN
170 DO ii= k_shift+1,airbags_total_fvm
171 wa4(ii) = zero
172 is_written_node_fvm(ii) = 0
173 ENDDO
174 ENDIF
175
176
177 RETURN
178 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)
#define my_real
Definition cppsort.cpp:32
subroutine nodald(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 nodald.F:44