OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_murnaghan.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_murnaghan ../starter/source/materials/eos/hm_read_eos_murnaghan.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_eos ../starter/source/materials/eos/hm_read_eos.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
31!||--- uses -----------------------------------------------------
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_murnaghan(NPROPM, IOUT,PM,UNITAB,IUNIT,LSUBMODEL,IMIDEOS,MAT_PARAM)
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 MURNAGHAN 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, NPROPM
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 L o c a l V a r i a b l e s
70C-----------------------------------------------
71 my_real p0, e0, psh, rho0, k0, k1, rhoi, rhor, mu0, df, ssp0, g0, dpdmu
72 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
73C-----------------------------------------------
74C S o u r c e L i n e s
75C-----------------------------------------------
76 is_encrypted = .false.
77 is_available = .false.
78 is_available_rho0 = .false.
79
80 CALL hm_option_is_encrypted(is_encrypted)
81
82 CALL hm_get_floatv('EOS_K0', k0, is_available,lsubmodel,unitab)
83 CALL hm_get_floatv('K1', k1, is_available,lsubmodel,unitab)
84 CALL hm_get_floatv('LAW5_P0', p0, is_available,lsubmodel,unitab)
85 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
86 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
87
88 rhor = pm(1)
89 rhoi = pm(89)
90
91 IF(rho0 > zero) THEN
92 rhor = rho0
93 pm(1)= rho0
94 mat_param%RHO = rho0
95 ELSE
96 rho0=rhor
97 ENDIF
98
99 e0=zero
100
101 IF(k0 <= zero)THEN
102 CALL ancmsg(msgid=67,msgtype=msgerror,anmode=aninfo,i1=imideos, c1='/EOS/MURNAGHAN', c2='K0 MUST BE POSITIVE')
103 ENDIF
104
105 pm(32)=k0 !BULK = (1+ยต)*dP/dmu (partial derivative at constant E)
106 pm(88)=psh
107 pm(23)=e0
108
109 mat_param%EOS%NUPARAM = 3
110 mat_param%EOS%NIPARAM = 0
111 mat_param%EOS%NFUNC = 0
112 mat_param%EOS%NTABLE = 0
113 CALL mat_param%EOS%CONSTRUCT() !allocations
114
115 mat_param%EOS%UPARAM(1) = k0
116 mat_param%EOS%UPARAM(2) = p0
117 mat_param%EOS%UPARAM(3) = k1
118 mat_param%EOS%PSH = psh
119 mat_param%EOS%E0 = e0
120 IF (mat_param%THERM%TINI == zero) THEN
121 mat_param%THERM%TINI =three100
122 pm(79) = three100
123 END IF
124
125 IF(rhoi == zero)THEN
126 mu0 = zero ! error 683 already displayed
127 ELSE
128 IF(rhor /= zero)THEN
129 mu0 = rhoi/rhor-one
130 ELSE
131 mu0 = zero ! error 683 already displayed
132 ENDIF
133 ENDIF
134
135 IF(rhoi /= zero)THEN
136 df = rhor/rhoi
137 ELSE
138 df = zero
139 ENDIF
140
141 !P0
142 pm(31) = k0/k1 * (exp(k1*log(1+mu0)) - one ) + p0 - psh
143 pm(104)= k0/k1 * (exp(k1*log(1+mu0)) - one ) + p0 - psh
144
145 !SSP0
146 ssp0 = zero
147 g0 = pm(22)
148 rhoi = pm(89)
149 dpdmu = k0*exp( k1*log(1+mu0) )/(one+mu0)
150 dpdmu = max(zero,dpdmu)
151 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
152 pm(27)=ssp0
153 WRITE(iout,1000)
154
155 IF(is_encrypted)THEN
156 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
157 ELSE
158 WRITE(iout,1500)k0,k1,p0,pm(31),psh
159 IF(is_available_rho0)WRITE(iout,1501)pm(1)
160 ENDIF
161
162 RETURN
163 1000 FORMAT(
164 & 5x,' MURNAGHAN EOS ',/,
165 & 5x,' ------------- ',/)
166 1500 FORMAT(
167 & 5x,'K0. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
168 & 5x,'K1. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
169 & 5x,'P0. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
170 & 5x,'initial pressure. . . . . . . . . . . . .=',1PG20.13/,
171 & 5X,'psh . . . . . . . . . . . . . . . . . . .=',1PG20.13)
172 1501 FORMAT(
173 & 5X,'eos reference density . . . . . . . . . .=',1PG20.13)
174
175
176 RETURN
177
178
179 END SUBROUTINE HM_READ_EOS_MURNAGHAN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_eos_murnaghan(npropm, iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
#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