73 TYPE(t_region
),
POINTER :: pregion
79 CHARACTER(CHRLEN) :: rcsidentstring
80 INTEGER,
PARAMETER :: max_negative_locs = 10
81 INTEGER :: icg,indcp,indmol,nlocs
82 INTEGER :: loc(max_negative_locs,min_val:max_val)
83 REAL(RFREAL) :: eo,gamma,p,rgas,rho,rrho,t,u,
v,vm2,w
84 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv,dv,gv
86 TYPE(t_grid),
POINTER :: pgrid
92 rcsidentstring =
'$RCSfile: RFLU_CheckPositivity.F90,v $ $Revision: 1.14 $'
94 global => pregion%global
97 'RFLU_CheckPositivity.F90')
103 pgrid => pregion%grid
107 indcp = pregion%mixtInput%indCp
108 indmol = pregion%mixtInput%indMol
111 CALL fprofiler_begins(
"RFLU::CheckPositivity")
118 cv => pregion%mixt%cv
119 dv => pregion%mixt%dv
120 gv => pregion%mixt%gv
122 DO icg = 1,pgrid%nCells
123 rho = cv(cv_mixt_dens,icg)
124 rrho = 1.0_rfreal/rho
125 u = rrho*cv(cv_mixt_xmom,icg)
126 v = rrho*cv(cv_mixt_ymom,icg)
127 w = rrho*cv(cv_mixt_zmom,icg)
128 eo = rrho*cv(cv_mixt_ener,icg)
132 vm2 = u*u +
v*
v + w*w
137 IF ( (rho <= 0.0_rfreal) .OR. (p <= 0.0_rfreal) )
THEN
140 IF ( nlocs == 1 )
THEN
141 WRITE(stdout,
'(A,1X,A)') solver_name, &
142 'Negative positive-definite variables detected!'
143 WRITE(stdout,
'(A,3X,A)') solver_name,
'Module: Mixture.'
145 IF ( global%flowType == flow_unsteady )
THEN
146 WRITE(stdout,
'(A,3X,A,1X,1PE12.5)') solver_name,
'Current time:', &
149 WRITE(stdout,
'(A,3X,A,1X,I6)') solver_name, &
150 'Current iteration number:', &
154 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
155 pregion%iRegionGlobal
156 WRITE(stdout,
'(A,6X,A,6(1X,A))') solver_name,
'#', &
165 IF ( nlocs <= max_negative_locs )
THEN
166 WRITE(stdout,
'(A,4X,I3,6(1X,E13.6))') solver_name,nlocs, &
168 loc(nlocs,min_val:max_val) = icg
177 IF ( nlocs > 0 )
THEN
178 IF ( nlocs > max_negative_locs )
THEN
179 WRITE(stdout,
'(A,3X,A,1X,I3,1X,A,1X,I9,1X,A)') solver_name, &
180 'Only wrote the first',max_negative_locs,
'of',nlocs, &
181 'cells with negative positive-definite variables.'
183 locinfo_mode_silent,output_mode_anybody)
186 locinfo_mode_silent,output_mode_anybody)
189 CALL
errorstop(global,err_negative_posdef,__line__)
197 CALL fprofiler_ends(
"RFLU::CheckPositivity")
real(rfreal) function mixtperf_p_deogvm2(D, Eo, G, Vm2)
real(rfreal) function mixtperf_r_m(M)
subroutine registerfunction(global, funName, fileName)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS 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 v
real(rfreal) function mixtperf_t_dpr(D, P, R)
subroutine rflu_printlocinfo(pRegion, locUnsorted, nLocUnsorted, locInfoMode, outputMode)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflu_checkpositivity(pRegion)
subroutine deregisterfunction(global)
real(rfreal) function mixtperf_g_cpr(Cp, R)