-
Notifications
You must be signed in to change notification settings - Fork 0
/
planetwbc.src
87 lines (83 loc) · 2.15 KB
/
planetwbc.src
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
75
76
77
78
79
80
81
82
83
84
85
86
87
#include "zeus2d.def"
c=====================================================================
c/////////////////// SUBROUTINE PLANETWBC \\\\\\\\\\\\\\\\\\\\\\\\\\\
c
subroutine planetwbc
c
c SETS BOUNDARY CONDITIONS AT BASE OF PLANET WIND
c
c written by: Daniel Proga
c date: May 2008
c modified1:
c
c INPUT PARAMETERS:
c
c----------------------------------------------------------------------
implicit NONE
#include "cons.h"
#include "param.h"
#include "grid.h"
#include "field.h"
#include "root.h"
#include "scratch.h"
#include "gravity.h"
#include "bndry.h"
#include "planetw.h"
real ciso2
integer i,j,iswitch
save iswitch
c
external bvalv1,bvalv2,bvald,bvale
c\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////////////////////
c=======================================================================
c
c Increase sound speed as t^{1/4} to final value given by input HEP
c
c if (gamma .eq. 1.0) then
c if (time .gt. 200.0) then
c ciso2 = 0.2 + (1.0/hep - 0.2)
c & *min(sqrt((time-200.0)/1000.0),1.0)
c ciso = sqrt(ciso2)
c endif
c endif
c
c switch to adiabatic EOS with gamma=1.01 at t=2000.0
c
c if (time .gt. 2000.0 .and. iswitch=0)
c gamma = 1.01
c e0 = ciso**2*d0/(gamma*(gamma-1.0))
c do j=js,je
c do i=is,ie
c e(i,j)=d(i,j)*ciso**2/(gamma-1.0)
c enddo
c iswitch = 1
c endif
c
c set d, e, velocity at first cell in r
c
if (time .lt. t0) then
do j=js,je
e (is,j)=eiim1(j)*max(0.01,cos(x2b(j)))
c e (is,j)=eiim1(j)
c if (cos(x2b(j)) .lt. 0.0) e(is,j)=0.01*eiim1(j)
d (is,j)=diim1(j)
v2(is,j)=0.0
enddo
endif
c
c increase e at inner boundary for t>t0 to factor eratio larger
c
c if (time .gt. t0) then
c do j=js,je
c d (is,j)=diim1(j)
c e (is,j)=eiim1(j) + eiim1(j)*((eratio-1.0)*
c & min(((time-t0)/tramp),1.0)*max(1e-3,cos(x2b(j))))
c v2(is,j)=0.0
c enddo
c endif
call bvald
call bvale
call bvalv1
call bvalv2
return
end