Changeset 1858 for palm/trunk/SOURCE/lpm_collision_kernels_mod.f90
 Timestamp:
 Apr 13, 2016 1:12:11 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/lpm_collision_kernels_mod.f90
r1851 r1858 19 19 ! Current revisions: 20 20 !  21 ! 21 ! Interpolation of collision kernels adjusted to more reasonable values. 22 ! Reformatting of the code. 22 23 ! 23 24 ! Former revisions: … … 27 28 ! 1850 20160408 13:29:27Z maronga 28 29 ! Module renamed 29 !30 30 ! 31 31 ! 1822 20160407 07:49:42Z hoffmann … … 195 195 ! 196 196 ! Calculate the radius class bounds with logarithmic distances 197 ! in the interval [1.0E6, 2.0E4] m197 ! in the interval [1.0E6, 1000.0E6] m 198 198 rclass_lbound = LOG( 1.0E6_wp ) 199 rclass_ubound = LOG( 2.0E4_wp )199 rclass_ubound = LOG( 1000.0E6_wp ) 200 200 radclass(1) = EXP( rclass_lbound ) 201 201 DO i = 2, radius_classes … … 206 206 207 207 ! 208 ! Set the class bounds for dissipation in interval [0.0, 0.1]m**2/s**3208 ! Set the class bounds for dissipation in interval [0.0, 600.0] cm**2/s**3 209 209 DO i = 1, dissipation_classes 210 epsclass(i) = 0. 1_wp * REAL( i, KIND=wp ) / dissipation_classes210 epsclass(i) = 0.06_wp * REAL( i, KIND=wp ) / dissipation_classes 211 211 ENDDO 212 212 ! … … 286 286 DEALLOCATE( ec, ecf, epsclass, gck, hkernel, winf ) 287 287 288 ELSEIF( collision_kernel == 'hall' .OR. collision_kernel == 'wang' ) &289 THEN290 !291 ! Initial settings for Hall and WangKernel292 ! To be done: move here parts from turbsd, fallg, ecoll, etc.293 288 ENDIF 294 289 … … 307 302 308 303 USE particle_attributes, & 309 ONLY: prt_count, radius_classes, wang_kernel304 ONLY: number_of_particles, prt_count, radius_classes, wang_kernel 310 305 311 306 IMPLICIT NONE … … 316 311 INTEGER(iwp) :: j1 !< 317 312 INTEGER(iwp) :: k1 !< 318 INTEGER(iwp) :: pend !< 319 INTEGER(iwp) :: pstart !< 320 321 322 pstart = 1 323 pend = prt_count(k1,j1,i1) 324 radius_classes = prt_count(k1,j1,i1) 325 326 ALLOCATE( ec(1:radius_classes,1:radius_classes), & 327 radclass(1:radius_classes), winf(1:radius_classes) ) 313 314 315 number_of_particles = prt_count(k1,j1,i1) 316 radius_classes = number_of_particles ! necessary to use the same 317 ! subroutines as for 318 ! precalculated kernels 319 320 ALLOCATE( ec(1:number_of_particles,1:number_of_particles), & 321 radclass(1:number_of_particles), winf(1:number_of_particles) ) 328 322 329 323 ! 330 324 ! Store particle radii on the radclass array 331 radclass(1: radius_classes) = particles(pstart:pend)%radius325 radclass(1:number_of_particles) = particles(1:number_of_particles)%radius 332 326 333 327 IF ( wang_kernel ) THEN … … 341 335 ! 342 336 ! Call routines to calculate efficiencies for the Wang kernel 343 ALLOCATE( gck(1: radius_classes,1:radius_classes), &344 ecf(1: radius_classes,1:radius_classes) )337 ALLOCATE( gck(1:number_of_particles,1:number_of_particles), & 338 ecf(1:number_of_particles,1:number_of_particles) ) 345 339 346 340 CALL turbsd … … 348 342 CALL effic 349 343 350 DO j = 1, radius_classes351 DO i = 1, radius_classes352 ckernel( pstart+i1,pstart+j1,1) = ec(i,j) * gck(i,j) * ecf(i,j)344 DO j = 1, number_of_particles 345 DO i = 1, number_of_particles 346 ckernel(1+i1,1+j1,1) = ec(i,j) * gck(i,j) * ecf(i,j) 353 347 ENDDO 354 348 ENDDO … … 362 356 CALL effic 363 357 364 DO j = 1, radius_classes 365 DO i = 1, radius_classes 366 ckernel(pstart+i1,pstart+j1,1) = pi * & 367 ( radclass(j) + radclass(i) )**2 & 368 * ec(i,j) * ABS( winf(j)  winf(i) ) 358 DO j = 1, number_of_particles 359 DO i = 1, number_of_particles 360 ckernel(i,j,1) = pi * ( radclass(j) + radclass(i) )**2 & 361 * ec(i,j) * ABS( winf(j)  winf(i) ) 369 362 ENDDO 370 363 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.