OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
h3d_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 h3d_velvecz22 (elbuf_tab, iparg, ipari, igrnod, x, ixs, ixq, itab, iflg, iok_part, is_written_node, nodal_vector)

Function/Subroutine Documentation

◆ h3d_velvecz22()

subroutine h3d_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,
integer, dimension(*), intent(in) iok_part,
integer, dimension(*), intent(in) is_written_node,
dimension(3,*), intent(inout) nodal_vector )

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