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 37 of file velvecz22.F.

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 my_real, INTENT(INOUT) :: x(3,numnod)
71 REAL R4
72 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
73 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
74C-----------------------------------------------
75C L o c a l A r g u m e n t s
76C-----------------------------------------------
77 INTEGER :: ICELLM,NCELL,NBF,NBL,ICELL,NIN,NODE_ID,IB,NG,I
78 INTEGER :: IAD0, NNODES, II, NFACE, J, K, IE,IGR
79 my_real :: rho_cell, rho(4)
80 REAL,DIMENSION(:,:),ALLOCATABLE :: BUFFER
81 LOGICAL :: lStillNode
82C-----------------------------------------------
83C P r e - C o n d i t i o n s
84C-----------------------------------------------
85 nin = 1
86 IF(int22==0) RETURN
87 IF(ipari(82,nin)==0)RETURN
88C-----------------------------------------------
89C S o u r c e C o d e
90C-----------------------------------------------
91 !---------------------------------------------------------!
92 nbf = 1
93 nbl = nb
94 ALLOCATE(buffer(3,numnod))
95 buffer(:,:) = zero
96 !---------------------------------------------------------!
97
98 lstillnode = .true.
99 igr = ipari(82,nin)
100 nnodes = igrnod(igr)%NENTITY
101 IF(nnodes==0)RETURN
102 ii = 1 ! start with the first node of the group
103 DO ib=nbf,nbl
104 ie = brick_list(nin,ib)%ID
105 icell = 0
106 ncell = brick_list(nin,ib)%NBCUT
107 DO WHILE (icell<=ncell) ! loop on polyhedron {1:NCELL} U {9}
108 icell = icell +1
109 IF (icell>ncell .AND. ncell/=0)icell=9
110 IF(.NOT.lstillnode) cycle
111 ! nFACE = BRICK_LIST(NIN,IB)%NFACE_Cell(ICELL)
112 DO j=1, 6
113 IF(ii>nnodes)THEN
114 lstillnode = .false.
115 print *, "** Warning inter22 : no more node in group to mark cell center"
116 EXIT
117 ENDIF
118 node_id = igrnod(igr)%ENTITY(ii)
119 IF(iflg==1)THEN
120 !velocity at faces
121 buffer(1,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(1)
122 buffer(2,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(2)
123 buffer(3,node_id) = brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(3)
124 ELSEIF(iflg==2)THEN
125 !internal forces at face int(P.dS)
126 buffer(1,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(1)
127 buffer(2,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(2)
128 buffer(3,node_id) = -brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(3)
129 ELSE
130 buffer(1,node_id) = zero
131 buffer(2,node_id) = zero
132 buffer(3,node_id) = zero
133 ENDIF
134 ii = ii + 1 !next node
135 ENDDO
136 ENDDO !next ICELL
137 enddo!next IB
138
139 DO ii=1,nnodes
140 node_id = igrnod(igr)%ENTITY(ii)
141 x(1:3,node_id) = zero
142 ENDDO
143
144 DO i=1,numnod
145 r4 = buffer(1,i)
146 CALL write_r_c(r4,1)
147 r4 = buffer(2,i)
148 CALL write_r_c(r4,1)
149 r4 = buffer(3,i)
150 CALL write_r_c(r4,1)
151 enddo!next I
152
153 DEALLOCATE(buffer)
154
155C-----------------------------------------------
156 RETURN
#define my_real
Definition cppsort.cpp:32
type(brick_entity), dimension(:,:), allocatable, target brick_list
void write_r_c(float *w, int *len)