OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cut-cell-buffer_mod.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!|| i22edge_mod ../common_source/modules/interfaces/cut-cell-buffer_mod.F
25!||--- called by ------------------------------------------------------
26!|| anim_nodal_p_elems ../engine/source/output/anim/generate/anim_nodal_p_elems.F
27!|| h3d_velvecc22 ../engine/source/output/h3d/h3d_results/h3d_velvecc22.F
28!|| h3d_velvecz22 ../engine/source/output/h3d/h3d_results/h3d_velvecz22.F
29!|| i22buce ../engine/source/interfaces/intsort/i22buce.F
30!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
31!|| i22cor3 ../engine/source/interfaces/int22/i22cor3.F
32!|| i22get_prev_data ../engine/source/interfaces/int22/i22get_prev_data.F
33!|| i22ident ../engine/source/interfaces/int22/i22ident.F
34!|| i22intersect ../engine/source/interfaces/int22/i22intersect.F
35!|| i22subvol ../engine/source/interfaces/int22/i22subvol.F
36!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
37!|| i22trivox ../engine/source/interfaces/intsort/i22trivox.F
38!|| int22listcombi ../engine/source/interfaces/int22/int22ListCombi.F
39!|| nodal_schlieren ../engine/source/output/anim/generate/nodal_schlieren.F
40!|| nodald ../engine/source/output/anim/generate/nodald.F
41!|| nodalt ../engine/source/output/anim/generate/nodalt.F
42!|| nodalvfrac ../engine/source/output/anim/generate/nodalvfrac.F
43!|| nodalzvol ../engine/source/output/anim/generate/nodalzvol.F
44!|| resol ../engine/source/engine/resol.F
45!|| velvecc22 ../engine/source/output/anim/generate/velvec.F
46!|| velvecz22 ../engine/source/output/anim/generate/velvecz22.F
47!||====================================================================
49
50#include "my_real.inc"
51
52 INTEGER,ALLOCATABLE,DIMENSION(:) :: nbold
53 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: list_b_old
54 INTEGER,DIMENSION(:,:),ALLOCATABLE :: iiad22
55 INTEGER,DIMENSION(:) ,ALLOCATABLE :: ngb, idb, nelb, idlocb
56 my_real,DIMENSION(:) ,ALLOCATABLE :: v22max_l, dx22min_l !kinematic time step
57
58 my_real,ALLOCATABLE,DIMENSION(:,:,:) :: uvarl ! multi-material merging
59 my_real,ALLOCATABLE,DIMENSION(:,:) :: eint_l ! mono material only
60 my_real,ALLOCATABLE,DIMENSION(:,:) :: rho_l ! mono material only
61 my_real,ALLOCATABLE,DIMENSION(:,:,:) :: mom_l ! mono material only
62 my_real,ALLOCATABLE,DIMENSION(:,:,:) :: sig_l ! mono material only
63 my_real,ALLOCATABLE,DIMENSION(:,:,:) :: vold_l ! mono material only
64 my_real,ALLOCATABLE,DIMENSION(:,:,:) :: supercellvol_l ! geometrical (both multi and mono material)
65 INTEGER,ALLOCATABLE,DIMENSION(:,:,:) :: unlinked_cells_l
66 INTEGER,ALLOCATABLE,DIMENSION(:) :: n_unlinked_l
67 INTEGER,ALLOCATABLE,DIMENSION(:) :: imergel
68
70 INTEGER ,DIMENSION(2) :: node
71 INTEGER :: nbcut !number of intersection points on edge
72 INTEGER :: cutshell(2)
73 my_real, DIMENSION(2) :: cutcoor !local coordinates 1D on edge N1->N2
74 my_real, DIMENSION(3,2) :: cutpoint !coordinates x,y,z
75 my_real, DIMENSION(3,2) :: cutvel !velocity of intersection point
76 my_real, DIMENSION(3) :: vector
77 my_real :: len
78 END TYPE edge_entity
79
81 my_real :: n(3) !normal vector
82 my_real :: b(3) !basis
83 my_real :: scut(1) !Cut Area
84 my_real :: seff(1) !Effective Section = Wetted Surface : Cut Aera - Holes (computed by suming lagrangian projection)
85 my_real :: p(3,8) !Cut Surface Polygon (coordinates)
86 my_real :: vel(3)
87 INTEGER :: np !Cut Surface Polygon (number of points) ! NP<=6 | NP<=8 for additional Scut (closed surface hypothesis)
88 END TYPE
89
91 INTEGER :: num !number of adjacent elements (level2)
92 INTEGER :: num_inv(48) !to define bijection with adjacent cut cell
93 INTEGER :: iv(48) !internal ID
94 INTEGER :: ib(48) !cut cell id
95 INTEGER :: icell(48) !secnd cell id
96 INTEGER :: secndface(48) !secnd face ID to pickup correct flux
97 END TYPE list_adj
98
100 my_real :: vol_unmerged
101 INTEGER :: num
102 INTEGER :: numsecndnodes
103 INTEGER :: fm(24) !Main face common face
104 INTEGER :: fv(24) !Secnd corresponding face
105 INTEGER :: iv(24) !brick id which contains secnd cell
106 INTEGER :: ibv(24) !cut cell address in cut cell buffer
107 INTEGER :: icellv(24) !secnd cell id
108 my_real :: vol(24) !secnd cell volume
109 my_real :: surf_v(24) !Area of linking face
110 INTEGER :: numnod_cell(24) !noeuds sommets
111 INTEGER :: listnodid(24,8) !Global nodes ID (max8) describing the cell, for each of 9 cells
112 END TYPE list_secnd
113
115 INTEGER :: numpoint !gives number of points (node+intersec.pts) on a given cell face (%NumPOINT_Face(6,9))
116 INTEGER :: nadjcell !Number of adjacent cell for a given cell 1:9 and a given face 1:6 (%NAdjCell(9,6) )
117 INTEGER :: adjacent_cell(5) !index3: IADJ (adjacent cell id 1:%NAdjCell)
118 my_real :: adjacent_flux(5) !1 adjacent cell = 1 flux (plus pratique pour maillage non conforme)
119 my_real :: adjacent_upwflux(5)
120 my_real :: center(3) !Centroides des facettes de polyedres
121 my_real :: surf !face0=intersection surface
122 my_real :: vel(3) !velocity on polyhedra faces. Face 0 is for further implementation for porosity. Computed in i22subvol to take into account lagrangian vel.
123 my_real :: f_face(3) !FVM force on faces (and also velocity storage)
124 my_real :: u_n
125 my_real :: w(3)
126 END TYPE polyface_entity
127
129 INTEGER :: numpoint !gives number of points (node+intersec.pts) on a given cell face (%NumPOINT_Face(6,9))
130 INTEGER :: nadjcell !Number of adjacent cell for a given cell 1:9 and a given face 1:6 (%NAdjCell(9,6) )
131 !INTEGER :: Adjacent_Cell(5) !index3: IADJ (adjacent cell id 1:%NAdjCell)
132 !my_real :: Adjacent_FLUX(5) !1 adjacent cell = 1 flux (plus pratique pour maillage non conforme)
133 !my_real :: Adjacent_upwFLUX(5)
134 my_real :: center(3) !polyhedra Centroid
135 my_real :: surf !face0=intersection surface
136 my_real :: f_face(3) !FVM force on faces (and also velocity storage)
137 my_real :: u_n(9) !%U_N(index<=4) face0 is cut surface : can be the union of max. 4 cut polygons
138 !possible optimization : 1 single U_N per polyhedron ipoly <9
139 my_real :: w(3)
140
141 END TYPE polyface_entity_2
142
144 my_real :: rho
145 my_real :: rhoe
146 my_real :: rhou(3)
147 my_real :: sig(6)
148 my_real :: ssp
149 my_real, ALLOCATABLE,DIMENSION(:) :: uvar !law37:size=5 !law51:size=N0PHAS+4*NVPHAS !0:otherwise
150 END TYPE mat_entity
151
153 INTEGER :: numnod !vertexes (%NumNOD_Cell(9))
154 INTEGER :: numpoint !total number of intersection point which describes the volume (%NumPOINT_Cell(9))
155 INTEGER :: listnodid(8) !Global nodes ID (max8) describing the cell, for each of 9 cells (%ListNodID(8,9))
156 INTEGER :: ismain !=1 main =0:secnd (index is icell) (%IsMain(9))
157 INTEGER :: whereismain(4) !locate main cell to link with index1 : ICELL, index2: (1)face, (2):icellm, (3):IDm, (4):IBm !(%WhereIsMain(9,4))
158 INTEGER :: id_free_node !post-treatment (!ID_FREE_NODE(9) )
159 my_real :: adjacent_flu1 ! Adjacent_FLU1(9)
160 my_real :: ddvol !d/dT (DELTA V)
161 my_real :: ddvol_upw
162 my_real :: phi !data for convection (mass or energy)
163 my_real :: dphi !convected increment (mass or energy)
164 my_real :: vfracm(4) !main cell VFRAC
165 my_real :: vnew !subvolumes (if exists)
166 my_real :: vold
167 my_real :: old_vnew
168 my_real :: cellcenter(3) !centroid of control volume
169 my_real :: dvol(0:2) !index1:0:previous,1=real,2=prediction index2 :0-9=icell (0=supercell)
170 my_real :: cutface
171 my_real :: dm
172 TYPE(polyface_entity_2) :: face0
173 TYPE(polyface_entity) :: face(1:6)
174 !TYPE(MAT_ENTITY) :: MAT
175 END TYPE poly_entity
176
178 INTEGER :: old_whichcell ! [1,8] -> [1,9]
179 INTEGER :: whichcell !node local id in[1,8] -> [1,9] = local cut cell id.
180 INTEGER :: nodwasmain !=1 belonged to the main cell, 0 otherwise. (index is brick node)
181 INTEGER :: wherewasmain !index=node : result=face
182 END TYPE node_entity
183
185 INTEGER :: id
186 INTEGER :: ng
187 INTEGER :: idloc
188 INTEGER :: icode
189 INTEGER :: old_icode
190 INTEGER :: idble
191 INTEGER :: nbits
192 INTEGER :: npqts
193 INTEGER :: nbcut !number of cut planes
194 INTEGER :: mainid
195 INTEGER :: wascut
196 INTEGER :: newinbuffer
197 INTEGER :: oldmainstrongnode
198 INTEGER :: mlw
199 INTEGER :: itask
200 INTEGER :: secid_cell(8) !cut local id in [1,8] -> [1,52] = sec type. Each possible cut is numbered from 1 to 52 ; 8 nodes => 8 possible cut cells
201 INTEGER :: seg_add_lft !EL FIRST : first lagrangian face in CAND_E
202 INTEGER :: seg_add_llt !EL LAST : last lagrangian face in CAND_E
203 INTEGER :: adjacent_brick(6,5) !index2: 1:IV, 2:NGV, 3:IDLOCV, 4:IBV, 5:IFV
204 INTEGER :: mergetarget(3,5) !index1 (1)=Face (2)=MCELL, (3)=IB
205 INTEGER :: ntarget !number of merged location
206 INTEGER :: closedsurf(6) !tells if brick face has a double cut (only for multiple cut, in this case cell 9 has no adjacent cells, only for contact forces to get pressure differential)
207 INTEGER :: ismergetarget
208 my_real :: n(6,3) !unitary normal vector on each 6 faces
209 my_real :: vnew_scell !SuperCell volume (if exists)
210 my_real :: vold_scell !volume main (if exists) : need for epsdot in sigeps51, merge/demerge, link switching , srho3
211 my_real :: scellcenter(3) !SuperCell centroid
212 my_real :: face_brick(6)
213 my_real :: uncutvol !brick volume. the one in gbuf can up extended if secnd is merged.
214 my_real :: fcell(3) !FVM force on centroid
215 my_real :: fext_cell(3)
216 my_real :: sig(0:6) !0 is pressure 1:6 is tensor
217 my_real :: rhoc
218 my_real :: mach
219 my_real :: dvol
220 my_real :: poly9wonodes(6,2) !Poly9woNodes(1:6,1) : tells if polygona has no nodes
221 !Poly9woNodes(1:6,2) : tells about adjacent cell 0=closed surface 1=communication with adjacent cell
222 TYPE(poly_entity) :: poly(9)
223 TYPE(node_entity) :: node(8)
224 TYPE(list_adj) :: adj_elems !to be cleaned ?
225 TYPE(cut_plane) :: pcut(16)
226 TYPE(list_secnd) :: secndlist !list of secnd cells linked to the given main cell
227 TYPE(edge_entity) :: Edge(12) !list of edges for velocity or coordinates
228 CHARACTER*14 :: SECTYPE(8)
229 TYPE(mat_entity) :: bakmat
230 END TYPE brick_entity
231
232
233 TYPE(list_secnd),DIMENSION(:,:),ALLOCATABLE :: old_secndlist
234
235
236 END MODULE
#define my_real
Definition cppsort.cpp:32
initmumps id
integer, dimension(:), allocatable imergel
integer, dimension(:), allocatable idb
type(list_secnd), dimension(:,:), allocatable old_secndlist
integer, dimension(:,:), allocatable list_b_old
integer, dimension(:), allocatable ngb
integer, dimension(:), allocatable n_unlinked_l
integer, dimension(:,:,:), allocatable unlinked_cells_l
integer, dimension(:), allocatable nelb
integer, dimension(:,:), allocatable iiad22
integer, dimension(:), allocatable nbold
integer, dimension(:), allocatable idlocb