Changeset 996 for palm/trunk/SOURCE/boundary_conds.f90
- Timestamp:
- Sep 7, 2012 10:41:47 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/boundary_conds.f90
r979 r996 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! little reformatting 7 7 ! 8 8 ! Former revisions: … … 259 259 260 260 ! 261 !-- Calculate the phase speeds for u, v, and w, first local and then262 !-- average parallel along the outflow boundary.263 DO k = nzb+1, nzt+1264 DO i = nxl, nxr261 !-- Calculate the phase speeds for u, v, and w, first local and then 262 !-- average along the outflow boundary. 263 DO k = nzb+1, nzt+1 264 DO i = nxl, nxr 265 265 266 266 denom = u_m_s(k,0,i) - u_m_s(k,1,i) 267 267 268 268 IF ( denom /= 0.0 ) THEN 269 c_u(k,i) = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) & 270 / ( denom * tsc(2) ) 269 c_u(k,i) = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) / ( denom * tsc(2) ) 271 270 IF ( c_u(k,i) < 0.0 ) THEN 272 271 c_u(k,i) = 0.0 … … 281 280 282 281 IF ( denom /= 0.0 ) THEN 283 c_v(k,i) = -c_max * ( v(k,1,i) - v_m_s(k,1,i) ) & 284 / ( denom * tsc(2) ) 282 c_v(k,i) = -c_max * ( v(k,1,i) - v_m_s(k,1,i) ) / ( denom * tsc(2) ) 285 283 IF ( c_v(k,i) < 0.0 ) THEN 286 284 c_v(k,i) = 0.0 … … 295 293 296 294 IF ( denom /= 0.0 ) THEN 297 c_w(k,i) = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) & 298 / ( denom * tsc(2) ) 295 c_w(k,i) = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) / ( denom * tsc(2) ) 299 296 IF ( c_w(k,i) < 0.0 ) THEN 300 297 c_w(k,i) = 0.0 … … 343 340 ! 344 341 !-- Calculate the new velocities 345 DO k = nzb+1, nzt+1346 DO i = nxlg, nxrg342 DO k = nzb+1, nzt+1 343 DO i = nxlg, nxrg 347 344 u_p(k,-1,i) = u(k,-1,i) - dt_3d * tsc(2) * c_u_m(k) * & 348 345 ( u(k,-1,i) - u(k,0,i) ) * ddy … … 401 398 402 399 ! 403 !-- Calculate the phase speeds for u, v, and w, first local and then404 !-- average parallel along the outflow boundary.405 DO k = nzb+1, nzt+1406 DO i = nxl, nxr400 !-- Calculate the phase speeds for u, v, and w, first local and then 401 !-- average along the outflow boundary. 402 DO k = nzb+1, nzt+1 403 DO i = nxl, nxr 407 404 408 405 denom = u_m_n(k,ny,i) - u_m_n(k,ny-1,i) 409 406 410 407 IF ( denom /= 0.0 ) THEN 411 c_u(k,i) = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) & 412 / ( denom * tsc(2) ) 408 c_u(k,i) = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) / ( denom * tsc(2) ) 413 409 IF ( c_u(k,i) < 0.0 ) THEN 414 410 c_u(k,i) = 0.0 … … 423 419 424 420 IF ( denom /= 0.0 ) THEN 425 c_v(k,i) = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) & 426 / ( denom * tsc(2) ) 421 c_v(k,i) = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) / ( denom * tsc(2) ) 427 422 IF ( c_v(k,i) < 0.0 ) THEN 428 423 c_v(k,i) = 0.0 … … 437 432 438 433 IF ( denom /= 0.0 ) THEN 439 c_w(k,i) = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) & 440 / ( denom * tsc(2) ) 434 c_w(k,i) = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) / ( denom * tsc(2) ) 441 435 IF ( c_w(k,i) < 0.0 ) THEN 442 436 c_w(k,i) = 0.0 … … 485 479 ! 486 480 !-- Calculate the new velocities 487 DO k = nzb+1, nzt+1488 DO i = nxlg, nxrg481 DO k = nzb+1, nzt+1 482 DO i = nxlg, nxrg 489 483 u_p(k,ny+1,i) = u(k,ny+1,i) - dt_3d * tsc(2) * c_u_m(k) * & 490 484 ( u(k,ny+1,i) - u(k,ny,i) ) * ddy … … 543 537 544 538 ! 545 !-- Calculate the phase speeds for u, v, and w, first local and then546 !-- average parallel along the outflow boundary.547 DO k = nzb+1, nzt+1548 DO j = nys, nyn539 !-- Calculate the phase speeds for u, v, and w, first local and then 540 !-- average along the outflow boundary. 541 DO k = nzb+1, nzt+1 542 DO j = nys, nyn 549 543 550 544 denom = u_m_l(k,j,1) - u_m_l(k,j,2) 551 545 552 546 IF ( denom /= 0.0 ) THEN 553 c_u(k,j) = -c_max * ( u(k,j,1) - u_m_l(k,j,1) ) & 554 / ( denom * tsc(2) ) 547 c_u(k,j) = -c_max * ( u(k,j,1) - u_m_l(k,j,1) ) / ( denom * tsc(2) ) 555 548 IF ( c_u(k,j) < 0.0 ) THEN 556 549 c_u(k,j) = 0.0 … … 565 558 566 559 IF ( denom /= 0.0 ) THEN 567 c_v(k,j) = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) & 568 / ( denom * tsc(2) ) 560 c_v(k,j) = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) / ( denom * tsc(2) ) 569 561 IF ( c_v(k,j) < 0.0 ) THEN 570 562 c_v(k,j) = 0.0 … … 579 571 580 572 IF ( denom /= 0.0 ) THEN 581 c_w(k,j) = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) & 582 / ( denom * tsc(2) ) 573 c_w(k,j) = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) / ( denom * tsc(2) ) 583 574 IF ( c_w(k,j) < 0.0 ) THEN 584 575 c_w(k,j) = 0.0 … … 627 618 ! 628 619 !-- Calculate the new velocities 629 DO k = nzb+1, nzt+1630 DO i = nxlg, nxrg620 DO k = nzb+1, nzt+1 621 DO i = nxlg, nxrg 631 622 u_p(k,j,0) = u(k,j,0) - dt_3d * tsc(2) * c_u_m(k) * & 632 623 ( u(k,j,0) - u(k,j,1) ) * ddx … … 685 676 686 677 ! 687 !-- Calculate the phase speeds for u, v, and w, first local and then688 !-- average parallel along the outflow boundary.689 DO k = nzb+1, nzt+1690 DO j = nys, nyn678 !-- Calculate the phase speeds for u, v, and w, first local and then 679 !-- average along the outflow boundary. 680 DO k = nzb+1, nzt+1 681 DO j = nys, nyn 691 682 692 683 denom = u_m_r(k,j,nx) - u_m_r(k,j,nx-1) 693 684 694 685 IF ( denom /= 0.0 ) THEN 695 c_u(k,j) = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) & 696 / ( denom * tsc(2) ) 686 c_u(k,j) = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) / ( denom * tsc(2) ) 697 687 IF ( c_u(k,j) < 0.0 ) THEN 698 688 c_u(k,j) = 0.0 … … 707 697 708 698 IF ( denom /= 0.0 ) THEN 709 c_v(k,j) = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) & 710 / ( denom * tsc(2) ) 699 c_v(k,j) = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) / ( denom * tsc(2) ) 711 700 IF ( c_v(k,j) < 0.0 ) THEN 712 701 c_v(k,j) = 0.0 … … 721 710 722 711 IF ( denom /= 0.0 ) THEN 723 c_w(k,j) = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) & 724 / ( denom * tsc(2) ) 712 c_w(k,j) = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) / ( denom * tsc(2) ) 725 713 IF ( c_w(k,j) < 0.0 ) THEN 726 714 c_w(k,j) = 0.0 … … 769 757 ! 770 758 !-- Calculate the new velocities 771 DO k = nzb+1, nzt+1772 DO i = nxlg, nxrg759 DO k = nzb+1, nzt+1 760 DO i = nxlg, nxrg 773 761 u_p(k,j,nx+1) = u(k,j,nx+1) - dt_3d * tsc(2) * c_u_m(k) * & 774 762 ( u(k,j,nx+1) - u(k,j,nx) ) * ddx
Note: See TracChangeset
for help on using the changeset viewer.