Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_ConvectiveFluxes.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 rocsmoke, add them to dissipation
26 ! in order to obtain the residual.
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region.
31 !
32 ! Output: region%levels%peul%rhs = convective fluxes + dissipation.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: PEUL_ConvectiveFluxes.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2002 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE peul_convectivefluxes( region ) ! PUBLIC
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE moderror
49  USE modparameters
50 #ifdef RFLO
53 
54 #include "Indexing.h"
55 #endif
56  IMPLICIT NONE
57 
58 ! ... parameters
59  TYPE(t_region) :: region
60 
61 ! ... loop variables
62  INTEGER :: ic, icv
63 
64 ! ... local variables
65  CHARACTER(CHRLEN) :: rcsidentstring
66 
67 #ifdef RFLO
68  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
69  INTEGER :: ilev, icoff, ijcoff
70 #endif
71  INTEGER :: ibc, iec, spacediscr, spaceorder
72 
73  REAL(RFREAL), POINTER :: diss(:,:), rhs(:,:)
74 
75 !******************************************************************************
76 
77  rcsidentstring = '$RCSfile: PEUL_ConvectiveFluxes.F90,v $ $Revision: 1.3 $'
78 
79  CALL registerfunction( region%global,'PEUL_ConvectiveFluxes',&
80  'PEUL_ConvectiveFluxes.F90' )
81 
82 ! get dimensions and pointers -------------------------------------------------
83 
84 #ifdef RFLO
85  ilev = region%currLevel
86 
87  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend,jdcbeg,jdcend, &
88  kdcbeg,kdcend )
89  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
90  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
91  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
92 
93  diss => region%levels(ilev)%peul%diss
94  rhs => region%levels(ilev)%peul%rhs
95 #endif
96 
97  spacediscr = region%mixtInput%spaceDiscr
98  spaceorder = region%mixtInput%spaceOrder
99 
100 ! initialize residual (set = dissipation) -------------------------------------
101 
102  DO ic=ibc,iec
103  DO icv=1,region%levels(ilev)%peul%nCv
104  rhs(icv,ic) = -diss(icv,ic)
105  ENDDO
106  ENDDO
107 
108 ! 2nd-order central scheme ----------------------------------------------------
109 
110 #ifdef RFLO
111  IF (spacediscr==discr_cen_scal .AND. &
112  (spaceorder==discr_order_1 .OR. spaceorder==discr_order_2)) THEN
113  CALL peul_centralflux( region )
114  ENDIF
115 #endif
116 
117 ! finalize --------------------------------------------------------------------
118 
119  CALL deregisterfunction( region%global )
120 
121 END SUBROUTINE peul_convectivefluxes
122 
123 !******************************************************************************
124 !
125 ! RCS Revision history:
126 !
127 ! $Log: PEUL_ConvectiveFluxes.F90,v $
128 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
129 ! Updated license.
130 !
131 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
132 ! Added Illinois Open Source License/Copyright
133 !
134 ! Revision 1.1 2004/12/01 21:09:29 haselbac
135 ! Initial revision after changing case
136 !
137 ! Revision 1.3 2004/07/23 22:43:17 jferry
138 ! Integrated rocspecies into rocinteract
139 !
140 ! Revision 1.2 2003/05/15 02:57:05 jblazek
141 ! Inlined index function.
142 !
143 ! Revision 1.1 2003/02/11 22:52:50 jferry
144 ! Initial import of Rocsmoke
145 !
146 !
147 !******************************************************************************
148 
149 
150 
151 
152 
153 
154 
**********************************************************************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 peul_centralflux(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 peul_convectivefluxes(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469