1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*@@
@file EOS_GeneralHybrid_Analysis.F
@date
@author Harry Dimmelmeier, Ian Hawke, Christian Ott
@desc
Calculates the polytropic and thermal contributions to the
total pressure.
@enddesc
@@*/
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
/*@@
@routine Check_Poly_Contrib_General
@date
@author Harry Dimmelmeier, Ian Hawke, Christian Ott
@desc
The routine that calculates the contributions.
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
subroutine Check_Poly_Contrib_General(CCTK_ARGUMENTS)
USE EOS_GP_Scalars
USE EOS_GeneralHybrid_Scalars
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
CCTK_INT :: i,j,k
CCTK_REAL local_eos_gamma, local_eos_k_cgs, d_p_poly, d_p_th_1, &
d_p_th_2, zero
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
if (rho(i,j,k) > rho_nuc) then
local_eos_gamma = eos_gamma_supernuclear
local_eos_k_cgs = eos_k_supernuclear_cgs
else
local_eos_gamma = eos_gamma
local_eos_k_cgs = eos_k_cgs
end if
pressure_poly(i,j,k) = p_geom_factor * local_eos_k_cgs * &
(rho(i,j,k) * rho_geom_factor_inv)**local_eos_gamma
pressure_th(i,j,k) = - p_geom_factor * local_eos_k_cgs * &
(eos_gamma_th - 1.d0) / (local_eos_gamma - 1.d0) * &
(rho(i,j,k) * rho_geom_factor_inv)**local_eos_gamma + &
(eos_gamma_th - 1.d0) * rho(i,j,k) * eps(i,j,k) - &
(eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) / &
(eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) * &
p_geom_factor * eos_k_cgs * &
rho_geom_factor_inv**eos_gamma * &
rho_nuc**(eos_gamma - 1.d0) * rho(i,j,k)
end do
end do
end do
end subroutine Check_Poly_Contrib_General
|