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 ../common_source/eos/eospolyno.f
25!||--- called by ------------------------------------------------------
26!|| eosmain ../common_source/eos/eosmain.F
27!||--- uses -----------------------------------------------------
28!|| constant_mod ../common_source/modules/constant_mod.F
29!||====================================================================
30 SUBROUTINE eospolyno(IFLAG,NEL ,PM ,OFF ,EINT ,MU ,MU2 ,
31 2 ESPE ,DVOL ,DF ,VNEW ,MAT ,PSH ,
32 3 PNEW ,DPDM ,DPDE )
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE constant_mod , ONLY : zero, em15, half, one, two, three, three100
37C-----------------------------------------------
38C D e s c r i p t i o n
39C-----------------------------------------------
40!----------------------------------------------------------------------------
41!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
42!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
43!! \details
44!! \details STAGGERED SCHEME
45!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
46!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
47!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
48!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
49!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
50!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
51!! \details COLLOCATED SCHEME
52!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
53!----------------------------------------------------------------------------
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57 IMPLICIT NONE
58#include "my_real.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "param_c.inc"
63#include "com04_c.inc"
64#include "com06_c.inc"
65#include "com08_c.inc"
66#include "vect01_c.inc"
67#include "scr06_c.inc"
68C-----------------------------------------------
69C D u m m y A r g u m e n t s
70C-----------------------------------------------
71 INTEGER MAT(NEL), IFLAG, NEL
72 my_real PM(NPROPM,NUMMAT),
73 . off(nel) ,eint(nel) ,mu(nel) ,
74 . mu2(nel) ,espe(nel) ,dvol(nel) ,df(nel) ,
75 . vnew(nel) ,psh(nel) ,pnew(nel) ,dpdm(nel),
76 . dpde(nel)
77C-----------------------------------------------
78C L o c a l V a r i a b l e s
79C-----------------------------------------------
80 INTEGER :: I, MX
81 my_real :: AA, BB, DVV, PP
82 my_real :: c0,c1,c2,c3,c4,c5,pc,sph
83C-----------------------------------------------
84C S o u r c e L i n e s
85C-----------------------------------------------
86 IF(iflag == 0) THEN
87 mx = mat(1)
88 c0 = pm(104,mx)
89 c1 = pm( 32,mx)
90 c2 = pm( 33,mx)
91 c3 = pm( 34,mx)
92 c4 = pm( 35,mx)
93 c5 = pm( 36,mx)
94 sph = pm( 69,mx)
95 psh(1:nel) = pm( 88,mx)
96 pc = pm( 37,mx)
97 DO i=1,nel
98 pp = c0 +(c1 +c3 *mu(i)*mu(i))*mu(i)+c2 *mu2(i) + (c4 +c5 *mu(i))*espe(i)
99 dpdm(i) = c1 + two*c2 *max(zero,mu(i))+three*c3 *mu(i)*mu(i) + c5 *espe(i)+(c4 +c5 *mu(i))*df(i)*df(i)*(pp+psh(i) )
100 dpde(i) = c4 +c5 *mu(i)
101 pnew(i) = max(pp,pc)*off(i)! P(mu[n+1],E[n])
102 ENDDO
103
104 ELSEIF(iflag == 1) THEN
105 mx = mat(1)
106 c0 = pm(104,mx)
107 c1 = pm( 32,mx)
108 c2 = pm( 33,mx)
109 c3 = pm( 34,mx)
110 c4 = pm( 35,mx)
111 c5 = pm( 36,mx)
112 pc = pm( 37,mx)
113 psh(1:nel) = pm(88,mx)
114 DO i=1,nel
115 aa = c0 +mu(i)*(c1 +c3 *mu(i)*mu(i))+c2 *mu2(i)
116 bb = c4 +c5 *mu(i)
117 dvv = half*dvol(i)*df(i) / max(em15,vnew(i))
118 pnew(i) = (aa+bb*(espe(i)-psh(i) *dvv))/(one+bb*dvv)
119 pnew(i) = max(pnew(i),pc )*off(i) ! P(mu[n+1],E[n+1])
120 eint(i) = eint(i) - half*dvol(i)*(pnew(i)+psh(i))
121 dpde(i) = c4 +c5 *mu(i)
122 ENDDO
123
124 ELSEIF(iflag == 2) THEN
125 mx = mat(1)
126 c0 = pm(104,mx)
127 c1 = pm( 32,mx)
128 c2 = pm( 33,mx)
129 c3 = pm( 34,mx)
130 c4 = pm( 35,mx)
131 c5 = pm( 36,mx)
132 sph = pm( 69,mx)
133 psh(1:nel) = pm(88,mx)
134 pc = pm(37,mx)
135 DO i=1, nel
136 IF (vnew(i) > zero) THEN
137 pnew(i) = c0 +(c1 +c3 *mu(i)*mu(i))*mu(i)+c2 *mu2(i) + (c4 +c5 *mu(i))*espe(i)
138 dpdm(i) = c1 + two*c2 *max(zero,mu(i))+three*c3 *mu(i)*mu(i) +
139 . c5 *espe(i)+(c4 +c5 *mu(i))*df(i)*df(i)*(pnew(i)+psh(i) )
140 dpde(i) = c4 +c5 *mu(i)
141 pnew(i) = max(pnew(i),pc )*off(i)
142 ENDIF
143 ENDDO
144 ENDIF
145C------------------------
146 RETURN
147 END
subroutine eospolyno(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition eospolyno.F:33
#define max(a, b)
Definition macros.h:21