-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphysical_constants.f90
More file actions
68 lines (45 loc) · 1.91 KB
/
physical_constants.f90
File metadata and controls
68 lines (45 loc) · 1.91 KB
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
module physical_constants
implicit none
!precision parameter so all reals have same level of precision
integer, parameter :: dp=selected_real_kind(15,300)
!pi
real(kind=dp), parameter :: pi = 3.14159265358979_dp
!Permiability of free space
real(kind=dp), parameter :: PFS = 4.0e-7_dp * pi
!electron charge
real(kind=dp), parameter :: e = 1.602176634e-19
!Planck constant
real(kind=dp), parameter :: h = 6.62607015e-34
!reduced Planck constant
real(kind=dp), parameter :: h_bar = h / (2.0_dp * pi)
!electron rest mass
real(kind=dp), parameter :: m_e = 9.109383701528e-31
!speed of light
real(kind=dp), parameter :: SOL = 2.99792458e8
!Bohn magneton
real(kind=dp), parameter :: BohrMag = (e * h_bar) / (2.0_dp * m_e)
!------------------------------------------------------------------------------!
!integers for files
integer, parameter :: unit1=10, unit2=11, unit3=12
integer :: istat
!------------------------------------------------------------------------------!
!integers for counting
integer :: i, j, k
!------------------------------------------------------------------------------!
!--All constants below this point are for use within the dipole field problem--!
!------------------------------------------------------------------------------!
!atomic spacing = 3 angstroms
real(kind=dp), parameter :: l = 3.0e-10_dp
!number of dipoles = N**3
integer :: N
!arrays for x, y and z possible coordinates to be stored in
real(kind=dp), dimension(:), allocatable :: coords
!magnetic moment unit vector
real(kind=dp), dimension(3) :: mag_vector
!center of the ellipsoid
real(kind=dp) :: ellipCent
!Ellipsoid radii
real(kind=dp), parameter :: rx = 10.0e-9_dp, ry = 10.0e-9_dp, rz = 20.0e-9_dp
!Defined by user in initialise module, selects if run is series or parallel
character :: sORp
endmodule physical_constants