OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
h3d_velvecz22.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!|| h3d_velvecz22 ../engine/source/output/h3d/h3d_results/h3d_velvecz22.F
25!||--- called by ------------------------------------------------------
26!|| h3d_nodal_vector ../engine/source/output/h3d/h3d_results/h3d_nodal_vector.F
27!||--- calls -----------------------------------------------------
28!|| h3d_write_vector ../engine/source/output/h3d/h3d_results/h3d_write_vector.F
29!||--- uses -----------------------------------------------------
30!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
31!|| groupdef_mod ../common_source/modules/groupdef_mod.F
32!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
33!|| i22edge_mod ../common_source/modules/interfaces/cut-cell-buffer_mod.F
34!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
35!|| initbuf_mod ../engine/share/resol/initbuf.F
36!||====================================================================
37 SUBROUTINE h3d_velvecz22(ELBUF_TAB,IPARG,IPARI,IGRNOD,X,IXS,IXQ,ITAB,IFLG,
38 . IOK_PART,IS_WRITTEN_NODE,NODAL_VECTOR)
39C-----------------------------------------------
40C D e s c r i p t i o n
41C-----------------------------------------------
42C This subroutines writes velocities & internal forces at face
43C centers for coupling interface 22. Free nodes are used as
44C marker to plot centroid vectors (see input card for grnod_id)
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE initbuf_mod
49 USE elbufdef_mod
51 USE i22edge_mod
52 USE i22tri_mod
53 USE groupdef_mod
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57#include "implicit_f.inc"
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "com01_c.inc"
62#include "com04_c.inc"
63#include "param_c.inc"
64#include "inter22.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 INTEGER, INTENT(IN) :: IPARG(NPARG,*), IPARI(NPARI,*),IXS(NIXS,*),IXQ(NIXQ,*)
69 INTEGER, INTENT(IN) :: ITAB(NUMNOD),IFLG
70 INTEGER, INTENT(IN) :: IOK_PART(*),IS_WRITTEN_NODE(*)
71 my_real, INTENT(INOUT) :: x(3,numnod)
72 my_real, INTENT(INOUT) :: nodal_vector(3,*)
73 REAL R4
74 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
75 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
76C-----------------------------------------------
77C L o c a l A r g u m e n t s
78C-----------------------------------------------
79 INTEGER :: ICELLM,NCELL,NBF,NBL,ICELL,NIN,NODE_ID,IB,NG,I
80 INTEGER :: IAD0, NNODES, II, NFACE, J, K, IE,IGR
81 my_real :: rho_cell, rho(4)
82 REAL,DIMENSION(:,:),ALLOCATABLE :: BUFFER
83 LOGICAL :: lStillNode
84 my_real value(3)
85C-----------------------------------------------
86C P r e - C o n d i t i o n s
87C-----------------------------------------------
88 nin = 1
89 IF(int22==0) RETURN
90 IF(ipari(82,nin)==0)RETURN
91C-----------------------------------------------
92C S o u r c e C o d e
93C-----------------------------------------------
94 !---------------------------------------------------------!
95 nbf = 1
96 nbl = nb
97 ALLOCATE(buffer(3,numnod))
98 buffer(:,:) = zero
99 !---------------------------------------------------------!
100
101 lstillnode = .true.
102 igr = ipari(82,nin)
103 nnodes = igrnod(igr)%NENTITY
104 IF(nnodes==0)RETURN
105 ii = 1 ! start with the first node of the group
106 DO ib=nbf,nbl
107 ie = brick_list(nin,ib)%ID
108 icell = 0
109 ncell = brick_list(nin,ib)%NBCUT
110 DO WHILE (icell<=ncell) ! loop on polyhedron {1:NCELL} U {9}
111 icell = icell +1
112 IF (icell>ncell .AND. ncell/=0)icell=9
113 IF(.NOT.lstillnode) cycle
114 ! nFACE = BRICK_LIST(NIN,IB)%NFACE_Cell(ICELL)
115 DO j=1, 6
116 IF(ii>nnodes)THEN
117 lstillnode = .false.
118 print *, "** Warning inter22 : no more node in group to mark cell center"
119 EXIT
120 ENDIF
121 node_id = igrnod(igr)%ENTITY(ii)
122 IF(iflg==1)THEN
123 !velocity at faces
124 buffer(1,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(1)
125 buffer(2,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(2)
126 buffer(3,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(3)
127 ELSEIF(iflg==2)THEN
128 !internal forces at face int(P.dS)
129 buffer(1,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(1)
130 buffer(2,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(2)
131 buffer(3,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(3)
132 ELSE
133 buffer(1,node_id) = zero
134 buffer(2,node_id) = zero
135 buffer(3,node_id) = zero
136 ENDIF
137 ii = ii + 1 !next node
138 ENDDO
139 ENDDO !next ICELL
140 enddo!next IB
141
142 DO ii=1,nnodes
143 node_id = igrnod(igr)%ENTITY(ii)
144 x(1:3,node_id) = zero
145 ENDDO
146
147 DO i=1,numnod
148 value(1)=buffer(1,i)
149 value(2)=buffer(2,i)
150 value(3)=buffer(3,i)
151 CALL h3d_write_vector(iok_part,is_written_node,nodal_vector,i,0,0,
152 . VALUE)
153 ENDDO
154
155 DEALLOCATE(buffer)
156
157C-----------------------------------------------
158 RETURN
159 END
#define my_real
Definition cppsort.cpp:32
subroutine h3d_velvecz22(elbuf_tab, iparg, ipari, igrnod, x, ixs, ixq, itab, iflg, iok_part, is_written_node, nodal_vector)
subroutine h3d_write_vector(iok_part, is_written, vector, i, offset, nft, value)
type(brick_entity), dimension(:,:), allocatable, target brick_list