Changeset 1159 for palm/trunk
- Timestamp:
- May 21, 2013 11:58:22 AM (12 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/boundary_conds.f90
r1116 r1159 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! Bugfix: Neumann boundary conditions for the velocity components at the 23 ! outflow are in fact radiation boundary conditions using the maximum phase 24 ! velocity that ensures numerical stability (CFL-condition). 25 ! Hence, logical operator use_cmax is now used instead of bc_lr_dirneu/_neudir. 26 ! Bugfix: In case of use_cmax at the outflow, u, v, w are replaced by 27 ! u_p, v_p, w_p 22 28 ! 23 29 ! … … 96 102 ! Description: 97 103 ! ------------ 98 ! Boundary conditions for the prognostic quantities (range='main'). 99 ! In case of non-cyclic lateral boundaries the conditions for velocities at 100 ! the outflow are set after the pressure solver has been called (range= 101 ! 'outflow_uvw'). 104 ! Boundary conditions for the prognostic quantities. 102 105 ! One additional bottom boundary condition is applied for the TKE (=(u*)**2) 103 106 ! in prandtl_fluxes. The cyclic lateral boundary conditions are implicitly … … 334 337 335 338 ! 336 !-- Neumann or Radiation boundary condition for the velocities at the 337 !-- respective outflow 339 !-- Radiation boundary conditions for the velocities at the respective outflow. 340 !-- The phase velocity is either assumed to the maximum phase velocity that 341 !-- ensures numerical stability (CFL-condition) or calculated after 342 !-- Orlanski(1976) and averaged along the outflow boundary. 338 343 IF ( outflow_s ) THEN 339 344 340 IF ( bc_ns_dirneu) THEN341 u (:,-1,:) = u(:,0,:)342 v (:,0,:) = v(:,1,:)343 w (:,-1,:) = w(:,0,:)344 ELSEIF ( bc_ns_dirrad) THEN345 IF ( use_cmax ) THEN 346 u_p(:,-1,:) = u(:,0,:) 347 v_p(:,0,:) = v(:,1,:) 348 w_p(:,-1,:) = w(:,0,:) 349 ELSEIF ( .NOT. use_cmax ) THEN 345 350 346 351 c_max = dy / dt_3d … … 477 482 IF ( outflow_n ) THEN 478 483 479 IF ( bc_ns_neudir) THEN480 u (:,ny+1,:) = u(:,ny,:)481 v (:,ny+1,:) = v(:,ny,:)482 w (:,ny+1,:) = w(:,ny,:)483 ELSEIF ( bc_ns_dirrad) THEN484 IF ( use_cmax ) THEN 485 u_p(:,ny+1,:) = u(:,ny,:) 486 v_p(:,ny+1,:) = v(:,ny,:) 487 w_p(:,ny+1,:) = w(:,ny,:) 488 ELSEIF ( .NOT. use_cmax ) THEN 484 489 485 490 c_max = dy / dt_3d … … 616 621 IF ( outflow_l ) THEN 617 622 618 IF ( bc_lr_neudir) THEN619 u (:,:,-1) = u(:,:,0)620 v (:,:,0) = v(:,:,1)621 w (:,:,-1) = w(:,:,0)622 ELSEIF ( bc_ns_dirrad) THEN623 IF ( use_cmax ) THEN 624 u_p(:,:,-1) = u(:,:,0) 625 v_p(:,:,0) = v(:,:,1) 626 w_p(:,:,-1) = w(:,:,0) 627 ELSEIF ( .NOT. use_cmax ) THEN 623 628 624 629 c_max = dx / dt_3d … … 755 760 IF ( outflow_r ) THEN 756 761 757 IF ( bc_lr_dirneu) THEN758 u (:,:,nx+1) = u(:,:,nx)759 v (:,:,nx+1) = v(:,:,nx)760 w (:,:,nx+1) = w(:,:,nx)761 ELSEIF ( bc_ns_dirrad) THEN762 IF ( use_cmax ) THEN 763 u_p(:,:,nx+1) = u(:,:,nx) 764 v_p(:,:,nx+1) = v(:,:,nx) 765 w_p(:,:,nx+1) = w(:,:,nx) 766 ELSEIF ( .NOT. use_cmax ) THEN 762 767 763 768 c_max = dx / dt_3d -
palm/trunk/SOURCE/check_parameters.f90
r1116 r1159 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! bc_lr/ns_dirneu/neudir removed 23 23 ! 24 24 ! Former revisions: … … 1440 1440 !-- Lateral boundary conditions 1441 1441 IF ( bc_lr /= 'cyclic' .AND. bc_lr /= 'dirichlet/radiation' .AND. & 1442 bc_lr /= 'radiation/dirichlet' .AND. bc_lr /= 'dirichlet/neumann' & 1443 .AND. bc_lr /= 'neumann/dirichlet' ) THEN 1442 bc_lr /= 'radiation/dirichlet' ) THEN 1444 1443 message_string = 'unknown boundary condition: bc_lr = "' // & 1445 1444 TRIM( bc_lr ) // '"' … … 1447 1446 ENDIF 1448 1447 IF ( bc_ns /= 'cyclic' .AND. bc_ns /= 'dirichlet/radiation' .AND. & 1449 bc_ns /= 'radiation/dirichlet' .AND. bc_ns /= 'dirichlet/neumann' & 1450 .AND. bc_ns /= 'neumann/dirichlet' ) THEN 1448 bc_ns /= 'radiation/dirichlet' ) THEN 1451 1449 message_string = 'unknown boundary condition: bc_ns = "' // & 1452 1450 TRIM( bc_ns ) // '"' … … 1459 1457 IF ( bc_lr == 'dirichlet/radiation' ) bc_lr_dirrad = .TRUE. 1460 1458 IF ( bc_lr == 'radiation/dirichlet' ) bc_lr_raddir = .TRUE. 1461 IF ( bc_lr == 'dirichlet/neumann' ) bc_lr_dirneu = .TRUE.1462 IF ( bc_lr == 'neumann/dirichlet' ) bc_lr_neudir = .TRUE.1463 1459 IF ( bc_ns /= 'cyclic' ) bc_ns_cyc = .FALSE. 1464 1460 IF ( bc_ns == 'dirichlet/radiation' ) bc_ns_dirrad = .TRUE. 1465 1461 IF ( bc_ns == 'radiation/dirichlet' ) bc_ns_raddir = .TRUE. 1466 IF ( bc_ns == 'dirichlet/neumann' ) bc_ns_dirneu = .TRUE.1467 IF ( bc_ns == 'neumann/dirichlet' ) bc_ns_neudir = .TRUE.1468 1462 1469 1463 ! … … 3306 3300 ENDIF 3307 3301 3308 IF ( bc_lr == 'radiation/dirichlet' .OR. bc_lr == 'neumann/dirichlet') THEN3302 IF ( bc_lr == 'radiation/dirichlet' ) THEN 3309 3303 dist_nxr = nx - inflow_disturbance_begin 3310 3304 dist_nxl(1) = nx - inflow_disturbance_end 3311 ELSEIF ( bc_lr == 'dirichlet/radiation' .OR. bc_lr == 'dirichlet/neumann') THEN3305 ELSEIF ( bc_lr == 'dirichlet/radiation' ) THEN 3312 3306 dist_nxl = inflow_disturbance_begin 3313 3307 dist_nxr(1) = inflow_disturbance_end 3314 3308 ENDIF 3315 IF ( bc_ns == 'dirichlet/radiation' .OR. bc_ns == 'dirichlet/neumann') THEN3309 IF ( bc_ns == 'dirichlet/radiation' ) THEN 3316 3310 dist_nyn = ny - inflow_disturbance_begin 3317 3311 dist_nys(1) = ny - inflow_disturbance_end 3318 ELSEIF ( bc_ns == 'radiation/dirichlet' .OR. bc_ns == 'neumann/dirichlet') THEN3312 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 3319 3313 dist_nys = inflow_disturbance_begin 3320 3314 dist_nyn(1) = inflow_disturbance_end … … 3324 3318 !-- A turbulent inflow requires Dirichlet conditions at the respective inflow 3325 3319 !-- boundary (so far, a turbulent inflow is realized from the left side only) 3326 IF ( turbulent_inflow .AND. bc_lr /= 'dirichlet/radiation' .AND. bc_lr /= 'dirichlet/neumann') THEN3320 IF ( turbulent_inflow .AND. bc_lr /= 'dirichlet/radiation' ) THEN 3327 3321 message_string = 'turbulent_inflow = .T. requires a Dirichlet ' // & 3328 3322 'condition at the inflow boundary' -
palm/trunk/SOURCE/header.f90
r1116 r1159 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! +use_cmax 22 23 ! 23 24 ! … … 742 743 WRITE ( io, 317 ) bc_lr, bc_ns 743 744 IF ( .NOT. bc_lr_cyc .OR. .NOT. bc_ns_cyc ) THEN 744 WRITE ( io, 318 ) pt_damping_width, pt_damping_factor745 WRITE ( io, 318 ) use_cmax, pt_damping_width, pt_damping_factor 745 746 IF ( turbulent_inflow ) THEN 746 747 WRITE ( io, 319 ) recycling_width, recycling_plane, & … … 1781 1782 ' left/right: ',A/ & 1782 1783 ' north/south: ',A) 1783 318 FORMAT (/' pt damping layer width = ',F7.2,' m, pt ', & 1784 318 FORMAT (/' use_cmax: ',L1 / & 1785 ' pt damping layer width = ',F8.2,' m, pt ', & 1784 1786 'damping factor = ',F6.4) 1785 1787 319 FORMAT (' turbulence recycling at inflow switched on'/ & -
palm/trunk/SOURCE/init_3d_model.f90
r1154 r1159 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! -bc_lr_dirneu, bc_lr_neudir, bc_ns_dirneu, bc_ns_neudir 25 26 ! 26 27 ! … … 1695 1696 ptdf_x = 0.0 1696 1697 ptdf_y = 0.0 1697 IF ( bc_lr_dirrad .OR. bc_lr_dirneu) THEN1698 IF ( bc_lr_dirrad ) THEN 1698 1699 DO i = nxl, nxr 1699 1700 IF ( ( i * dx ) < pt_damping_width ) THEN … … 1703 1704 ENDIF 1704 1705 ENDDO 1705 ELSEIF ( bc_lr_raddir .OR. bc_lr_neudir) THEN1706 ELSEIF ( bc_lr_raddir ) THEN 1706 1707 DO i = nxl, nxr 1707 1708 IF ( ( i * dx ) > ( nx * dx - pt_damping_width ) ) THEN … … 1711 1712 ENDIF 1712 1713 ENDDO 1713 ELSEIF ( bc_ns_dirrad .OR. bc_ns_dirneu) THEN1714 ELSEIF ( bc_ns_dirrad ) THEN 1714 1715 DO j = nys, nyn 1715 1716 IF ( ( j * dy ) > ( ny * dy - pt_damping_width ) ) THEN … … 1719 1720 ENDIF 1720 1721 ENDDO 1721 ELSEIF ( bc_ns_raddir .OR. bc_ns_neudir) THEN1722 ELSEIF ( bc_ns_raddir ) THEN 1722 1723 DO j = nys, nyn 1723 1724 IF ( ( j * dy ) < pt_damping_width ) THEN -
palm/trunk/SOURCE/init_pegrid.f90
r1140 r1159 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! dirichlet/neumann and neumann/dirichlet removed 22 23 ! 23 24 ! … … 1051 1052 !-- horizontal boundary conditions. 1052 1053 IF ( pleft == MPI_PROC_NULL ) THEN 1053 IF ( bc_lr == 'dirichlet/radiation' .OR. bc_lr == 'dirichlet/neumann') THEN1054 IF ( bc_lr == 'dirichlet/radiation' ) THEN 1054 1055 inflow_l = .TRUE. 1055 ELSEIF ( bc_lr == 'radiation/dirichlet' .OR. bc_lr == 'neumann/dirichlet') THEN1056 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 1056 1057 outflow_l = .TRUE. 1057 1058 ENDIF … … 1059 1060 1060 1061 IF ( pright == MPI_PROC_NULL ) THEN 1061 IF ( bc_lr == 'dirichlet/radiation' .OR. bc_lr == 'dirichlet/neumann') THEN1062 IF ( bc_lr == 'dirichlet/radiation' ) THEN 1062 1063 outflow_r = .TRUE. 1063 ELSEIF ( bc_lr == 'radiation/dirichlet' .OR. bc_lr == 'neumann/dirichlet') THEN1064 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 1064 1065 inflow_r = .TRUE. 1065 1066 ENDIF … … 1067 1068 1068 1069 IF ( psouth == MPI_PROC_NULL ) THEN 1069 IF ( bc_ns == 'dirichlet/radiation' .OR. bc_ns == 'dirichlet/neumann') THEN1070 IF ( bc_ns == 'dirichlet/radiation' ) THEN 1070 1071 outflow_s = .TRUE. 1071 ELSEIF ( bc_ns == 'radiation/dirichlet' .OR. bc_ns == 'neumann/dirichlet') THEN1072 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 1072 1073 inflow_s = .TRUE. 1073 1074 ENDIF … … 1075 1076 1076 1077 IF ( pnorth == MPI_PROC_NULL ) THEN 1077 IF ( bc_ns == 'dirichlet/radiation' .OR. bc_ns == 'dirichlet/neumann') THEN1078 IF ( bc_ns == 'dirichlet/radiation' ) THEN 1078 1079 inflow_n = .TRUE. 1079 ELSEIF ( bc_ns == 'radiation/dirichlet' .OR. bc_ns == 'neumann/dirichlet') THEN1080 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 1080 1081 outflow_n = .TRUE. 1081 1082 ENDIF … … 1107 1108 1108 1109 #elif ! defined ( __parallel ) 1109 IF ( bc_lr == 'dirichlet/radiation' .OR. bc_lr == 'dirichlet/neumann') THEN1110 IF ( bc_lr == 'dirichlet/radiation' ) THEN 1110 1111 inflow_l = .TRUE. 1111 1112 outflow_r = .TRUE. 1112 ELSEIF ( bc_lr == 'radiation/dirichlet' .OR. bc_lr == 'neumann/dirichlet') THEN1113 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 1113 1114 outflow_l = .TRUE. 1114 1115 inflow_r = .TRUE. 1115 1116 ENDIF 1116 1117 1117 IF ( bc_ns == 'dirichlet/radiation' .OR. bc_ns == 'dirichlet/neumann') THEN1118 IF ( bc_ns == 'dirichlet/radiation' ) THEN 1118 1119 inflow_n = .TRUE. 1119 1120 outflow_s = .TRUE. 1120 ELSEIF ( bc_ns == 'radiation/dirichlet' .OR. bc_ns == 'neumann/dirichlet') THEN1121 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 1121 1122 outflow_n = .TRUE. 1122 1123 inflow_s = .TRUE. -
palm/trunk/SOURCE/modules.f90
r1132 r1159 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! -bc_lr_dirneu, bc_lr_neudir, bc_ns_dirneu, bc_ns_neudir 23 ! +use_cmax 23 24 ! 24 25 ! Former revisions: … … 730 731 731 732 LOGICAL :: avs_output = .FALSE., & 732 bc_lr_cyc =.TRUE., bc_lr_dirneu = .FALSE., & 733 bc_lr_dirrad = .FALSE., bc_lr_neudir = .FALSE., & 733 bc_lr_cyc =.TRUE., bc_lr_dirrad = .FALSE., & 734 734 bc_lr_raddir = .FALSE., bc_ns_cyc = .TRUE., & 735 bc_ns_dirneu = .FALSE., bc_ns_dirrad = .FALSE., & 736 bc_ns_neudir = .FALSE., bc_ns_raddir = .FALSE., & 735 bc_ns_dirrad = .FALSE., bc_ns_raddir = .FALSE.,& 737 736 call_psolver_at_all_substeps = .TRUE., & 738 737 cloud_droplets = .FALSE., cloud_physics = .FALSE., & … … 767 766 stop_dt = .FALSE., synchronous_exchange = .FALSE., & 768 767 terminate_run = .FALSE., turbulence = .FALSE., & 769 turbulent_inflow = .FALSE., &768 turbulent_inflow = .FALSE., use_cmax = .TRUE., & 770 769 use_prescribed_profile_data = .FALSE., use_reference = .FALSE.,& 771 770 use_surface_fluxes = .FALSE., use_top_fluxes = .FALSE., & -
palm/trunk/SOURCE/parin.f90
r1132 r1159 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! +use_cmax 22 23 ! 23 24 ! … … 254 255 top_momentumflux_u, top_momentumflux_v, top_salinityflux, & 255 256 turbulence, turbulent_inflow, ug_surface, ug_vertical_gradient, & 256 ug_vertical_gradient_level, use_surface_fluxes, &257 ug_vertical_gradient_level, use_surface_fluxes, use_cmax, & 257 258 use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke, & 258 259 uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient, & -
palm/trunk/SOURCE/poismg.f90
r1093 r1159 23 23 ! Current revisions: 24 24 ! ----------------- 25 ! bc_lr/ns_dirneu/neudir removed 25 26 ! 26 27 ! … … 1251 1252 !-- outflow conditions have to be used on all PEs after the switch, 1252 1253 !-- because then they have the total domain. 1253 IF ( bc_lr_dirrad .OR. bc_lr_dirneu) THEN1254 IF ( bc_lr_dirrad ) THEN 1254 1255 inflow_l = .TRUE. 1255 1256 inflow_r = .FALSE. 1256 1257 outflow_l = .FALSE. 1257 1258 outflow_r = .TRUE. 1258 ELSEIF ( bc_lr_raddir .OR. bc_lr_neudir) THEN1259 ELSEIF ( bc_lr_raddir ) THEN 1259 1260 inflow_l = .FALSE. 1260 1261 inflow_r = .TRUE. … … 1263 1264 ENDIF 1264 1265 1265 IF ( bc_ns_dirrad .OR. bc_ns_dirneu) THEN1266 IF ( bc_ns_dirrad ) THEN 1266 1267 inflow_n = .TRUE. 1267 1268 inflow_s = .FALSE. 1268 1269 outflow_n = .FALSE. 1269 1270 outflow_s = .TRUE. 1270 ELSEIF ( bc_ns_raddir .OR. bc_ns_neudir) THEN1271 ELSEIF ( bc_ns_raddir ) THEN 1271 1272 inflow_n = .FALSE. 1272 1273 inflow_s = .TRUE. … … 1339 1340 1340 1341 IF ( pleft == MPI_PROC_NULL ) THEN 1341 IF ( bc_lr_dirrad .OR. bc_lr_dirneu) THEN1342 IF ( bc_lr_dirrad ) THEN 1342 1343 inflow_l = .TRUE. 1343 ELSEIF ( bc_lr_raddir .OR. bc_lr_neudir) THEN1344 ELSEIF ( bc_lr_raddir ) THEN 1344 1345 outflow_l = .TRUE. 1345 1346 ENDIF … … 1347 1348 1348 1349 IF ( pright == MPI_PROC_NULL ) THEN 1349 IF ( bc_lr_dirrad .OR. bc_lr_dirneu) THEN1350 IF ( bc_lr_dirrad ) THEN 1350 1351 outflow_r = .TRUE. 1351 ELSEIF ( bc_lr_raddir .OR. bc_lr_neudir) THEN1352 ELSEIF ( bc_lr_raddir ) THEN 1352 1353 inflow_r = .TRUE. 1353 1354 ENDIF … … 1355 1356 1356 1357 IF ( psouth == MPI_PROC_NULL ) THEN 1357 IF ( bc_ns_dirrad .OR. bc_ns_dirneu) THEN1358 IF ( bc_ns_dirrad ) THEN 1358 1359 outflow_s = .TRUE. 1359 ELSEIF ( bc_ns_raddir .OR. bc_ns_neudir) THEN1360 ELSEIF ( bc_ns_raddir ) THEN 1360 1361 inflow_s = .TRUE. 1361 1362 ENDIF … … 1363 1364 1364 1365 IF ( pnorth == MPI_PROC_NULL ) THEN 1365 IF ( bc_ns_dirrad .OR. bc_ns_dirneu) THEN1366 IF ( bc_ns_dirrad ) THEN 1366 1367 inflow_n = .TRUE. 1367 ELSEIF ( bc_ns_raddir .OR. bc_ns_neudir) THEN1368 ELSEIF ( bc_ns_raddir ) THEN 1368 1369 outflow_n = .TRUE. 1369 1370 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.