OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
osborne.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!|| osborne_mod ../common_source/eos/osborne.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!|| osborne ../common_source/eos/osborne.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 osborne (
42 1 IFLAG , NEL ,PMIN ,OFF ,EINT ,MU ,
43 2 ESPE , DVOL ,DF ,VNEW ,RHO0 ,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 : em15,zero,one,half,two
50C-----------------------------------------------
51C D e s c r i p t i o n
52C-----------------------------------------------
53C This subroutine contains numerical solving
54C of OSBORNE EOS
55!----------------------------------------------------------------------------
56!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
57!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
58!! \details
59!! \details STAGGERED SCHEME
60!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
61!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
62!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
63!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
64!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
65!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
66!! \details COLLOCATED SCHEME
67!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
68!----------------------------------------------------------------------------
69C-----------------------------------------------
70C I m p l i c i t T y p e s
71C-----------------------------------------------
72 IMPLICIT NONE
73#include "my_real.inc"
74C-----------------------------------------------
75C D u m m y A r g u m e n t s
76C-----------------------------------------------
77 INTEGER,INTENT(IN) :: IFLAG, NEL
78 my_real,INTENT(IN) :: OFF(NEL) ,MU(NEL) ,DVOL(NEL) ,DF(NEL) ,VNEW(NEL), RHO0(NEL), PMIN
79 my_real,INTENT(INOUT) :: PNEW(NEL), DPDM(NEL), DPDE(NEL),PSH(NEL),EINT(NEL),ESPE(NEL)
80 TYPE(eos_param_),INTENT(IN):: EOS_STRUCT
81C-----------------------------------------------
82C L o c a l V a r i a b l e s
83C-----------------------------------------------
84 INTEGER I
85 my_real :: P0,E0,DVV,PP,dPdMU
86 my_real :: A1,A2,B0,B1,B2,C0,C1,D0, A2_
87 my_real :: denom
88C-----------------------------------------------
89C S o u r c e L i n e s
90C-----------------------------------------------
91 e0 = eos_struct%E0
92 psh(1:nel) = eos_struct%PSH
93
94 a1 = eos_struct%UPARAM(1)
95 a2 = eos_struct%UPARAM(2)
96 b0 = eos_struct%UPARAM(3)
97 b1 = eos_struct%UPARAM(4)
98 b2 = eos_struct%UPARAM(5)
99 c0 = eos_struct%UPARAM(6)
100 c1 = eos_struct%UPARAM(7)
101 d0 = eos_struct%UPARAM(8)
102 p0 = eos_struct%UPARAM(9)
103
104 IF(iflag == 0) THEN
105 DO i=1,nel
106 a2_=a2
107 IF(mu(i)<zero)a2_=-a2
108 denom = (espe(i)+d0)
109 pp = (a1*mu(i)+a2_*mu(i)*mu(i)+(b0+b1*mu(i)+b2*mu(i)*mu(i))*espe(i)+(c1*mu(i)+c0)*espe(i)*espe(i))/denom
110 pp = max(pp,pmin) * off(i)
111 dpdmu = (a1+2*a2_*mu(i)+(two*b2*mu(i)+b1)*espe(i)+c1*espe(i)*espe(i))/denom
112 dpde(i) = (((b2*mu(i)+b1)*mu(i)+b0)+(two*(c1*mu(i)+c0))*espe(i) - pp/denom)/denom
113 dpdm(i) = dpdmu + dpde(i)*df(i)*df(i)*(pp) !total derivative
114 pnew(i) = pp ! P(mu[n+1],E[n])
115 pnew(i) = pnew(i) - psh(i)
116 ENDDO
117
118 ELSEIF(iflag == 1) THEN
119 DO i=1,nel
120 a2_=a2
121 IF(mu(i)<zero)a2_=-a2
122 dvv = dvol(i)*df(i) / max(em15,vnew(i)) ! DVOL/V0 car ESPE =EINT/V0
123 dvv = half*dvv ! car 2 iterations
124 denom = (espe(i)+d0)
125 pp = (a1*mu(i)+a2_*mu(i)*mu(i)+(b0+b1*mu(i)+b2*mu(i)*mu(i))*espe(i)+(c1*mu(i)+c0)*espe(i)*espe(i))/denom
126 pp = max(pp,pmin) * off(i)
127 espe(i) = espe(i) - (pp)*dvv
128 denom = (espe(i)+d0)
129 pp = (a1*mu(i)+a2_*mu(i)*mu(i)+(b0+b1*mu(i)+b2*mu(i)*mu(i))*espe(i)+(c1*mu(i)+c0)*espe(i)*espe(i))/denom
130 pp = max(pp,pmin) * off(i)
131 espe(i) = espe(i) - (pp)*dvv
132 pnew(i) = pp ! P(mu[n+1],E[n+1])
133 eint(i) = eint(i) - half*dvol(i)*(pnew(i))
134 pnew(i) = pnew(i) - psh(i)
135 dpde(i) = (((b2*mu(i)+b1)*mu(i)+b0)+(two*(c1*mu(i)+c0))*espe(i) - pp/denom)/denom
136 ENDDO
137
138 ELSEIF(iflag == 2) THEN
139 DO i=1, nel
140 IF (vnew(i) > zero) THEN
141 a2_=a2
142 IF(mu(i)<zero)a2_=-a2
143 denom = (espe(i)+d0)
144 pp = (a1*mu(i)+a2_*mu(i)*mu(i)+(b0+b1*mu(i)+b2*mu(i)*mu(i))*espe(i)+(c1*mu(i)+c0)*espe(i)*espe(i))/denom
145 pp = max(pp,pmin)*off(i)
146 dpdmu = (a1+2*a2_*mu(i)+(two*b2*mu(i)+b1)*espe(i)+c1*espe(i)*espe(i))/denom
147 dpde(i) = (((b2*mu(i)+b1)*mu(i)+b0)+(two*(c1*mu(i)+c0))*espe(i) - pp/denom)/denom
148 dpdm(i) = dpdmu + dpde(i)*df(i)*df(i)*(pp) !total derivative
149 pnew(i) = pp
150 pnew(i) = pnew(i) - psh(i)
151 ENDIF
152 ENDDO
153
154 ENDIF
155
156C-----------------------------------------------
157 RETURN
158 END SUBROUTINE osborne
159 END MODULE osborne_mod
#define max(a, b)
Definition macros.h:21
subroutine osborne(iflag, nel, pmin, off, eint, mu, espe, dvol, df, vnew, rho0, psh, pnew, dpdm, dpde, eos_struct)
Definition osborne.F:45