Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ModThrustSpecImpulse.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: Collection of routines to compute thrust and specific impulse.
26 !
27 ! Description: None.
28 !
29 ! Notes: None.
30 !
31 ! ******************************************************************************
32 !
33 ! $Id: RFLU_ModThrustSpecImpulse.F90,v 1.4 2008/12/06 08:44:24 mtcampbe Exp $
34 !
35 ! Copyright: (c) 2004-2005 by the University of Illinois
36 !
37 ! ******************************************************************************
38 
40 
41  USE modparameters
42  USE moddatatypes
43  USE modglobal, ONLY: t_global
44  USE modgrid, ONLY: t_grid
45  USE modbndpatch, ONLY: t_patch
46  USE moddatastruct, ONLY: t_region
47  USE moderror
48  USE modmpi
49 
50  IMPLICIT NONE
51 
52 ! ******************************************************************************
53 ! Declarations and definitions
54 ! ******************************************************************************
55 
56 ! ==============================================================================
57 ! Private data
58 ! ==============================================================================
59 
60  CHARACTER(CHRLEN), PRIVATE :: &
61  RCSIdentString = '$$'
62 
63 ! ==============================================================================
64 ! Public functions
65 ! ==============================================================================
66 
67  PUBLIC :: rflu_tsi_computeglobalthrustsi, &
70 
71 ! ==============================================================================
72 ! Private functions
73 ! ==============================================================================
74 
75  PRIVATE :: rflu_tsi_closeglobalvals, &
77 
78 ! ******************************************************************************
79 ! Routines
80 ! ******************************************************************************
81 
82  CONTAINS
83 
84 
85 
86 
87 
88 
89 
90 ! ******************************************************************************
91 !
92 ! Purpose: Close thrust and specific impulse files.
93 !
94 ! Description: None.
95 !
96 ! Input:
97 ! global Pointer to global data
98 !
99 ! Notes:
100 !
101 ! ******************************************************************************
102 
103  SUBROUTINE rflu_tsi_closeglobalvals(global,iPatch,iFile1,iFile2)
104 
105  USE moddatatypes
106  USE modglobal, ONLY: t_global
107  USE modparameters
108  USE moderror
109  USE modmpi
110 
111 ! *****************************************************************************
112 ! Declarations and definitions
113 ! *****************************************************************************
114 
115 ! =============================================================================
116 ! Arguments
117 ! =============================================================================
118 
119  INTEGER, INTENT(IN) :: ipatch,ifile1,ifile2
120  TYPE(t_global), POINTER :: global
121 
122 ! ==============================================================================
123 ! Locals
124 ! ==============================================================================
125 
126  CHARACTER(CHRLEN) :: ifilename1,ifilename2
127  INTEGER :: errorflag
128 
129 ! *****************************************************************************
130 ! Start
131 ! *****************************************************************************
132 
133  CALL registerfunction(global,'RFLU_TSI_CloseGlobalVals',&
134  'RFLU_ModThrustSpecImpulse.F90')
135 
136 ! ==============================================================================
137 ! Opening thrust and specific impulse file
138 ! ==============================================================================
139 
140  IF ( global%verbLevel > verbose_low ) THEN
141  WRITE(stdout,'(A,1X,A,I4.4)') solver_name,'Closing thrust and '// &
142  'specific impulse files for iPatch =',ipatch
143  END IF ! global%verbLevel
144 
145 ! ------------------------------------------------------------------------------
146 ! Build file name
147 ! ------------------------------------------------------------------------------
148 
149  WRITE(ifilename1,'(A,I4.4)') trim(global%outDir)// &
150  trim(global%casename)//'.thr_',ipatch
151 
152  WRITE(ifilename2,'(A,I4.4)') trim(global%outDir)// &
153  trim(global%casename)//'.isp_',ipatch
154 
155 ! ------------------------------------------------------------------------------
156 ! Open file
157 ! ------------------------------------------------------------------------------
158 
159  CLOSE(ifile1,iostat=errorflag)
160  IF (global%error /= err_none ) THEN
161  CALL errorstop(global,err_file_close,__line__,'File: '// &
162  trim(ifilename1))
163  END IF ! global%error
164  CLOSE(ifile2,iostat=errorflag)
165  IF (global%error /= err_none ) THEN
166  CALL errorstop(global,err_file_close,__line__,'File: '// &
167  trim(ifilename2))
168  END IF ! global%error
169 
170 ! ******************************************************************************
171 ! End
172 ! ******************************************************************************
173 
174  IF ( global%verbLevel > verbose_low ) THEN
175  WRITE(stdout,'(A,1X,A)') solver_name,'Closing thrust and '// &
176  'specific impulse files done.'
177  END IF ! global%verbLevel
178 
179  CALL deregisterfunction(global)
180 
181  END SUBROUTINE rflu_tsi_closeglobalvals
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 ! *******************************************************************************
193 !
194 ! Purpose: Compute thrust and specific impulse coefficients.
195 !
196 ! Description: None.
197 !
198 ! Input:
199 ! regions Region data
200 !
201 ! Output: None.
202 !
203 ! Notes: None.
204 !
205 ! ******************************************************************************
206 
207  SUBROUTINE rflu_tsi_computeglobalthrustsi(pRegion)
208 
209  IMPLICIT NONE
210 
211 ! ******************************************************************************
212 ! Declarations and definitions
213 ! ******************************************************************************
214 
215 ! ==============================================================================
216 ! Arguments
217 ! ==============================================================================
218 
219  TYPE(t_region), POINTER :: pregion
220 
221 ! ==============================================================================
222 ! Locals
223 ! ==============================================================================
224 
225  INTEGER :: errorflag,ipatch,ipatchglobal
226  REAL(RFREAL) :: forcecoeff2thrust,thrust2isp,masscoeffin,masscoeffout, &
227  massin,massout
228  REAL(RFREAL), DIMENSION(:,:,:), POINTER :: pforcecoeff,pforcecoeffvac
229  REAL(RFREAL), DIMENSION(:,:), POINTER :: pspecimpulse,pspecimpulsevac, &
230  pthrust,pthrustvac
231  TYPE(t_global), POINTER :: global
232 
233 ! ******************************************************************************
234 ! Start, set pointers and variables
235 ! ******************************************************************************
236 
237  global => pregion%global
238 
239  CALL registerfunction(global,'RFLU_TSI_ComputeGlobalThrustSI',&
240  'RFLU_ModThrustSpecImpulse.F90')
241 
242  pforcecoeff => pregion%forceCoeffsGlobal
243  pforcecoeffvac => pregion%forceVacCoeffsGlobal
244  pspecimpulse => pregion%specImpulseGlobal
245  pspecimpulsevac => pregion%specImpulseVacGlobal
246  pthrust => pregion%thrustGlobal
247  pthrustvac => pregion%thrustVacGlobal
248 
249 ! ******************************************************************************
250 ! Compute thrust
251 ! ******************************************************************************
252 
253 ! ==============================================================================
254 ! De-normalize mass coefficients
255 ! ==============================================================================
256 
257  masscoeffin = 0.0_rfreal
258  masscoeffout = 0.0_rfreal
259  massin = 0.0_rfreal
260  massout = 0.0_rfreal
261 
262  DO ipatch = 1,pregion%global%nPatches
263  masscoeffin = masscoeffin + pregion%massCoeffsGlobal(mass_in ,ipatch)
264  masscoeffout = masscoeffout + pregion%massCoeffsGlobal(mass_out,ipatch)
265  END DO ! iPatch
266 
267  massin = masscoeffin*global%refDensity*global%refVelocity*global%forceRefArea
268  massout = masscoeffout*global%refDensity*global%refVelocity*global%forceRefArea
269 
270 ! ==============================================================================
271 ! De-normalize force coefficients to compute thrusts
272 ! ==============================================================================
273 
274  forcecoeff2thrust = 0.5_rfreal*global%refDensity*global%refVelocity &
275  *global%refVelocity*global%forceRefArea
276 
277  DO ipatch = 1,pregion%global%nPatches
278  pthrust(xcoord,ipatch) = forcecoeff2thrust &
279  *(pforcecoeff(xcoord,comp_mom ,ipatch) &
280  + pforcecoeff(xcoord,comp_pres,ipatch) &
281  + pforcecoeff(xcoord,comp_visc,ipatch))
282  pthrust(ycoord,ipatch) = forcecoeff2thrust &
283  *(pforcecoeff(ycoord,comp_mom ,ipatch) &
284  + pforcecoeff(ycoord,comp_pres,ipatch) &
285  + pforcecoeff(ycoord,comp_visc,ipatch))
286  pthrust(zcoord,ipatch) = forcecoeff2thrust &
287  *(pforcecoeff(zcoord,comp_mom ,ipatch) &
288  + pforcecoeff(zcoord,comp_pres,ipatch) &
289  + pforcecoeff(zcoord,comp_visc,ipatch))
290 
291  pthrustvac(xcoord,ipatch) = forcecoeff2thrust &
292  *(pforcecoeffvac(xcoord,comp_mom ,ipatch) &
293  + pforcecoeffvac(xcoord,comp_pres,ipatch) &
294  + pforcecoeffvac(xcoord,comp_visc,ipatch))
295  pthrustvac(ycoord,ipatch) = forcecoeff2thrust &
296  *(pforcecoeffvac(ycoord,comp_mom ,ipatch) &
297  + pforcecoeffvac(ycoord,comp_pres,ipatch) &
298  + pforcecoeffvac(ycoord,comp_visc,ipatch))
299  pthrustvac(zcoord,ipatch) = forcecoeff2thrust &
300  *(pforcecoeffvac(zcoord,comp_mom ,ipatch) &
301  + pforcecoeffvac(zcoord,comp_pres,ipatch) &
302  + pforcecoeffvac(zcoord,comp_visc,ipatch))
303  END DO ! iPatch
304 
305 ! ==============================================================================
306 ! Normalize thrusts to compute specific impulse
307 ! ==============================================================================
308 
309  thrust2isp = 1.0_rfreal/(massin*global%gravity)
310 
311  DO ipatch = 1,pregion%global%nPatches
312  pspecimpulse(xcoord,ipatch) = thrust2isp*pthrust(xcoord,ipatch)
313  pspecimpulse(ycoord,ipatch) = thrust2isp*pthrust(ycoord,ipatch)
314  pspecimpulse(zcoord,ipatch) = thrust2isp*pthrust(zcoord,ipatch)
315 
316  pspecimpulsevac(xcoord,ipatch) = thrust2isp*pthrustvac(xcoord,ipatch)
317  pspecimpulsevac(ycoord,ipatch) = thrust2isp*pthrustvac(ycoord,ipatch)
318  pspecimpulsevac(zcoord,ipatch) = thrust2isp*pthrustvac(zcoord,ipatch)
319  END DO ! iPatch
320 
321 ! ******************************************************************************
322 ! End
323 ! ******************************************************************************
324 
325  CALL deregisterfunction(global)
326 
327  END SUBROUTINE rflu_tsi_computeglobalthrustsi
328 
329 
330 
331 
332 
333 
334 
335 
336 
337 ! ******************************************************************************
338 !
339 ! Purpose: Open thrust and specific impulse files.
340 !
341 ! Description: None.
342 !
343 ! Input:
344 ! global Pointer to global data
345 !
346 ! Notes:
347 !
348 ! ******************************************************************************
349 
350  SUBROUTINE rflu_tsi_openglobalvals(global,iPatch,iFile1,iFile2)
351 
352  USE moddatatypes
353  USE modglobal, ONLY: t_global
354  USE modparameters
355  USE moderror
356  USE modmpi
357 
358 ! *****************************************************************************
359 ! Declarations and definitions
360 ! *****************************************************************************
361 
362 ! =============================================================================
363 ! Arguments
364 ! =============================================================================
365 
366  INTEGER, INTENT(IN) :: ipatch
367  TYPE(t_global), POINTER :: global
368 
369  INTEGER, INTENT(OUT) :: ifile1,ifile2
370 
371 ! ==============================================================================
372 ! Locals
373 ! ==============================================================================
374 
375  LOGICAL :: fileexists1,fileexists2
376  CHARACTER(CHRLEN) :: ifilename1,ifilename2
377  INTEGER :: errorflag
378 
379 ! *****************************************************************************
380 ! Start
381 ! *****************************************************************************
382 
383  CALL registerfunction(global,'RFLU_TSI_OpenGlobalVals',&
384  'RFLU_ModThrustSpecImpulse.F90')
385 
386 ! ==============================================================================
387 ! Opening thrust and specific impulse file
388 ! ==============================================================================
389 
390  IF ( global%verbLevel > verbose_low ) THEN
391  WRITE(stdout,'(A,1X,A,I4.4)') solver_name,'Opening thrust and '// &
392  'specific impulse files for iPatch =',ipatch
393  END IF ! global%verbLevel
394 
395 ! ------------------------------------------------------------------------------
396 ! Build file name
397 ! ------------------------------------------------------------------------------
398 
399  ifile1 = if_thrust
400  ifile2 = if_isp
401 
402  WRITE(ifilename1,'(A,I4.4)') trim(global%outDir)// &
403  trim(global%casename)//'.thr_',ipatch
404 
405  WRITE(ifilename2,'(A,I4.4)') trim(global%outDir)// &
406  trim(global%casename)//'.isp_',ipatch
407 
408 ! ------------------------------------------------------------------------------
409 ! Open file
410 ! ------------------------------------------------------------------------------
411 
412  IF ( global%restartFromScratch .EQV. .false. ) THEN
413  INQUIRE(file=ifilename1,exist=fileexists1)
414 
415  IF ( fileexists1 .EQV. .true. ) THEN
416  OPEN(ifile1,file=ifilename1,form='FORMATTED',status='OLD', &
417  position='APPEND',iostat=errorflag)
418  ELSE
419  OPEN(ifile1,file=ifilename1,form='FORMATTED',status='NEW', &
420  iostat=errorflag)
421  END IF ! fileExists1
422 
423  INQUIRE(file=ifilename2,exist=fileexists2)
424 
425  IF ( fileexists2 .EQV. .true. ) THEN
426  OPEN(ifile2,file=ifilename2,form='FORMATTED',status='OLD', &
427  position='APPEND',iostat=errorflag)
428  ELSE
429  OPEN(ifile1,file=ifilename2,form='FORMATTED',status='NEW', &
430  iostat=errorflag)
431  END IF ! fileExists2
432  ELSE
433  IF ( global%thrustWriteCntr == 1 ) THEN
434  OPEN(ifile1,file=ifilename1,form='FORMATTED',status='UNKNOWN', &
435  iostat=errorflag)
436  OPEN(ifile2,file=ifilename2,form='FORMATTED',status='UNKNOWN', &
437  iostat=errorflag)
438  ELSE
439  OPEN(ifile1,file=ifilename1,form='FORMATTED',status='OLD', &
440  position='APPEND',iostat=errorflag)
441  OPEN(ifile2,file=ifilename2,form='FORMATTED',status='OLD', &
442  position='APPEND',iostat=errorflag)
443  END IF ! global%thrustWriteCntr
444  END IF ! global
445 
446  global%error = errorflag
447 
448  IF ( global%error /= err_none ) THEN
449  CALL errorstop(global,err_file_open,__line__,'File: '// &
450  trim(ifilename1)//' and '//trim(ifilename2))
451  END IF ! global%error
452 
453 ! ******************************************************************************
454 ! End
455 ! ******************************************************************************
456 
457  IF ( global%verbLevel > verbose_low ) THEN
458  WRITE(stdout,'(A,1X,A)') solver_name,'Opening thrust and '// &
459  'specific impulse files done.'
460  END IF ! global%verbLevel
461 
462  CALL deregisterfunction(global)
463 
464  END SUBROUTINE rflu_tsi_openglobalvals
465 
466 
467 
468 
469 
470 
471 
472 
473 
474 
475 
476 ! *******************************************************************************
477 !
478 ! Purpose: Print thrust and specific impulse.
479 !
480 ! Description: None.
481 !
482 ! Input:
483 ! pRegion Pointer to region
484 !
485 ! Output: None.
486 !
487 ! Notes:
488 ! 1. This routine should only be called for the master process. It will not
489 ! do anything if called by any other process (safeguard).
490 !
491 ! ******************************************************************************
492 
493  SUBROUTINE rflu_tsi_printglobalvals(pRegion)
494 
495  IMPLICIT NONE
496 
497 ! ******************************************************************************
498 ! Declarations and definitions
499 ! ******************************************************************************
500 
501 ! ==============================================================================
502 ! Arguments
503 ! ==============================================================================
504 
505  TYPE(t_region), POINTER :: pregion
506 
507 ! ==============================================================================
508 ! Locals
509 ! ==============================================================================
510 
511  INTEGER :: ipatch
512  TYPE(t_global), POINTER :: global
513 
514 ! ******************************************************************************
515 ! Start, set pointers and variables
516 ! ******************************************************************************
517 
518  global => pregion%global
519 
520  CALL registerfunction(global,'RFLU_TSI_PrintGlobalVals',&
521  'RFLU_ModThrustSpecImpulse.F90')
522 
523 ! ******************************************************************************
524 ! Print global force coefficients
525 ! ******************************************************************************
526 
527  IF ( global%myProcid == masterproc .AND. &
528  global%verbLevel > verbose_low ) THEN
529  WRITE(stdout,'(A,1X,A)') solver_name,'Printing thrust and '// &
530  'specific impulse...'
531 
532  DO ipatch = 1,pregion%global%nPatches
533  IF ( pregion%thrustFlagsGlobal(ipatch) .EQV. .true. ) THEN
534  WRITE(stdout,'(A,5X,A,1X,I2)') solver_name,'Patch:',ipatch
535  WRITE(stdout,'(A,7X,A,7X,A,6X,A,8X,A,8X,A)') solver_name, &
536  'Component','Thrust','Thrust vacuum','Isp','Isp vacuum'
537  WRITE(stdout,'(A,7X,A,4(1X,E13.6))') solver_name,'x-direction:', &
538  pregion%thrustGlobal(xcoord,ipatch), &
539  pregion%thrustVacGlobal(xcoord,ipatch), &
540  pregion%specImpulseGlobal(xcoord,ipatch), &
541  pregion%specImpulseVacGlobal(xcoord,ipatch)
542  WRITE(stdout,'(A,7X,A,4(1X,E13.6))') solver_name,'y-direction:', &
543  pregion%thrustGlobal(ycoord,ipatch), &
544  pregion%thrustVacGlobal(ycoord,ipatch), &
545  pregion%specImpulseGlobal(ycoord,ipatch), &
546  pregion%specImpulseVacGlobal(ycoord,ipatch)
547  WRITE(stdout,'(A,7X,A,4(1X,E13.6))') solver_name,'z-direction:', &
548  pregion%thrustGlobal(zcoord,ipatch), &
549  pregion%thrustVacGlobal(zcoord,ipatch), &
550  pregion%specImpulseGlobal(zcoord,ipatch), &
551  pregion%specImpulseVacGlobal(zcoord,ipatch)
552  END IF ! pRegion%thrustFlagsGlobal
553  END DO ! iPatch
554 
555  WRITE(stdout,'(A,1X,A)') solver_name,'Printing thrust and '// &
556  'specific impulse done.'
557  END IF ! global%myProcid
558 
559 ! ******************************************************************************
560 ! End
561 ! ******************************************************************************
562 
563  CALL deregisterfunction(global)
564 
565  END SUBROUTINE rflu_tsi_printglobalvals
566 
567 
568 
569 
570 
571 
572 
573 
574 ! *******************************************************************************
575 !
576 ! Purpose: Write thrust and specific impulse to file.
577 !
578 ! Description: None.
579 !
580 ! Input:
581 ! pRegion Pointer to region
582 !
583 ! Output: None.
584 !
585 ! Notes:
586 ! 1. This routine should only be called for the master process. It will not
587 ! do anything if called by any other process (safeguard).
588 ! 2. At present, each patch is written to separate file. This may change in
589 ! future with definition of superpatches which are treated together.
590 !
591 ! ******************************************************************************
592 
593  SUBROUTINE rflu_tsi_writeglobalvals(pRegion)
594 
595  IMPLICIT NONE
596 
597 ! ******************************************************************************
598 ! Declarations and definitions
599 ! ******************************************************************************
600 
601 ! ==============================================================================
602 ! Arguments
603 ! ==============================================================================
604 
605  TYPE(t_region), POINTER :: pregion
606 
607 ! ==============================================================================
608 ! Locals
609 ! ==============================================================================
610 
611  LOGICAL :: fileexists1,fileexists2
612  CHARACTER(CHRLEN) :: ifilename1,ifilename2
613  INTEGER :: errorflag,ifile1,ifile2,ipatch
614  TYPE(t_global), POINTER :: global
615 
616 ! ******************************************************************************
617 ! Start, set pointers and variables
618 ! ******************************************************************************
619 
620  global => pregion%global
621 
622  CALL registerfunction(global,'RFLU_TSI_WriteGlobalVals',&
623  'RFLU_ModThrustSpecImpulse.F90')
624 
625 ! ******************************************************************************
626 ! Increment counter
627 ! ******************************************************************************
628 
629  global%thrustWriteCntr = global%thrustWriteCntr + 1
630 
631 ! ******************************************************************************
632 ! Write global force coefficients
633 ! ******************************************************************************
634 
635  IF ( global%myProcid == masterproc ) THEN
636  IF ( global%verbLevel > verbose_low ) THEN
637  WRITE(stdout,'(A,1X,A)') solver_name,'Writing thrust and '// &
638  'specific impulse...'
639  END IF ! global%verbLevel
640 
641 ! ==============================================================================
642 ! Loop over patches - DONT LOOP OVER PATCH, just write for a given patch
643 ! ==============================================================================
644 
645  DO ipatch = 1,global%nPatches
646  IF ( pregion%thrustFlagsGlobal(ipatch) .EQV. .true. ) THEN
647  IF ( global%verbLevel > verbose_low ) THEN
648  WRITE(stdout,'(A,3X,A,1X,I2)') solver_name,'Patch:',ipatch
649  END IF ! global%verbLevel
650 
651 ! ------------------------------------------------------------------------------
652 ! Open file
653 ! ------------------------------------------------------------------------------
654 
655  CALL rflu_tsi_openglobalvals(global,ipatch,ifile1,ifile2)
656 
657 ! ------------------------------------------------------------------------------
658 ! Write to file
659 ! ------------------------------------------------------------------------------
660 
661  IF ( global%flowType == flow_steady ) THEN
662  WRITE(ifile1,'(I6,6(1X,E13.6))') global%currentIter, &
663  pregion%thrustGlobal(xcoord,ipatch), &
664  pregion%thrustVacGlobal(xcoord,ipatch), &
665 
666  pregion%thrustGlobal(ycoord,ipatch), &
667  pregion%thrustVacGlobal(ycoord,ipatch), &
668 
669  pregion%thrustGlobal(zcoord,ipatch), &
670  pregion%thrustVacGlobal(zcoord,ipatch)
671  ELSE
672  WRITE(ifile1,'(1PE12.5,6(1X,E13.6))') global%currentTime, &
673  pregion%thrustGlobal(xcoord,ipatch), &
674  pregion%thrustVacGlobal(xcoord,ipatch), &
675 
676  pregion%thrustGlobal(ycoord,ipatch), &
677  pregion%thrustVacGlobal(ycoord,ipatch), &
678 
679  pregion%thrustGlobal(zcoord,ipatch), &
680  pregion%thrustVacGlobal(zcoord,ipatch)
681  END IF ! global%flowType
682 
683  IF ( global%flowType == flow_steady ) THEN
684  WRITE(ifile2,'(I6,6(1X,E13.6))') global%currentIter, &
685  pregion%specImpulseGlobal(xcoord,ipatch), &
686  pregion%specImpulseVacGlobal(xcoord,ipatch), &
687 
688  pregion%specImpulseGlobal(ycoord,ipatch), &
689  pregion%specImpulseVacGlobal(ycoord,ipatch), &
690 
691  pregion%specImpulseGlobal(zcoord,ipatch), &
692  pregion%specImpulseVacGlobal(zcoord,ipatch)
693  ELSE
694  WRITE(ifile2,'(1PE12.5,6(1X,E13.6))') global%currentTime, &
695  pregion%specImpulseGlobal(xcoord,ipatch), &
696  pregion%specImpulseVacGlobal(xcoord,ipatch), &
697 
698  pregion%specImpulseGlobal(ycoord,ipatch), &
699  pregion%specImpulseVacGlobal(ycoord,ipatch), &
700 
701  pregion%specImpulseGlobal(zcoord,ipatch), &
702  pregion%specImpulseVacGlobal(zcoord,ipatch)
703  END IF ! global%flowType
704 
705 ! ------------------------------------------------------------------------------
706 ! Close file
707 ! ------------------------------------------------------------------------------
708 
709  CALL rflu_tsi_closeglobalvals(global,ipatch,ifile1,ifile2)
710  END IF ! pRegion%thrustFlagsGlobal
711  END do! iPatch
712 
713 ! ******************************************************************************
714 ! End
715 ! ******************************************************************************
716 
717  IF ( global%verbLevel > verbose_low ) THEN
718  WRITE(stdout,'(A,1X,A)') solver_name,'Writing thrust and '// &
719  'specific impulse done.'
720  END IF ! global%verbLevel
721  END IF ! global%myProcid
722 
723  CALL deregisterfunction(global)
724 
725  END SUBROUTINE rflu_tsi_writeglobalvals
726 
727 
728 
729 
730 
731 
732 END MODULE rflu_modthrustspecimpulse
733 
734 ! ******************************************************************************
735 !
736 ! RCS Revision history:
737 !
738 ! $Log: RFLU_ModThrustSpecImpulse.F90,v $
739 ! Revision 1.4 2008/12/06 08:44:24 mtcampbe
740 ! Updated license.
741 !
742 ! Revision 1.3 2008/11/19 22:17:35 mtcampbe
743 ! Added Illinois Open Source License/Copyright
744 !
745 ! Revision 1.2 2007/12/19 19:13:42 rfiedler
746 ! Increased verbosity level required for writing to screen dump to > VERBOSE_LOW.
747 !
748 ! Revision 1.1 2006/10/20 21:16:32 mparmar
749 ! Initial import
750 !
751 !
752 ! ******************************************************************************
753 
754 
755 
756 
757 
758 
759 
760 
761 
762 
763 
subroutine, public rflu_tsi_printglobalvals(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine, private rflu_tsi_closeglobalvals(global, iPatch, iFile1, iFile2)
subroutine, public rflu_tsi_computeglobalthrustsi(pRegion)
**********************************************************************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 form
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine, private rflu_tsi_openglobalvals(global, iPatch, iFile1, iFile2)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine, public rflu_tsi_writeglobalvals(pRegion)