OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_tillotson.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!|| hm_read_eos_tillotson ../starter/source/materials/eos/hm_read_eos_tillotson.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_eos ../starter/source/materials/eos/hm_read_eos.f
27!||--- calls -----------------------------------------------------
28!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
29!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
30!||--- uses -----------------------------------------------------
31!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
32!|| message_mod ../starter/share/message_module/message_mod.F
33!|| submodel_mod ../starter/share/modules1/submodel_mod.F
34!||====================================================================
35 SUBROUTINE hm_read_eos_tillotson(IOUT,PM,UNITAB,IUNIT,LSUBMODEL,IMIDEOS,EOS_TAG,IEOS)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE unitab_mod
40 USE submodel_mod
41 USE message_mod
42 USE elbuftag_mod
43C-----------------------------------------------
44C D e s c r i p t i o n
45C-----------------------------------------------
46C reading parameters for
47C TILLOTSON EQUATION OF STATE
48C-----------------------------------------------
49C C o m m e n t s
50C-----------------------------------------------
51C RHOI = PM(89) -> provided by /MAT
52C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
53C => MU0 = RHO/RHOR-1.
54C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
55C-----------------------------------------------
56C I m p l i c i t T y p e s
57C-----------------------------------------------
58#include "implicit_f.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
63 INTEGER IIN,IOUT,IUNIT
64 INTEGER,INTENT(IN) :: IEOS
65 my_real pm(npropm)
66 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
67 INTEGER,INTENT(IN) :: IMIDEOS
68 TYPE(eos_tag_),DIMENSION(0:MAXEOS) ,INTENT(INOUT) :: EOS_TAG
69C-----------------------------------------------
70C C o m m o n B l o c k s
71C-----------------------------------------------
72#include "param_c.inc"
73C-----------------------------------------------
74C L o c a l V a r i a b l e s
75C-----------------------------------------------
76 my_real :: c1, c2, a, b, er, es, vs, e0, rho0,rhoi,rhor, alpha, beta,
77 . fac_l,fac_t,fac_m,fac_c,facc1,facc2,facpb,mu0,mu2,df,eta,
78 . omega,aa,bb,pp,xx,expa,expb,dpdmu, ssp0, g0
79 LOGICAL :: IS_ENCRYPTED,IS_AVAILABLE,IS_AVAILABLE_RHO0
80C-----------------------------------------------
81C S o u r c e L i n e s
82C-----------------------------------------------
83 is_encrypted = .false.
84 is_available = .false.
85 is_available_rho0 = .false.
86
87 eos_tag(ieos)%NVAR = 1 !saving Region id for H2D and ANIM output
88
89 CALL hm_option_is_encrypted(is_encrypted)
90
91 CALL hm_get_floatv('EOS_C1', c1, is_available,lsubmodel,unitab)
92 CALL hm_get_floatv('EOS_C2', c2, is_available,lsubmodel,unitab)
93 CALL hm_get_floatv('MAT_A', a, is_available,lsubmodel,unitab)
94 CALL hm_get_floatv('MAT_B', b, is_available,lsubmodel,unitab)
95
96 CALL hm_get_floatv('E_R',er, is_available,lsubmodel,unitab)
97 CALL hm_get_floatv('E_S', es, is_available,lsubmodel,unitab)
98 CALL hm_get_floatv('Vs', vs, is_available,lsubmodel,unitab)
99 CALL hm_get_floatv('MAT_EA', e0 ,is_available,lsubmodel,unitab)
100 CALL hm_get_floatv('Refer_Rho', rho0 ,is_available_rho0,lsubmodel,unitab)
101
102 CALL hm_get_floatv('Alpha', alpha ,is_available,lsubmodel,unitab)
103 CALL hm_get_floatv('Beta', beta ,is_available,lsubmodel,unitab)
104
105 rhor = pm(1)
106 rhoi = pm(89)
107
108 IF(rho0 > zero) THEN
109 rhor = rho0
110 pm(1)= rho0
111 ELSE
112 rho0=rhor
113 ENDIF
114
115 pm(23) = e0
116 pm(32) = c1
117 pm(33) = c2
118 pm(34) = a
119 pm(35) = b
120 pm(36) = er
121 IF(pm(79)==zero)pm(79)=three100
122 pm(160) = es
123 pm(161) = vs
124 pm(162) = alpha
125 pm(163) = beta
126
127 !COMPUTING INITIAL PRESSURE FOR PM(31) -> SIG(1:3,*)
128
129 IF(rhoi == zero)THEN
130 mu0 = zero ! error 683 already displayed
131 ELSE
132 IF(rhor /= zero)THEN
133 mu0 = rhoi/rhor-one
134 ELSE
135 mu0 = zero ! error 683 already displayed
136 ENDIF
137 ENDIF
138
139 IF(rhoi /= zero)THEN
140 df = rhor/rhoi
141 ELSE
142 df = zero
143 ENDIF
144
145 mu2 = mu0*mu0
146 facc1 = one
147 facc2 = one
148 facpb = one
149 IF(mu0<zero) THEN
150 facc2=zero
151 IF(df>vs .OR. (df<=vs .AND. e0>=es) ) THEN
152 xx = mu0/(one+mu0)
153 expa = exp(-alpha*xx*xx)
154 expb = exp(beta*xx)
155 facc1 = expa*expb
156 facpb = expa
157 ENDIF
158 ENDIF
159 eta = one+mu0
160 omega = one+e0/(er*eta**2)
161 aa = facc1*c1*mu0+facc2*c2*mu2
162 bb = a+facpb*b/omega
163 pp = max(aa+bb*eta*e0,pm(37))
164 pm(31)= pp
165
166 !SSP0
167 ssp0 = zero
168 g0 = pm(22)
169 rhoi = pm(89)
170
171 dpdmu=facc1*c1+two*facc2*c2*mu0+bb*eta*pp*df*df
172 . +e0*( bb+(two*e0/eta-pp*df*df)
173 . *b*facpb/(er*eta*omega**2) )
174 dpdmu=max(zero,dpdmu)
175 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
176 pm(27)=ssp0
177
178 WRITE(iout,1000)
179 IF(is_encrypted)THEN
180 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
181 ELSE
182 WRITE(iout,1500)c1,c2,a,b,er,es,vs,e0,pm(31),alpha,beta
183 IF(is_available_rho0)WRITE(iout,1501)pm(1)
184 ENDIF
185
186 RETURN
187
188 1000 FORMAT(
189 & 5x,' TILLOTSON EOS ',/,
190 & 5x,' -------------- ',/)
191 1500 FORMAT(
192 & 5x,'C1. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
193 & 5x,'C2. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
194 & 5x,'A . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
195 & 5x,'b . . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
196 & 5X,'ref internal energy (per unit volume) . .=',1PG20.13/,
197 & 5X,'sublimation energy(per unit volume) . .=',1PG20.13/,
198 & 5X,'sublimation relative volume . . . . . . .=',1PG20.13/,
199 & 5X,'initial internal energy(per unit volume).=',1PG20.13/,
200 & 5X,'initial pressure. . . . . . . . . . . . .=',1PG20.13/,
201 & 5X,'alpha . . . . . . . . . . . . . . . . . .=',1PG20.13/,
202 & 5X,'beta. . . . . . . . . . . . . . . . . . .=',1PG20.13)
203 1501 FORMAT(
204 & 5X,'eos reference density . . . . . . . . . .=',1PG20.13)
205
206 RETURN
207 END
208
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_eos(mat_param, ipm, pm, bufmat, nummat, nfunct, buflen, iadbuf, eos_tag, unitab, lsubmodel, mlaw_tag, npc, tf, snpc, npts, sbufmat, ntable, table)
Definition hm_read_eos.F:68
subroutine hm_read_eos_tillotson(iout, pm, unitab, iunit, lsubmodel, imideos, eos_tag, ieos)
#define max(a, b)
Definition macros.h:21
program starter
Definition starter.F:39