constants_geometrical.f90
Go to the documentation of this file.
1 !#############################################################################
2 !# #
3 !# fosite - 3D hydrodynamical simulation program #
4 !# module: constants_geometrical.f90 #
5 !# #
6 !# Copyright (C) 2007-2016 #
7 !# Tobias Illenseer <tillense@astrophysik.uni-kiel.de> #
8 !# Manuel Jung <mjung@astrophysik.uni-kiel.de> #
9 !# #
10 !# This program is free software; you can redistribute it and/or modify #
11 !# it under the terms of the GNU General Public License as published by #
12 !# the Free Software Foundation; either version 2 of the License, or (at #
13 !# your option) any later version. #
14 !# #
15 !# This program is distributed in the hope that it will be useful, but #
16 !# WITHOUT ANY WARRANTY; without even the implied warranty of #
17 !# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or #
18 !# NON INFRINGEMENT. See the GNU General Public License for more #
19 !# details. #
20 !# #
21 !# You should have received a copy of the GNU General Public License #
22 !# along with this program; if not, write to the Free Software #
23 !# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
24 !# #
25 !#############################################################################
26 
27 !----------------------------------------------------------------------------!
35 !----------------------------------------------------------------------------!
39  IMPLICIT NONE
40  !--------------------------------------------------------------------------!
41  PRIVATE
43  CONTAINS
45  END TYPE
46  CHARACTER(LEN=32), PARAMETER :: units_name = 'geometrical'
47  !--------------------------------------------------------------------------!
48  PUBLIC :: &
49  ! types
51  !--------------------------------------------------------------------------!
52 
53 CONTAINS
54 
56  SUBROUTINE initconstants_geometrical(this)
57  IMPLICIT NONE
58  !------------------------------------------------------------------------!
59  CLASS(constants_geometrical), INTENT(INOUT) :: this
60  !------------------------------------------------------------------------!
61  REAL :: C, GN, KB, NA, SB, KE
62  !------------------------------------------------------------------------!
63  ! numerical values of physical constants in geometrical units (c = G = 1)
64  this%C = 1.0 ! lightspeed !
65  this%GN = 1.0 ! Newtons grav. constant !
66  this%KB = 1.0 ! Boltzmann constant !
67  this%NA = na ![1/mol] ! Avogadro constant !
68  ! factors for conversion to SI units
69  ! time and mass have unit of length i.e. metre
70 
71  c = this%constants_SI%C
72  gn = this%constants_SI%GN
73  kb = this%constants_SI%KB
74  na = this%constants_SI%NA
75  sb = this%constants_SI%SB
76  ke = this%constants_SI%KE
77  this%cf_time = c ! i.e. 1 sec [SI] = 3e8 m [geometrical] !
78  this%cf_mass = (gn/c)/c
79  this%cf_momentum = this%cf_mass/c
80  this%cf_energy = this%cf_momentum/c
81  this%cf_power = this%cf_energy/c
82  this%cf_temperature = kb * this%cf_energy
83  this%cf_density = this%cf_mass
84  ! some scaled constants
85  this%KE = ke*c/(gn/c) ! [m] electron scat. opacity !
86 
87  CALL this%InitConstants(geometrical,units_name)
88  END SUBROUTINE initconstants_geometrical
89 
module for SI units and physical constants
character(len=32), parameter units_name
subroutine initconstants_geometrical(this)
Constructor of physical constants module using geometrical units.
generic module for units and physical constants
module for geometrical units and physical constants
integer, parameter, public geometrical