Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SPEC_RFLU_InitFlowScratch.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: Initialize flow field for species in a region from scratch.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Region pointer
31 !
32 ! Output: None.
33 !
34 ! Notes:
35 ! 1. Initialize state vector in primitive form. This is done so can compute
36 ! gas properties based on species mass fractions.
37 !
38 ! ******************************************************************************
39 !
40 ! $Id: SPEC_RFLU_InitFlowScratch.F90,v 1.5 2008/12/06 08:44:40 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003-2005 by the University of Illinois
43 !
44 ! ******************************************************************************
45 
46 SUBROUTINE spec_rflu_initflowscratch(pRegion)
47 
48  USE moddatatypes
49  USE moderror
50  USE modparameters
51  USE modglobal, ONLY: t_global
52  USE modgrid, ONLY: t_grid
53  USE moddatastruct, ONLY: t_region
54 
55  IMPLICIT NONE
56 
57 ! ******************************************************************************
58 ! Definitions and declarations
59 ! ******************************************************************************
60 
61 ! ==============================================================================
62 ! Arguments
63 ! ==============================================================================
64 
65  TYPE(t_region), POINTER :: pregion
66 
67 ! ==============================================================================
68 ! Locals
69 ! ==============================================================================
70 
71  CHARACTER(CHRLEN) :: rcsidentstring
72  INTEGER :: errorflag,icg,ispec
73  REAL(RFREAL) :: initval
74  REAL(RFREAL), DIMENSION(:,:), POINTER :: pcvspec
75  TYPE(t_grid), POINTER :: pgrid
76  TYPE(t_global), POINTER :: global
77 
78 ! ******************************************************************************
79 ! Start
80 ! ******************************************************************************
81 
82  rcsidentstring = '$RCSfile: SPEC_RFLU_InitFlowScratch.F90,v $ $Revision: 1.5 $'
83 
84  global => pregion%global
85 
86  CALL registerfunction(global,'SPEC_RFLU_InitFlowScratch',&
87  'SPEC_RFLU_InitFlowScratch.F90')
88 
89 ! ******************************************************************************
90 ! Set pointers and variables
91 ! ******************************************************************************
92 
93  pgrid => pregion%grid
94  pcvspec => pregion%spec%cv
95 
96  pregion%spec%cvState = cv_mixt_state_prim
97 
98 ! ******************************************************************************
99 ! State vector
100 ! ******************************************************************************
101 
102  DO ispec = 1,pregion%specInput%nSpecies
103  initval = pregion%specInput%specType(ispec)%initVal
104 
105  DO icg = 1,pgrid%nCellsTot
106  pcvspec(ispec,icg) = initval
107  END DO ! icg
108  END DO ! iSpec
109 
110 ! ******************************************************************************
111 ! End
112 ! ******************************************************************************
113 
114  CALL deregisterfunction(global)
115 
116 END SUBROUTINE spec_rflu_initflowscratch
117 
118 ! ******************************************************************************
119 !
120 ! RCS Revision history:
121 !
122 ! $Log: SPEC_RFLU_InitFlowScratch.F90,v $
123 ! Revision 1.5 2008/12/06 08:44:40 mtcampbe
124 ! Updated license.
125 !
126 ! Revision 1.4 2008/11/19 22:17:53 mtcampbe
127 ! Added Illinois Open Source License/Copyright
128 !
129 ! Revision 1.3 2006/04/07 15:19:24 haselbac
130 ! Removed tabs
131 !
132 ! Revision 1.2 2005/11/10 02:37:59 haselbac
133 ! Now init primitive state, cosmetics
134 !
135 ! Revision 1.1 2003/11/25 21:08:37 haselbac
136 ! Initial revision
137 !
138 ! ******************************************************************************
139 
140 
141 
142 
143 
144 
145 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine spec_rflu_initflowscratch(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469