OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anim_nodal_contour_fvmbags.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"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ anim_nodal_contour_fvmbags()

subroutine anim_nodal_contour_fvmbags ( character*4, intent(in) key,
real, dimension(airbags_total_fvm), intent(inout) wa4,
integer, dimension(smonvol), intent(in) monvol,
dimension(svolmon), intent(in) volmon,
type(fvbag_data), dimension(nfvbag), intent(in) fvdata_p,
integer, intent(in) nfvbag,
integer, intent(in) smonvol,
integer, intent(in) svolmon,
integer, intent(in) airbags_total_fvm,
integer, dimension(airbags_total_fvm), intent(inout) is_written_node_fvm,
integer, intent(in) airbags_node_id_shift )

Definition at line 36 of file anim_nodal_contour_fvmbags.F.

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
#define my_real
Definition cppsort.cpp:32