73 TYPE(t_region
),
POINTER :: pregion
79 LOGICAL :: printerrornorms
80 CHARACTER(CHRLEN) :: ifilename,rcsidentstring
81 INTEGER :: errorflag,ibc,icg,im,in,iprobe,iq
82 REAL(RFREAL) :: atot,const,cpgas,dc,de,dinc,dtot,dummyreal,etaqm,ggas, &
83 idc,l,omega,pc,pe,probetime,ptot,rgas,ro,
term,tc,ttot,uc, &
85 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv
87 TYPE(t_grid),
POINTER :: pgrid
94 rcsidentstring =
'$RCSfile: RFLU_ComputeExactFlowProbeError.F90,v $ $Revision: 1.3 $'
96 global => pregion%global
99 'RFLU_ComputeExactFlowProbeError.F90')
101 IF ( global%verbLevel > verbose_none )
THEN
102 WRITE(stdout,
'(A,1X,A)') solver_name, &
103 'Computing errors in flow solution at probe locations...'
105 IF ( global%verbLevel > verbose_low )
THEN
106 WRITE(stdout,
'(A,3X,A,A)') solver_name,
'Case: ',trim(global%casename)
114 pgrid => pregion%grid
115 pcv => pregion%mixt%cv
116 pdv => pregion%mixt%dv
117 pmixtinput => pregion%mixtInput
124 ggas = global%refGamma
131 SELECT CASE ( global%casename )
138 CASE (
"pipeacoust" )
142 l = maxval(pgrid%xyz(xcoord,1:pgrid%nVert))
143 ro = maxval(pgrid%xyz(ycoord,1:pgrid%nVert))
145 im =
max(pmixtinput%prepIntVal1,1)
146 in =
max(pmixtinput%prepIntVal2,1)
147 iq =
max(pmixtinput%prepIntVal3,1)
148 ibc =
max(
min(pmixtinput%prepIntVal4,1),0)
150 const =
max(pmixtinput%prepRealVal1,0.0_rfreal)
152 CALL
rflu_jyzom(im,iq,dummyreal,etaqm,dummyreal,dummyreal)
154 omega = atot*
sqrt((in*global%pi/l)**2 + (etaqm/ro)**2)
156 IF ( global%verbLevel > verbose_low )
THEN
157 WRITE(stdout,
'(A,5X,A,1X,I2)' ) solver_name, &
158 'Boundary condition:',ibc
159 WRITE(stdout,
'(A,5X,A,3(1X,I2))') solver_name, &
161 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
162 'Total density (kg/m^3): ',dtot
163 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
164 'Total pressure (N/m^2): ',ptot
165 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
166 'Angular frequency (rad/s):',omega
167 WRITE(stdout,
'(A,5X,A,1X,E13.6)') solver_name, &
168 'Constant (-): ',const
176 DO iprobe = 1,global%nProbes
177 IF ( global%probePos(iprobe,probe_region) == &
178 pregion%iRegionGlobal )
THEN
179 icg = global%probePos(iprobe,probe_cell)
181 rewind(if_probe+iprobe-1)
183 WRITE(ifilename,
'(A,I4.4)') trim(global%outDir)// &
184 trim(global%casename)//
'.prbe_',iprobe
185 OPEN(if_extr_data1,file=trim(ifilename),
form=
'FORMATTED', &
186 status=
'UNKNOWN',iostat=errorflag)
187 global%error = errorflag
188 IF (global%error /= err_none )
THEN
189 CALL
errorstop(global,err_file_open,__line__, &
190 'File: '//trim(ifilename))
194 READ(if_probe+iprobe-1,*,iostat=errorflag) probetime, &
196 IF ( errorflag /= err_none )
THEN
200 x = pgrid%cofg(xcoord,icg)
201 y = pgrid%cofg(ycoord,icg)
202 z = pgrid%cofg(zcoord,icg)
205 ibc,im,in,iq,etaqm,omega, &
206 dtot,ptot,atot,const,de,ue, &
209 WRITE(if_extr_data1,
'(1PE14.7,3(1X,E13.6))') &
210 probetime,pe,pc,((pc-ptot)/(pe-ptot)-1.0_rfreal)
213 CLOSE(if_extr_data1,iostat=errorflag)
214 global%error = errorflag
215 IF (global%error /= err_none )
THEN
216 CALL
errorstop(global,err_file_close,__line__, &
217 'File: '//trim(ifilename))
227 global%warnCounter = global%warnCounter + 1
229 IF ( global%verbLevel > verbose_none )
THEN
230 WRITE(stdout,
'(A,3X,A,1X,A)') solver_name,
'*** WARNING ***', &
231 'Exact solution not available. Returning to calling procedure.'
239 IF ( global%verbLevel > verbose_none )
THEN
240 WRITE(stdout,
'(A,1X,A)') solver_name, &
241 'Computing errors in flow solution at probe locations done.'
void int int REAL REAL * y
subroutine, public rflu_computeexactflowpacoust(global, x, y, z, t, L, ro, iBc, im, in, iq, etaqm, omega, dTot, pTot, aTot, const, d, u, v, w, p)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public rflu_jyzom(N, M, RJ0M, RJ1M, RY0M, RY1M)
real(rfreal) function mixtperf_r_cpg(Cp, G)
void int int int REAL REAL REAL * z
subroutine rflu_computeexactflowprobeerror(pRegion)
real(rfreal) function mixtperf_d_cgp(C, G, P)
**********************************************************************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
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine, public rflu_getparamshardcodepacoust(pTot, aTot)