OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lszk.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!|| lszk_mod ../common_source/eos/lszk.F
25!||--- called by ------------------------------------------------------
26!|| eosmain ../common_source/eos/eosmain.F
27!|| eosmain51 ../engine/source/materials/mat/mat051/eosmain51.F90
28!||====================================================================
29 MODULE lszk_mod
30 IMPLICIT NONE
31 CONTAINS
32!||====================================================================
33!|| lszk ../common_source/eos/lszk.F
34!||--- called by ------------------------------------------------------
35!|| eosmain ../common_source/eos/eosmain.F
36!|| eosmain51 ../engine/source/materials/mat/mat051/eosmain51.F90
37!||--- uses -----------------------------------------------------
38!|| constant_mod ../common_source/modules/constant_mod.F
39!|| eos_param_mod ../common_source/modules/mat_elem/eos_param_mod.F90
40!||====================================================================
41 SUBROUTINE lszk (
42 1 IFLAG,NEL ,PMIN ,OFF ,EINT ,MU ,
43 2 ESPE ,DVOL ,DF ,VNEW ,PSH ,
44 3 PNEW ,DPDM ,DPDE ,EOS_STRUCT )
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE eos_param_mod , ONLY : eos_param_
49 USE constant_mod , ONLY : zero, em15, half, one, three_half, two, three, three100
50C-----------------------------------------------
51C D e s c r i p t i o n
52C-----------------------------------------------
53C This subroutine contains numerical solving
54C of LSZK EOS
55C Landau Stanyukovich Zeldovich Kompaneet
56!----------------------------------------------------------------------------
57!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
58!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
59!! \details
60!! \details STAGGERED SCHEME
61!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
62!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
63!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
64!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
65!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
66!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
67!! \details COLLOCATED SCHEME
68!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
69!----------------------------------------------------------------------------
70C-----------------------------------------------
71C I m p l i c i t T y p e s
72C-----------------------------------------------
73 IMPLICIT NONE
74#include "my_real.inc"
75C-----------------------------------------------
76C D u m m y A r g u m e n t s
77C-----------------------------------------------
78 INTEGER,INTENT(IN) :: IFLAG, NEL
79 my_real,INTENT(IN) :: PMIN,OFF(NEL),MU(NEL),ESPE(NEL),DVOL(NEL),DF(NEL),VNEW(NEL)
80 my_real,INTENT(INOUT) :: PNEW(NEL) ,DPDM(NEL),DPDE(NEL),EINT(NEL),PSH(NEL)
81 TYPE(EOS_PARAM_),INTENT(IN) :: EOS_STRUCT
82C-----------------------------------------------
83C L o c a l V a r i a b l e s
84C-----------------------------------------------
85 INTEGER I
86 my_real :: P0,GAMMA,E0,AA,BB,DVV,PP,AR0B,B
87C-----------------------------------------------
88C S o u r c e L i n e s
89C-----------------------------------------------
90 e0 = eos_struct%E0
91 psh(1:nel) = eos_struct%PSH
92
93 gamma = eos_struct%UPARAM(1)
94 p0 = eos_struct%UPARAM(2)
95 ar0b = eos_struct%UPARAM(3)
96 b = eos_struct%UPARAM(4)
97
98 IF(iflag == 0) THEN
99 DO i=1,nel
100 pp = (gamma-one)*(one+mu(i))*espe(i) + ar0b*exp(b*log(one+mu(i)))
101 dpdm(i) = (gamma-one)*espe(i)+ar0b*b/(one+mu(i))*exp((b-one)*log(one+mu(i)))+(gamma-one)*df(i)*pp !total derivative
102 dpde(i) = (gamma-one)*(one+mu(i)) !partial derivative
103 pnew(i) = max(pp,pmin)*off(i) ! P(mu[n+1],E[n])
104 pnew(i) = pnew(i) - psh(i)
105 ENDDO
106
107 ELSEIF(iflag == 1) THEN
108 DO i=1,nel
109 bb = (gamma-one)*(one+mu(i))
110 dpde(i) = bb
111 aa = ar0b*exp(b*log(one+mu(i)))
112 dvv = half*dvol(i)*df(i) / max(em15,vnew(i))
113 pnew(i) = (aa + bb*espe(i) ) / (one+bb*dvv)
114 pnew(i) = max(pnew(i),pmin)*off(i) ! P(mu[n+1],E[n+1])
115 eint(i) = eint(i) - half*dvol(i)*(pnew(i))
116 pnew(i) = pnew(i) - psh(i)
117 ENDDO
118
119 ELSEIF (iflag == 2) THEN
120 DO i=1, nel
121 IF (vnew(i) > zero) THEN
122 pnew(i) = (gamma-one)*(one+mu(i))*espe(i) + ar0b*exp(b*log(one+mu(i)))
123 dpdm(i) = (gamma-one)*espe(i)+ar0b*b/(one+mu(i))*exp((b-one)*log(one+mu(i)))+(gamma-one)*df(i)*pnew(i) !total derivative
124 dpde(i) = (gamma-one)*(one+mu(i)) !partial derivative
125 pnew(i) = pnew(i)-psh(i)
126 ENDIF
127 ENDDO
128
129 ENDIF
130
131C-----------------------------------------------
132 RETURN
133 END SUBROUTINE lszk
134 END MODULE lszk_mod
#define max(a, b)
Definition macros.h:21
subroutine lszk(iflag, nel, pmin, off, eint, mu, espe, dvol, df, vnew, psh, pnew, dpdm, dpde, eos_struct)
Definition lszk.F:45