OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
eospolyno.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!|| eospolyno_mod ../common_source/eos/eospolyno.F
25!||--- called by ------------------------------------------------------
26!|| eosmain ../common_source/eos/eosmain.F
27!|| eosmain51 ../engine/source/materials/mat/mat051/eosmain51.F90
28!||====================================================================
30 IMPLICIT NONE
31 CONTAINS
32!||====================================================================
33!|| eospolyno ../common_source/eos/eospolyno.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 eospolyno(
42 1 IFLAG,NEL ,PMIN ,OFF ,EINT ,MU ,MU2 ,
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 constant_mod , ONLY : zero, em15, half, one, two, three, three100
49 USE eos_param_mod , ONLY : eos_param_
50C-----------------------------------------------
51C D e s c r i p t i o n
52C-----------------------------------------------
53!----------------------------------------------------------------------------
54!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
55!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
56!! \details
57!! \details STAGGERED SCHEME
58!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
59!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
60!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
61!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
62!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
63!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
64!! \details COLLOCATED SCHEME
65!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
66!----------------------------------------------------------------------------
67C-----------------------------------------------
68C I m p l i c i t T y p e s
69C-----------------------------------------------
70 IMPLICIT NONE
71#include "my_real.inc"
72C-----------------------------------------------
73C D u m m y A r g u m e n t s
74C-----------------------------------------------
75 INTEGER :: IFLAG, NEL
76 my_real,INTENT(INOUT) :: PNEW(NEL), DPDM(NEL), DPDE(NEL), PSH(NEL), EINT(NEL)
77 my_real,INTENT(IN) :: OFF(NEL), MU(NEL), MU2(NEL), ESPE(NEL), DVOL(NEL), DF(NEL), VNEW(NEL), PMIN
78 type(eos_param_),intent(in) :: eos_struct !< data structure for EoS parameters
79C-----------------------------------------------
80C L o c a l V a r i a b l e s
81C-----------------------------------------------
82 INTEGER :: I
83 my_real :: AA, BB, DVV, PP
84 my_real :: C0,C1,C2,C3,C4,C5,C6
85 my_real :: mu_pos
86C-----------------------------------------------
87C S o u r c e L i n e s
88C-----------------------------------------------
89 c0 = eos_struct%UPARAM(1)
90 c1 = eos_struct%UPARAM(2)
91 c2 = eos_struct%UPARAM(3)
92 c3 = eos_struct%UPARAM(4)
93 c4 = eos_struct%UPARAM(5)
94 c5 = eos_struct%UPARAM(6)
95 c6 = eos_struct%UPARAM(7)
96 psh(1:nel) = eos_struct%PSH
97
98 IF(iflag == 0) THEN
99 DO i=1,nel
100 mu_pos = max(zero,mu(i))
101 pp = c0 +(c1+c3*mu(i)*mu(i))*mu(i)+c2*mu2(i) + (c4 +c5 *mu(i) + c6*mu2(i))*espe(i)
102 dpdm(i) = c1+two*c2*mu_pos+three*c3*mu(i)*mu(i) +(c5+c6*mu_pos)*espe(i) + (c4+c5*mu(i)+c6*mu2(i))*df(i)*df(i)*(pp+psh(i))
103 dpde(i) = c4 + c5*mu(i) + c6*mu2(i)
104 pnew(i) = max(pp,pmin)*off(i)! P(mu[n+1],E[n])
105 ENDDO
106
107 ELSEIF(iflag == 1) THEN
108 DO i=1,nel
109 aa = c0 +mu(i)*(c1 +c3 *mu(i)*mu(i))+c2*mu2(i)
110 bb = c4 +c5*mu(i) + c6*mu2(i)
111 dvv = half*dvol(i)*df(i) / max(em15,vnew(i))
112 pnew(i) = (aa+bb*(espe(i)-psh(i) *dvv))/(one+bb*dvv)
113 pnew(i) = max(pnew(i),pmin )*off(i) ! P(mu[n+1],E[n+1])
114 eint(i) = eint(i) - half*dvol(i)*(pnew(i)+psh(i))
115 dpde(i) = bb
116 ENDDO
117
118 ELSEIF(iflag == 2) THEN
119 DO i=1, nel
120 IF (vnew(i) > zero) THEN
121 mu_pos = max(zero,mu(i))
122 pnew(i) = c0 + (c1 +c3*mu(i)*mu(i))*mu(i) + c2*mu2(i) + (c4 +c5 *mu(i) + c6*mu2(i))*espe(i)
123 dpde(i) = c4+c5*mu(i)+c6*mu2(i)
124 dpdm(i) = c1 + two*c2*mu_pos + three*c3*mu(i)*mu(i) + (c5+c6*mu_pos)*espe(i) + (dpde(i))*df(i)*df(i)*(pnew(i)+psh(i))
125 pnew(i) = max(pnew(i),pmin )*off(i)
126 ENDIF
127 ENDDO
128 ENDIF
129C------------------------
130 RETURN
131 END SUBROUTINE eospolyno
132 END MODULE eospolyno_mod
#define max(a, b)
Definition macros.h:21
subroutine eospolyno(iflag, nel, pmin, off, eint, mu, mu2, espe, dvol, df, vnew, psh, pnew, dpdm, dpde, eos_struct)
Definition eospolyno.F:45