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