Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PERI_SolutionUpdate.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: update solution pertinent to periodic flows rocperi if applicable
26 !
27 ! Description: Depending on flow kind, different quantities are updated to
28 ! maintain balance (e.g. momentum balance), while maintaining
29 ! other important physical requirements (e.g. mass balance).
30 !
31 ! Input: region = data of current region
32 !
33 ! Output: PERI flow solution updated, e.g. cpr mean pgrad for cpr case
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: PERI_SolutionUpdate.F90,v 1.5 2008/12/06 08:44:36 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE peri_solutionupdate( region ) ! PUBLIC
46 
47  USE moddatatypes
48  USE modglobal, ONLY : t_global
49  USE moddatastruct, ONLY : t_region
51  USE moderror
52  USE modparameters
54  IMPLICIT NONE
55 
56 ! ... parameters
57  TYPE(t_region) :: region
58 
59 ! ... local variables
60  CHARACTER(CHRLEN) :: rcsidentstring
61  TYPE(t_global), POINTER :: global
62  INTEGER :: iupdate
63 
64 !******************************************************************************
65 
66  rcsidentstring = '$RCSfile: PERI_SolutionUpdate.F90,v $ $Revision: 1.5 $'
67 
68  global => region%global
69  CALL registerfunction( global,'PERI_SolutionUpdate',&
70  'PERI_SolutionUpdate.F90' )
71 
72 ! update flow solution --------------------------------------------------------
73 
74  iupdate = 0
75 
76  IF (global%flowType == flow_unsteady .AND. &
77  global%solverType == solv_explicit) THEN
78  IF (region%periInput%flowKind == peri_flow_cpr .AND. &
79  region%irkStep == global%nrkSteps) THEN
80  iupdate = 1
81  ELSEIF (region%periInput%flowKind == peri_flow_channel) THEN
82  iupdate = 1
83  ENDIF
84  ELSE
85  IF (region%periInput%flowKind == peri_flow_cpr .OR. &
86  region%periInput%flowKind == peri_flow_channel) THEN
87  iupdate = 1
88  ENDIF
89  ENDIF
90 
91  IF (iupdate == 1) THEN
92  CALL peri_copgradupdate( region )
93  ENDIF
94 
95 ! finalize -------------------------------------------------------------------
96 
97  CALL deregisterfunction( global )
98 
99 END SUBROUTINE peri_solutionupdate
100 
101 !******************************************************************************
102 !
103 ! RCS Revision history:
104 !
105 ! $Log: PERI_SolutionUpdate.F90,v $
106 ! Revision 1.5 2008/12/06 08:44:36 mtcampbe
107 ! Updated license.
108 !
109 ! Revision 1.4 2008/11/19 22:17:49 mtcampbe
110 ! Added Illinois Open Source License/Copyright
111 !
112 ! Revision 1.3 2004/06/11 21:49:40 wasistho
113 ! prepared for RFLU
114 !
115 ! Revision 1.2 2004/06/09 01:21:34 wasistho
116 ! prepared for RFLU
117 !
118 ! Revision 1.1 2004/06/08 23:56:56 wasistho
119 ! changed nomenclature
120 !
121 ! Revision 1.6 2004/01/21 03:52:57 wasistho
122 ! modify due to newly unsteady explicit and implicit (dual t-s) option
123 !
124 ! Revision 1.5 2003/04/25 23:17:12 wasistho
125 ! update cpr pgrad per time-step for unsteady
126 !
127 ! Revision 1.4 2003/04/05 02:03:51 wasistho
128 ! regions to region in PERI_solutionUpdate
129 !
130 ! Revision 1.3 2003/04/03 20:56:20 wasistho
131 ! replace regions to region in pgradUpdate
132 !
133 ! Revision 1.2 2003/04/02 03:03:36 wasistho
134 ! removed unused files
135 !
136 ! Revision 1.1.1.1 2003/03/29 03:36:30 wasistho
137 ! install ROCPERI
138 !
139 !
140 !******************************************************************************
141 
142 
143 
144 
145 
146 
147 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine peri_copgradupdate(region)
subroutine peri_solutionupdate(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469