-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINPUTS.f90
135 lines (85 loc) · 3.21 KB
/
INPUTS.f90
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
FUNCTION COAGKERNEL(x1,y1,x2,y2,time)
!----------------------------------------------------------------------------------------------
!
!DESCRIPTION:
!
!This is where the coagulation/aggregation kernel is defined. To adapt as desired.
!See for instance Equation 14.
!
!VARIABLES:
!
!B0 aggregation rate factor
!eij sticking probability between pure particles of i and j
!eff efficiency
!fxi mass fraction of component i
!vi mass of particle i
!
!----------------------------------------------------------------------------------------------
USE GLOBAL
IMPLICIT NONE
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
DOUBLE PRECISION, INTENT (IN) :: x1, y1, x2, y2, time
DOUBLE PRECISION :: COAGKERNEL
DOUBLE PRECISION, PARAMETER :: B0=1.0d0
DOUBLE PRECISION :: v1, v2, eff, fx1, fx2, e11=0.8d0, e22=0.1, e12=0.6d0
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
v1 = x1 + y1
v2 = x2 + y2
fx1 = x1/v1
fx2 = x2/v2
eff = 1.0d0 !e11*fx1*fx2 + ((1.0d0-fx1)*fx2 + fx1*(1.0d0-fx2))*e12 + (1.0d0-fx1)*(1.0d0-fx2)*e22
COAGKERNEL = B0 !*eff*(2.0d0 + (v1/v2)**(1.0d0/3.0d0) + (v2/v1)**(1.0d0/3.0d0))
END FUNCTION COAGKERNEL
!##############################################################################################
FUNCTION PSDINI(xf,yf)
!----------------------------------------------------------------------------------------------
!
!DESCRIPTION:
!
!Initial condition for the number density function.
!See, for example, Equations 10 and 11 of paper.
!
!VARIABLES:
!
!mi mass of component i
!mi0 mean mass of component i
!N0 initial number of particles per unit volume
!
!----------------------------------------------------------------------------------------------
USE GLOBAL
IMPLICIT NONE
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
DOUBLE PRECISION, INTENT (IN) :: xf, yf
DOUBLE PRECISION :: PSDINI
DOUBLE PRECISION :: m1, m2, m10, m20, N0
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
m1 = xf
m2 = yf
m10 = 1.0d0
m20 = 1.0d0
N0 = 1.0d0
PSDINI = 4.0d0*N0/(m10*m20)*(m1/m10)*DEXP(-2.0d0*(m1/m10) - (m2/m20))
END FUNCTION PSDINI
!##############################################################################################
FUNCTION EXPO2DMM(m1,m2,m10,m20,N0)
!----------------------------------------------------------------------------------------------
!
!DESCRIPTION:
!
!2D Exponential distribution. Input: mass of each component.
!
!VARIABLES:
!
!mi mass of component i
!mi0 mean mass of component i
!N0 initial number of particles per unit volume
!
!----------------------------------------------------------------------------------------------
IMPLICIT NONE
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
DOUBLE PRECISION, INTENT (IN) :: m1, m2, m10, m20, N0
DOUBLE PRECISION :: EXPO2DMM
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
EXPO2DMM = N0/(m10*m20)*DEXP(-m1/m10 -m2/m20)
END FUNCTION EXPO2DMM
!##############################################################################################