Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_FlimConvectiveFluxes.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: compute convective fluxes for FLDTRAN radiation model, and
26 ! add them to dissipation in order to obtain the residual.
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region.
31 !
32 ! Output: region%levels%radi%rhs = radi convective fluxes + radi dissipation.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RADI_FlimConvectiveFluxes.F90,v 1.3 2008/12/06 08:44:37 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE radi_flimconvectivefluxes( region ) ! PUBLIC
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE moderror
49  USE modparameters
51 #ifdef RFLO
54 
55 #include "Indexing.h"
56 #endif
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region) :: region
61 
62 ! ... loop variables
63  INTEGER :: ic, idx
64 
65 ! ... local variables
66  INTEGER :: ibc, iec, discrtype, discrorder, idxbeg, idxend
67  REAL(RFREAL), POINTER :: diss(:,:), rhs(:,:)
68 
69 #ifdef RFLO
70  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
71  INTEGER :: ilev, icoff, ijcoff
72 #endif
73 
74 !******************************************************************************
75 
76  CALL registerfunction( region%global,'RADI_FlimConvectiveFluxes',&
77  'RADI_FlimConvectiveFluxes.F90' )
78 
79  IF (region%radiInput%radiModel /= radi_model_fldtran) goto 999
80 
81 ! get dimensions and pointers -------------------------------------------------
82 
83 #ifdef RFLO
84  ilev = region%currLevel
85 
86  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend,jdcbeg,jdcend, &
87  kdcbeg,kdcend )
88  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
89  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
90  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
91 
92  diss => region%levels(ilev)%radi%diss
93  rhs => region%levels(ilev)%radi%rhs
94 #endif
95 #ifdef RFLU
96  ibc = 1
97  iec = region%grid%nCellsTot
98 
99  diss => region%radi%diss
100  rhs => region%radi%rhs
101 #endif
102 
103  discrtype = region%radiInput%spaceDiscr
104  discrorder = region%radiInput%spaceOrder
105 
106 ! select start and end index of 1st dimension
107 
108  idxbeg = cv_radi_ener
109  idxend = cv_radi_ener
110 
111 ! initialize residual (set = dissipation) -------------------------------------
112 
113  DO ic=ibc,iec
114  DO idx=idxbeg,idxend
115  rhs(idx,ic) = -diss(idx,ic)
116  ENDDO
117  ENDDO
118 
119 ! 2nd-order central scheme ----------------------------------------------------
120 
121 #ifdef RFLO
122  IF (discrtype ==fld_discr_cen) THEN
123  IF (discrorder==fld_discr_ord1 .OR. discrorder==fld_discr_ord2) THEN
124  CALL radi_floflimcentflux( region )
125  ENDIF
126  ENDIF
127 #endif
128 
129 ! finalize --------------------------------------------------------------------
130 
131 999 CONTINUE
132 
133  CALL deregisterfunction( region%global )
134 
135 END SUBROUTINE radi_flimconvectivefluxes
136 
137 !******************************************************************************
138 !
139 ! RCS Revision history:
140 !
141 ! $Log: RADI_FlimConvectiveFluxes.F90,v $
142 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
143 ! Updated license.
144 !
145 ! Revision 1.2 2008/11/19 22:17:49 mtcampbe
146 ! Added Illinois Open Source License/Copyright
147 !
148 ! Revision 1.1 2004/09/30 17:49:10 wasistho
149 ! prepared for full FLD radiation model
150 !
151 !
152 !
153 !******************************************************************************
154 
155 
156 
157 
158 
159 
160 
subroutine radi_floflimcentflux(region)
**********************************************************************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
NT rhs
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_flimconvectivefluxes(region)
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