OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anim_nodal_vector_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_vector_fvmbags ../engine/source/output/anim/generate/anim_nodal_vector_fvmbags.F
25!||--- called by ------------------------------------------------------
26!|| h3d_nodal_vector ../engine/source/output/h3d/h3d_results/h3d_nodal_vector.F
27!||--- uses -----------------------------------------------------
28!|| fvbag_mod ../engine/share/modules/fvbag_mod.F
29!|| groupdef_mod ../common_source/modules/groupdef_mod.F
30!||====================================================================
31 SUBROUTINE anim_nodal_vector_fvmbags(KEY, WA4, MONVOL,VOLMON, FVDATA, NFVBAG, SMONVOL, SVOLMON,
32 . AIRBAGS_TOTAL_FVM_IN_H3D, IS_WRITTEN_NODE_FVM, AIRBAGS_NODE_ID_SHIFT )
33C-----------------------------------------------
34C D e s c r i p t i o n
35C-----------------------------------------------
36C This suroutine computes nodal vectors from fvmbag polyhedra (fvm case)
37C Done when requested by Engine keyword
38C velocity : /ANIM/NODA/VEL or /H3D/NODA/VEL
39C-----------------------------------------------
40C P r e - C o n d i t i o n s
41C-----------------------------------------------
42C none
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE groupdef_mod , only:group_
47 USE fvbag_mod , only:fvbag_data !data structure definition
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "com01_c.inc"
56#include "com04_c.inc"
57#include "vect01_c.inc"
58#include "param_c.inc"
59#include "inter22.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 CHARACTER*4, INTENT(IN) :: KEY
64 INTEGER,INTENT(IN) :: NFVBAG, SMONVOL,SVOLMON,AIRBAGS_TOTAL_FVM_IN_H3D, AIRBAGS_NODE_ID_SHIFT
65 my_real,INTENT(INOUT) :: wa4(3,airbags_total_fvm_in_h3d)
66 my_real,INTENT(IN) :: volmon(svolmon)
67 INTEGER,INTENT(IN) :: MONVOL(SMONVOL)
68 TYPE(fvbag_data), INTENT(IN) :: FVDATA(NFVBAG)
69 INTEGER,INTENT(INOUT) :: IS_WRITTEN_NODE_FVM(AIRBAGS_TOTAL_FVM_IN_H3D)
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER :: K1 !< index shift for MONVOL ARRAY
74 INTEGER :: NN, II !< loop
75 INTEGER :: ITYP !< monvol type (refer to read_monvol.F)
76 INTEGER :: IH3D_FLAG !< node group identifier
77 INTEGER :: NNODES !< number of nodes in group
78 INTEGER :: IFV !< FVMBAG identifier in [1, NFVBAG] where NFVBAG <= NVOLU
79 INTEGER :: nodeID !< node identifier (internal)
80 my_real :: value(3) !< polyhedron value
81 INTEGER :: K_SHIFT !< shift value for index : sum of previous NPOLH
82 INTEGER :: INDX
83C-----------------------------------------------
84C S o u r c e L i n e s
85C-----------------------------------------------
86
87
88 !loop over all airbags, skip ones which are not FVMBAG (no internal mesh)
89 ! then if grnod_id is provided get corresponding value in the output buffer WA4 depending on KEY value (pressure, temperature, density ...)
90 k1=1
91 k_shift=0
92 DO nn=1,nvolu
93 ityp=monvol(k1-1+2)
94 IF (ityp == 6.OR.ityp == 8 .OR. ityp == 11) THEN ! /MONVOL/FVMBAG, or FVMBAG1, or FVMBAG2
95 ih3d_flag = monvol(k1-1 +75) !GRNOD internal identifier in [1:NGRNOD]
96 ifv = monvol(k1-1 +45)
97 !check if grnod_id was provided, otherwise skip
98 IF(ih3d_flag == 1 .AND. ifv /= 0)THEN
99
100 IF(fvdata(ifv)%NPOLH > 0)THEN !if GRNOD is not empty and if there are any polyhedrong
101
102 SELECT CASE (trim(key))
103
104 CASE('VEL')
105 DO ii=1,fvdata(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
106 value(1:3) = zero
107 IF(fvdata(ifv)%MPOLH(ii) /= zero)THEN
108 value(1) = fvdata(ifv)%QPOLH(1,ii) / fvdata(ifv)%MPOLH(ii)
109 value(2) = fvdata(ifv)%QPOLH(2,ii) / fvdata(ifv)%MPOLH(ii)
110 value(3) = fvdata(ifv)%QPOLH(3,ii) / fvdata(ifv)%MPOLH(ii)
111 ENDIF
112 wa4(1:3,k_shift+ii) = value(1:3)
113 is_written_node_fvm(k_shift+ii) = 1
114 enddo! next I (next polyhedron)
115
116 END SELECT
117
118 ENDIF !NPOLH>0>0
119 ENDIF !IH3D_FLAG>0
120 k_shift = k_shift+fvdata(ifv)%NPOLH
121 ENDIF ! ityp
122 k1=k1+nimv
123
124 ENDDO !next NN
125
126 ! set minimum value to other nodes in the group (otherwise visualization may lead to unsuitable color legend/gradient)
127 IF(k_shift < airbags_total_fvm_in_h3d)THEN
128 DO ii= k_shift+1, airbags_total_fvm_in_h3d
129 wa4(1:3, ii) = zero
130 is_written_node_fvm(ii) = 0
131 ENDDO
132 ENDIF
133
134
135 RETURN
136 END
subroutine anim_nodal_vector_fvmbags(key, wa4, monvol, volmon, fvdata, nfvbag, smonvol, svolmon, airbags_total_fvm_in_h3d, is_written_node_fvm, airbags_node_id_shift)
#define my_real
Definition cppsort.cpp:32