Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
INRT_DefineDrag.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: Defines the interaction Drag.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: modifies region%inrtInput%inrts
32 !
33 ! Notes:
34 !
35 ! Whereas INRT_Initialize sets up everything generic to all interactions,
36 ! this routine sets up things specific to this interaction.
37 !
38 ! In particular, this is where the designer
39 !
40 ! (a) gives values for all the interactions parameters (or leaves them
41 ! as default values given in INRT_Initialize). These parameters are
42 ! described in ModInteract.
43 !
44 ! (b) defines the Edges of the interaction. Here the type of an Edge is
45 ! given (i.e., whether it transports mass, momentum, or energy), as well
46 ! as the indices of the Nodes at either end. For each momentum Edge
47 ! he must call the routine INRT_FinishMomentumEdge.
48 !
49 !******************************************************************************
50 !
51 ! $Id: INRT_DefineDrag.F90,v 1.3 2008/12/06 08:44:31 mtcampbe Exp $
52 !
53 ! Copyright: (c) 2003 by the University of Illinois
54 !
55 !******************************************************************************
56 
57 SUBROUTINE inrt_definedrag( region )
58 
59  USE moddatatypes
60  USE moddatastruct, ONLY : t_region
61  USE modglobal, ONLY : t_global
62  USE modinteract
63  USE moderror
65 
67  IMPLICIT NONE
68 
69 ! ... parameters
70  TYPE(t_region), INTENT(INOUT) :: region
71 
72 ! ... local variables
73  CHARACTER(CHRLEN) :: rcsidentstring
74 
75  INTEGER :: nedges,nplag01
76 
77  TYPE(t_inrt_input), POINTER :: input
78  TYPE(t_inrt_interact), POINTER :: inrt
79  TYPE(t_inrt_edge), POINTER :: edge
80  TYPE(t_global), POINTER :: global
81 
82 !******************************************************************************
83 
84  rcsidentstring = '$RCSfile: INRT_DefineDrag.F90,v $ $Revision: 1.3 $'
85 
86  global => region%global
87 
88  CALL registerfunction( global,'INRT_DefineDrag',&
89  'INRT_DefineDrag.F90' )
90 
91 ! begin -----------------------------------------------------------------------
92 
93 ! allocate memory for edges, switches and data
94 
95  input => region%inrtInput
96  inrt => input%inrts(inrt_type_drag)
97 
98  inrt%name = "Drag"
99 
100  nplag01 = 1
101  IF (input%nPlag == 0) nplag01 = 0
102 
103  nedges = nplag01 * inrt_drag_nedges
104 
105  CALL inrt_allocateauxillary(global,inrt,nedges, &
106  inrt_swi_drag_total,inrt_dat_drag_total)
107 
108 ! set parameters for this interaction: see comment in ModInteract
109 
110 ! ** for this interaction, all parameters keep their default values **
111 
112 ! define Edges
113 
114  IF (nedges > 0) THEN
115 
116  edge => inrt%edges(inrt_drag_l_xmom_g)
117 
118  edge%tEdge = inrt_edge_mome
119  edge%iNode(1) = input%indPlagJoint
120  edge%iNode(2) = input%indMixt
121 
122 ! - the Insulate Token for this Edge is placed on the Lagrangian particle
123 ! - end of the Edge, i.e., end number 1.
124 
125  CALL inrt_finishmomentumedge(global,inrt,inrt_drag_l_xmom_g,1)
126 
127  END IF ! nEdges
128 
129 ! finalize --------------------------------------------------------------------
130 
131  CALL deregisterfunction( global )
132 
133 END SUBROUTINE inrt_definedrag
134 
135 !******************************************************************************
136 !
137 ! RCS Revision history:
138 !
139 ! $Log: INRT_DefineDrag.F90,v $
140 ! Revision 1.3 2008/12/06 08:44:31 mtcampbe
141 ! Updated license.
142 !
143 ! Revision 1.2 2008/11/19 22:17:44 mtcampbe
144 ! Added Illinois Open Source License/Copyright
145 !
146 ! Revision 1.1 2004/12/01 21:56:22 fnajjar
147 ! Initial revision after changing case
148 !
149 ! Revision 1.4 2003/04/02 22:32:03 jferry
150 ! codified Activeness and Permission structures for rocinteract
151 !
152 ! Revision 1.3 2003/03/24 23:30:52 jferry
153 ! overhauled rocinteract to allow interaction design to use user input
154 !
155 ! Revision 1.2 2003/03/11 16:09:39 jferry
156 ! Added comments
157 !
158 ! Revision 1.1 2003/03/04 22:12:35 jferry
159 ! Initial import of Rocinteract
160 !
161 !******************************************************************************
162 
163 
164 
165 
166 
167 
168 
subroutine inrt_finishmomentumedge(global, inrt, iXEdge, iEnd)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine inrt_definedrag(region)
IndexType nedges() const
Definition: Mesh.H:564
subroutine inrt_allocateauxillary(global, inrt, nEdges, nSwitches, nData)
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
subroutine deregisterfunction(global)
Definition: ModError.F90:469