Changeset 4420 for palm/trunk/SOURCE
- Timestamp:
- Feb 24, 2020 2:13:56 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4414 r4420 25 25 # ----------------- 26 26 # $Id$ 27 # Added output control for wind turbine model 28 # 29 # 4414 2020-02-19 20:16:04Z suehring 27 30 # Move dependencies for init grid from advection scheme and multigrid solver 28 31 # to module_interface … … 1145 1148 vertical_nesting_mod.o \ 1146 1149 virtual_flight_mod.o \ 1147 virtual_measurement_mod.o 1150 virtual_measurement_mod.o \ 1151 wind_turbine_model_mod.o 1148 1152 time_integration_spinup.o: \ 1149 1153 basic_constants_and_equations_mod.o \ -
palm/trunk/SOURCE/time_integration.f90
r4403 r4420 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output control for wind turbine model 28 ! 29 ! 4403 2020-02-12 13:08:46Z banzhafs 27 30 ! Allowing both existing and on-demand emission read modes 28 31 ! … … 369 372 vm_time_start 370 373 374 375 USE wind_turbine_model_mod, & 376 ONLY: dt_data_output_wtm, time_wtm, wind_turbine, wtm_data_output 371 377 372 378 #if defined( _OPENACC ) … … 1286 1292 time_virtual_measurement = time_virtual_measurement + dt_3d 1287 1293 ENDIF 1294 1295 ! 1296 !-- Increment time-counter for wind turbine data output 1297 IF ( wind_turbine ) THEN 1298 time_wtm = time_wtm + dt_3d 1299 ENDIF 1300 1288 1301 ! 1289 1302 !-- In case of synthetic turbulence generation and parametrized turbulence … … 1439 1452 MAX( dt_virtual_measurement, dt_3d ) ) 1440 1453 ENDIF 1454 1455 ! 1456 !-- Output wind turbine data 1457 IF ( wind_turbine .AND. time_wtm >= dt_data_output_wtm ) THEN 1458 CALL wtm_data_output 1459 time_wtm = MOD( time_wtm, MAX( dt_data_output_wtm, dt_3d ) ) 1460 ENDIF 1461 1441 1462 ! 1442 1463 !-- Profile output (ASCII) on file -
palm/trunk/SOURCE/wind_turbine_model_mod.f90
r4412 r4420 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added output control for wind turbine model 29 ! 30 ! 4412 2020-02-19 14:53:13Z maronga 28 31 ! Bugfix: corrected character length in dimension_names 29 32 ! … … 166 169 167 170 LOGICAL :: initial_write_coordinates = .FALSE. 168 169 REAL(wp) :: dt_wtm = 1.0_wp 171 172 REAL(wp) :: dt_data_output_wtm = 1.0_wp !< data output interval 173 REAL(wp) :: time_wtm = 0.0_wp !< time since last data output 174 170 175 171 176 REAL(wp) :: segment_length = 1.0_wp !< length of the segments, the rotor area is divided into … … 441 446 442 447 PUBLIC & 448 dt_data_output_wtm, & 449 time_wtm, & 450 wind_turbine 451 452 PUBLIC & 443 453 wtm_parin, & 444 454 wtm_check_parameters, & … … 467 477 CHARACTER (LEN=80) :: line !< dummy string that contains the current line of the parameter file 468 478 469 NAMELIST /wind_turbine_par/ air_dens, dtow, gear_eff, gear_ratio, & 479 480 NAMELIST /wind_turbine_parameters/ & 481 air_dens, dtow, dt_data_output_wtm, gear_eff,& 482 gear_ratio, & 470 483 gen_eff, inertia_gen, inertia_rot, max_miss, & 471 484 max_torque_gen, max_trq_rate, min_miss, & … … 478 491 yaw_control, yaw_speed, tl_cor 479 492 ! , turb_cd_nacelle 480 481 NAMELIST /wind_turbine_parameters/ &482 air_dens, dtow, gear_eff, gear_ratio, &483 gen_eff, inertia_gen, inertia_rot, max_miss, &484 max_torque_gen, max_trq_rate, min_miss, &485 min_reg15, min_reg2, nairfoils, nturbines, &486 omega_rot, phi_yaw, pitch_add, pitch_control,&487 rated_genspeed, rated_power, rcx, rcy, rcz, &488 rnac, rr, segment_length, segment_width, &489 slope2, speed_control, tilt, time_turbine_on,&490 turb_cd_tower, pitch_rate, &491 yaw_control, yaw_speed, tl_cor492 ! , turb_cd_nacelle493 493 ! 494 494 !-- Try to find wind turbine model package … … 502 502 ! 503 503 !-- Read user-defined namelist 504 READ ( 11, wind_turbine_parameters, ERR = 10 )504 READ ( 11, wind_turbine_parameters, ERR = 10, END = 12 ) 505 505 ! 506 506 !-- Set flag that indicates that the wind turbine model is switched on 507 507 wind_turbine = .TRUE. 508 508 509 GOTO 1 4509 GOTO 12 510 510 511 511 10 BACKSPACE( 11 ) … … 513 513 CALL parin_fail_message( 'wind_turbine_parameters', line ) 514 514 515 ! 516 !-- Try to find wind turbine model package 517 12 REWIND ( 11 ) 518 line = ' ' 519 DO WHILE ( INDEX( line, '&wind_turbine_par' ) == 0 ) 520 READ ( 11, '(A)', END=14 ) line 521 ENDDO 522 BACKSPACE ( 11 ) 523 524 ! 525 !-- Read user-defined namelist 526 READ ( 11, wind_turbine_par, ERR = 13, END = 14 ) 527 528 message_string = 'namelist wind_tubrine_par is deprecated and will ' // & 529 'be removed in near future. &Please use namelist ' // & 530 'wind_turbine_parameters instead' 531 CALL message( 'wtm_parin', 'PA0487', 0, 1, 0, 6, 0 ) 532 533 ! 534 !-- Set flag that indicates that the wind turbine model is switched on 535 wind_turbine = .TRUE. 536 537 GOTO 14 538 539 13 BACKSPACE( 11 ) 540 READ( 11 , '(A)') line 541 CALL parin_fail_message( 'wind_turbine_par', line ) 542 543 14 CONTINUE ! TBD Change from continue, mit ierrn machen 515 516 12 CONTINUE ! TBD Change from continue, mit ierrn machen 544 517 545 518 … … 556 529 557 530 IMPLICIT NONE 558 559 531 532 560 533 CALL wrd_write_string( 'omega_gen' ) 561 534 WRITE ( 14 ) omega_gen … … 678 651 ENDIF 679 652 653 IF ( dt_data_output_wtm <= 0.0 ) THEN 654 message_string = 'dt_data_output_wtm must be > 0.0' 655 CALL message( 'check_parameters', 'PA0709', 1, 2, 0, 6, 0 ) 656 ENDIF 657 680 658 681 659 END SUBROUTINE wtm_check_parameters 682 660 ! 683 661 684 662 !------------------------------------------------------------------------------! … … 1323 1301 ntimesteps = MIN( CEILING( & 1324 1302 ( end_time - MAX( time_turbine_on, time_since_reference_point )& 1325 ) / MAX( 0.1_wp, dt_ wtm ) ), ntimesteps_max )1303 ) / MAX( 0.1_wp, dt_data_output_wtm ) ), ntimesteps_max ) 1326 1304 1327 1305 … … 2730 2708 ENDIF 2731 2709 2732 2733 !2734 !-- NetCDF output, should be moved2735 CALL wtm_data_output2736 2710 2737 2711 CALL cpu_log( log_point_s(61), 'wtm_forces', 'stop' )
Note: See TracChangeset
for help on using the changeset viewer.