OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
velvecz22.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "inter22.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine velvecz22 (elbuf_tab, iparg, ipari, igrnod, x, ixs, ixq, itab, iflg)

Function/Subroutine Documentation

◆ velvecz22()

subroutine velvecz22 ( type (elbuf_struct_), dimension(ngroup), target elbuf_tab,
integer, dimension(nparg,*), intent(in) iparg,
integer, dimension(npari,*), intent(in) ipari,
type (group_), dimension(ngrnod) igrnod,
dimension(3,numnod), intent(inout) x,
integer, dimension(nixs,*), intent(in) ixs,
integer, dimension(nixq,*), intent(in) ixq,
integer, dimension(numnod), intent(in) itab,
integer, intent(in) iflg )

Definition at line 38 of file velvecz22.F.

40C-----------------------------------------------
41C D e s c r i p t i o n
42C-----------------------------------------------
43C This subroutines writes velocities & internal forces at face
44C centers for coupling interface 22. Free nodes are used as
45C marker to plot centroid vectors (see input card for grnod_id)
46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE initbuf_mod
50 USE elbufdef_mod
52 USE i22edge_mod
53 USE i22tri_mod
54 USE groupdef_mod
55 use element_mod , only : nixs,nixq
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 "param_c.inc"
66#include "inter22.inc"
67C-----------------------------------------------
68C D u m m y A r g u m e n t s
69C-----------------------------------------------
70 INTEGER, INTENT(IN) :: IPARG(NPARG,*), IPARI(NPARI,*),IXS(NIXS,*),IXQ(NIXQ,*)
71 INTEGER, INTENT(IN) :: ITAB(NUMNOD),IFLG
72 my_real, INTENT(INOUT) :: x(3,numnod)
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 :: NCELL, NBF, NBL, ICELL, NIN, NODE_ID, IB, I
80 INTEGER :: NNODES, II, J, IE, IGR
81
82 REAL,DIMENSION(:,:),ALLOCATABLE :: BUFFER
83 LOGICAL :: lStillNode
84C-----------------------------------------------
85C P r e - C o n d i t i o n s
86C-----------------------------------------------
87 nin = 1
88 IF(int22==0) RETURN
89 IF(ipari(82,nin)==0)RETURN
90C-----------------------------------------------
91C S o u r c e C o d e
92C-----------------------------------------------
93 !---------------------------------------------------------!
94 nbf = 1
95 nbl = nb
96 ALLOCATE(buffer(3,numnod))
97 buffer(:,:) = zero
98 !---------------------------------------------------------!
99
100 lstillnode = .true.
101 igr = ipari(82,nin)
102 nnodes = igrnod(igr)%NENTITY
103 IF(nnodes==0)RETURN
104 ii = 1 ! start with the first node of the group
105 DO ib=nbf,nbl
106 ie = brick_list(nin,ib)%ID
107 icell = 0
108 ncell = brick_list(nin,ib)%NBCUT
109 DO WHILE (icell<=ncell) ! loop on polyhedron {1:NCELL} U {9}
110 icell = icell +1
111 IF (icell>ncell .AND. ncell/=0)icell=9
112 IF(.NOT.lstillnode) cycle
113 ! nFACE = BRICK_LIST(NIN,IB)%NFACE_Cell(ICELL)
114 DO j=1, 6
115 IF(ii>nnodes)THEN
116 lstillnode = .false.
117 print *, "** Warning inter22 : no more node in group to mark cell center"
118 EXIT
119 ENDIF
120 node_id = igrnod(igr)%ENTITY(ii)
121 IF(iflg==1)THEN
122 !velocity at faces
123 buffer(1,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(1)
124 buffer(2,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(2)
125 buffer(3,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(3)
126 ELSEIF(iflg==2)THEN
127 !internal forces at face int(P.dS)
128 buffer(1,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(1)
129 buffer(2,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(2)
130 buffer(3,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(3)
131 ELSE
132 buffer(1,node_id) = zero
133 buffer(2,node_id) = zero
134 buffer(3,node_id) = zero
135 ENDIF
136 ii = ii + 1 !next node
137 ENDDO
138 ENDDO !next ICELL
139 enddo!next IB
140
141 DO ii=1,nnodes
142 node_id = igrnod(igr)%ENTITY(ii)
143 x(1:3,node_id) = zero
144 ENDDO
145
146 DO i=1,numnod
147 r4 = buffer(1,i)
148 CALL write_r_c(r4,1)
149 r4 = buffer(2,i)
150 CALL write_r_c(r4,1)
151 r4 = buffer(3,i)
152 CALL write_r_c(r4,1)
153 enddo!next I
154
155 DEALLOCATE(buffer)
156
157C-----------------------------------------------
158 RETURN
#define my_real
Definition cppsort.cpp:32
type(brick_entity), dimension(:,:), allocatable, target brick_list
void write_r_c(float *w, int *len)