60 TYPE(t_region
) :: region
63 INTEGER ::
ic,ifc,iv1,iv2
66 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER ::
a,c1g,c2g,
d,errorflag,hloc1,ic1l,ic2l,ifcp,
j,l,ncells,
nfaces,vloc1
68 INTEGER,
DIMENSION(:),
POINTER :: f2fpoles
69 INTEGER,
DIMENSION(:,:),
POINTER :: fsoles
70 REAL(RFREAL) :: avgfac,corr,eneroles,numer,sum1,sum2,sum3,
term,uavg,var, &
72 REAL(RFREAL),
DIMENSION(:),
POINTER :: vol
73 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv
74 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: int2oles
75 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: int20oles,int21oles
80 rcsidentstring =
'$RCSfile: RFLU_ComputeEnerDissOLES.F90,v $ $Revision: 1.5 $'
82 global => region%global
85 'RFLU_ComputeEnerDissOLES.F90')
91 IF ( region%mixt%cvState == cv_mixt_state_cons )
THEN
92 CALL
errorstop(global,err_cv_state_invalid,__line__)
99 vol => region%grid%vol
102 eneroles = global%enerOLES
104 fsoles => region%grid%fsOLES
105 f2fpoles => region%grid%f2fpOLES
107 int20oles => region%grid%int20OLES
108 int21oles => region%grid%int21OLES
110 ncells = region%grid%nCells
111 nfaces = region%grid%nFaces
112 avgfac = 1.0_rfreal/
REAL(ncells,kind=rfreal)
118 eneroles = 0.0_rfreal
121 eneroles = eneroles + cv(cv_mixt_xvel,
ic)*cv(cv_mixt_xvel,
ic) &
122 + cv(cv_mixt_yvel,
ic)*cv(cv_mixt_yvel,
ic) &
123 + cv(cv_mixt_zvel,
ic)*cv(cv_mixt_zvel,
ic)
126 global%enerOLES = avgfac*0.5_rfreal*eneroles
134 uavg = uavg + cv(cv_mixt_xvel,
ic)*cv(cv_mixt_xvel,
ic)
135 vavg = vavg + cv(cv_mixt_yvel,
ic)*cv(cv_mixt_yvel,
ic)
136 wavg = wavg + cv(cv_mixt_zvel,
ic)*cv(cv_mixt_zvel,
ic)
143 global%uVarOLES = uavg
144 global%vVarOLES = vavg
145 global%wVarOLES = wavg
152 ncells =
SIZE(region%grid%fsOLES,1)
153 avgfac = 3.0_rfreal/
REAL(
nfaces,kind=rfreal)
155 ALLOCATE(int2oles(3,3*ncells,3*ncells),stat=errorflag)
156 global%error = errorflag
157 IF ( global%error /= err_none )
THEN
158 CALL
errorstop(global,err_allocate,__line__,
'int2OLES')
161 int2oles(:,:,:) = 0.0_rfreal
175 c1g = fsoles(ic1l,ifc)
179 c2g = fsoles(ic2l,ifc)
182 term = vol(c1g)*vol(c2g)
194 corr =
term*cv(iv1+1,c1g)*cv(iv2+1,c2g)
203 int2oles(ifcp,vloc1,hloc1) = int2oles(ifcp,vloc1,hloc1) + corr
217 int2oles(:,:,:) = avgfac*int2oles(:,:,:)
236 IF ( ic1l /= ic2l )
THEN
273 sum1 = sum1 + int2oles(ifcp,vloc1,hloc1)
274 sum2 = sum2 + int20oles(ifcp,vloc1,hloc1)
275 sum3 = sum3 + int21oles(ifcp,vloc1,hloc1)
287 var = 2.0_rfreal*global%enerOLES/3.0_rfreal
288 numer = sum1/region%grid%deltaOLES**6 - var*sum2
289 global%dissOLES = (
max(numer/sum3,tiny(1.0_rfreal)))**(3.0_rfreal/2.0_rfreal)/ &
290 region%grid%rhoOLES(1)
292 WRITE(*,
'(3(2X,E15.8))') sum1/region%grid%deltaOLES**6,var*sum2,sum3
293 WRITE(71,
'(4(2X,E15.8))') global%currentTime,sum1/region%grid%deltaOLES**6, &
297 WRITE(*,
'(5(2X,E15.8))') global%enerOLES,global%dissOLES, &
304 DEALLOCATE(int2oles,stat=errorflag)
305 global%error = errorflag
306 IF ( global%error /= err_none )
THEN
307 CALL
errorstop(global,err_deallocate,__line__,
'int2OLES')
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
**********************************************************************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
INTEGER function, public rflu_geti1posoles(l, d)
INTEGER function, public rflu_getlposoles(j, a)
subroutine rflu_computeenerdissoles(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)