Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_SetVarInfo.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: Set variable info for mixture.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_SetVarInfo.F90,v 1.6 2008/12/06 08:44:13 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2004-2006 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_setvarinfo(pRegion)
45 
46  USE moddatatypes
47  USE moderror
48  USE modparameters
49  USE modglobal, ONLY: t_global
50  USE moddatastruct, ONLY: t_region
51 
52  USE modinterfaces, ONLY: rflu_getcvloc
53 
54  IMPLICIT NONE
55 
56 ! ******************************************************************************
57 ! Declarations and definitions
58 ! ******************************************************************************
59 
60 ! ==============================================================================
61 ! Arguments
62 ! ==============================================================================
63 
64  TYPE(t_region), POINTER :: pregion
65 
66 ! ==============================================================================
67 ! Locals
68 ! ==============================================================================
69 
70  CHARACTER(CHRLEN) :: rcsidentstring
71  INTEGER :: cvmixtpres,cvmixtxvel,cvmixtyvel,cvmixtzvel
72  TYPE(t_global), POINTER :: global
73 
74 ! ******************************************************************************
75 ! Start
76 ! ******************************************************************************
77 
78  rcsidentstring = '$RCSfile: RFLU_SetVarInfo.F90,v $ $Revision: 1.6 $'
79 
80  global => pregion%global
81 
82  CALL registerfunction(global,'RFLU_SetVarInfo',&
83  'RFLU_SetVarInfo.F90')
84 
85 ! ******************************************************************************
86 ! Set variable info depending on fluid model
87 ! ******************************************************************************
88 
89  SELECT CASE ( pregion%mixtInput%fluidModel )
90 
91 ! ==============================================================================
92 ! Incompressible fluid
93 ! ==============================================================================
94 
95  CASE ( fluid_model_incomp )
96  cvmixtxvel = rflu_getcvloc(global,fluid_model_incomp,cv_mixt_xvel)
97  cvmixtyvel = rflu_getcvloc(global,fluid_model_incomp,cv_mixt_yvel)
98  cvmixtzvel = rflu_getcvloc(global,fluid_model_incomp,cv_mixt_zvel)
99  cvmixtpres = rflu_getcvloc(global,fluid_model_incomp,cv_mixt_pres)
100 
101  pregion%mixt%cvInfo(cvmixtxvel) = var_info_posneg
102  pregion%mixt%cvInfo(cvmixtyvel) = var_info_posneg
103  pregion%mixt%cvInfo(cvmixtzvel) = var_info_posneg
104  pregion%mixt%cvInfo(cvmixtpres) = var_info_pos
105 
106 ! ==============================================================================
107 ! Compressible fluid
108 ! ==============================================================================
109 
110  CASE ( fluid_model_comp )
111  pregion%mixt%cvInfo(cv_mixt_dens) = var_info_pos
112  pregion%mixt%cvInfo(cv_mixt_xvel) = var_info_posneg
113  pregion%mixt%cvInfo(cv_mixt_yvel) = var_info_posneg
114  pregion%mixt%cvInfo(cv_mixt_zvel) = var_info_posneg
115  pregion%mixt%cvInfo(cv_mixt_pres) = var_info_pos
116 
117 ! ==============================================================================
118 ! Default
119 ! ==============================================================================
120 
121  CASE default
122  CALL errorstop(global,err_reached_default,__line__)
123  END SELECT ! pRegion%mixtInput%fluidModel
124 
125 ! ******************************************************************************
126 ! End
127 ! ******************************************************************************
128 
129  CALL deregisterfunction(global)
130 
131 END SUBROUTINE rflu_setvarinfo
132 
133 ! ******************************************************************************
134 !
135 ! RCS Revision history:
136 !
137 ! $Log: RFLU_SetVarInfo.F90,v $
138 ! Revision 1.6 2008/12/06 08:44:13 mtcampbe
139 ! Updated license.
140 !
141 ! Revision 1.5 2008/11/19 22:17:26 mtcampbe
142 ! Added Illinois Open Source License/Copyright
143 !
144 ! Revision 1.4 2006/03/26 20:21:47 haselbac
145 ! Removed error trap for GL model
146 !
147 ! Revision 1.3 2004/11/14 19:44:00 haselbac
148 ! Generalized setting of variable info
149 !
150 ! Revision 1.2 2004/11/06 03:17:34 haselbac
151 ! Cosmetics only
152 !
153 ! Revision 1.1 2004/11/02 02:26:50 haselbac
154 ! Initial revision
155 !
156 ! ******************************************************************************
157 
158 
159 
160 
161 
162 
163 
INTEGER function rflu_getcvloc(global, fluidModel, var)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflu_setvarinfo(pRegion)