Changeset 241 for palm/trunk/SOURCE


Ignore:
Timestamp:
Feb 19, 2009 4:08:56 PM (15 years ago)
Author:
letzel
Message:
  • Option to predefine a target bulk velocity for conserve_volume_flow
Location:
palm/trunk/SOURCE
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r240 r241  
    1010New topography case 'single_street_canyon' (header, init_grid, modules, parin,
    1111read_var_list, user_check_parameters, user_header, user_init_grid, write_var_list)
     12
     13Option to predefine a target bulk velocity for conserve_volume_flow
     14(check_parameters, header, init_3d_model, modules, parin, read_var_list,
     15write_var_list)
    1216
    1317check_parameters, init_dvrp, init_grid, init_3d_model, header, modules, package_parin, parin, prognostic_equations, read_var_list, user_check_parameters, user_header, user_init_grid, write_var_list
  • palm/trunk/SOURCE/check_parameters.f90

    r240 r241  
    28402840       CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 )
    28412841    ENDIF
     2842    IF ( conserve_volume_flow )  THEN
     2843       IF ( TRIM( conserve_volume_flow_mode ) == 'default' )  THEN
     2844          IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
     2845             conserve_volume_flow_mode = 'inflow_profile'
     2846          ELSE
     2847             conserve_volume_flow_mode = 'initial_profiles'
     2848          ENDIF
     2849       ELSEIF ( TRIM( conserve_volume_flow_mode ) /= 'initial_profiles' .AND.  &
     2850            TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND.  &
     2851            TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' )  THEN
     2852          WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ', &
     2853               conserve_volume_flow_mode
     2854          CALL message( 'check_parameters', 'PA0154', 1, 2, 0, 6, 0 )
     2855       ENDIF
     2856       IF ( ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' ) .AND. &
     2857            TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' )  THEN
     2858          WRITE( message_string, * )  'noncyclic boundary conditions ', &
     2859               'require & conserve_volume_flow_mode = ''inflow_profile'''
     2860          CALL message( 'check_parameters', 'PA0155', 1, 2, 0, 6, 0 )
     2861       ENDIF
     2862       IF ( bc_lr == 'cyclic'  .AND.  bc_ns == 'cyclic'  .AND.  &
     2863            TRIM( conserve_volume_flow_mode ) == 'inflow_profile' )  THEN
     2864          WRITE( message_string, * )  'cyclic boundary conditions ', &
     2865               'require & conserve_volume_flow_mode = ''initial_profiles''', &
     2866               ' or ''bulk_velocity'''
     2867          CALL message( 'check_parameters', 'PA0156', 1, 2, 0, 6, 0 )
     2868       ENDIF
     2869    ENDIF
     2870    IF ( ( u_bulk /= 0.0 .OR. v_bulk /= 0.0 ) .AND.  &
     2871         ( .NOT. conserve_volume_flow .OR.  &
     2872         TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) )  THEN
     2873       WRITE( message_string, * )  'nonzero bulk velocity requires ', &
     2874            'conserve_volume_flow = .T. and & ', &
     2875            'conserve_volume_flow_mode = ''bulk_velocity'''
     2876       CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 )
     2877    ENDIF
    28422878
    28432879!
  • palm/trunk/SOURCE/header.f90

    r240 r241  
    55! -----------------
    66! Output of cluster_size
    7 ! +dp_external, dp_level_b, dp_smooth, dpdxy
    87! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    9 ! canyon_wall_south
     8! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     9! dp_smooth, dpdxy, u_bulk, v_bulk
    1010!
    1111! Former revisions:
     
    290290    IF ( passive_scalar )  WRITE ( io, 134 )
    291291    IF ( conserve_volume_flow )  THEN
    292        WRITE ( io, 150 )
     292       WRITE ( io, 150 )  conserve_volume_flow_mode
     293       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
     294          WRITE ( io, 151 )  u_bulk, v_bulk
     295       ENDIF
    293296    ELSEIF ( dp_external )  THEN
    294297       IF ( dp_smooth )  THEN
    295           WRITE ( io, 151 ) dpdxy, dp_level_b, ', vertically smoothed.'
     298          WRITE ( io, 152 ) dpdxy, dp_level_b, ', vertically smoothed.'
    296299       ELSE
    297           WRITE ( io, 151 ) dpdxy, dp_level_b, '.'
     300          WRITE ( io, 152 ) dpdxy, dp_level_b, '.'
    298301       ENDIF
    299302    ENDIF
     
    14061409                  'kinetic energy')
    14071410150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
    1408                   'conserved')
    1409 151 FORMAT (' --> External pressure gradient directly prescribed by the user:'/, &
     1411                  'conserved'/ &
     1412            '     using the ',A,' mode')
     1413151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
     1414152 FORMAT (' --> External pressure gradient directly prescribed by the user:'/, &
    14101415              2(1X,E12.5),'Pa/m', &
    14111416             ' in x/y direction starting from dp_level_b =', F6.3, 'm', &
  • palm/trunk/SOURCE/init_3d_model.f90

    r240 r241  
    99! Set the starting level and the vertical smoothing factor used for
    1010! the external pressure gradient
     11! +converve_volume_flow_mode: 'default', 'initial_profiles', 'inflow_profile'
     12! and 'bulk_velocity'
    1113!
    1214! Former revisions:
     
    821823          volume_flow_initial = volume_flow_initial_l
    822824          volume_flow_area    = volume_flow_area_l
    823 #endif 
     825#endif
     826!
     827!--       In case of 'bulk_velocity' mode, volume_flow_initial is overridden
     828!--       and calculated from u|v_bulk instead.
     829          IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
     830             volume_flow_initial(1) = u_bulk * volume_flow_area(1)
     831             volume_flow_initial(2) = v_bulk * volume_flow_area(2)
     832          ENDIF
     833
    824834       ENDIF
    825835
  • palm/trunk/SOURCE/modules.f90

    r240 r241  
    66! -----------------
    77! +cluster_size in dvrp_variables
    8 ! +dp_external, dp_level_b, dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy,
    9 ! in control_parameters
    108! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    11 ! canyon_wall_south in control_parameters
     9! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     10! dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy, u_bulk, v_bulk in
     11! control_parameters
    1212!
    1313! Former revisions:
     
    273273    CHARACTER (LEN=11)   ::  topography_grid_convention = ' '
    274274    CHARACTER (LEN=12)   ::  version = ' ', revision = ' '
    275     CHARACTER (LEN=16)   ::  loop_optimization = 'default', &
     275    CHARACTER (LEN=16)   ::  conserve_volume_flow_mode = 'default', &
     276                             loop_optimization = 'default', &
    276277                             momentum_advec = 'pw-scheme', &
    277278                             psolver = 'poisfft', &
     
    432433             recycling_width = 9999999.9, residual_limit = 1.0E-4, &
    433434             restart_time = 9999999.9, rho_reference, rho_surface, &
    434              rif_max = 1.0, &
    435              rif_min = -5.0, roughness_length = 0.1, sa_surface = 35.0, &
    436              scalar_exchange_coefficient = 0.0, &
     435             rif_max = 1.0, rif_min = -5.0, roughness_length = 0.1, &
     436             sa_surface = 35.0, scalar_exchange_coefficient = 0.0, &
    437437             simulated_time = 0.0, simulated_time_at_begin, sin_alpha_surface, &
    438438             skip_time_data_output = 0.0, skip_time_data_output_av = 9999999.9,&
     
    444444             s_surface = 0.0, s_surface_initial_change = 0.0, &
    445445             termination_time_needed = -1.0, time_coupling = 0.0, &
    446              time_disturb = 0.0, &
    447              time_dopr = 0.0, time_dopr_av = 0.0, time_dopr_listing = 0.0, &
    448              time_dopts = 0.0, time_dosp = 0.0, time_dosp_av = 0.0, &
    449              time_dots = 0.0, time_do2d_xy = 0.0, time_do2d_xz = 0.0, &
    450              time_do2d_yz = 0.0, time_do3d = 0.0, time_do_av = 0.0, &
    451              time_do_sla = 0.0, time_dvrp = 0.0, time_prel = 0.0, &
    452              time_restart = 9999999.9, time_run_control = 0.0, &
     446             time_disturb = 0.0, time_dopr = 0.0, time_dopr_av = 0.0, &
     447             time_dopr_listing = 0.0, time_dopts = 0.0, time_dosp = 0.0, &
     448             time_dosp_av = 0.0, time_dots = 0.0, time_do2d_xy = 0.0, &
     449             time_do2d_xz = 0.0, time_do2d_yz = 0.0, time_do3d = 0.0, &
     450             time_do_av = 0.0, time_do_sla = 0.0, time_dvrp = 0.0, &
     451             time_prel = 0.0, time_restart = 9999999.9, time_run_control = 0.0,&
    453452             top_heatflux = 9999999.9, top_momentumflux_u = 9999999.9, &
    454453             top_momentumflux_v = 9999999.9, top_salinityflux = 9999999.9, &
    455              ug_surface = 0.0, u_gtrans = 0.0, &
     454             ug_surface = 0.0, u_bulk = 0.0, u_gtrans = 0.0, &
    456455             ups_limit_e = 0.0, ups_limit_pt = 0.0, ups_limit_u = 0.0, &
    457456             ups_limit_v = 0.0, ups_limit_w = 0.0, vg_surface = 0.0, &
    458              v_gtrans = 0.0, wall_adjustment_factor = 1.8, z_max_do1d = -1.0, &
    459              z_max_do1d_normalized = -1.0, z_max_do2d = -1.0
     457             v_bulk = 0.0, v_gtrans = 0.0, wall_adjustment_factor = 1.8, &
     458             z_max_do1d = -1.0, z_max_do1d_normalized = -1.0, z_max_do2d = -1.0
    460459
    461460    REAL ::  do2d_xy_last_time(0:1) = -1.0, do2d_xz_last_time(0:1) = -1.0, &
  • palm/trunk/SOURCE/parin.f90

    r240 r241  
    55! -----------------
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    7 ! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy in inipar
     7! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     8! dp_smooth, dpdxy, u_bulk, v_bulk in inipar
    89!
    910! Former revisions:
     
    8889             canopy_mode, canyon_height, canyon_width_x, canyon_width_y, &
    8990             canyon_wall_left, canyon_wall_south, cloud_droplets, &
    90              cloud_physics, conserve_volume_flow, cthf, cut_spline_overshoot, &
     91             cloud_physics, conserve_volume_flow, conserve_volume_flow_mode, &
     92             cthf, cut_spline_overshoot, &
    9193             damp_level_1d, dissipation_1d, dp_external, dp_level_b, &
    9294             dp_smooth, dpdxy, drag_coefficient, dt, dt_pr_1d, &
     
    117119             topography, top_heatflux, top_momentumflux_u, top_momentumflux_v, &
    118120             top_salinityflux, turbulent_inflow, ug_surface, &
    119              ug_vertical_gradient, ug_vertical_gradient_level, ups_limit_e, &
    120              ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, &
     121             ug_vertical_gradient, ug_vertical_gradient_level, u_bulk, &
     122             ups_limit_e, ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, &
    121123             use_surface_fluxes, use_top_fluxes, use_ug_for_galilei_tr, &
    122124             use_upstream_for_tke, vg_surface, vg_vertical_gradient, &
    123              vg_vertical_gradient_level, wall_adjustment, wall_heatflux
     125             vg_vertical_gradient_level, v_bulk, wall_adjustment, wall_heatflux
    124126
    125127
  • palm/trunk/SOURCE/read_var_list.f90

    r240 r241  
    55! -----------------
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    7 ! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy
     7! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     8! dp_smooth, dpdxy, u_bulk, v_bulk
    89!
    910! Former revisions:
     
    8182!-- Make version number check first
    8283    READ ( 13 )  version_on_file
    83     binary_version = '3.3'
     84    binary_version = '3.4'
    8485    IF ( TRIM( version_on_file ) /= TRIM( binary_version ) )  THEN
    8586       IF ( myid == 0 )  THEN
     
    240241          CASE ( 'conserve_volume_flow' )
    241242             READ ( 13 )  conserve_volume_flow
     243          CASE ( 'conserve_volume_flow_mode' )
     244             READ ( 13 )  conserve_volume_flow_mode
    242245          CASE ( 'cthf' )
    243246             READ ( 13 )  cthf
     
    508511          CASE ( 'turbulent_inflow' )
    509512             READ ( 13 )  turbulent_inflow
     513          CASE ( 'u_bulk' )
     514             READ ( 13 )  u_bulk
    510515          CASE ( 'u_init' )
    511516             READ ( 13 )  u_init
     
    542547          CASE ( 'use_upstream_for_tke' )
    543548             READ ( 13 )  use_upstream_for_tke
     549          CASE ( 'v_bulk' )
     550             READ ( 13 )  v_bulk
    544551          CASE ( 'v_init' )
    545552             READ ( 13 )  v_init
  • palm/trunk/SOURCE/write_var_list.f90

    r240 r241  
    55! -----------------
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    7 ! canyon_wall_south, dp_external, dp_level_b, dp_smooth, dpdxy
     7! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     8! dp_smooth, dpdxy, u_bulk, v_bulk
    89!
    910! Former revisions:
     
    7172
    7273
    73     binary_version = '3.3'
     74    binary_version = '3.4'
    7475
    7576    WRITE ( 14 )  binary_version
     
    168169    WRITE ( 14 )  'conserve_volume_flow          '
    169170    WRITE ( 14 )  conserve_volume_flow
     171    WRITE ( 14 )  'conserve_volume_flow_mode     '
     172    WRITE ( 14 )  conserve_volume_flow_mode
    170173    WRITE ( 14 )  'current_timestep_number       '
    171174    WRITE ( 14 )  current_timestep_number
     
    432435    WRITE ( 14 )  'turbulent_inflow              '
    433436    WRITE ( 14 )  turbulent_inflow
     437    WRITE ( 14 )  'u_bulk                        '
     438    WRITE ( 14 )  u_bulk
    434439    WRITE ( 14 )  'u_init                        '
    435440    WRITE ( 14 )  u_init
     
    466471    WRITE ( 14 )  'use_upstream_for_tke          '
    467472    WRITE ( 14 )  use_upstream_for_tke
     473    WRITE ( 14 )  'v_bulk                        '
     474    WRITE ( 14 )  v_bulk
    468475    WRITE ( 14 )  'v_init                        '
    469476    WRITE ( 14 )  v_init
Note: See TracChangeset for help on using the changeset viewer.