Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
INRT_AugmentDisSources.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: converts the transfers of primary quantities along Edges for each
26 ! particle into augmentations of RHS terms for all quantities, for
27 ! an interaction involving Lagrangian particles
28 !
29 ! Description: none.
30 !
31 ! Input: iInrt = index of interaction
32 !
33 ! Output: augments region%levels(iLev)%...%rhs structures
34 !
35 ! Notes:
36 !
37 ! The RHS structures use opposite sign as the input source structure
38 !
39 ! For efficiency, this routine requires Nodes to be stored in this order:
40 ! Mixture, Lagrangian particle, Eulerian particle, Internal
41 !
42 ! The energy corresponding to a gas mass is actually taken to be the
43 ! enthalpy because energy added in reactions are measured as enthalpies
44 !
45 !******************************************************************************
46 !
47 ! $Id: INRT_AugmentDisSources.F90,v 1.5 2008/12/06 08:44:31 mtcampbe Exp $
48 !
49 ! Copyright: (c) 2003 by the University of Illinois
50 !
51 !******************************************************************************
52 
53 SUBROUTINE inrt_augmentdissources( region,iInrt )
54 
55  USE moddatatypes
56  USE moddatastruct, ONLY : t_region
57  USE modglobal, ONLY : t_global
59  USE modmixture, ONLY : t_mixt
60  USE modpartlag, ONLY : t_plag
61 #ifdef RFLO
62 #ifdef PEUL
63  USE modparteul, ONLY : t_peul
64 #endif
65 #endif
66 #ifdef RFLU
67  USE modspecies, ONLY : t_spec
68 #endif
69  USE moderror
70  USE modparameters
72 #ifdef PLAG
74 #endif
75 
76  IMPLICIT NONE
77 
78 ! ... parameters
79  TYPE(t_region), INTENT(INOUT), TARGET :: region
80  INTEGER, INTENT(IN) :: iinrt
81 
82 ! ... loop variables
83  INTEGER :: ipcls,iplag,ipeul,iedge
84 
85 ! ... local variables
86  INTEGER, PARAMETER :: max_nodes = 101
87 
88  CHARACTER(CHRLEN) :: rcsidentstring
89 
90  LOGICAL :: computeaux
91 
92  INTEGER :: npcls,nplag,npeul,nintl,ninputedges,nnodes,nedges
93  INTEGER :: indmixt,indplag0,indpeul0,indintl
94  INTEGER :: indplagvapor,indplagn,indpeuln
95  INTEGER :: indcp,gasmodel,ic,inod,off1beg,ic1beg
96 #ifdef RFLO
97  INTEGER :: ilev
98 #endif
99  INTEGER :: tedge,inode(2),token(2)
100  INTEGER, POINTER :: pcvplagmass(:), aiv(:,:)
101 
102  REAL(RFREAL) :: temp1,temp2,spht,massdot,hcapdot,enerdot
103  REAL(RFREAL) :: kinedot1,kinedot2,thrmdot1,thrmdot2,enerdot1,enerdot2
104  REAL(RFREAL) :: intlmass,intlener,intltemp,intlhcap,contfac
105  REAL(RFREAL) :: sphtplag(max_nodes),sphtpeul(max_nodes)
106  REAL(RFREAL), DIMENSION(3) :: velo1,velo2,intlvelo,intlmome
107  REAL(RFREAL), DIMENSION(3) :: momedot,momedot1,momedot2
108  REAL(RFREAL) :: src(max_nodes,5)
109  REAL(RFREAL), DIMENSION(:), POINTER :: p1begmixttemp,pplagtemp
110  REAL(RFREAL), DIMENSION(:,:), POINTER :: p1begmixtvelo,pplagvelo
111  REAL(RFREAL), DIMENSION(:,:), POINTER :: pmixtrhs,pplagrhs,ppeulrhs
112  REAL(RFREAL), DIMENSION(:,:), POINTER :: gv,arv,primary
113 
114  TYPE(t_inrt_input), POINTER :: input
115  TYPE(t_inrt_interact), POINTER :: inrt
116  TYPE(t_mixt), POINTER :: pmixt
117 #ifdef RFLO
118 #ifdef PLAG
119  TYPE(t_plag), POINTER :: pplag
120 #endif
121 #ifdef PEUL
122  TYPE(t_peul), POINTER :: ppeul
123 #endif
124 #endif
125 #ifdef RFLU
126  TYPE(t_plag), POINTER :: pplag
127  TYPE(t_spec), POINTER :: ppeul
128 #endif
129  TYPE(t_global), POINTER :: global
130 
131 !******************************************************************************
132 
133  rcsidentstring = '$RCSfile: INRT_AugmentDisSources.F90,v $ $Revision: 1.5 $'
134 
135  global => region%global
136 
137  CALL registerfunction( global,'INRT_AugmentDisSources',&
138  'INRT_AugmentDisSources.F90' )
139 
140 #ifdef PLAG
141 ! begin -----------------------------------------------------------------------
142 
143 ! Check if there are any particles
144 
145  npcls = 0
146 
147 #ifdef RFLO
148  ilev = region%currLevel
149  IF (global%plagUsed) npcls = region%levels(ilev)%plag%nPcls
150 #endif
151 #ifdef RFLU
152  IF (global%plagUsed) npcls = region%plag%nPcls
153 #endif
154 
155  IF (npcls < 1) go to 999
156 
157 #ifdef RFLU
158 ! Check that have primitive state vector --------------------------------------
159 
160  IF ( region%mixt%cvState /= cv_mixt_state_duvwp ) THEN
161  CALL errorstop(global,err_cv_state_invalid,__line__)
162  END IF ! region%mixt%cvState
163 #endif
164 
165 ! initialize interaction constants and pointers
166 
167  input => region%inrtInput
168  inrt => input%inrts(iinrt)
169 
170  nplag = input%nPlag
171  npeul = input%nPeul
172 
173  nintl = inrt%nIntl
174  ninputedges = inrt%nInputEdges
175 
176  indmixt = input%indMixt
177  indplag0 = input%indPlag0
178  indpeul0 = input%indPeul0
179  indintl = input%indIntl
180 
181  indplagvapor = input%indPlagVapor
182 
183  indplagn = indplag0 + nplag
184  indpeuln = indpeul0 + npeul
185 
186  nnodes = input%nNodes
187  IF (nnodes > max_nodes .OR. nplag > max_nodes .OR. npeul > max_nodes) &
188  CALL errorstop( global,err_exceeds_decl_mem,__line__ )
189 
190  nedges = inrt%nEdges
191 
192  computeaux = input%computeAux
193 
194 ! initialize data constants and pointers
195 
196 #ifdef RFLO
197  pmixt => region%levels(ilev)%mixt
198  pplag => region%levels(ilev)%plag
199 #ifdef PEUL
200  ppeul => region%levels(ilev)%peul
201 #endif
202  indcp = pmixt%indCp
203 #endif
204 #ifdef RFLU
205  pmixt => region%mixt
206  pplag => region%plag
207  ppeul => region%spec
208 
209  indcp = region%mixtInput%indCp
210 #endif
211 
212  pcvplagmass => pplag%cvPlagMass
213  aiv => pplag%aiv
214  arv => pplag%arv
215 
216 ! Constructing pointers from sections of arrays can be dangerous
217 ! Extensive checks are employed to ensure correct behavior
218 
219 ! The string "1beg" is used to identify arrays beginning at 1 instead of ibc
220 
221 #ifdef RFLO
222  p1begmixtvelo => pmixt%dv(dv_mixt_uvel:dv_mixt_wvel,:)
223  off1beg = lbound(p1begmixtvelo,2) - lbound(pmixt%dv,2)
224 #endif
225 #ifdef RFLU
226  p1begmixtvelo => pmixt%cv(cv_mixt_xvel:cv_mixt_zvel,:)
227  off1beg = lbound(p1begmixtvelo,2) - lbound(pmixt%cv,2)
228 #endif
229 
230  IF (ubound(p1begmixtvelo,1) /= 3) THEN
231  CALL errorstop( global,err_inrt_indexrange,__line__ )
232  ENDIF
233 
234  p1begmixttemp => pmixt%dv(dv_mixt_temp,:)
235 
236  IF (off1beg /= lbound(p1begmixttemp,1) - lbound(pmixt%dv,2)) THEN
237  CALL errorstop( global,err_inrt_indexrange,__line__ )
238  ENDIF
239 
240 ! The string "1beg" is not needed here: Plag arrays already begin at 1
241 
242  pplagvelo => pplag%dv(dv_plag_uvel:dv_plag_wvel,:)
243 
244  IF (ubound(pplagvelo,1) /= 3) THEN
245  CALL errorstop( global,err_inrt_indexrange,__line__ )
246  ENDIF
247 
248  IF (lbound(pplagvelo,2) /= lbound(pplag%dv,2)) THEN
249  CALL errorstop( global,err_inrt_indexrange,__line__ )
250  ENDIF
251 
252  pplagtemp => pplag%dv(dv_plag_temp,:)
253 
254  IF (lbound(pplagtemp,1) /= lbound(pplag%dv,2)) THEN
255  CALL errorstop( global,err_inrt_indexrange,__line__ )
256  ENDIF
257 
258  pmixtrhs => pmixt%rhs
259  pplagrhs => pplag%rhs
260 #ifdef RFLO
261 #ifdef PEUL
262  ppeulrhs => ppeul%rhs
263 #endif
264 #endif
265 #ifdef RFLU
266  ppeulrhs => ppeul%rhs
267 #endif
268  gasmodel = region%mixtInput%gasModel
269  gv => pmixt%gv
270 
271  IF (nplag > 0) sphtplag(1:nplag) = region%plagInput%spht(1:nplag)
272 
273  DO ipeul = 1,npeul
274 #ifdef RFLO
275 #ifdef PEUL
276  sphtpeul(ipeul) = region%peulInput%ptypes(ipeul)%material%spht
277 #endif
278 #endif
279 ! use spht for now: should be spht at constant pressure (or volume?)
280 #ifdef RFLU
281  sphtpeul(ipeul) = region%specInput%specType(ipeul)%pMaterial%spht
282 #endif
283  END DO ! iPeul
284 
285  primary => pplag%inrtSources
286 
287  DO ipcls = 1,npcls
288 
289  ic = aiv(aiv_plag_icells,ipcls)
290  ic1beg = ic + off1beg
291 
292 ! ----------------------
293 ! - Compute source terms
294 ! ----------------------
295 
296  src(:nnodes,:) = 0._rfreal
297  intlhcap = 0._rfreal
298 
299  DO iedge = 1, nedges
300 
301  tedge = inrt%edges(iedge)%tEdge
302  inode = inrt%edges(iedge)%iNode
303  token = inrt%edges(iedge)%token
304 
305  SELECT CASE (tedge)
306 
307 ! --- Mass Edge
308 
309  CASE (inrt_edge_mass)
310 
311  massdot = primary(iedge,ipcls)
312  IF (massdot == 0._rfreal) cycle ! do not waste time with null transfer
313 
314 ! ----- BEGIN INLINE: makeSpecificHeat(iNode,spht) ------------------------BEGI
315 
316 ! ----- Nodes at both ends should have the same specific heat, so use either.
317 ! ----- Restriction: cannot use an internal Node.
318 
319  IF (inode(1) == indintl) THEN
320  inod = inode(2)
321  ELSE
322  inod = inode(1)
323  END IF ! iNode(1)
324 
325  IF (inod == indmixt) THEN
326 
327  SELECT CASE (gasmodel)
328 
329  CASE (gas_model_tcperf)
330  spht = gv(gv_mixt_cp,indcp*ic) ! specific heat at constant pressure
331 
332  CASE default
333  CALL errorstop( global,err_reached_default,__line__ )
334 
335  END SELECT ! gasModel
336 
337  ELSE IF (inod <= indplagn) THEN
338  spht = sphtplag(inod-indplag0)
339 
340  ELSE IF (inod == indintl .OR. inod == indplagvapor) THEN
341  CALL errorstop( global,err_inrt_indexrange,__line__ )
342 
343  ELSE
344  spht = sphtpeul(inod-indpeul0)
345 
346  END IF ! iNod
347 
348 ! ----- END INLINE: makeSpecificHeat(iNode,spht) ------------------------ENDI
349 
350  hcapdot = spht * massdot
351 
352 ! ----- BEGIN INLINE: makeVelocity(iNode(1),velo1) ------------------------BEGI
353 ! ----- BEGIN INLINE: makeTemperature(iNode(1),temp1) ---------------------BEGI
354 
355  inod = inode(1)
356 
357  IF (inod == indmixt) THEN
358  velo1 = p1begmixtvelo(:,ic1beg)
359  temp1 = p1begmixttemp(ic1beg)
360  ELSE IF (inod <= indplagn) THEN
361  velo1 = pplagvelo(:,ipcls)
362  temp1 = pplagtemp(ipcls)
363  ELSE IF (inod == indplagvapor) THEN
364  CALL errorstop( global,err_inrt_indexrange,__line__ )
365  ELSE IF (inod <= indpeuln) THEN
366  velo1 = p1begmixtvelo(:,ic1beg) ! Sets Smoke velocity = Fluid velocity
367  temp1 = p1begmixttemp(ic1beg) ! Sets Smoke temp = Fluid temp
368  ELSE
369  velo1 = intlvelo
370  temp1 = intltemp
371  END IF ! iNod
372 
373 ! ----- END INLINE: makeVelocity(iNode(1),velo1) ------------------------ENDI
374 ! ----- END INLINE: makeTemperature(iNode(1),temp1) ---------------------ENDI
375 
376 ! ----- BEGIN INLINE: makeVelocity(iNode(2),velo2) ------------------------BEGI
377 ! ----- BEGIN INLINE: makeTemperature(iNode(2),temp2) ---------------------BEGI
378 
379  inod = inode(2)
380 
381  IF (inod == indmixt) THEN
382  velo2 = p1begmixtvelo(:,ic1beg)
383  temp2 = p1begmixttemp(ic1beg)
384  ELSE IF (inod <= indplagn) THEN
385  velo2 = pplagvelo(:,ipcls)
386  temp2 = pplagtemp(ipcls)
387  ELSE IF (inod == indplagvapor) THEN
388  CALL errorstop( global,err_inrt_indexrange,__line__ )
389  ELSE IF (inod <= indpeuln) THEN
390  velo2 = p1begmixtvelo(:,ic1beg) ! Sets Smoke velocity = Fluid velocity
391  temp2 = p1begmixttemp(ic1beg) ! Sets Smoke temp = Fluid temp
392  ELSE
393  velo2 = 0._rfreal ! intlVelo not defined yet
394  temp2 = 0._rfreal ! intlTemp not defined yet
395 ! ------- If downwind Node is Internal, then augment its heat capacity
396  intlhcap = intlhcap + hcapdot
397  END IF ! iNod
398 
399 ! ----- END INLINE: makeVelocity(iNode(2),velo2) ------------------------ENDI
400 ! ----- END INLINE: makeTemperature(iNode(2),temp2) ---------------------BEGI
401 
402  IF (computeaux) THEN
403 
404  momedot1 = massdot * velo1
405  momedot2 = massdot * velo2
406 
407  kinedot1 = 0.5_rfreal*dot_product(velo1,momedot1)
408  kinedot2 = 0.5_rfreal*dot_product(velo2,momedot2)
409 
410  thrmdot1 = hcapdot * temp1
411  thrmdot2 = hcapdot * temp2
412 
413  ELSE
414 
415  momedot1 = 0._rfreal
416  momedot2 = 0._rfreal
417 
418  kinedot1 = 0._rfreal
419  kinedot2 = 0._rfreal
420 
421  thrmdot1 = 0._rfreal
422  thrmdot2 = 0._rfreal
423 
424  ENDIF
425 
426 ! ----- Compute sources for upwind Node
427 
428  SELECT CASE(token(1))
429 
430  CASE(inrt_perm_pmass)
431  src(inode(1),1) = src(inode(1),1) - massdot
432  src(inode(1),2:4) = src(inode(1),2:4) - momedot1
433  src(inode(1),5 ) = src(inode(1),5 ) - kinedot1 - thrmdot1
434 
435  CASE(inrt_perm_pmome)
436  src(inode(1),1) = src(inode(1),1) - massdot
437  src(inode(1),2:4) = src(inode(1),2:4) - momedot2
438  src(inode(1),5 ) = src(inode(1),5 ) - kinedot2 - thrmdot1
439 
440  CASE(inrt_perm_pall)
441  src(inode(1),1) = src(inode(1),1) - massdot
442  src(inode(1),2:4) = src(inode(1),2:4) - momedot2
443  src(inode(1),5 ) = src(inode(1),5 ) - kinedot2 - thrmdot2
444 
445  END SELECT ! token(1)
446 
447 ! ----- Compute sources for downwind Node
448 
449  SELECT CASE(token(2))
450 
451  CASE(inrt_perm_pmass)
452  src(inode(2),1) = src(inode(2),1) + massdot
453  src(inode(2),2:4) = src(inode(2),2:4) + momedot2
454  src(inode(2),5 ) = src(inode(2),5 ) + kinedot2 + thrmdot2
455 
456  CASE(inrt_perm_pmome)
457  src(inode(2),1) = src(inode(2),1) + massdot
458  src(inode(2),2:4) = src(inode(2),2:4) + momedot1
459  src(inode(2),5 ) = src(inode(2),5 ) + kinedot1 + thrmdot2
460 
461  CASE(inrt_perm_pall)
462  src(inode(2),1) = src(inode(2),1) + massdot
463  src(inode(2),2:4) = src(inode(2),2:4) + momedot1
464  src(inode(2),5 ) = src(inode(2),5 ) + kinedot1 + thrmdot1
465 
466  END SELECT ! token(2)
467 
468 ! --- Momentum Edge
469 
470  CASE (inrt_edge_mome)
471 
472  momedot = primary(iedge:iedge+2,ipcls)
473 
474 ! ----- BEGIN INLINE: makeVelocity(iNode(1),velo1) ------------------------BEGI
475 
476  inod = inode(1)
477 
478  IF (inod == indmixt) THEN
479  velo1 = p1begmixtvelo(:,ic1beg)
480  ELSE IF (inod <= indplagn) THEN
481  velo1 = pplagvelo(:,ipcls)
482  ELSE IF (inod == indplagvapor) THEN
483  CALL errorstop( global,err_inrt_indexrange,__line__ )
484  ELSE IF (inod <= indpeuln) THEN
485  velo1 = p1begmixtvelo(:,ic1beg) ! Sets Smoke velocity = Fluid velocity
486  ELSE
487  velo1 = intlvelo
488  END IF ! iNod
489 
490 ! ----- END INLINE: makeVelocity(iNode(1),velo1) ------------------------ENDI
491 
492 ! ----- BEGIN INLINE: makeVelocity(iNode(2),velo2) ------------------------BEGI
493 
494  inod = inode(2)
495 
496  IF (inod == indmixt) THEN
497  velo2 = p1begmixtvelo(:,ic1beg)
498  ELSE IF (inod <= indplagn) THEN
499  velo2 = pplagvelo(:,ipcls)
500  ELSE IF (inod == indplagvapor) THEN
501  CALL errorstop( global,err_inrt_indexrange,__line__ )
502  ELSE IF (inod <= indpeuln) THEN
503  velo2 = p1begmixtvelo(:,ic1beg) ! Sets Smoke velocity = Fluid velocity
504  ELSE
505  velo2 = 0._rfreal ! intlVelo not defined yet
506  END IF ! iNod
507 
508 ! ----- END INLINE: makeVelocity(iNode(2),velo2) ------------------------ENDI
509 
510  IF (computeaux) THEN
511 
512  enerdot1 = dot_product(momedot,velo1)
513  enerdot2 = dot_product(momedot,velo2)
514 
515  ELSE
516 
517  enerdot1 = 0._rfreal
518  enerdot2 = 0._rfreal
519 
520  ENDIF
521 
522 ! ----- Compute sources for upwind Node
523 
524  SELECT CASE(token(1))
525 
526  CASE(inrt_perm_pmome)
527  src(inode(1),2:4) = src(inode(1),2:4) - momedot
528  src(inode(1),5 ) = src(inode(1),5 ) - enerdot1
529 
530  CASE(inrt_perm_pall)
531  src(inode(1),2:4) = src(inode(1),2:4) - momedot
532  src(inode(1),5 ) = src(inode(1),5 ) - enerdot2
533 
534  END SELECT ! token(1)
535 
536 ! ----- Compute sources for downwind Node
537 
538  SELECT CASE(token(2))
539 
540  CASE(inrt_perm_pmome)
541  src(inode(2),2:4) = src(inode(2),2:4) + momedot
542  src(inode(2),5) = src(inode(2),5) + enerdot2
543 
544  CASE(inrt_perm_pall)
545  src(inode(2),2:4) = src(inode(2),2:4) + momedot
546  src(inode(2),5) = src(inode(2),5) + enerdot1
547 
548  END SELECT ! token(2)
549 
550 ! --- Dummy momentum Edge
551 
552  CASE (inrt_edge_mome_dum)
553  cycle
554 
555 ! --- Energy Edge
556 
557  CASE (inrt_edge_ener)
558 
559  enerdot = primary(iedge,ipcls)
560 
561  IF (token(1) == inrt_perm_pall) &
562  src(inode(1),5) = src(inode(1),5) - enerdot
563 
564  IF (token(2) == inrt_perm_pall) &
565  src(inode(2),5) = src(inode(2),5) + enerdot
566 
567 ! --- Ghost mass Edge
568 
569  CASE (inrt_edge_mass_gho)
570 
571 ! ----- Downwind node must have Block Token. Check value of upwind node
572 
573  IF (token(1) >= inrt_perm_pmass) THEN
574 
575  massdot = primary(iedge,ipcls)
576  src(inode(1),1) = src(inode(1),1) - massdot
577 
578  END IF ! token(1)
579 
580  CASE default
581  CALL errorstop( global,err_reached_default,__line__ )
582 
583  END SELECT ! tEdge
584 
585 ! --- Compute velocity and temperature at internal Node if necessary
586 
587  IF (nintl > 0) THEN
588  IF (iedge == ninputedges) THEN
589 
590  intlmass = src(indintl,1)
591  intlmome = src(indintl,2:4)
592  intlener = src(indintl,5)
593 
594  IF (intlmass > 0._rfreal) THEN
595  intlvelo = intlmome / intlmass
596  ELSE
597  intlvelo = 0._rfreal
598  END IF ! intlMass
599 
600  IF (intlhcap > 0._rfreal) THEN
601  intltemp = (intlener - 0.5_rfreal*dot_product(intlmome, &
602  intlvelo)) / intlhcap
603  ELSE
604  intltemp = 0._rfreal
605  END IF ! intlHcap
606 
607  END IF ! iEdge
608  END IF ! nIntl
609 
610  END DO ! iEdge
611 
612 ! ------------------
613 ! - Augment RHS data
614 ! ------------------
615 
616 ! - Continuum conversion factor: converts from single particle value to
617 ! - superparticle value
618 
619 ! - Note: does not incorporate volume because rhs values are not per volume
620 ! - for either particles or continuua, in contrast to cv values, which are
621 ! - not per volume for particles, but are per volume for continuua.
622 
623  contfac = arv(arv_plag_spload,ipcls)
624 
625 ! - Augment Gas Sources
626 
627  pmixtrhs( cv_mixt_dens ,ic) = &
628  pmixtrhs(cv_mixt_dens ,ic) - contfac*src(indmixt,1 )
629 
630  pmixtrhs( cv_mixt_xmom:cv_mixt_zmom,ic) = &
631  pmixtrhs(cv_mixt_xmom:cv_mixt_zmom,ic) - contfac*src(indmixt,2:4)
632 
633  pmixtrhs( cv_mixt_ener ,ic) = &
634  pmixtrhs(cv_mixt_ener ,ic) - contfac*src(indmixt,5 )
635 
636 ! - Augment Lagrangian Particle Sources
637 
638  DO iplag = 1, nplag
639 
640  pplagrhs( pcvplagmass(iplag) ,ipcls) = &
641  pplagrhs(pcvplagmass(iplag) ,ipcls) - src(indplag0+iplag,1)
642 
643  pplagrhs( cv_plag_xmom:cv_plag_zmom,ipcls) = &
644  pplagrhs(cv_plag_xmom:cv_plag_zmom,ipcls) - src(indplag0+iplag,2:4)
645 
646  pplagrhs( cv_plag_ener ,ipcls) = &
647  pplagrhs(cv_plag_ener ,ipcls) - src(indplag0+iplag,5)
648 
649  END DO ! iPlag
650 
651 ! - Augment Lagrangian Particle Vapor Energy
652 
653  pplagrhs( cv_plag_enervapor,ipcls) = &
654  pplagrhs(cv_plag_enervapor,ipcls) - src(indplagvapor,5)
655 
656 ! - Augment Smoke Sources
657 #ifdef RFLO
658 #ifdef PEUL
659  DO ipeul = 1, npeul
660  ppeulrhs(ipeul,ic) = ppeulrhs(ipeul,ic) - contfac * src(indpeul0+ipeul,1)
661  END DO ! iPeul
662 #endif
663 #endif
664 #ifdef RFLU
665  DO ipeul = 1, npeul
666  ppeulrhs(ipeul,ic) = ppeulrhs(ipeul,ic) - contfac * src(indpeul0+ipeul,1)
667  END DO ! iPeul
668 #endif
669  END DO ! iPcls
670 
671 ! finalize --------------------------------------------------------------------
672 
673 999 CONTINUE
674 #endif
675  CALL deregisterfunction( global )
676 
677 END SUBROUTINE inrt_augmentdissources
678 
679 !******************************************************************************
680 !
681 ! RCS Revision history:
682 !
683 ! $Log: INRT_AugmentDisSources.F90,v $
684 ! Revision 1.5 2008/12/06 08:44:31 mtcampbe
685 ! Updated license.
686 !
687 ! Revision 1.4 2008/11/19 22:17:44 mtcampbe
688 ! Added Illinois Open Source License/Copyright
689 !
690 ! Revision 1.3 2006/02/15 20:18:30 wasistho
691 ! put peul within ifdef
692 !
693 ! Revision 1.2 2005/10/31 21:09:37 haselbac
694 ! Changed specModel and SPEC_MODEL_NONE
695 !
696 ! Revision 1.1 2004/12/01 21:56:10 fnajjar
697 ! Initial revision after changing case
698 !
699 ! Revision 1.15 2004/07/28 15:42:12 jferry
700 ! deleted defunct constructs: useDetangle, useSmokeDrag, useSmokeHeatTransfer
701 !
702 ! Revision 1.14 2004/07/23 22:43:16 jferry
703 ! Integrated rocspecies into rocinteract
704 !
705 ! Revision 1.13 2004/03/25 21:14:53 jferry
706 ! fixed pointer offset bug
707 !
708 ! Revision 1.12 2004/03/05 22:09:03 jferry
709 ! created global variables for peul, plag, and inrt use
710 !
711 ! Revision 1.11 2004/03/02 21:47:29 jferry
712 ! Added After Update interactions
713 !
714 ! Revision 1.10 2004/01/31 03:59:22 haselbac
715 ! Initial integration for Rocflu and Rocpart
716 !
717 ! Revision 1.9 2003/09/19 20:35:26 jferry
718 ! Implemented oxidizer species for burning interaction
719 !
720 ! Revision 1.8 2003/05/08 17:17:14 jferry
721 ! changed energy associated with mass to enthalpy
722 !
723 ! Revision 1.7 2003/05/07 15:13:10 jferry
724 ! Rearranged for efficiency
725 !
726 ! Revision 1.6 2003/04/09 15:02:39 jferry
727 ! removed erroneous volume normalization for continuum rhs
728 !
729 ! Revision 1.5 2003/04/03 21:10:17 jferry
730 ! implemented additional safety checks for rocinteract
731 !
732 ! Revision 1.4 2003/04/02 22:32:03 jferry
733 ! codified Activeness and Permission structures for rocinteract
734 !
735 ! Revision 1.3 2003/03/24 23:30:52 jferry
736 ! overhauled rocinteract to allow interaction design to use user input
737 !
738 ! Revision 1.2 2003/03/11 16:05:54 jferry
739 ! Created data type for material properties
740 !
741 ! Revision 1.1 2003/03/04 22:12:35 jferry
742 ! Initial import of Rocinteract
743 !
744 !******************************************************************************
745 
746 
747 
748 
749 
750 
751 
**********************************************************************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 inode
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
IndexType nedges() const
Definition: Mesh.H:564
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
long double dot_product(pnt vec1, pnt vec2)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine inrt_augmentdissources(region, iInrt)