OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
m6law.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!|| m6law ../engine/source/materials/mat/mat006/m6law.F
25!||--- called by ------------------------------------------------------
26!|| mmain ../engine/source/materials/mat_share/mmain.F90
27!||====================================================================
28 SUBROUTINE m6law(
29 1 PM, OFF, SIG, EINT,
30 2 RHO, RK, RE, VORTI,
31 3 VNEW, RHO0, VIS, PSH,
32 4 D1, D2, D3, D4,
33 5 D5, D6, C1, C2,
34 6 C3, C4, C5, C6,
35 7 PC, AMU, AMU2, ESPE,
36 8 SSP, DF, TMU, MAT,
37 9 WXX, WYY, WZZ, NEL,
38 A DPDM, JTUR, JPOR)
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com01_c.inc"
45#include "com08_c.inc"
46#include "param_c.inc"
47#include "scr14_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER, INTENT(IN) :: JTUR
52 INTEGER, INTENT(IN) :: JPOR
53 INTEGER MAT(*),NEL
54 my_real
55 . PM(NPROPM,*), OFF(*), SIG(NEL,6), EINT(*), RHO(*), RK(*), RE(*),
56 . VORTI(*)
57 my_real
58 . VNEW(*), RHO0(*), D1(*), D2(*), D3(*), D4(*), D5(*), D6(*),
59 . PC(*), VIS(*), C1(*), C2(*), C3(*), C4(*), C5(*),
60 . C6(*), AMU(*), AMU2(*), ESPE(*), SSP(*), DF(*),
61 . tmu(*), psh(*), wxx(*), wyy(*), wzz(*), rho0_1,
62 . pc_1, c1_1, c2_1, c3_1,
63 . c4_1, c5_1, c6_1, tmu_1, psh_1
64 my_real
65 . dpdm(*)
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER I, MX
70 my_real
71 . DAV, RK2T, VIS2, FAC
72C-----------------------------------------------
73
74 !SAUVEGARDE VORTICITE SI ANIM
75 IF((anim_e(10)==1 .OR. anim_se(10)==1).AND. dt1/=zero)THEN
76 fac=four/dt1
77 IF(n2d==0)THEN
78 DO 5 i=1,nel
79 5 vorti(i)=fac*sqrt(wxx(i)**2+wyy(i)**2+wzz(i)**2)
80 ELSE
81 DO 6 i=1,nel
82 6 vorti(i)=fac*wzz(i)
83 ENDIF
84 ENDIF
85
86 !EOS COEFFICIENTS
87 mx =mat(1)
88 rho0_1=pm( 1,mx)
89 pc_1 =pm(37,mx)
90 c1_1 =pm(104,mx)-pm(88,mx)
91 c2_1 =pm(32,mx)
92 c3_1 =pm(33,mx)
93 c4_1 =pm(34,mx)
94 c5_1 =pm(35,mx)
95 c6_1 =pm(36,mx)
96 tmu_1 =pm(81,mx)
97 psh_1=pm(88,mx)
98 DO 10 i=1,nel
99 rho0(i)=rho0_1
100 vis(i) =pm(24,mx)*rho(i)
101 pc(i) =pc_1
102 c1(i) =c1_1
103 c2(i) =c2_1
104 c3(i) =c3_1
105 c4(i) =c4_1
106 c5(i) =c5_1
107 c6(i) =c6_1
108 tmu(i) =tmu_1
109 psh(i)=psh_1
110 10 CONTINUE
111
112 !IF TURBULENT
113 IF(jtur/=0)THEN
114 IF(jpor/=2)THEN
115 DO i=1,nel
116 tmu(i)=tmu(i)*rk(i)*rk(i) / max(em15,(re(i)*vnew(i)))
117 vis(i)=vis(i)+tmu(i)
118 ENDDO
119 ELSE
120 DO i=1,nel
121 tmu(i)=zero
122 ENDDO
123 ENDIF
124 ELSE
125 DO i=1,nel
126 rk(i)=zero
127 ENDDO
128 ENDIF
129
130 !OUTPUT
131 DO i=1,nel
132 vis2 = two*vis(i)
133 dav = -(d1(i)+d2(i)+d3(i))*third
134 !------------------------------!
135 ! VISCOUS STRESS TENSOR !
136 !------------------------------!
137 sig(i,1)=vis2*(d1(i)+dav)
138 sig(i,2)=vis2*(d2(i)+dav)
139 sig(i,3)=vis2*(d3(i)+dav)
140 sig(i,4)=vis(i) *d4(i)
141 sig(i,5)=vis(i) *d5(i)
142 sig(i,6)=vis(i) *d6(i)
143
144C DF(I) =RHO0(I)/RHO(I)
145C AMU(I) =ONE/DF(I)-ONE
146 amu2(i)= max(zero,amu(i))**2
147 espe(i)=df(i)*eint(i) / max(em15,vnew(i))
148 rk2t = two*rk(i) / max(em15,three*vnew(i))
149
150 !------------------------------!
151 ! SOUND SPEED !
152 !------------------------------!
153
154 dpdm(i) = dpdm(i)
155 . +(c5(i)+c6(i)*amu(i))*df(i)*df(i)*rk2t + rk2t*df(i)
156 ssp(i)=sqrt(abs(dpdm(i))/rho0(i))
157 ENDDO
158
159 RETURN
160 END
subroutine m6law(pm, off, sig, eint, rho, rk, re, vorti, vnew, rho0, vis, psh, d1, d2, d3, d4, d5, d6, c1, c2, c3, c4, c5, c6, pc, amu, amu2, espe, ssp, df, tmu, mat, wxx, wyy, wzz, nel, dpdm, jtur, jpor)
Definition m6law.F:39
#define max(a, b)
Definition macros.h:21