OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_stiffened_gas.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_eos_stiffened_gas (iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)

Function/Subroutine Documentation

◆ hm_read_eos_stiffened_gas()

subroutine hm_read_eos_stiffened_gas ( integer iout,
pm,
type (unit_type_), intent(in) unitab,
integer iunit,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
integer, intent(in) imideos,
type(matparam_struct_), intent(inout) mat_param )

Definition at line 35 of file hm_read_eos_stiffened_gas.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE unitab_mod
40 USE submodel_mod
41 USE message_mod
42 USE matparam_def_mod, ONLY : matparam_struct_
43C-----------------------------------------------
44C D e s c r i p t i o n
45C-----------------------------------------------
46C reading parameters for
47C LINEAR 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 IOUT, IUNIT
64 my_real pm(npropm)
65 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
66 TYPE(MATPARAM_STRUCT_),INTENT(INOUT) :: MAT_PARAM
67 INTEGER,INTENT(IN) :: IMIDEOS
68C-----------------------------------------------
69C C o m m o n B l o c k s
70C-----------------------------------------------
71#include "param_c.inc"
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 my_real gamma, p0, e0, psh, rho0, pstar, rhoi, rhor, mu0, pp, df, ssp0, g0, dpdmu
76 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
77C-----------------------------------------------
78C S o u r c e L i n e s
79C-----------------------------------------------
80 is_encrypted = .false.
81 is_available = .false.
82 is_available_rho0 = .false.
83
84 CALL hm_option_is_encrypted(is_encrypted)
85
86 CALL hm_get_floatv('Gamma', gamma, is_available,lsubmodel,unitab)
87 CALL hm_get_floatv('LAW5_P0', p0, is_available,lsubmodel,unitab)
88 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
89 CALL hm_get_floatv('P_star', pstar, is_available,lsubmodel,unitab)
90 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
91!-------------------------------------------------------------------------------
92 rhor = mat_param%RHO
93 rhoi = mat_param%RHO0
94 IF (rho0 > zero) THEN
95 rhor = rho0
96 mat_param%RHO = rho0
97 pm(1)= rho0
98 ELSE
99 rho0=rhor
100 ENDIF
101
102 IF(gamma /= one)THEN
103 e0=(p0+gamma*pstar)/(gamma-one)
104 ELSE
105 e0 = zero ! error managed below
106 ENDIf
107
108 !ERRORS :
109 ! GAMMA <=0
110
111 IF(gamma <= one)THEN
112 CALL ancmsg(msgid=67,msgtype=msgerror,anmode=aninfo,i1=imideos,c1='/EOS/STIFF-GAS',c2='GAMMA MUST BE GREATER THAN 1.0')
113 ENDIF
114
115 pm(32)=(gamma-one)*e0 !BULK = (1+ยต)*dP/dmu (partial derivative at constant E)
116 pm(88)=psh
117 pm(23)=e0
118
119 mat_param%EOS%NUPARAM = 3
120 mat_param%EOS%NIPARAM = 0
121 mat_param%EOS%NFUNC = 0
122 mat_param%EOS%NTABLE = 0
123 CALL mat_param%EOS%CONSTRUCT() !allocations
124
125 mat_param%EOS%UPARAM(1) = gamma
126 mat_param%EOS%UPARAM(2) = p0
127 mat_param%EOS%UPARAM(3) = pstar
128 mat_param%EOS%PSH = psh
129 mat_param%EOS%E0 = e0
130
131 !P0
132 IF(rhoi == zero)THEN
133 mu0 = zero ! error 683 already displayed
134 ELSE
135 IF(rhor /= zero)THEN
136 mu0 = rhoi/rhor-one
137 ELSE
138 mu0 = zero ! error 683 already displayed
139 ENDIF
140 ENDIF
141
142 IF(rhoi /= zero)THEN
143 df = rhor/rhoi
144 ELSE
145 df = zero
146 ENDIF
147
148 pp = -gamma*pstar-psh + (gamma-one)*(one+mu0)*e0
149 pm(31)=p0-psh
150 pm(104)=p0-psh
151 IF (mat_param%THERM%TINI == zero) THEN
152 mat_param%THERM%TINI =three100
153 pm(79) = three100
154 END IF
155
156 !SSP0
157 ssp0 = zero
158 g0 = pm(22)
159 rhoi = pm(89)
160 dpdmu = (gamma-one) *e0+(gamma-one)*(one+mu0)*df*df*(pp+psh)
161 dpdmu=max(zero,dpdmu)
162 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
163 pm(27)=ssp0
164
165 WRITE(iout,1000)
166
167 IF(is_encrypted)THEN
168 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
169 ELSE
170 WRITE(iout,1500)gamma,p0,psh,pstar,e0
171 IF(is_available_rho0)WRITE(iout,1501)pm(1)
172 ENDIF
173
174 RETURN
175 1000 FORMAT(
176 & 5x,' STIFFENED GAS EOS ',/,
177 & 5x,' ----------------- ',/)
178 1500 FORMAT(
179 & 5x,'GAMMA . . . . . . . . . . . . . . . . . .=',1pg20.13/,
180 & 5x,'P0. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
181 & 5x,'PSH . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
182 & 5x,'PSTAR . . . . . . . . . . . . . . . . . .=',1pg20.13/,
183 & 5x,'COMPUTED E0 . . . . . . . . . . . . . . .=',1pg20.13)
184 1501 FORMAT(
185 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
186
187 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
#define max(a, b)
Definition macros.h:21
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895