Changeset 4420 for palm


Ignore:
Timestamp:
Feb 24, 2020 2:13:56 PM (4 years ago)
Author:
maronga
Message:

added steering for NetCDF output for wind turbine model; minor fix in palmrungui

Location:
palm/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrungui

    r4411 r4420  
    2525# -----------------
    2626# $Id$
     27# Bugfix: minor fixes related to start buttons
     28#
     29# 4411 2020-02-18 14:28:02Z maronga
    2730# Added new features: individual tag for submitted runs, automatic finding of
    2831# configuration, start of palmbuild from GUI
     
    177180    def startpalmrun(self):
    178181        palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
    179         userline = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
     182        userline    = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
    180183       
    181184        # Check for empty line
     
    246249        palmbuildline = 'palmbuild -c ' + str(self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").currentText())
    247250       
     251        palmrunline_save = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
     252       
    248253        # Disable the main window
     254        palmbuildline_save = palmbuildline
    249255        self.tabWidget.setEnabled(False)
    250256        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False)
    251257        self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(False) 
     258        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...") 
     259        self.group_execution.findChild(QtGui.QPushButton,"button_palmbuild").setText("wait...")
    252260        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmbuild in xterm...")       
    253261       
     
    284292        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True)
    285293        self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True)
    286        
     294        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("palmrun")
     295        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save)
     296        self.group_execution.findChild(QtGui.QPushButton,"button_palmbuild").setText("(re-)build")     
    287297        # Reload recent jobs
    288298        self.recent_jobs(50)
  • palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui

    r4411 r4420  
    14111411     <y>0</y>
    14121412     <width>1185</width>
    1413      <height>19</height>
     1413     <height>30</height>
    14141414    </rect>
    14151415   </property>
     
    14191419      <x>261</x>
    14201420      <y>103</y>
    1421       <width>147</width>
    1422       <height>156</height>
     1421      <width>128</width>
     1422      <height>189</height>
    14231423     </rect>
    14241424    </property>
     
    15981598   <hints>
    15991599    <hint type="sourcelabel">
    1600      <x>202</x>
    1601      <y>515</y>
     1600     <x>206</x>
     1601     <y>540</y>
    16021602    </hint>
    16031603    <hint type="destinationlabel">
     
    16141614   <hints>
    16151615    <hint type="sourcelabel">
    1616      <x>240</x>
    1617      <y>515</y>
     1616     <x>244</x>
     1617     <y>540</y>
    16181618    </hint>
    16191619    <hint type="destinationlabel">
     
    22922292     <x>1182</x>
    22932293     <y>495</y>
    2294     </hint>
    2295    </hints>
    2296   </connection>
    2297   <connection>
    2298    <sender>button_start</sender>
    2299    <signal>clicked()</signal>
    2300    <receiver>MainWindow</receiver>
    2301    <slot>startpalmbuild()</slot>
    2302    <hints>
    2303     <hint type="sourcelabel">
    2304      <x>106</x>
    2305      <y>756</y>
    2306     </hint>
    2307     <hint type="destinationlabel">
    2308      <x>-3</x>
    2309      <y>672</y>
    23102294    </hint>
    23112295   </hints>
  • palm/trunk/SOURCE/Makefile

    r4414 r4420  
    2525# -----------------
    2626# $Id$
     27# Added output control for wind turbine model
     28#
     29# 4414 2020-02-19 20:16:04Z suehring
    2730# Move dependencies for init grid from advection scheme and multigrid solver
    2831# to module_interface
     
    11451148        vertical_nesting_mod.o \
    11461149        virtual_flight_mod.o \
    1147         virtual_measurement_mod.o
     1150        virtual_measurement_mod.o \
     1151        wind_turbine_model_mod.o
    11481152time_integration_spinup.o: \
    11491153        basic_constants_and_equations_mod.o \
  • palm/trunk/SOURCE/time_integration.f90

    r4403 r4420  
    2525! -----------------
    2626! $Id$
     27! Added output control for wind turbine model
     28!
     29! 4403 2020-02-12 13:08:46Z banzhafs
    2730! Allowing both existing and on-demand emission read modes
    2831!
     
    369372               vm_time_start
    370373
     374               
     375    USE wind_turbine_model_mod,                                                                    &
     376        ONLY:  dt_data_output_wtm, time_wtm, wind_turbine, wtm_data_output
    371377
    372378#if defined( _OPENACC )
     
    12861292          time_virtual_measurement = time_virtual_measurement + dt_3d
    12871293       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 
    12881301!
    12891302!--    In case of synthetic turbulence generation and parametrized turbulence
     
    14391452                                          MAX( dt_virtual_measurement, dt_3d ) )
    14401453       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       
    14411462!
    14421463!--    Profile output (ASCII) on file
  • palm/trunk/SOURCE/wind_turbine_model_mod.f90

    r4412 r4420  
    2626! -----------------
    2727! $Id$
     28! Added output control for wind turbine model
     29!
     30! 4412 2020-02-19 14:53:13Z maronga
    2831! Bugfix: corrected character length in dimension_names
    2932!
     
    166169   
    167170    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   
    170175   
    171176    REAL(wp) ::  segment_length  = 1.0_wp          !< length of the segments, the rotor area is divided into
     
    441446
    442447    PUBLIC                                                                     &
     448           dt_data_output_wtm,                                                 &
     449           time_wtm,                                                           &
     450           wind_turbine
     451
     452    PUBLIC                                                                     &
    443453           wtm_parin,                                                          &
    444454           wtm_check_parameters,                                               &
     
    467477       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file
    468478
    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,                                  &
    470483                                  gen_eff, inertia_gen, inertia_rot, max_miss, &
    471484                                  max_torque_gen, max_trq_rate, min_miss,      &
     
    478491                                  yaw_control, yaw_speed, tl_cor
    479492!                                  , 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_cor
    492 !                                  , turb_cd_nacelle
    493493!
    494494!--    Try to find wind turbine model package
     
    502502!
    503503!--    Read user-defined namelist
    504        READ ( 11, wind_turbine_parameters, ERR = 10 )
     504       READ ( 11, wind_turbine_parameters, ERR = 10, END = 12 )
    505505!
    506506!--    Set flag that indicates that the wind turbine model is switched on
    507507       wind_turbine = .TRUE.
    508508       
    509        GOTO 14
     509       GOTO 12
    510510
    511511 10    BACKSPACE( 11 )
     
    513513       CALL parin_fail_message( 'wind_turbine_parameters', line )
    514514
    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
    544517
    545518
     
    556529
    557530       IMPLICIT NONE
    558 
    559        
     531       
     532
    560533       CALL wrd_write_string( 'omega_gen' )
    561534       WRITE ( 14 )  omega_gen
     
    678651       ENDIF
    679652
     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       
    680658 
    681659    END SUBROUTINE wtm_check_parameters
    682    
     660!    
    683661                                       
    684662!------------------------------------------------------------------------------!
     
    13231301       ntimesteps = MIN( CEILING(                                                 &
    13241302                     ( 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 )
    13261304
    13271305       
     
    27302708       ENDIF   
    27312709
    2732 
    2733 !
    2734 !--    NetCDF output, should be moved
    2735        CALL wtm_data_output
    27362710       
    27372711       CALL cpu_log( log_point_s(61), 'wtm_forces', 'stop' )
Note: See TracChangeset for help on using the changeset viewer.