Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_FlimEmsInit.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 initial solution field to radiant Energy transport equation,
26 ! if any (selected model is FLDTRAN), for first EMS stage,
27 ! and initiate dissipation at stages > 1.
28 !
29 ! Description: none.
30 !
31 ! Input: region = data of current region,
32 ! iStage = current EMS stage.
33 !
34 ! Output: region%levels%radi = initial values
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: RADI_FlimEmsInit.F90,v 1.3 2008/12/06 08:44:37 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE radi_flimemsinit( region, istage )
47 
48  USE moddatatypes
49  USE moddatastruct, ONLY : t_region
50  USE modglobal, ONLY : t_global
51  USE moderror
52  USE modmpi
53  USE modparameters
55 #ifdef RFLO
57 
58 #include "Indexing.h"
59 #endif
60 
61  IMPLICIT NONE
62 
63 ! ... parameters
64  TYPE(t_region) :: region
65 
66  INTEGER, INTENT(IN) :: istage
67 
68 ! ... loop variables
69  INTEGER :: ic, idx
70 
71 ! ... local variables
72  TYPE(t_global), POINTER :: global
73 
74  INTEGER :: ibc, iec, idxbeg, idxend, ldiss(5)
75  REAL(RFREAL) :: blend1, betrk(5)
76  REAL(RFREAL), POINTER :: rcv(:,:), rcvold(:,:), rdiss(:,:)
77 
78 #ifdef RFLO
79  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
80  INTEGER :: ilev, icoff, ijcoff
81 #endif
82 
83 !******************************************************************************
84 
85  global => region%global
86 
87  CALL registerfunction( global,'RADI_FlimEmsInit',&
88  'RADI_FlimEmsInit.F90' )
89 
90 ! get parameters, dimensions and pointers -------------------------------------
91 
92  ldiss(:) = region%mixtInput%ldiss(:)
93  betrk(:) = region%mixtInput%betrk(:)
94 
95 #ifdef RFLO
96  ilev = region%currLevel
97 
98  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
99  jdcbeg,jdcend,kdcbeg,kdcend )
100  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
101  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
102  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
103 
104  rcv => region%levels(ilev)%radi%cv
105  rcvold => region%levels(ilev)%radi%cvOld
106  rdiss => region%levels(ilev)%radi%diss
107 #endif
108 
109 #ifdef RFLU
110  ibc = 1
111  iec = region%grid%nCellsTot
112 
113  rcv => region%radi%cv
114  rcvold => region%radi%cvOld
115  rdiss => region%radi%diss
116 #endif
117 
118 ! select start and end index of 1st dimension depending on RADI model selected
119 
120  IF (region%radiInput%radiModel == radi_model_fldtran) THEN
121  idxbeg = cv_radi_ener
122  idxend = cv_radi_ener
123  ENDIF
124 
125 ! store previous solution and initialize dissipation --------------------------
126 
127  IF (istage == 1) THEN
128  DO ic=ibc,iec
129  DO idx=idxbeg, idxend
130  rcvold(idx,ic) = rcv(idx,ic)
131  rdiss(idx,ic) = 0._rfreal
132  ENDDO
133  ENDDO
134  ENDIF
135  IF (istage>1 .AND. ldiss(istage)/=0) THEN
136  blend1 = 1._rfreal - betrk(istage)
137  DO ic=ibc,iec
138  DO idx=idxbeg, idxend
139  rdiss(idx,ic) = blend1*rdiss(idx,ic)
140  ENDDO
141  ENDDO
142  ENDIF ! iStage
143 
144 ! finalize --------------------------------------------------------------------
145 
146  CALL deregisterfunction( global )
147 
148 END SUBROUTINE radi_flimemsinit
149 
150 !******************************************************************************
151 !
152 ! RCS Revision history:
153 !
154 ! $Log: RADI_FlimEmsInit.F90,v $
155 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
156 ! Updated license.
157 !
158 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
159 ! Added Illinois Open Source License/Copyright
160 !
161 ! Revision 1.1 2004/09/30 17:49:10 wasistho
162 ! prepared for full FLD radiation model
163 !
164 !
165 !
166 !******************************************************************************
167 
168 
169 
170 
171 
172 
173 
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcend
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
subroutine radi_flimemsinit(region, istage)
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469