OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
osborne_mod Module Reference

Functions/Subroutines

subroutine osborne (iflag, nel, pmin, off, eint, mu, espe, dvol, df, vnew, rho0, psh, pnew, dpdm, dpde, eos_struct)

Function/Subroutine Documentation

◆ osborne()

subroutine osborne_mod::osborne ( integer, intent(in) iflag,
integer, intent(in) nel,
intent(in) pmin,
dimension(nel), intent(in) off,
dimension(nel), intent(inout) eint,
dimension(nel), intent(in) mu,
dimension(nel), intent(inout) espe,
dimension(nel), intent(in) dvol,
dimension(nel), intent(in) df,
dimension(nel), intent(in) vnew,
dimension(nel), intent(in) rho0,
dimension(nel), intent(inout) psh,
dimension(nel), intent(inout) pnew,
dimension(nel), intent(inout) dpdm,
dimension(nel), intent(inout) dpde,
type(eos_param_), intent(in) eos_struct )

Definition at line 41 of file osborne.F.

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
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21