# Subroutine to calculate performance parameters for a liquid turbine
# Based on the LIQUID_TURBINE performace macro in CFX-TASCflow.  The
# disclaimer from TASCflow:
#
# Some of the definitions used in these macros have
# alternate forms in the common literature.  Constant fluid specific
# heats are assumed.  Please check the definitions in the macros to
# be sure you get what you expect.

# Macro GUI begin
#
# macro name = Liquid Turbine Performance
# macro subroutine = liquidTurbPerformTurbo
# macro report file = LiquidTurbPerform_report.html
# macro related files = liquidTurbPerform.cse
#
# macro parameter = Domains
#  type = Domain
#
# macro parameter = Ref Radius
#  type = Float
#  quantity type = length
#  range = 0.0001 [m], 0.1 [m]
#  default = 0.05 [m]
#
# macro parameter = Ref Height
#  type = Float
#  quantity type = length
#  range = 0.0001 [m], 0.1 [m]
#  default = 0.05 [m]
#
# macro parameter = Flow Rate
#  type = Float
#  quantity type = volumetric flow
#  range = 0.1 [m^3/s], 100 [m^3/s]
#  default = 0.1 [m^3/s]
#
# macro parameter = Head Rise
#  type = Float
#  quantity type = length
#  range = 0 [m], 1000 [m]
#  default = 1 [m]
#
# macro parameter = Ref. Density
#  type = Float
#  quantity type = density
#  range = 0 [kg/m^3], 10000 [kg/m^3]
#  default = 1000 [kg/m^3]
#
# macro parameter = Gravity Accel.
#  type = Float
#  quantity type = acceleration
#  range = 1 [m/s^2], 10 [m/s^2]
#  default = 9.81 [m/s^2]

#
# Macro GUI end

! no warnings 'redefine';
! use strict 'vars';

! sub liquidTurbPerformTurbo {
! my ( $domainList, $rRadius, $rHeight, $qDesign, $hDesign, $dref, $gravity ) = @_;
!
# Create all turbo prameters
! my @retVal = collectTurboInfo($domainList);
! if ( !@retVal ) {
!   exit 1;
! }
!
# Execute the standard liquid turbine performance macro
! liquidTurbPerform(@retVal, $rRadius, $rHeight, $qDesign, $hDesign, 
!                   $dref, $gravity);
!}
