OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sesame.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!|| sesame_mod ../common_source/eos/sesame.F
25!||--- called by ------------------------------------------------------
26!|| eosmain ../common_source/eos/eosmain.F
27!|| eosmain51 ../engine/source/materials/mat/mat051/eosmain51.F90
28!||====================================================================
30 IMPLICIT NONE
31 CONTAINS
32!||====================================================================
33!|| sesame ../common_source/eos/sesame.F
34!||--- called by ------------------------------------------------------
35!|| eosmain ../common_source/eos/eosmain.F
36!|| eosmain51 ../engine/source/materials/mat/mat051/eosmain51.F90
37!||--- calls -----------------------------------------------------
38!|| mintp1_rt ../common_source/eos/mintp1_rt.F
39!|| mintp_re ../common_source/eos/mintp_re.F
40!|| mintp_rt ../common_source/eos/mintp_rt.F
41!||--- uses -----------------------------------------------------
42!|| eos_param_mod ../common_source/modules/mat_elem/eos_param_mod.F90
43!||====================================================================
44 SUBROUTINE sesame(IFLAG , NEL, PMIN ,OFF ,EINT ,RHO ,RHO0 ,
45 2 ESPE , DVOL, PNEW ,DPDM ,DPDE ,THETA ,
46 3 BUFMAT, EOS_STRUCT)
47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE eos_param_mod , ONLY : eos_param_
51C-----------------------------------------------
52C D e s c r i p t i o n
53C-----------------------------------------------
54C This subroutine contains numerical solving
55C of SESAME EOS
56!----------------------------------------------------------------------------
57!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
58!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
59!! \details
60!! \details STAGGERED SCHEME
61!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
62!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
63!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
64!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
65!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
66!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
67!! \details COLLOCATED SCHEME
68!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
69!----------------------------------------------------------------------------C-----------------------------------------------
70C I m p l i c i t T y p e s
71C-----------------------------------------------
72#include "implicit_f.inc"
73C-----------------------------------------------
74C C o m m o n B l o c k s
75C-----------------------------------------------
76!#include "param_c.inc"
77#include "vect01_c.inc"
78#include "com04_c.inc"
79#include "tabsiz_c.inc"
80C-----------------------------------------------
81C D u m m y A r g u m e n t s
82C-----------------------------------------------
83 INTEGER :: IFLAG, NEL
84 my_real :: BUFMAT(SBUFMAT),
85 . off(nel) , eint(nel), rho(nel) , rho0(nel),
86 . espe(nel), dvol(nel), pnew(nel),
87 . dpdm(nel), dpde(nel), theta(nel)
88 TYPE(eos_param_),INTENT(IN) :: EOS_STRUCT
89C-----------------------------------------------
90C L o c a l V a r i a b l e s
91C-----------------------------------------------
92 INTEGER :: I, NR, NT, IDR, IDT, IDP, IDE
93 my_real :: ESPEM, PRES, DTDE, DPDR, DPDT
94 my_real :: pmin
95C-----------------------------------------------
96C S o u r c e L i n e s
97C-----------------------------------------------
98 nr = eos_struct%IPARAM(1)
99 nt = eos_struct%IPARAM(2)
100 idr = eos_struct%IPARAM(3)
101
102 IF(iflag == 0) THEN
103 DO i=1,nel
104 idt = idr + nr
105 idp = idt + nt
106 ide = idp + nr * nt
107 espem = espe(i)/rho0(i)
108 dtde = zero
109 CALL mintp_re(bufmat(idr),nr,bufmat(idt),nt,bufmat(ide),rho(i),theta(i),espem,dtde)
110 CALL mintp1_rt(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),rho(i),theta(i),pres,dpdr,dpdt)
111 dpdm(i) = rho0(i)*dpdr
112 dpde(i) = dpdt*dtde/rho0(i)
113 pnew(i) = max(pres,pmin)*off(i)! P(mu[n+1],E[n])
114 ENDDO
115
116 ELSEIF(iflag == 1) THEN
117 DO i=1,nel
118 idt = idr + nr
119 idp = idt + nt
120 ide = idp + nr * nt
121 espem=espe(i)/rho0(i)
122 CALL mintp_re(bufmat(idr),nr,bufmat(idt),nt,bufmat(ide),rho(i),theta(i),espem,dtde)
123 CALL mintp_rt(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),rho(i),theta(i),pnew(i),dpdr)
124 pnew(i)= max(pnew(i),pmin)*off(i)! P(mu[n+1],E[n+1])
125 eint(i)= eint(i)-half*dvol(i)*pnew(i)
126 ENDDO
127
128 ELSEIF(iflag == 2) THEN
129 DO i=1, nel
130 idt = idr + nr
131 idp = idt + nt
132 ide = idp + nr * nt
133 espem = espe(i)/rho0(i)
134 CALL mintp_re(bufmat(idr),nr,bufmat(idt),nt,bufmat(ide),rho(i),theta(i),espem,dtde)
135 CALL mintp1_rt(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),rho(i),theta(i),pres,dpdr,dpdt)
136 dpdm(i) = rho0(i)*dpdr
137 dpde(i) = dpdt*dtde/rho0(i)
138 pnew(i) = max(pres,pmin)*off(i)
139 ENDDO
140 ENDIF
141C-----------------------------------------------
142 RETURN
143 END SUBROUTINE sesame
144 END MODULE sesame_mod
#define max(a, b)
Definition macros.h:21
subroutine mintp1_rt(xx, nx, yy, ny, zz, x, y, z, dzdx, dzdy)
Definition mintp1_rt.F:31
subroutine mintp_re(xx, nx, yy, ny, zz, x, y, z, dydz)
Definition mintp_re.F:34
subroutine mintp_rt(xx, nx, yy, ny, zz, x, y, z, dzdx)
Definition mintp_rt.F:35
subroutine sesame(iflag, nel, pmin, off, eint, rho, rho0, espe, dvol, pnew, dpdm, dpde, theta, bufmat, eos_struct)
Definition sesame.F:47