constants_base.f90
Go to the documentation of this file.
1 !#############################################################################
2 !# #
3 !# fosite - 3D hydrodynamical simulation program #
4 !# module: constants_generic.f90 #
5 !# #
6 !# Copyright (C) 2007-2008,2011 #
7 !# Tobias Illenseer <tillense@astrophysik.uni-kiel.de> #
8 !# #
9 !# This program is free software; you can redistribute it and/or modify #
10 !# it under the terms of the GNU General Public License as published by #
11 !# the Free Software Foundation; either version 2 of the License, or (at #
12 !# your option) any later version. #
13 !# #
14 !# This program is distributed in the hope that it will be useful, but #
15 !# WITHOUT ANY WARRANTY; without even the implied warranty of #
16 !# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or #
17 !# NON INFRINGEMENT. See the GNU General Public License for more #
18 !# details. #
19 !# #
20 !# You should have received a copy of the GNU General Public License #
21 !# along with this program; if not, write to the Free Software #
22 !# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
23 !# #
24 !#############################################################################
29 !----------------------------------------------------------------------------!
32 !----------------------------------------------------------------------------!
38 !----------------------------------------------------------------------------!
41  IMPLICIT NONE
42  !--------------------------------------------------------------------------!
43  PRIVATE
44  INTEGER, PARAMETER :: si = 1
45  INTEGER, PARAMETER :: cgs = 2
46  INTEGER, PARAMETER :: geometrical = 3
52  TYPE, EXTENDS(logging_base) :: constants_base
55  REAL :: c
56  REAL :: gn
57  REAL :: kb
58  REAL :: na
59  REAL :: sb
60  REAL :: rg
61  REAL :: ke
64  REAL :: cf_time
65  REAL :: cf_mass
66  REAL :: cf_momentum
67  REAL :: cf_energy
68  REAL :: cf_power
69  REAL :: cf_temperature
70  REAL :: cf_density
71  REAL :: cf_opacity
72  CONTAINS
73  PROCEDURE :: initconstants
74  END TYPE constants_base
75  !--------------------------------------------------------------------------!
76  PUBLIC :: &
77  ! types
79  ! constant flags
81  !--------------------------------------------------------------------------!
82 
83 CONTAINS
84 
85  SUBROUTINE initconstants(this,units,units_name)
86  IMPLICIT NONE
87  !------------------------------------------------------------------------!
88  CLASS(constants_base),INTENT(INOUT) :: this
89  INTEGER :: units
90  CHARACTER(LEN=*) :: units_name
91  !------------------------------------------------------------------------!
92  INTENT(IN) :: units
93  !------------------------------------------------------------------------!
94  CALL this%InitLogging(units,units_name)
95 
96  ! derived constants
97  this%RG = this%KB * this%NA ![J/mol/K] universal gas constant !
98 
99  ! print some information
100  CALL this%Info(" CONSTANTS> physical units: " // trim(this%GetName()))
101  END SUBROUTINE initconstants
102 
103 END MODULE constants_base_mod
Basic fosite module.
common data structure
integer, parameter, public si
generic module for units and physical constants
physical constants data structure
subroutine initconstants(this, units, units_name)
integer, parameter, public geometrical
integer, parameter, public cgs