Changeset 4420 for palm/trunk/SOURCE/wind_turbine_model_mod.f90
- Timestamp:
- Feb 24, 2020 2:13:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.