OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alefvm_scheme.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!|| alefvm_scheme ../engine/source/ale/alefvm/alefvm_scheme.F
25!||--- called by ------------------------------------------------------
26!|| alefvm_main ../engine/source/ale/alefvm/alefvm_main.F
27!||--- calls -----------------------------------------------------
28!|| alefvm_expand_mom2 ../engine/source/ale/alefvm/alefvm_expand_mom2.F
29!||--- uses -----------------------------------------------------
30!|| alefvm_mod ../common_source/modules/ale/alefvm_mod.F
31!|| element_mod ../common_source/modules/elements/element_mod.F90
32!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
33!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
34!||====================================================================
35 SUBROUTINE alefvm_scheme (
36 1 IXS, IALEFVM_FLG,
37 2 MOM, VOL , RHO ,
38 3 IPM, IAD22 ,
39 4 SSP, SIG , NEL )
40C-----------------------------------------------
41C D e s c r i p t i o n
42C-----------------------------------------------
43C 'alefvm' is related to a collocated scheme (built from FVM and based on Godunov scheme)
44C which was temporarily introduced for experimental option /INTER/TYPE22 (FSI coupling with cut cell method)
45C This cut cell method is not completed, abandoned, and is not an official option.
46C There is no other use for this scheme which is automatically enabled when /INTER/TYPE22 is defined (INT22>0 => IALEFVM=1).
47C
48C This subroutine is treating an uncut cell.
49C-----------------------------------------------
50C M o d u l e s
51C-----------------------------------------------
52 USE alefvm_mod
53 USE i22tri_mod
55 use element_mod , only : nixs
56C-----------------------------------------------
57C I m p l i c i t T y p e s
58C-----------------------------------------------
59#include "implicit_f.inc"
60C-----------------------------------------------
61C G l o b a l P a r a m e t e r s
62C-----------------------------------------------
63#include "mvsiz_p.inc"
64C-----------------------------------------------
65C C o m m o n B l o c k s
66C-----------------------------------------------
67#include "com01_c.inc"
68#include "com04_c.inc"
69#include "com08_c.inc"
70#include "vect01_c.inc"
71#include "inter22.inc"
72#include "param_c.inc"
73C-----------------------------------------------
74C D e s c r i p t i o n
75C-----------------------------------------------
76C This subroutines computes cell momentum
77C using finit volume scheme
78C-----------------------------------------------
79C D u m m y A r g u m e n t s
80C-----------------------------------------------
81 INTEGER :: IXS(NIXS,*), IALEFVM_FLG, IPM(NPROPMI,*),NEL
82 my_real :: MOM(NEL,3), VOL(MVSIZ), RHO(MVSIZ), IAD22(*),SSP(*),SIG(NEL,6)
83C-----------------------------------------------
84C L o c a l V a r i a b l e s
85C-----------------------------------------------
86 INTEGER :: I, II, IMAT, ILAW, NIN, IB
87 my_real :: DMOM(3,MVSIZ)
88 LOGICAL :: debug_outp
89 INTEGER :: idbf,idbl
90C-----------------------------------------------
91C P r e - C o n d i t i o n s
92C-----------------------------------------------
93 IF(alefvm_param%IEnabled==0) RETURN
94 IF(ialefvm_flg <= 1)RETURN
95 imat = ixs(1,1+nft)
96 ilaw = ipm(2,imat)
97
98C-----------------------------------------------
99C S o u r c e L i n e s
100C-----------------------------------------------
101
102 IF(ilaw /= 11)THEN
103 !-------------------------------------------------------------!
104 ! INTEGRAL ON EACH FACE from Integral(DIV(SIGMA),Volume) !
105 !-------------------------------------------------------------!
106 DO i=1,nel
107 ii = i + nft
108 dmom(1:3,i) = alefvm_buffer%FCELL(1:3,ii)
109 IF(dt1==zero)THEN
110 dmom(1:3,i) = half*dt2 * dmom(1:3,i)
111 ELSE
112 dmom(1:3,i) = dt2 * dmom(1:3,i)
113 ENDIF
114 enddo!next I
115
116 DO i=1,nel
117 ii = i + nft
118 mom(i,1) = mom(i,1) + dmom(1,i)
119 mom(i,2) = mom(i,2) + dmom(2,i)
120 mom(i,3) = mom(i,3) + dmom(3,i)
121 enddo!next I
122
123
124 !DEBUG-OUTPUT---------------!
125 if(alefvm_param%IOUTP_SCHEME /= 0)then
126 debug_outp = .false.
127 if(alefvm_param%IOUTP_SCHEME>0)then
128 do i=lft,llt
129 ii = nft + i
130 if(ixs(11,ii)==alefvm_param%IOUTP_SCHEME)THEN
131 debug_outp = .true.
132 idbf = i
133 idbl = i
134 EXIT
135 endif
136 enddo
137 elseif(alefvm_param%IOUTP_SCHEME==-1)then
138 debug_outp=.true.
139 idbf = lft
140 idbl = llt
141 endif
142 if(debug_outp)then
143 !#!include "lockon.inc"
144 print *, " |----alefvm_scheme.F-----|"
145 print *, " | THREAD INFORMATION |"
146 print *, " |------------------------|"
147 print *, " NCYCLE =", ncycle
148 do i=idbf,idbl
149 ii = nft + i
150 print *, " brique=", ixs(11,nft+i)
151 write(*,fmt='(A,1E26.14)') " RHO =", rho(i)
152 write(*,fmt='(A,1E26.14)') " VOL =", vol(i)
153 write(*,fmt='(A,1E26.14)') " MASS =", rho(i)*vol(i)
154 write(*,fmt='(A)') " #-- cell momentum --#"
155 write (*,fmt='(3(A,1E26.14))') " Q-X =", mom(i,1) -dmom(1,i)," +",dmom(1,i)," =",mom(i,1)
156 write (*,fmt='(3(A,1E26.14))') " Q-Y =", mom(i,2) -dmom(2,i)," +",dmom(2,i)," =",mom(i,2)
157 write (*,fmt='(3(A,1E26.14))') " Q-Z =", mom(i,3) -dmom(3,i)," +",dmom(3,i)," =",mom(i,3)
158 write(*,fmt='(A)') " #-- cell momentum densities--#"
159 write (*,fmt='(3(A,1E26.14))') " rho.Ux =", mom(i,1) / vol(i)
160 write (*,fmt='(3(A,1E26.14))') " rho.Uy =", mom(i,2) / vol(i)
161 write (*,fmt='(3(A,1E26.14))') " rho.Uz =", mom(i,3) / vol(i)
162 write(*,fmt='(A)') " #-- cell velocities--#"
163 write (*,fmt='(3(A,1E26.14))') " Ux =", mom(i,1) / vol(i)/rho(i)
164 write (*,fmt='(3(A,1E26.14))') " Uy =", mom(i,2) / vol(i)/rho(i)
165 write (*,fmt='(3(A,1E26.14))') " Uz =", mom(i,3) / vol(i)/rho(i)
166 print *, " "
167 enddo
168 !#!include "lockoff.inc"
169 endif
170 endif
171 !-----------------------------------------!
172 ENDIF !IF(ILAW /= 11)THEN
173
174 !EXPAND MOMENTUM TO NODES FOR POST-TREATMENT
175 !call my_barrier
176 CALL alefvm_expand_mom2 (ixs, mom, nel)
177
178 DO i=1,nel
179 !MOM=[rhoU]*VOL -> U : needed for fluxes calculation
180 ii = i + nft
181 !MASS = RHO(I) * VOL(I)
182 !MOM(1,I) = MOM(1,I) / MASS
183 !MOM(2,I) = MOM(2,I) / MASS
184 !MOM(3,I) = MOM(3,I) / MASS
185 mom(i,1) = mom(i,1) / vol(i)
186 mom(i,2) = mom(i,2) / vol(i)
187 mom(i,3) = mom(i,3) / vol(i)
188 enddo!next I
189
190 !internal force in animation file USER7 -> ||Fint||
191 IF(int22 > 0)THEN
192
193 DO i=1,nel
194 ii = i + nft
195 int22_fcell_anim(ii) = sqrt( alefvm_buffer%FCELL(1,ii)*alefvm_buffer%FCELL(1,ii)
196 . + alefvm_buffer%FCELL(2,ii)*alefvm_buffer%FCELL(2,ii)
197 . + alefvm_buffer%FCELL(3,ii)*alefvm_buffer%FCELL(3,ii) )
198 enddo!next I
199
200 nin = 1
201 DO i=1,nel
202 ii = i+nft
203 ib = nint(iad22(i))
204 IF (ib>0)THEN
205 brick_list(nin,ib)%FCELL(1:3) = alefvm_buffer%FCELL(1:3,ii)
206 ENDIF
207 ENDDO
208
209 ENDIF
210
211
212 DO i=1,nel
213 ii = i + nft
214 alefvm_buffer%FCELL(1,ii) = mom(i,1)
215 alefvm_buffer%FCELL(2,ii) = mom(i,2)
216 alefvm_buffer%FCELL(3,ii) = mom(i,3)
217 alefvm_buffer%FCELL(4,ii) = rho(i)
218 alefvm_buffer%FCELL(5,ii) = ssp(i)
219 alefvm_buffer%FCELL(6,ii) = -third*(sig(i,1)+sig(i,2)+sig(i,3))
220 enddo!next I
221
222
223
224
225
226 RETURN
227 END
subroutine alefvm_expand_mom2(ixs, mom, nel)
subroutine alefvm_scheme(ixs, ialefvm_flg, mom, vol, rho, ipm, iad22, ssp, sig, nel)
type(alefvm_buffer_), target alefvm_buffer
Definition alefvm_mod.F:120
type(alefvm_param_), target alefvm_param
Definition alefvm_mod.F:121
type(brick_entity), dimension(:,:), allocatable, target brick_list