OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
anim_nodal_vector_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_vector_fvmbags (key, wa4, monvol, volmon, fvdata, nfvbag, smonvol, svolmon, airbags_total_fvm_in_h3d, is_written_node_fvm, airbags_node_id_shift)

Function/Subroutine Documentation

◆ anim_nodal_vector_fvmbags()

subroutine anim_nodal_vector_fvmbags ( character*4, intent(in) key,
dimension(3,airbags_total_fvm_in_h3d), intent(inout) wa4,
integer, dimension(smonvol), intent(in) monvol,
dimension(svolmon), intent(in) volmon,
type(fvbag_data), dimension(nfvbag), intent(in) fvdata,
integer, intent(in) nfvbag,
integer, intent(in) smonvol,
integer, intent(in) svolmon,
integer, intent(in) airbags_total_fvm_in_h3d,
integer, dimension(airbags_total_fvm_in_h3d), intent(inout) is_written_node_fvm,
integer, intent(in) airbags_node_id_shift )

Definition at line 31 of file anim_nodal_vector_fvmbags.F.

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
#define my_real
Definition cppsort.cpp:32
type(fvbag_data), dimension(:), allocatable fvdata
Definition fvbag_mod.F:128
integer airbags_total_fvm_in_h3d
Definition fvbag_mod.F:191