OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ie_bound.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!|| ie_bound ../starter/source/materials/mat/mat051/ie_bound.F
25!||--- called by ------------------------------------------------------
26!|| fill_buffer_51 ../starter/source/materials/mat/mat051/fill_buffer_51.F
27!|| hm_read_mat51 ../starter/source/materials/mat/mat051/hm_read_mat51.F
28!||====================================================================
29 FUNCTION ie_bound(PEXT,PM,C0,C1,C2,C3,C4,C5,E0)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C I N P U T O U T P U T A r g u m e n t s
36C-----------------------------------------------
37 my_real ie_bound, pext,c0,c1,c2,c3,c4,c5,e0,pm
38C-----------------------------------------------
39C L o c a l V a r i a b l e s
40C-----------------------------------------------
41 my_real pcrit, p0, mu, c45,tmp, mu0, x, e0_ref, p0_ref, c1_ref
42C
43C----------+------+----------------------------------------------------C
44C VAR | SIZE | DEFINITION C
45C----------+------+----------------------------------------------------C
46C IE_BOUND | 1 | LOWER LIMIT FOR RELATIVE ENERGY (NEGATIVE OR NULL) C
47C PCRIT | 1 | CRITERIA ENSURING EXISTENCE OF AN ENERGY EXTREMUM C
48C MU0 | 1 | EXPANSION STATE WHERE TO COMPUTE LOWER LIMIT C
49C | | AT THIS POINT PRESSURE IS ZERO AND THEN dE IS ZERO C
50C P0 | 1 | SIMPLIFICATION FOR 0-DEGREE POLYNOMIAL COEFFICIENT C
51C----------+------+----------------------------------------------------C
52
53C-----------------------------------------------
54C S o u r c e L i n e s
55C-----------------------------------------------
56 p0=pext+c0
57 mu0=-one
58 pcrit=zero
59 c45=max(c4,c5)
60 ie_bound=-infinity !default : no minimum
61 e0_ref=zero
62 p0_ref=zero
63 c1_ref=zero
64
65 !===================!
66 ! no material !
67 !===================!
68 IF( (c0 == zero) .AND. (c1 == zero) .AND. (c2 == zero) .AND. (c3 == zero) .AND. (c4 == zero) .AND. (c5 == zero))THEN
69 ie_bound = zero
70 RETURN
71 END IF
72
73 !===================!
74 ! P(0) = 0 !
75 ! =>Einf = E0 !
76 ! dE=-(dP+Pext)dV=0 !
77 !===================!
78 IF(abs(p0+c4*e0) < em20)THEN
79 ie_bound = e0
80 RETURN
81 END IF
82
83 !===================!
84 ! PM+PEXT>0 !
85 ! IE_BOUND DOES NOT !
86 ! EXISTS !
87 !===================!
88 IF ((pm+pext) > em20) THEN
89 !In this case extremum does not exists. Pressure (P+Pext) will never be zero, then dE>0 is never zero and E has no extremum. limit E(->-1) = -INFINITY
90 ie_bound=-infinity
91 RETURN
92 END IF
93
94
95
96
97 !Otherwise for following cases : {PM+PEXT>0}
98
99
100 !===================!
101 ! PERFECT GAS !
102 !===================!
103 IF((c2 == zero) .AND. (c3 == zero) .AND. (p0 == c1) .AND. (c4 /= zero) .AND. (c4 == c5))THEN
104 !this condition describes all formulation possible for a perfect gas, included relative pressure and relative energy.
105 IF (c1 == 0)THEN
106 !total energy
107 ie_bound = zero
108 ELSE
109 !relative energy
110 ie_bound = -p0/c4
111 END IF
112 RETURN
113 END IF
114
115 !======================!
116 ! INCOMPRESSIBLE GAS !
117 ! LINEAR ELASTIC SOLID !
118 !======================!
119 IF((c2 == zero) .AND. (c3 == zero) .AND. (c4 == zero) .AND. (c5 == zero) .AND. (c1 /= zero))THEN
120 IF (p0 < c1)THEN
121 x=-p0/c1 !C1-P0>0 then x > -1, extremum is well defined
122 ie_bound = -1/(1+x)*p0+c1/(1+x)+c1*log(1+x)+e0+p0-c1
123 ELSE
124 ie_bound = -infinity !limit E(mu=-1) = -sgn(C1) * infinity, with C1>0
125 END IF
126 RETURN
127 END IF
128
129 !======================!
130 ! MIE-GRUNEISEN !
131 ! GAMMA 1st order !
132 !======================!
133 ! extremum estimated using one from case gamma constant
134
135 !======================!
136 ! MIE-GRUNEISEN !
137 ! GAMMA CONSTANT !
138 !======================!
139 IF((c1 > zero) .AND. (c4 >= c5) .AND. (c5 > zero))THEN
140 !similar to E0=0
141 !P=P0 + C1x + C2x+C3x+(C4+C5x)(dE+E0)
142 !P=P0+C4E0 + (C1+C5E0)x + C2x+C3x+(C4+C5x) dE : solving dE then puis on ajoute E0
143 e0_ref=e0
144 c1_ref=c1
145 p0_ref=p0
146 IF(e0/=zero)THEN
147 e0=zero
148 p0=p0+c4*e0_ref
149 c1=c1+c4*e0_ref
150 END IF
151
152 ! existing condition for C4/=1 et C4/=2
153 IF((c4 /= 1) .AND. (c4 /= 2))THEN
154 !diverging test (expansion)
155 IF(c1-p0 < zero)THEN
156 ie_bound=-infinity
157 GOTO 100
158 END IF
159 !diverging test (compression)
160 x=(-4*c2+2*c1+2*c4*p0+2*c4*c2-3*c4*c1-3*c4**2*p0+6*c3+c4**2*c1+c4**3*p0)/(2+c4**2-3*c4)
161 IF(x < zero)THEN
162 ie_bound=-infinity
163 GOTO 100
164 END IF
165 !expansion extremum
166 IF(p0 >= zero)THEN
167 IF (c1 == p0)THEN
168 ie_bound=-c1/c4 !limite en mu=-1
169 GOTO 100
170 ELSE !extremum in ] -1 et 0 [
171 x=(c4*p0+c1)/(c1-p0) !necessarily positive
172 x=exp(-log(x)/(1+c4))-1
173 ie_bound=(-(1+x)**(-1-c4)*(c4*p0+c1+c1*x+c4*c1*x) / c4/(1+c4)+(c4*p0+c1)/c4/(1+c4))*(1+x)**c4
174 GOTO 100
175 END IF !(C1==P0)
176 END IF !(P0>=ZERO)
177 !extremum in compression
178 IF(p0 < zero)THEN
179 !extremum estimation in compression (C2,C3 needed) :
180 ie_bound=-infinity ! ameliorer
181 !find an estimator
182 !fixed point method ?
183 GOTO 100
184 END IF
185
186 ELSEIF((c4 == one) .OR. (c4 == two))THEN
187 !diverging test in expansion
188 IF(c1-p0 < zero)THEN
189 ie_bound=-infinity
190 GOTO 100
191 END IF
192 !diverging test in compression
193 !diverge if dominant coefficient is negative
194 IF (c3 < zero)THEN
195 ie_bound = -infinity
196 GOTO 100
197 END IF
198 !diverge if dominant coefficient is negative
199 IF(c3 == zero)THEN
200 IF (c2 < zero)THEN
201 ie_bound=-infinity
202 GOTO 100
203 END IF
204 END IF
205 ! otherwise extremum does exist
206 ! expansion if P0>0
207 IF(p0 >= zero)THEN
208 !C1**2-P0^2 is here necessarily positive because C1-P0>0 C1>0 P0>0
209 x=-(c1+p0-sqrt(c1**2-p0**2))/(c1+p0)
210 ie_bound=(1+x)*(half*c1+half*p0)-half*(c1+2*c1*x+p0)/(1+x)
211 GOTO 100
212 END IF
213 ! compression
214 IF(p0 < zero)THEN
215 !extremum estimation in compression (C2,C3 needed) :
216 ie_bound=-infinity ! to improve
217 !find an estimator
218 !fixed point method ?
219 GOTO 100
220 END IF
221 END IF !condition for C4 (1 or 2)
222 END IF !mie gruneisen gamma constant
223
224 100 IF (e0_ref /= zero)THEN
225 IF(ie_bound /= -infinity)ie_bound=ie_bound+e0_ref
226 c1=c1_ref
227 e0=e0_ref
228 END IF
229
230 RETURN
231
232 END FUNCTION
#define my_real
Definition cppsort.cpp:32
function ie_bound(pext, pm, c0, c1, c2, c3, c4, c5, e0)
Definition ie_bound.F:30
#define max(a, b)
Definition macros.h:21