source: palm/trunk/SOURCE/timestep_scheme_steering.f90 @ 1907

Last change on this file since 1907 was 1818, checked in by maronga, 9 years ago

last commit documented / copyright update

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1!> @file timestep_scheme_steering.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2016 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! ------------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: timestep_scheme_steering.f90 1818 2016-04-06 15:53:27Z suehring $
26!
27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
30! 1322 2014-03-20 16:38:49Z raasch
31! REAL constants defined as wp-kind
32!
33! 1320 2014-03-20 08:40:49Z raasch
34! ONLY-attribute added to USE-statements
35!
36! 1036 2012-10-22 13:43:42Z raasch
37! code put under GPL (PALM 3.9)
38!
39! 1001 2012-09-13 14:08:46Z raasch
40! all actions concerning leapfrog scheme removed
41!
42! Revision 1.1  2004/01/28 15:34:47  raasch
43! Initial revision
44!
45!
46! Description:
47! ------------
48!> Depending on the timestep scheme set the steering factors for the prognostic
49!> equations.
50!------------------------------------------------------------------------------!
51 SUBROUTINE timestep_scheme_steering
52 
53
54    USE control_parameters,                                                    &
55        ONLY:  intermediate_timestep_count, timestep_scheme, tsc
56
57    USE kinds
58
59    IMPLICIT NONE
60
61
62    IF ( timestep_scheme(1:5) == 'runge' )  THEN
63!
64!--    Runge-Kutta schemes (here the factors depend on the respective
65!--    intermediate step)
66       IF ( timestep_scheme == 'runge-kutta-2' )  THEN
67          IF ( intermediate_timestep_count == 1 )  THEN
68             tsc(1:5) = (/ 1.0_wp, 1.0_wp,  0.0_wp, 0.0_wp, 0.0_wp /)
69          ELSE
70             tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /)
71          ENDIF
72       ELSE
73          IF ( intermediate_timestep_count == 1 )  THEN
74             tsc(1:5) = (/ 1.0_wp,  1.0_wp /  3.0_wp,           0.0_wp, 0.0_wp, 0.0_wp /)
75          ELSEIF ( intermediate_timestep_count == 2 )  THEN
76             tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /)
77          ELSE
78             tsc(1:5) = (/ 1.0_wp,  8.0_wp / 15.0_wp,   1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /)
79          ENDIF         
80       ENDIF
81
82    ELSEIF ( timestep_scheme == 'euler' )  THEN
83!
84!--    Euler scheme
85       tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /)
86
87    ENDIF
88
89
90 END SUBROUTINE timestep_scheme_steering
Note: See TracBrowser for help on using the repository browser.