OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
multi_buf2var.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!|| multi_buf2var ../engine/source/multifluid/multi_buf2var.F
25!||--- called by ------------------------------------------------------
26!|| alemain ../engine/source/ale/alemain.F
27!||--- uses -----------------------------------------------------
28!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
29!|| multi_fvm_mod ../common_source/modules/ale/multi_fvm_mod.F90
30!||====================================================================
31 SUBROUTINE multi_buf2var(ITASK, IPARG, MULTI_FVM, ELBUF_TAB)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE elbufdef_mod
36 USE multi_fvm_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44C NPARG
45#include "param_c.inc"
46C NGROUP
47#include "com01_c.inc"
48C NTHREAD
49#include "task_c.inc"
50C MVSIZ
51#include "mvsiz_p.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(IN) :: ITASK, IPARG(NPARG, *)
56 TYPE(MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
57 TYPE(elbuf_struct_), TARGET, DIMENSION(NGROUP), INTENT(INOUT) :: ELBUF_TAB
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61 INTEGER :: NBMAT, IMAT, II, I, NG, MATLAW, NEL, NFT
62 my_real :: vol
63 TYPE(g_bufel_), POINTER :: GBUF
64 TYPE(l_bufel_), POINTER :: LBUF
65
66 nbmat = multi_fvm%NBMAT
67 DO ng = itask + 1, ngroup, nthread
68 matlaw = iparg(1, ng)
69 IF (matlaw == 151) THEN
70 nel = iparg(2, ng)
71 nft = iparg(3, ng)
72 gbuf => elbuf_tab(ng)%GBUF
73 DO ii = 1, nel
74 i = ii + nft
75C Mass density
76 multi_fvm%RHO(i) = gbuf%RHO(ii)
77C Volumic internal energy
78 multi_fvm%EINT(i) = gbuf%EINT(ii)
79C Velocity
80 multi_fvm%VEL(1, i) = gbuf%MOM(ii + 0 * nel)
81 multi_fvm%VEL(2, i) = gbuf%MOM(ii + 1 * nel)
82 multi_fvm%VEL(3, i) = gbuf%MOM(ii + 2 * nel)
83 multi_fvm%PRES(i) = - third * (gbuf%SIG(ii + 0 * nel) +
84 . gbuf%SIG(ii + 1 * nel) +
85 . gbuf%SIG(ii + 2 * nel))
86 ENDDO
87 IF (nbmat > 1) THEN
88 DO imat = 1, nbmat
89 lbuf => elbuf_tab(ng)%BUFLY(imat)%LBUF(1, 1, 1)
90 DO ii = 1, nel
91 i = ii + nft
92 vol = gbuf%VOL(ii)
93C Volume fraction
94 multi_fvm%PHASE_ALPHA(imat, i) = lbuf%VOL(ii) / vol
95C Mass density
96 multi_fvm%PHASE_RHO(imat, i) = lbuf%RHO(ii)
97C internal energy
98 multi_fvm%PHASE_EINT(imat, i) = lbuf%EINT(ii)
99C PRessure
100 multi_fvm%PHASE_PRES(imat, i) = - third * (
101 . lbuf%SIG(ii + 0 * nel) +
102 . lbuf%SIG(ii + 1 * nel) +
103 ; lbuf%SIG(ii + 2 * nel))
104 ENDDO
105 ENDDO
106 ENDIF
107 ENDIF
108 ENDDO
109 END SUBROUTINE multi_buf2var
#define my_real
Definition cppsort.cpp:32
subroutine multi_buf2var(itask, iparg, multi_fvm, elbuf_tab)