0% found this document useful (0 votes)
220 views164 pages

SCO2 Brayton Cycle Modeling Dissertation

This document describes the development of a modeling framework for predicting the performance of supercritical carbon dioxide (SCO2) Brayton power cycles. The modeling framework is capable of analyzing both the design-point and off-design performance of recuperated and recompression SCO2 cycles. Models of turbomachinery components are integrated along with optimization routines to explore optimal component and system designs. Design-point and off-design performance is predicted for various cycle configurations using models of radial compressors and turbines being investigated for SCO2 applications. Varying operating parameters like heat rejection temperature and compressor inlet temperature allows analysis of their effects on cycle efficiency and optimal cycle design.

Uploaded by

aefontalvo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views164 pages

SCO2 Brayton Cycle Modeling Dissertation

This document describes the development of a modeling framework for predicting the performance of supercritical carbon dioxide (SCO2) Brayton power cycles. The modeling framework is capable of analyzing both the design-point and off-design performance of recuperated and recompression SCO2 cycles. Models of turbomachinery components are integrated along with optimization routines to explore optimal component and system designs. Design-point and off-design performance is predicted for various cycle configurations using models of radial compressors and turbines being investigated for SCO2 applications. Varying operating parameters like heat rejection temperature and compressor inlet temperature allows analysis of their effects on cycle efficiency and optimal cycle design.

Uploaded by

aefontalvo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 164

Modeling the Supercritical Carbon Dioxide Brayton Cycle with Recompression

By

John J. Dyreby

A dissertation submitted in partial fulfillment of

the requirements for the degree of

Doctor of Philosophy

(Mechanical Engineering)

at the

UNIVERSITY OF WISCONSIN-MADISON

2014

Date of final oral examination: 8/1/2014

The dissertation is approved by the following members of the Final Oral Committee:
Gregory F. Nellis, Professor, Mechanical Engineering
Sanford A. Klein, Professor, Mechanical Engineering
Douglas T. Reindl, Professor, Mechanical Engineering
Mark H. Anderson, Research Professor, Engineering Physics
Michael L. Corradini, Professor, Engineering Physics
i

To Alissa – thanks for your patience.


ii

Abstract
Supercritical carbon dioxide (SCO2) power cycles show promise for a wide range of applications,

such as concentrating solar power, next-generation nuclear reactors, and waste-heat recovery. Models ca-

pable of predicting the design-point, off-design, and part-load performance of SCO2 power cycles are nec-

essary for evaluating cycle designs. These models should be flexible in order to accommodate the range

of designs under consideration and computationally efficient in order to enable timely optimization stud-

ies, possibly while considering cycle performance on an annual or life-cycle basis. This document reports

on the development of a modeling framework that accommodates these requirements and is capable of

predicting the performance of recuperated and recompression cycle configurations. The modeling frame-

work is in Fortran and is flexible with respect to component-level specifics, such as the type of compres-

sor used in the cycle or the method used to represent the off-design performance of the turbine. Opti-

mization routines are integrated into the models, allowing exploration of optimal component and system

designs or optimal operating strategies for a given system design.

The optimal design-point and off-design performance of various cycle designs is predicted using

turbomachinery models based on the radial compressors and turbines that are currently being investigated

by Sandia National Laboratory for use in SCO2 applications. A range of heat rejection (low-side) temper-

atures are considered and results indicate that operating the cycles at warmer low-side temperatures re-

quires a corresponding increase in low-side pressure in order to maximize thermal efficiency. The rela-

tionship between low-side temperature and pressure suggests that inventory control (i.e., actively

controlling the low-side pressure) is a favorable control mechanism, especially if the power plant is ex-

pected to operate away from its design point for significant periods of time. For cycles designed to oper-

ate at warmer heat rejection temperatures (e.g., a dry-cooled design in an arid climate), the benefits of re-

compression are reduced and a simple recuperated cycle may be favorable. The optimal SCO2 Brayton

cycle design depends on the application being considered, and the developed modeling framework pro-

vides the consistent performance predictions that are required for further application-specific analyses.
iii

Table of Contents
Abstract ..................................................................................................................................................ii
Table of Contents ..................................................................................................................................iii
List of Figures .......................................................................................................................................iv
List of Tables ........................................................................................................................................vii
Nomenclature ......................................................................................................................................viii
1. Introduction ......................................................................................................................................1
2. Design-Point Modeling Methodology .............................................................................................6
2.1. Turbomachinery ..............................................................................................................................7
2.2. Heat Exchangers .............................................................................................................................8
2.3. Cycle Model .................................................................................................................................10
2.4. Fluid Properties ............................................................................................................................13
3. Off-Design Modeling Methodology ...............................................................................................14
3.1. Component Model Interfaces .......................................................................................................14
3.2. Sandia National Laboratory SCO2 Compressor ...........................................................................17
3.3. Low-Reaction Radial Turbine ......................................................................................................29
3.4. Heat Exchangers ...........................................................................................................................34
3.5. Cycle Model .................................................................................................................................36
4. Modeling Framework .....................................................................................................................43
4.1. core Module .................................................................................................................................44
4.2. design_point-Module ..................................................................................................................45
4.3. off_design_point Module ............................................................................................................47
4.4. heat_exchangers-Module .............................................................................................................51
4.5. compressors-Module ....................................................................................................................51
4.6. turbines-Module .........................................................................................................................52
4.7. CO2_properties-Module ...............................................................................................................52
5. Design-Point Analysis .....................................................................................................................53
5.1. Comparison to Literature ..............................................................................................................53
5.2. Effect of High-Side Pressure Limit ..............................................................................................57
5.3. Effect of Low-Side Temperature ..................................................................................................61
5.4. Convergence Verification .............................................................................................................67
6. Off-Design Analysis ........................................................................................................................70
6.1. Varying Compressor Inlet Temperature ........................................................................................78
6.2. Varying Turbine Inlet Temperature ...............................................................................................86
6.3. Cycle Performance with Alternative Turbine Model....................................................................88
6.4. Convergence Verification .............................................................................................................94
7. Conclusions .....................................................................................................................................96
7.1. Design-Point Considerations ........................................................................................................96
7.2. Off-Design Considerations ...........................................................................................................97
7.3. Recommendations for Further Study............................................................................................98
References...........................................................................................................................................100
Appendix I: core Module Source Code ..........................................................................................103
Appendix II: design_point Module Source Code .......................................................................108
Appendix III: off_design_point Module Source Code.............................................................120
Appendix IV: compressors Module Source Code ........................................................................134
Appendix V: turbines Module Source Code ................................................................................144
Appendix VI: heat_exchangers Module Source Code ...............................................................149
Appendix VII: CO2_properties Module Source Code ................................................................150
Appendix VIII: Recorded Data Plots for SNL Compression Test Cases ......................................152
iv

List of Figures
Figure 1.1: Diagram of a simple Brayton cycle (a) and a recompression cycle (b). Sandia
National Laboratory has demonstrated a flexible 250 kW test loop that is capable
of running in either configuration (Conboy et al., 2012). .......................................................2
Figure 2.1: Diagram of a recompression Brayton cycle, with design-point cycle model inputs
shown in bold. .........................................................................................................................6
Figure 2.2: Iteration process for the design-point cycle model. ..............................................................11
Figure 3.1: Performance map for the main compressor in the Sandia National Laboratory
supercritical CO2 test loop, taken from Wright et al., (2010). Note: the y-axis
label should be “Corrected Specific Ideal Enthalpy Rise (BTU/lbm)”.................................18
Figure 3.2: Non-dimensional head-flow and efficiency-flow curves for the main compressor
in the Sandia National Laboratory supercritical CO2 test loop; points are colored
by shaft speed. .......................................................................................................................20
Figure 3.3: Modified non-dimensional head-flow and efficiency-flow curves for the main
compressor in the SNL supercritical CO2 test loop. ..............................................................22
Figure 3.4: Polynomial fits of the modified non-dimensional head-flow and efficiency-flow
curves for the main compressor in the SNL supercritical CO2 test loop. ..............................22
Figure 3.5: Deviations in efficiency and ideal enthalpy rise associated with using the
modified dimensionless numbers and polynomial fits. .........................................................23
Figure 3.6: Recorded measurement data for the Map Reference test case. .............................................26
Figure 3.7: Recorded mass flow rate and pressure rise through the compressor for the Map
Reference test case where the regions highlighted in red are assumed as steady-
state operation. ......................................................................................................................27
Figure 3.8: Measured and predicted modified ideal head coefficient for the four test cases. .................28
Figure 3.9: Efficiency of an ideal radial turbine as a function of velocity ratio. .....................................30
Figure 3.10: Performance map for a turbine used in the SCO2 test loop at Sandia National
Laboratories, taken from the presentation associated with Wright et al. (2011). ..................31
Figure 3.11: Calculated effective nozzle area using data from the turbine performance map;
the markers are colored by shaft speed. ................................................................................32
Figure 3.12: Calculated effective nozzle area using data from the turbine performance map
and inlet fluid density; the markers are colored by shaft speed. ...........................................33
Figure 3.13: Efficiency predicted from the performance map as a function of the ratio of tip
speed to spouting velocity. ....................................................................................................33
Figure 3.14: Head-flow and flow resistance curves for different shaft speeds and turbine inlet
temperature; the curves intersect at the corresponding operating point of the
cycle. .....................................................................................................................................37
v

Figure 3.15: Diagram of a single-shaft recompression Brayton cycle (a) and a split-shaft
recompression Brayton cycle (b); model inputs are shown in bold. .....................................38
Figure 3.16: Iteration process for the off-design cycle model. ..................................................................41
Figure 4.1: Iteration strategy for maximizing off-design cycle efficiency given a target power
output or rate of heat addition. ..............................................................................................50
Figure 5.1: Thermal efficiency as a function of recompression fraction for the “Basic” design
with fixed low-side and high-side pressures of 7.69 MPa and 20 MPa,
respectively. ...........................................................................................................................54
Figure 5.2: Thermal efficiency as a function of recompression fraction for the “High
Performance” design with fixed low-side and high-side pressures of 7.69 MPa
and 20 MPa, respectively. .....................................................................................................55
Figure 5.3: Thermal efficiency as a function of recompression fraction for the “Dry Cooled”
design with fixed low-side and high-side pressures of 7.69 MPa and 20 MPa,
respectively. ...........................................................................................................................56
Figure 5.4: Optimal thermal efficiency for a SCO2 cycle with a compressor inlet temperature
of 32°C. The dashed line corresponds to a recompression fraction of zero (i.e., a
simple cycle). The open circles mark the normalized conductance corresponding
to a minimum temperature difference of 10°C in the recuperators while the filled
circles correspond to a 2°C minimum temperature difference..............................................58
Figure 5.5: Optimal thermal efficiency for a SCO2 cycle with a compressor inlet temperature
of 55°C. The dashed line corresponds to a recompression fraction of zero (i.e., a
simple cycle). The open circles mark the normalized conductance corresponding
to a minimum temperature difference of 10°C in the recuperators while the filled
circles correspond to a 2°C minimum temperature difference..............................................59
Figure 5.6: Optimal compressor inlet and outlet pressures for the 32°C case (left) and the
55°C case (right). The polytropic efficiency of the turbomachinery is 0.9. .........................60
Figure 5.7: Thermal efficiency as a function of compressor inlet temperature for various
designs. ..................................................................................................................................62
Figure 5.8: Optimal low-side pressure (top), recompression fraction (middle), and low-
temperature recuperator conductance fraction (bottom) as a function of low-side
temperature with a high-side temperature of 700°C. ............................................................63
Figure 5.9: Thermal efficiency as a function of compressor inlet temperature for various
designs assuming a one percent relative pressure drop through the heat
exchangers in the cycle. ........................................................................................................65
Figure 5.10: Thermal efficiency as a function of compressor inlet temperature for various
designs assuming a two percent relative pressure drop through the heat
exchangers in the cycle. ........................................................................................................65
Figure 5.11: Optimal low-side pressure (top), recompression fraction (middle), and low-
temperature recuperator conductance fraction (bottom) as a function of low-side
temperature with a high-side temperature of 700°C and a one percent relative
pressure drop through the heat exchangers in the cycle. .......................................................66
vi

Figure 5.12: Relative error of thermal efficiency (black lines) and mass flow rate (blue lines)
for a number of design points. The reference values used for the calculating
errors are determined from runs using 30 sub-heat exchangers and a convergence
tolerance of 10-8. ....................................................................................................................68
Figure 5.13: Design-point cycle model runtime using FIT (bottom) and REFPROP (top) for
two representative designs. ...................................................................................................69
Figure 6.1: Power output and corresponding compressor outlet pressure as a function of
compressor inlet pressure for various off-design temperatures. The black dots
represent the design points for the two cycles, and the dashed line indicates surge
in the main compressor. Note that these results do not take into account physical
limitations of the turbomachinery. ........................................................................................71
Figure 6.2: Ratio of turbomachinery tip speed to local speed of sound for various off-design
low-side temperatures and pressures; values greater than one are not physically
valid. ......................................................................................................................................73
Figure 6.3: Power output and compressor outlet pressure for various off-design conditions.
Only valid operating points are plotted. ................................................................................74
Figure 6.4: Ratio of turbomachinery tip speed to local speed of sound for various off-design
low-side temperatures and pressures. ....................................................................................75
Figure 6.5: Predicted power output, high-side pressure, and thermal efficiency for the low-
temperature and high-temperature recompression designs. The solid lines
indicate operation at maximum efficiency, the dashed lines indicate operation at
maximum power output, and the dotted lines are operation at maximum
efficiency using design-point shaft speed. ............................................................................79
Figure 6.6: Predicted power output, high-side pressure, and thermal efficiency for the low-
temperature and high-temperature simple designs. The solid lines indicate
operation at maximum efficiency, the dashed lines indicate operation at
maximum power output, and the dotted lines are operation at design-point shaft
speed. .....................................................................................................................................80
Figure 6.7: Thermal efficiency of the four designs as a function of off-design compressor
inlet temperature....................................................................................................................81
Figure 6.8: Control parameters associated with optimal performance under off-design
compressor inlet temperature for the two recompression cycle designs. ..............................83
Figure 6.9: Control parameters associated with optimal performance under off-design
compressor inlet temperature for the two simple cycle designs. ..........................................84
Figure 6.10: Head coefficient for the compressor and recompressor and turbine spouting
velocity ratio under off-design conditions for the recompression designs............................85
Figure 6.11: Head coefficient for the compressor and turbine spouting velocity ratio under off-
design conditions for the simple designs. .............................................................................85
Figure 6.12: Predicted power output, high-side pressure, and thermal efficiency for the low-
temperature and high-temperature recompression designs. The solid lines
indicate operation at maximum efficiency, the dashed lines indicate operation at
maximum power output, and the dotted lines are operation at maximum
efficiency using design-point shaft speed. ............................................................................86
vii

Figure 6.13: Predicted power output, high-side pressure, and thermal efficiency for the low-
temperature and high-temperature simple designs. The solid lines indicate
operation at maximum efficiency, the dashed lines indicate operation at
maximum power output, and the dotted lines are operation at design-point shaft
speed. .....................................................................................................................................87
Figure 6.14: Thermal efficiency of the four designs as a function of off-design turbine inlet
temperature. ...........................................................................................................................88
Figure 6.15: Thermal efficiency of the three designs at the rated 10 MW power output as a
function of off-design compressor inlet temperature. The design points are
indicated with a circle and only achievable values (with a high-pressure limit of
30 MPa) are plotted. ..............................................................................................................91
Figure 6.16: Control parameters associated with the efficiencies predicted in Fig. 6.15. .........................91
Figure 6.17: Off-design thermal efficiency of the three shaft configurations for the 32°C and
50°C designs at the rated 10 MW power output. The design points are indicated
with a circle and only achievable values (with a high-pressure limit of 30 MPa)
are plotted. .............................................................................................................................93
Figure 6.18: Part-load thermal efficiency of the three shaft configurations for the 32°C and
50°C designs..........................................................................................................................93
Figure 6.19: Convergence of the optimal_off_design subroutine. ...........................................................94
Figure 6.20: Model runtime for the four designs, using the optimal_off_design subroutine with
compressor inlet pressure specified for a number of representative conditions. ..................95

List of Tables
Table 3.1: Required inputs and outputs for compatible off-design compressor models. .......................15
Table 3.2: Required inputs and outputs for compatible off-design recompressor models. ....................15
Table 3.3: Required inputs and outputs for compatible off-design turbine models. ..............................15
Table 3.4: Required inputs and outputs for compatible off-design heat exchanger models. .................16
Table 3.5: Inlet conditions for various carbon dioxide compression tests. ............................................24
Table 4.1: Fortran modules used by the developed modeling framework. ............................................44
Table 4.2: Description of input arguments used by the design subroutine. ...........................................45
Table 4.3: Description of input arguments used by the optimal_design subroutine. .............................46
Table 4.4: Input arguments to the off-design cycle model. ....................................................................48
Table 4.5: Description of input arguments used by the optimal_off_design subroutine. .....................49
Table 5.1: Design-point conditions for model comparison with literature. ...........................................53
Table 6.1: Four designs of interest. ........................................................................................................77
Table 6.2: Three designs of interest, characterized by their compressor inlet temperatures. ................89
viii

Nomenclature
! heat exchanger effectiveness
" efficiency
"* modified efficiency
# ratio of turbine tip speed to spouting velocity
$ density
% compressor flow coefficient
%* modified compressor flow coefficient
%rc recompression fraction
&i compressor ideal head coefficient
&i* modified compressor ideal head coefficient
Δhi isentropic specific enthalpy change
ΔP pressure drop in heat exchanger
ΔPdesign design-point pressure drop in heat exchanger
f friction factor
hin inlet specific enthalpy
hout,i outlet specific enthalpy if compression or expansion is isentropic
hout outlet enthalpy
ṁ mass flow rate
sin inlet specific entropy
w specific work
wi isentropic specific work
Anozzle turbine effective nozzle area
Ċ capacitance rate
Ċ min minimum capacitance rate
CR capacitance ratio between streams of heat exchanger
Cs turbine spouting velocity
CSP concentrating solar power
D diameter
HT high-temperature, referring to the high-temperature recuperator
LT low-temperature, referring to the low-temperature recuperator
NTU heat exchanger dimensionless number of transfer units
N shaft speed
Ndesign design-point shaft speed
Nmc main compressor shaft speed
Nt turbine shaft speed
Pmc,in main compressor inlet pressure
RC recompressing compressor, also referred to as the “recompressor”
SCO2 supercritical carbon dioxide
SNL Sandia National Laboratory
T temperature
Tmc,in main compressor inlet temperature
Tt,in turbine inlet temperature
U rotor tip speed in compressor or turbine
UA heat exchanger conductance
UAdesign design-point heat exchanger conductance
1

1. Introduction
Brayton cycles operating with supercritical carbon dioxide (SCO2) have the potential to offer im-

proved thermal-to-mechanical conversion efficiency for utility scale electricity production. Supercritical

carbon dioxide Brayton cycles are characterized by their operation above the critical temperature and

pressure of carbon dioxide (31.1°C and 7.39 MPa, respectively) and were first proposed in 1967 by E.

Feher (1967). A number of related publications followed, a thorough overview of which is presented by

V. Dostal (2004), including an extensive summary by G. Angelino of the theoretical performance of vari-

ous CO2 cycle configurations (Angelino, 1968; Angelino, 1969). In his work, Angelino analyzed the de-

sign-point performance of a number of cycles designed to take advantage of the properties of carbon diox-

ide near its critical point. Two promising SCO2 cycle configurations that emerged from his work are the

simple Brayton cycle with recuperation, shown in Figure 1.1(a), and the recompression cycle, shown in

Figure 1.1(b). The recompression cycle was chosen for further analysis by Dostal because it offers the

potential for high efficiency without introducing a significant amount of complexity compared to the sim-

ple cycle. Despite showing promise, the cycles were never deployed due to the technical difficulties asso-

ciated with the high pressures and temperatures that are required. From the mid 1970's to the late 1990's,

there were no significant advancements or apparent interest in SCO2 power cycles.

Since the late 1990’s, advances in turbomachinery and heat exchanger design, as well as experi-

ence with higher operating temperatures and pressures in advanced steam-based Rankine power cycles,

have resulted in a resurgence of interest in SCO2 Brayton cycles. Dostal credits work done at the Czech

Technical University in Prague, Czech Republic in 1997 as the catalyst for this revival of interest in SCO2

power cycles. Since then, the unique advantages offered by SCO2 Brayton cycles have been recognized

by a number of industries, including nuclear and concentrating solar power (CSP), and publications relat-

ed to SCO2 research have risen dramatically in recent years.


2

Main
Generator Turbine
Comp

Main
Generator Turbine
Comp

Primary Heat
Exchanger
Recomp
Comp
Motor
Primary Heat
Exchanger

Recuperator
Precooler

Low Temperature High Temperature


Precooler Recuperator Recuperator

(a) (b)

Figure 1.1. Diagram of a simple Brayton cycle (a) and a recompression cycle (b).
Sandia National Laboratory has demonstrated a flexible 250 kW test loop
that is capable of running in either configuration (Conboy et al., 2012).

The advantages of SCO2 Brayton cycles make them well suited for a variety of applications.

With heat source temperatures above 550°C, SCO2 Brayton cycles have higher thermal efficiencies than

superheated steam Rankine cycles (Ishiyama et al., 2008; Dostal, 2004). The low specific volume of

carbon dioxide at the cycle’s operating pressures translates into considerably smaller turbomachinery

compared to steam-based Rankine cycles. Because there is no risk of carbon dioxide undergoing a phase

change from gas to liquid as it expands through the turbine in a supercritical Brayton cycle, concerns over

blade erosion due to droplet impingement are eliminated. Also, heat rejection for a SCO2 Brayton cycle is

not limited by the saturation temperature of the working fluid, offering the potential for cost-effective dry

cooling (i.e., the use of ambient air as the sole heat rejection medium).

In recent years there has been a growing interest in dry cooling because water consumption due to

thermoelectric power generation comprises a large portion of the overall water demands, and these de-

mands on our water resources will continue to grow as population and energy use increase. Depending on

the power plant type and cooling mechanism, between 200 and 900 gallons of water per MWhe are re-

quired to generate electricity (DOE, 2006). To put this into perspective, in 2005 the United States used

410 billion gallons of water, of which roughly 201 billion gallons (143 fresh, 58 saline) were withdrawn

to generate electricity (Kenny et al., 2009). The amount of water that is required for heat rejection from
3

power cycles is especially disadvantageous to CSP applications, which are typically located in arid re-

gions where water is scarce (Carter & Campbell, 2009). Because of the potential water and cost savings

associated with dry cooling, a better understanding of the SCO2 Brayton cycle's performance under dry-

cooled conditions is warranted.

While a number of investigators have reported the theoretical thermodynamic, design-point per-

formance of SCO2 power cycles (Dostal et al., 2006; Ishiyama et al., 2008; Sarkar, 2009; Utamura, 2010;

Chacartegui et al., 2011), the performance of heat exchangers in the cycle is typically represented using a

heat exchanger effectiveness. A disadvantage of characterizing heat exchanger performance with an ef-

fectiveness is that identical values of effectiveness under different design-point conditions can result in

heat exchangers of dramatically different sizes and costs. Representing the recuperators using conduc-

tance, rather than effectiveness, allows for a more appropriate comparison among design-point conditions

because a larger conductance typically corresponds more directly to a physically larger and higher capital

cost heat exchanger. Two notable exceptions in the literature to date are the overview of cycle perfor-

mance provided by Bryant et al. (2011), which includes a figure relating thermal efficiency to recuperator

conductance, and the analysis by Neises and Turchi (2013), which uses a conductance-based method in

order to compare a number of cycle configurations at a single design point.

Despite the recent popularity of the SCO2 Brayton cycle, few investigators have developed mod-

els that are capable of predicting off-design or part-load operation of the cycle. Such capabilities are re-

quired in order to analyze cycles on a seasonal or annual basis, especially in the context of dry cooling

that will likely lead to the cycle operating away from its design point for extended periods of time. Off-

design models have been developed by Argonne National Laboratory (ANL), which created a plant dy-

namics code to model an SCO2 cycle coupled to a lead-cooled pool-type fast reactor (Moisseytsev &

Sienicki, 2011), and Knolls Atomic Power Laboratory (KAPL), which developed a model using TRACE,

the TRAC/RELAP Advanced Computational Engine provided by the U.S. Nuclear Regulatory Commis-

sion (Hexemer & Rahner, 2011). However, both of these models are specific to a particular application
4

(the ANL model couples the power block and reactor and the KAPL model is specific to the Integrated

System Test demonstration loop) and both are designed to model transient performance with timescales

on the order of seconds to minutes. Annual simulations using either of these models would be prohibi-

tively time-consuming. The work by Dostal at MIT (Dostal, 2004) resulted in the CYCLES code, which

evolved into CYCLES II (Legault, 2006) and CYCLES III (Ludington, 2009). The off-design steady-

state capability of the CYCLES model is similar to the capability of the models developed under this

work effort, but the work at MIT makes a number of assumptions about the balance-of-system associated

with the power cycle that limits the cycle models applicability to other applications. For example, the

shaft speed of the turbomachinery is fixed at 3,600 rpm and the cycle model is coupled with a model of its

heat source, which is a sodium-cooled fast reactor (SFR). Also, the source code for CYCLES is not, to

the author's best knowledge, available online for other investigators to use.

The goal of this work effort is to develop and make available versatile and computationally effi-

cient models that allow the characterization and evaluation of recuperated and recompression SCO2 Bray-

ton power cycles under design-point and off-design conditions. The developed models are flexible with

respect to component-level specifics, such as the type of compressor used in the cycle or the approach

used to represent the off-design performance of the turbine. This flexibility is accomplished by providing

well-documented interfaces to "black box" component models, allowing a user to represent components

with any degree of complexity that is desired. Optimization routines are integrated into the models, al-

lowing exploration of optimal component and system designs based on defined constraints (e.g. source

and sink temperature) or optimal operating/control strategies for a given system design. Ultimately, the

selection of the best-possible design for a given application will strongly depend on a number of econom-

ic variables. The selection and justification of these variables, which range from the capital costs of the

components to the terms of the Power Purchase Agreement (PPA) used to govern the sale of the generated

electricity, are beyond the scope of this work effort. Therefore, the core cycle models presented in this

document are envisioned as building blocks for more complex and specific simulations. For example, the
5

models can easily be integrated into the TRNSYS simulation environment and combined with models de-

veloped for a specific power plant. Likewise, the cycle models can be coupled with models of various

heat rejection mechanisms in order to investigate the effects of cooling-related parasitic losses on cycle

design.

The organization of the remainder of this document is as follows. Chapters 2 and 3 describes the

methodology developed to model SCO2 systems under design-point and off-design conditions, respective-

ly, including the off-design turbomachinery models that are based on SCO2 compressors and turbines be-

ing investigated by Sandia National Laboratory (Conboy et al., 2012). The implementation of this

methodology into Fortran code is explained in Chapter 4. A number of design-point considerations are in-

vestigated in Chapter 5, including the effects of high-side (compressor outlet) pressure and low-side

(compressor inlet) temperature on cycle performance. Chapter 6 is an exploration of various off-design

and part-load performance predictions, including a discussion on optimal control strategies for the cycles.

General conclusions and recommendations for future applications of the modeling framework are consid-

ered in Chapter 7.
6

2. Design-Point Modeling Methodology


A diagram of the major components and their arrangement in the recompression cycle configura-

tion is shown in Figure 2.1, with the design-point cycle model inputs shown in bold.
Tmc,in
Pmc,in

!mc !t
Ẇnet
Main Generator Turbine
Comp

Pmc,out
Tt,in
6

𝜙rc
1
!rc

Primary Heat
Exchanger
2 Recomp Motor
Comp

10

Buffer UALT UAHT


Volume 3 4 5

8 7
9
Low Temperature High Temperature
Precooler Recuperator Recuperator

Figure 2.1. Diagram of a recompression Brayton cycle, with design-point cycle


model inputs shown in bold.

The recompression cycle is similar to a closed Brayton cycle with recuperation1, with the addition

of a bypass that diverts a fraction of the CO2 to a secondary compressor before the remainder of the

stream enters the precooler. The diverted CO2 is pressurized by the recompressing compressor (also re-

ferred to as the "recompressor") and reintroduced at a point between the low-temperature and high-tem-

perature recuperators. Because of the rapidly changing properties of carbon dioxide near the critical

point, the cold stream of the low-temperature recuperator has a higher specific heat capacity than the hot

stream. The bypass loop functions to balance the capacitance rates of these streams by decreasing the

mass flow rate through the cold side of the low-temperature recuperator, resulting in higher efficiency

1. Referred to in this dissertation as a “simple cycle”.


7

compared to the simple recuperated cycle. Note that when no flow is diverted to the recompressor, the re-

compression cycle becomes functionally equivalent to the simple cycle.

2.1. Turbomachinery

The design-point performance of the compressors and turbine are modeled assuming adiabatic

operation with either a constant isentropic efficiency (!isen) or a constant polytropic efficiency (!poly). The

polytropic efficiency is defined as the isentropic efficiency over an infinitesimally small pressure ratio

and it is used to account for the fact that isentropic efficiency is dependent on the pressure ratio over

which it is operating. That is, a turbomachine designed to operate under a higher pressure ratio with a

given isentropic efficiency will, typically, be more expensive than a turbomachine with the same efficien-

cy operating under a lower pressure ratio. Another advantage of using polytropic efficiency is that it is in-

dependent of the number of stages used by a turbomachine operating across a fixed pressure ratio. The

disadvantage of using polytropic efficiency is that it is computationally slower than assuming an isentrop-

ic efficiency due to the required integration of the entire compression process over a series of small

changes in pressure.

When assuming a constant isentropic efficiency, the specific enthalpy and entropy of the fluid en-

tering the turbomachine inlet (hin and sin, respectively) are determined based on the known temperature

and pressure at the inlet. The specific enthalpy at the outlet of the turbomachine that would result if the

fluid were isentropically processed to the outlet pressure (hout,i) is determined based on the inlet specific

entropy and the outlet pressure. The isentropic specific work (wi) of a turbomachine is calculated accord-

ing to:

wi = hin − hout ,i (2.1)


8

Applying the definition of isentropic efficiency results in an actual specific work (w) for a compressor

(left equation) and a turbine (right equation) of:

wi
wcomp = wturbine = wi ηisen (2.2)
ηisen

The specific enthalpy of the fluid at the outlet of the adiabatic turbomachine (hout) is determined using the

following energy balance:

hout = hin − w (2.3)

This calculated outlet enthalpy and the known outlet pressure fully defines the thermodynamic state at the

outlet of the turbomachine.

The constant polytropic efficiency assumption is accounted for in the turbomachinery model by

dividing the total pressure ratio into many small pressure differences (200 are currently used in the model)

and applying Equations (2.1-2.3) to each incremental change in pressure. The result of this integration

process is a final outlet enthalpy (hexit), which is used to calculate an equivalent isentropic efficiency:

hout ,i − hin
ηisen = (2.4)
hexit − hin

2.2. Heat Exchangers

Heat exchangers are modeled assuming a counter-flow configuration with constant conductance

(UA). Conductance is preferred over heat exchanger effectiveness because it more directly relates to the

size (and cost) of the heat exchangers, while still appropriately characterizing cycle performance under

various design conditions. Furthermore, the performance of cycles with different design points can be

more directly compared when the total recuperator conductance is fixed. Fixing the value of effectiveness

may correspond to dramatically different conductance values (and thus size and cost) for a given heat load

under different design conditions and result in misleading conclusions about the relative economic merit

of these cycles.
9

In order to accurately capture the effects of changing carbon dioxide properties, each recuperator

is discretized into sub-heat exchangers connected in series (Nellis & Klein, 2012). Using this approach,

the total conductance for a given heat exchanger is determined from the inlet conditions and a required

rate of total heat transfer (Q̇ ). The total rate of heat transfer for the overall heat exchanger is then evenly

divided among the discretized sub-heat exchangers and the application of energy balances on each sub-

heat exchanger allows the full determination of the inlet and outlet states for each section. Between 10

and 20 sub-heat exchangers are typically used for the results discussed in this dissertation.

For each sub-heat exchanger, the average capacitance rate (Ċ ) of each stream is calculated ac-

cording to:

h −h
C! = m! in out (2.5)
Tin − Tout

The effectiveness of each sub-heat exchanger is defined as:

Q! i
ε= (2.6)
(
C! min Thot ,in − Tcold ,in )
where Q̇ i is the heat transfer in the sub-heat exchanger and Ċ min is the minimum of the hot and cold capac-

itance rates calculated using Eq. (2.5) The dimensionless number of transfer units (NTU) for a sub-heat

exchanger is calculated for a counter-flow heat exchanger using:

⎧ ⎛ 1− ε C R ⎞
⎪ log ⎜ ⎟
⎪⎪ ⎝ 1− ε ⎠ if CR ≠ 1
NTU = ⎨ 1− C R (2.7)

⎪ ε otherwise
⎪⎩1− ε

where CR is the capacitance rate ratio between the two streams, defined as the ratio of the minimum ca-

pacitance rate stream to the maximum capacitance rate stream:

Cmin
CR = (2.8)
Cmax
10

The conductance of each sub-heat exchanger is determined from the NTU and minimum capacitance rate:

UAi = NTU C! min (2.9)

The total conductance for the heat exchanger is the sum of the sub-heat exchanger conductance values:

N hxrs

UA = ∑ UA i
(2.10)
i=1

2.3. Cycle Model

Apart from turbomachinery efficiencies and heat exchanger conductance values, the design-point

cycle model inputs (shown in bold in Fig. 2.1) include the main compressor inlet temperature and

pressure (also referred to as the "low-side" temperature and pressure), the main compressor outlet

pressure (referred to as the "high-side" pressure), the recompression fraction, the turbine inlet (high-side)

temperature, and the target net mechanical power output of the cycle (not considering any generator or

parasitic losses). Specifying these values fully constrains the set of equations derived from energy and

mass balances on the components in the cycle. However, iteration is necessary to solve the set of equa-

tions as there is no closed-form solution to the cycle model. A flowchart of the iteration logic used in the

system model is shown in Figure 2.2. Because the main compressor and turbine inlet temperatures are

specified at the design point, the precooler and primary heat exchanger do not need to be explicitly mod-

eled; the implied assumption is that the heat rejection and heat addition mechanisms are appropriately de-

signed. This assumption reduces the computational complexity of the design-point cycle model and in-

creases its flexibility, as various types of heat rejection or heat addition systems can be modeled

separately and coupled to the system model through calculated temperatures and heat rates.
11

start

read inputs

calculate pressure at all states

Turbomachinery Model Turbomachinery Model


(main compressor) (turbine)

assume a value for T8


(between T2 and T7)

assume a value for T9


(between T2 and T8)

Turbomachinery Model
(recompressing compressor)

calculate required mass flow


rate for target power

Heat Exchanger Model


(low-temperature recuperator)

no
UA exists? increase T9

yes
yes

UA equals no UA is too no
decrease T9
specified UA? large?

yes

calculate mixing valve outlet state

no
T4 < T8

yes

Heat Exchanger Model


(high-temperature recuperator)

no
UA exists? increase T8

yes yes

UA equals no UA is too no
decrease T8
specified UA? large?

yes

calculate performance metrics

write outputs

return

Figure 2.2. Iteration process for the design-point cycle model.


12

The numerical solution to the design-point model, given the inputs shown in bold in Fig. 2.1, is

determined using a nested iteration strategy. The outer iteration loop is initiated by guessing a value for

the temperature at state 8 (T8) that is bounded on the low side by T2 and on the high side by T7. Given a

value for T8, control moves to the inner iteration loop, which is initiated by guessing a value for T9 that is

bounded by T2 and T8. Setting T9 establishes the conductance of the low-temperature recuperator, as de-

scribed in Section 2.2 of this document. Note that if T9 is equal to T8, then the heat exchanger conduc-

tance is zero; as T9 decreases the low-temperature recuperator conductance increases to infinity (as the

minimum temperature difference between the hot and cold streams goes to zero). The inner loop iterates

on T9 in order to match the calculated and specified low-temperature recuperator conductance to within a

given relative tolerance (typically on the order of 10-5). It is possible during the iteration process that the

cold-stream temperature within one of the sub-heat exchangers will be warmer than the hot-stream tem-

perature. If this situation occurs it implies that the results are non-physical due to a violation of the Sec-

ond Law of thermodynamics; non-physical results indicate that the iteration value for T9 is too low.

Once the inner loop has converged, the recompressor outlet state (10) is determined and the tem-

perature of the working fluid at the outlet of the mixing valve (T4) is calculated using mass and energy

balances; the valve is assumed to be adiabatic. While the inner iteration loop guarantees that T3 will be

less than T8, the result of this energy balance could lead to a value of T4 that is larger than T8. This situa-

tion implies there was a Second Law violation in the high-temperature recuperator, and therefore the val-

ue for T8 is too low and the outer iteration loop is cycled with a better estimate for T8.

If there is no Second Law violation between states 4 and 8, the conductance of the high-tempera-

ture recuperator is calculated using T4, T7, and T8. As was the case for the inner iteration loop, the value

for T8 is adjusted until the calculated conductance for the high-temperature recuperator matches the speci-

fied conductance to within some relative tolerance. Note that the inner loop is completely evaluated at

every iteration of the outer loop.


13

For both iteration loops, a combination of the bisection and secant methods are used to adjust T8

or T9. The secant method has a higher rate of convergence, but sometimes predicts a new temperature that

is not physical (outside valid bounds). If this occurs, the model reverts back to the bisection method. A

general discussion on both root-finding algorithms is available in Chapra and Canale (2009).

2.4. Fluid Properties

The properties of carbon dioxide change rapidly near the critical point, and accurate fluid proper-

ty data are required to model SCO2 Brayton cycles. The two approaches explored in this work effort are

1) using a general equation of state, and 2) using a piecewise interpolated equation of state. Using an

equation of state enables high accuracy but is computationally expensive, while the interpolation ap-

proach is extremely fast but must be sufficiently refined in order to achieve adequate accuracy.

The National Institute of Standards and Technology (NIST) distributes the Reference Fluid Ther-

modynamic and Transport Properties Database (REFPROP), a program that is capable of calculating the

thermodynamic and transport properties of a large number of fluids and mixtures (E.W. Lemmon et al.,

2013). The properties of carbon dioxide are calculated by REFPROP according to the Helmholtz free en-

ergy equation of state (Span & Wagner, 1996).

While using REFPROP is extremely accurate, it is computationally expensive. In order to in-

crease the speed of the models, the Fluid Property Interpolation Tables (FIT) software library developed

by Northland Numerics (Northland Numerics, 2014) is also implemented. This library uses a piecewise

interpolation of Helmholtz free energy and derives all other thermodynamic properties from its analytical

derivatives. In order to evaluate the two libraries, as well as providing flexibility for alternative fluid

property libraries, the "black box" approach used for the off-design component models (discussed in

Chapter 3) is also applied to the calculation of fluid properties. This approach allows the design-point and

off-design models to easily switch between various carbon dioxide property libraries and, in fact, enables

other fluids besides carbon dioxide to be modeled.


14

3. Off-Design Modeling Methodology


The current interest in SCO2 Brayton cycles across a range of applications (solar, nuclear, waste-

heat recovery, etc.) provides a unique challenge in designing a modeling methodology that can readily be

applied to multiple designs. The developed modeling tool addresses this challenge by assuming "black

box" component models. In other words, any models can be used to describe the performance of the

turbomachinery and heat exchangers during off-design cycle analysis. The only limitations imposed on

the component models are the expected interface; that is, the values required as inputs and those deter-

mined as outputs. This black box approach allows a user to easily tailor the system-level cycle model and

component models to a specific application. The sections that follow will discuss the required interfaces

for the component models, as well as the currently implemented off-design component models.

3.1. Component Model Interfaces

In order to increase the applicability of the developed modeling tool, any models that satisfy a

few criteria can be used to represent the off-design performance of the individual components that com-

prise the cycle. This flexibility is accomplished by defining a number of interfaces for the component

models; any models that can be implemented with these interfaces are suitable. Each of the off-design

turbomachinery models have related but unique requirements; the inputs that each may use and the out-

puts each must provide are listed in Tables 3.1-3.3. The differences between the three sets of require-

ments for the turbomachinery models are due to their respective roles in the off-design cycle model,

which are discussed in Section 3.5. Note that the "Design Parameters" input is actually a number of vari-

ables; the method by which these variables are passed to the model is implementation-specific and is dis-

cussed in Chapter 4. Also discussed in Chapter 4 is the interface used to set the Design Parameters of the

turbomachinery based on a given design point.


15

Table 3.1. Required inputs and outputs for compatible off-design compressor models.
Inputs Outputs

Design Parameters Outlet Temperature


(rotor diameter, design-point shaft speed, etc.)

Inlet Temperature Outlet Pressure

Inlet Pressure Specific Work

Mass Flow Rate Warnings


(surge conditions, speed of sound concerns, etc.)

Shaft Speed

Table 3.2. Required inputs and outputs for compatible off-design recompressor models.
Inputs Outputs

Design Parameters Outlet Temperature


(rotor diameter, design-point shaft speed, etc.)

Inlet Temperature Shaft Speed

Inlet Pressure Specific Work

Mass Flow Rate Warnings


(surge conditions, speed of sound concerns, etc.)

Outlet Pressure

Table 3.3. Required inputs and outputs for compatible off-design turbine models.
Inputs Outputs

Design Parameters Outlet Temperature


(rotor diameter, design-point shaft speed, etc.)

Inlet Temperature Mass Flow Rate

Inlet Pressure Specific Work

Shaft Speed Warnings


(speed of sound concerns, etc.)

Outlet Pressure
16

While heat exchanger conductance values are used to model the recuperators in the cycle, these

values can be adjusted under off-design conditions. Similarly, the pressure drop for both fluid streams

can be scaled. The purpose of the off-design heat exchanger model in the cycle is to provide these values,

and its required inputs and outputs are listed in Table 3.4

Table 3.4. Required inputs and outputs for compatible off-design heat exchanger models.
Inputs Outputs

Design Parameters Scaled Conductance (UA)


(design-point conductance and pressure drops, etc.)

Cold Stream Mass Flow Rate Scaled Cold Stream Pressure Drop

Hot Stream Mass Flow Rate Scaled Hot Stream Pressure Drop

The off-design heat exchanger model interface does not currently require inlet temperatures or

pressures as inputs, as initial model development proceeded under the assumption that, for the recupera-

tors, the effects due to off-design inlet temperature and pressure are secondary to the effects due to off-de-

sign mass flow rates. This approach greatly reduces the computational complexity of the off-design cycle

model. However for more advanced off-design heat exchanger models, the inlet conditions can be pro-

vided at the cost of requiring an iterative approach to determining the conductance and pressure drop val-

ues. An iterative approach is necessary if the secondary effects due to off-design inlet temperature and

pressure are considered because the calculated conductance will affect the inlet conditions of the recuper-

ator, which in turn affect the calculated conductance. The current approach does not require iteration be-

cause the mass flow rate in the cycle is not affected by the thermal performance of the recuperators.
17

3.2. Sandia National Laboratory SCO2 Compressor

To facilitate development of the off-design cycle model, the compressor and recompressor models

are implemented as a functional relationship between the dimensionless flow and ideal head coefficients

of the radial compressor that is currently being developed for use with carbon dioxide at Sandia National

Laboratory (Conboy et al., 2012; Wright et al., 2010).

3.2.1 Functional Relationship


The flow coefficient (") of a compressor is a dimensionless flow rate that is defined according to:

m!
φ= (3.1)
ρ U D2

where ṁ is the mass flow rate, # is the fluid density at the compressor inlet, D is the diameter of the rotor

in the compressor (also called the “compressor diameter”), and U is the rotor tip speed:

D
U= N (3.2)
2

with N representing the shaft speed expressed in radians per second. The ideal head coefficient is a

dimensionless pressure rise through the compressor and it is defined according to:

Δhi
ψi = (3.3)
U2

where Δhi is the isentropic specific enthalpy rise through the compressor (i.e., the specific enthalpy rise

that would be obtained if the compressor were isentropic and adiabatic). The flow and head coefficients

are derived by applying the Buckingham Pi theorem and are commonly used to describe compressor per-

formance. A more thorough description is available in Peng (2008).

The ideal head coefficient and the compressor efficiency are both functions of the flow coeffi-

cient. The variation of head coefficient and isentropic efficiency with flow coefficient is a unique charac-

teristic of each compressor design. The functional relation used within the compressor model is based on

empirical data, typically provided by the manufacturer of the compressor in the form of a "performance
18

map" that is generated using either modeled or experimental data. Figure 3.1 is the performance map for

the SNL compressor overlaid onto experimental data. Note that SNL was able to run the compressor be-

yond the predicted surge line, indicating the model is slightly conservative in regards to the operating

range.

Figure 3.1. Performance map for the main compressor in the Sandia National Lab-
oratory supercritical CO2 test loop, taken from Wright et al. (2010).
Note: the y-axis label should be “Corrected Specific Ideal Enthalpy
Rise (BTU/lbm)”.

The data used to create the performance map were generated by Barber-Nichols (the compressor

manufacturer) using in-house modeling software. Using these modeled data, the ideal enthalpy rise and

efficiency for various shaft speeds and mass flow rates were non-dimensionalized using the previously

discussed flow (") and ideal head ($i) coefficients, defined in Equations (3.1) and (3.3), respectively. Us-

ing a non-dimensional head-flow curve reduces the number of independent variables needed to calculate

compressor efficiency and enthalpy rise from many (shaft speed, input conditions, and mass flow rate) to

one (flow coefficient). More importantly, the compressor map shown in Fig. 3.1 is only valid at the com-
19

pressor inlet conditions for which it was generated, which are 1,115 psi (7,688 kPa) and 549.7°R

(32.2°C). For other inlet conditions, the mass flow rate, shaft speed, and ideal enthalpy rise must be

corrected using a number of transformations that are derived from dynamic similarity and perfect gas as-

sumptions that also take into account deviations from ideal gas behavior using a compressibility factor. A

non-dimensional head-flow curve, however, accounts for deviations from the reference conditions implic-

itly and no additional corrections are required. To illustrate the advantage of this approach, the following

equations are used to transform actual conditions (indicated by the subscript ‘a’) to the equivalent refer-

ence conditions (indicated by the subscript ‘eq’), with the reference conditions indicated by the subscript

‘ref’ (Noall & Forsha, 2008).

m! a θ1
m! eq = ε (3.4)
δ
Na
N eq = (3.5)
θ1

Δha
Δheq = θ (3.6)
θ1 2
where,
γ ref
⎛ 2 ⎞ γ ref −1
γ ref ⎜ γ + 1⎟
⎝ ref ⎠
ε= γa
(3.7)
⎛ 2 ⎞ γ a −1
γa⎜
⎝ γ a + 1⎟⎠
2
⎛V ⎞
θ1 = ⎜ cr ,a ⎟ (3.8)
⎝ Vcr ,ref ⎠

To,a
θ2 = (3.9)
To,ref

Po,a
δ= (3.10)
Po,ref


Vcr = g ZRTo (3.11)
γ +1 c
20

While Equations (3.4-3.11) are useful for directly adjusting a compressor map for off-design con-

ditions, they are not required when using the non-dimensional head-flow curve approach adopted for this

work effort.

Figure 3.2 is a plot of the compressor performance map data after being non-dimensionalized us-

ing Eqs. (3.1) and (3.3).

Figure 3.2. Non-dimensional head-flow and efficiency-flow curves for the main
compressor in the Sandia National Laboratory supercritical CO2 test
loop; points are colored by shaft speed.

While Fig. 3.2 is clearly a more collapsed representation of the performance data shown in Fig. 3.1, there

appears to be an additional dependence on shaft speed that is unaccounted for and causing substantial

scatter, especially for larger values of flow coefficient. In order to address this deviation, a number of

modifications to the defined relationships for the flow and ideal head coefficients were considered. The
21

following modified definitions, which are completely empirical and specific to this compressor, were ulti-

mately chosen:

1/5
m! ⎛ N ⎞
φ =
*
⎜ ⎟ (3.12)
ρ U D 2 ⎝ N design ⎠

(20φ )
3
*

Δhi ⎛ N design

ψ i* = (3.13)
U 2 ⎜⎝ N ⎟⎠

(20φ )
5
*

⎛N ⎞
η * = η ⎜ design ⎟ (3.14)
⎝ N ⎠

where N is the shaft speed in rev/min and Ndesign is the shaft speed at the design point (75,000 rev/min).

Applying these modified definitions to the raw data for shaft speeds greater than 35,000 rev/min (speeds

below which are atypical for the SNL compressor, due to its foil bearings) results in the curves shown in

Figure 3.3.

As shown by Fig. 3.3, applying Eqs. (3.12-3.14) collapses the compressor performance map to

two curves that are easily fit with fourth order polynomials; these curves are overlaid on the performance

map data in Figure 3.4.


22

Figure 3.3. Modified non-dimensional head-flow and efficiency-flow curves for


the main compressor in the SNL supercritical CO2 test loop.

Figure 3.4. Polynomial fits of the modified non-dimensional head-flow and effi-
ciency-flow curves for the main compressor in the SNL supercritical
CO2 test loop.
23

For this particular compressor, the lower limit for the flow coefficient is roughly 0.02 and opera-

tion below this condition will lead to surge, which is an undesirable condition characterized by aerody-

namic instability and rapid flow reversals. The exact surge limit is dependent on many variables and must

be determined (or confirmed) experimentally for a given compressor. For the purposes of this work ef-

fort, constraining the minimum allowable flow coefficient to 0.02 is sufficient. The upper limit of the

flow coefficient for compressors similar to this compressor corresponds to an ideal head coefficient of

zero, which occurs near a flow coefficient of 0.05. For other compressor designs the upper limit of the

flow coefficient may instead be limited by the occurrence of choking within the turbomachine.

The error associated with fitting the dimensionless head-flow and efficiency-flow curves with

polynomials is minimal. For the modified ideal head relationship, the standard deviation is 0.011 with an

R2 value of 0.992, and for the modified efficiency relationship, the standard deviation is 0.020 with and R2

value of 0.983. Figure 3.5 shows the error between the ideal enthalpy rise and efficiency obtained from

the curve fits and the modified dimensionless coefficients versus the values provided by the compressor

performance map.

Figure 3.5. Deviations in efficiency and ideal enthalpy rise associated with using
the modified dimensionless numbers and polynomial fits.
24

The results of the analysis indicate that the performance map for the main compressor being stud-

ied at SNL can effectively be reduced to a dimensionless head-flow curve and a dimensionless efficiency-

flow curve, both of which can be approximated with fourth order polynomials as a function of modified

flow coefficient. The non-dimensional head and efficiency curves derived from the main compressor

wheel under investigation at SNL are very similar to non-dimensional curves derived (using a similar ap-

proach) from the recompressor wheel that is also under investigation at SNL. The recompressor wheel is

slightly larger than the main compressor wheel, but the non-dimensional performance is similar with the

exception of a reduction in the range of valid flow coefficients. For consistency, the polynomials shown

in Fig. 3.4 are used to represent the off-design performance for both the compressor and recompressor in

the currently implemented models. Note that the polynomials are only valid for flow coefficient values

greater than 0.02 (corresponding to the predicted surge region). The polynomials are also limited to posi-

tive values of ideal head coefficient and efficiency.

3.2.2 Experimental Validation


While it was shown that the compressor map can be effectively simplified using dimensionless

coefficients, the previous analysis does not account for deviations from the reference conditions of the

performance map. In order to show that Eqs. (3.4-3.11) can be omitted when using a dimensionless ap-

proach, experimental data are required to validate the aforementioned methodology.

Sandia National Laboratory provided experimental data for a number of compression tests at vari-

ous compressor inlet conditions. These conditions are summarized in Table 3.5.

Table 3.5. Inlet conditions for various carbon dioxide compression tests.
Average Inlet Pressure Average Inlet Temperature
Test Case Name
(kPa) (°C)
Map Reference 7,540 32
Supercritical 9,105 35
Liquid 7,219 28
Gas 6,771 28
25

For each test case, the mass flow rate and fluid density at the compressor inlet are measured with

high accuracy (on the order of 0.1%) using a Coriolis flow meter, pressures are measured with transducers

accurate to ± 34 kPa (± 5 psi), and temperature is measured using thermocouples accurate to ± 1°C. More

information about the experimental setup is available in Conboy (2012). The properties of carbon dioxide

at the compressor inlet are calculated using pressure and density, and the ideal enthalpy rise through the

compressor is calculated using the entropy at the compressor inlet and the pressure at the compressor out-

let. For this analysis, fluid properties are provided by the Engineering Equation Solver (EES) software

package (F-Chart Software, 2013). The shaft speed was held constant for each test at a number of speeds

and the mass flow rate through the loop was varied using a valve to provide increased or decreased flow

resistance in the loop. Figure 3.6 is a plot of the recorded data for a portion of the Map Reference test

case. Plots of the recorded measurement data for the four test cases are available in Appendix VIII.

For the Map Reference case, the shaft speed was held constant at 45,000 rpm and 50,000 rpm and

the mass flow rate through the loop was incremented four and five times, respectively. At each increment

of mass flow rate the pressure rise through the compressor achieves a steady state condition, shown as the

red lines in Figure 3.7.


26

110

Temperature (°F)
105
100 Outlet
95
90
Inlet
85
80

1400
Pressure (psi)

1300

Outlet
1200

1100
Inlet

1.3
Pressure Ratio

1.2

1.1

1.0
Mass Flow Rate (lb/s)

7
6
5
4
3
2
Shaft Speed (krpm)

50

40

30

20

2700 2800 2900 3000 3100 3200 3300 3400


Time (s)

Figure 3.6. Recorded measurement data for the Map Reference test case.
27

350

300

Pressure Rise (psi) 250

200

150

100

50

6
Mass Flow Rate (lb/s)

2700 2800 2900 3000 3100 3200 3300 3400


Time (s)

Figure 3.7. Recorded mass flow rate and pressure rise through the compressor for
the Map Reference test case where the regions highlighted in red are
assumed as steady-state operation.

The modified flow and ideal head coefficients were calculated for each of the steady state regions

(highlighted in red in Fig. 3.7) by averaging the recorded data and applying Eqs. (3.12) and (3.13). The

modified flow coefficient was used to predict the modified ideal head coefficient using the polynomial fit

discussed above. This approach was repeated for the other three test cases, and the measured and predict-

ed modified ideal head coefficients are compared in Figure 3.8. The error bars in Fig. 3.8 are calculated

using uncertainty propagation in EES and are based on the larger of the measurement error or standard

deviation for each steady state region.


28

0.55

0.50

0.45
Modified Ideal Head Coefficient

0.40

0.35

0.30

0.25 Test Case


Reference

Pre
Supercritical
0.20

d
Liquid

icte
Gas

d
0.15
0.020 0.025 0.030 0.035 0.040 0.045 0.050
Modified Flow Coefficient

Figure 3.8. Measured and predicted modified ideal head coefficient for the four test cases.

The measured relationship between flow and ideal head coefficients agrees well with the relation-

ship predicted by the non-dimensional performance curve for various inlet conditions, without having to

correct for deviations from reference conditions. At larger flow coefficients the measured head coeffi-

cient does not decrease as rapidly as predicted; this discrepancy was also observed by researchers at SNL

when using the compressor map with corrected inlet conditions. The likely cause of this discrepancy is

that the map originally provided by the manufacturer does not accurately capture the performance of this

compressor at larger mass flows and lower pressure ratios. While the current relationship between the

flow and ideal head coefficients derived from the performance map is satisfactory, a new relationship

could be generated from the data shown in Fig. 3.8 and validated with future experimental results. Al-

ternative compressor hardware can be characterized using the same technique, provided data were

available.
29

3.3. Low-Reaction Radial Turbine

For the purposes of generating and testing the framework developed for this project, the initial

turbine model development is applicable to radial designs, which are appropriate for SCO2 applications up

to 50 MWe (Gibbs et al., 2006). The mass flow rate through a radial turbine is strongly dependent on in-

let conditions and outlet pressure and, depending on its blade and nozzle design, weakly dependent on

shaft speed. Modeling the turbine as a constant area un-choked nozzle, this relationship is:

m! = Cs Anozzle ρ (3.15)

where # is the outlet density of the fluid and Anozzle is the effective nozzle area that results in the correct re-

lationship between mass flow rate and spouting velocity (Cs) and is based on the geometry of the turbine.

The spouting velocity is the velocity that would be achieved if the fluid were expanded isentropically to

the outlet pressure in an ideal nozzle and is calculated by:

Cs = 2Δhi (3.16)

where Δhi is the change in specific enthalpy across the turbine assuming an isentropic process. Modeling

the turbine as a constant area un-choked nozzle assumes a radial inflow turbine with a low degree of reac-

tion; a low degree of reaction (also referred to as a reaction ratio) means that the majority of the isentropic

enthalpy change is through the nozzles of the turbine, as opposed to along the blades.

An important characteristic of radial turbine performance is the ratio of tip speed (U) to spouting

velocity, also called the velocity ratio:

U
ν= (3.17)
Cs

Chen and Baines (1994) have proposed a general relationship between the ideal efficiency (!ideal) and ve-

locity ratio of a radial turbine that takes into account blade geometry and the loading. For a well-designed

turbine with a low loading coefficient, the relationship simplifies to:

ηideal = 2ν 1− ν 2 (3.18)
30

Plotting Eq. (3.18) results in the familiar relationship between ideal efficiency and velocity ratio

for a radial turbine, shown in Figure 3.9. Note that the maximum efficiency occurs at a velocity ratio of

0.707, as is expected based on Japikse and Baines (1997).

1.0

0.8
Ideal Efficiency

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1.0
U
Cs

Figure 3.9. Efficiency of an ideal radial turbine as a function of velocity ratio.

The ideal efficiency does not take into account other losses associated with the turbine (e.g., windage

losses). To account for these losses in the semi-empirical model the efficiency of the turbine (!) is calcu-

lated by scaling the ideal efficiency by the turbine design point efficiency (!design):

η = ηdesign ηideal = ηdesign 2ν 1− ν 2 (3.19)

Alternative turbine configurations suitable for use in an SCO2 power cycle are currently being

evaluated and tested at Sandia National Laboratory (Wright et al., 2011). The manufacturer of the turbine

wheels, Barber-Nichols, provided performance maps such as the one shown in Figure 3.10. These maps

can be used to predict turbine performance under off-design conditions in a similar manner to the com-

pressor performance maps discussed earlier (i.e., correcting the inlet conditions using various scaling

equations). Alternatively, the performance map information can be used to test the proposed low-reaction

turbine model.
31

Figure 3.10. Performance map for a turbine used in the SCO2 test loop at Sandia
National Laboratories, taken from the presentation associated with
Wright et al. (2011).

The first order approximation described by Eq. (3.15) is tested using the performance map in Fig.

3.10 by calculating the effective nozzle area from the mass flow rate and ideal enthalpy drop information

that is provided by Barber-Nichols. It should be noted that this information does not correspond to actual

experimental test data; rather, this information was generated by Barber-Nichols using proprietary in-

house modeling tools. Figure 3.11 shows the result of applying Eqs. (3.15) and (3.16) to the performance

map data for the main shaft turbine.


32

Figure 3.11. Calculated effective nozzle area using data from the turbine perfor-
mance map; the markers are colored by shaft speed.

The implemented radial turbine model assumes that the effective nozzle area remains constant un-

der off-design conditions. The application of Eq. (3.15) to the performance map data shows that both

shaft speed and isentropic enthalpy drop (which is related to pressure drop) have an effect on the effective

nozzle area for the turbine developed by Barber-Nichols. Furthermore, the shaft speed has a larger effect

at lower pressure drops, implying that the degree of reaction for the SNL turbine varies under off-design

conditions. Interestingly, using the inlet density of the turbine in Eq. (3.15) results in a more constant cal-

culated effective nozzle area, shown in Figure 3.12. These results indicate that the SNL turbine has a

non-negligible degree of reaction. That is, not all the pressure drop across the turbine is through the noz-

zles. While the assumed low-reaction radial model does not fit the data of the SNL turbine as neatly as

the compressor, the flexibility of the modeling methodology allows both of these variations to be imple-

mented and compared to determine their effect on system-level performance, as discussed in Chapter 6.
33

Figure 3.12. Calculated effective nozzle area using data from the turbine performance
map and inlet fluid density; the markers are colored by shaft speed.

The performance map provided by Barber-Nichols can also be compared to the efficiency calcu-

lated using Eq. (3.19), as shown in Figure 3.13, which is a plot of the efficiency predicted by the perfor-

mance map as a function of % overlaid by the efficiency predicted from Eq. (3.19) and scaled with an ap-

propriate value of !design.


1.0
35,000 - 50,000 rpm
50,000 - 60,000 rpm
60,000 - 70,000 rpm
0.8 70,000 - 80,000 rpm
80,000 - 90,000 rpm

0.6
Efficiency

0.4

4th Order Polynomial


0.2


÷ 4 k‹ R ≠ ‹k
0
0 0.5 1.0 1.5
U
Cs
U‹V

Figure 3.13. Efficiency predicted from the performance map as a function of the ra-
tio of tip speed to spouting velocity.
34

The performance map data agree well with Eq. (3.19) as the value of % increases to 0.7, which

corresponds roughly to the maximum operating efficiency of the turbine. Beyond a % of 0.7, though, the

performance map and Eq. (3.19) begin to diverge. The values for % that are greater than one are another

indication that the SNL turbine has a non-negligible degree of reaction. However, the current low-reac-

tion turbine model under-predicts the efficiency at larger values of %, so results based on the simplified

model will be conservative. For higher-performance predictions, the efficiency curve based on the 4th or-

der polynomial fit plotted as the purple dashed line in Fig. 3.13 is implemented in an alternative off-de-

sign turbine model based more closely on the SNL turbine. This alternative model uses the inlet fluid

density for Eq. (3.15) when predicting the allowable mass flow rate through the turbine.

3.4. Heat Exchangers

The performance of the recuperators in the off-design cycle model is represented using specified

conductance values and pressure drops. However, under off-design mass flow rates the conductance and

pressure drops through the heat exchangers will differ from their design values. To account for this devia-

tion, an off-design heat exchanger model is implemented based on scaling pressure drop and conductance

with mass flow rate. Thermal capacitance effects are not considered while modeling the off-design per-

formance of the heat exchangers.

A common method for determining the pressure drop due to friction for internal flow is the use of

the Darcy friction factor (f), a dimensionless number (Fox et al., 2008) that is defined such that:

L ρV 2
ΔP = f (3.20)
D 2

For a given heat exchanger, the length (L) and hydraulic diameter (D) are constant, and it follows that ΔP

is proportional to the friction factor (f), fluid density (#), and fluid velocity (V) to the second power:

ΔP ∝ f ρ V 2 (3.21)
35

The velocity of the fluid in the heat exchanger can be expressed in terms of the mass flow rate:

m!
V= (3.22)
ρ Ac

Substituting Eq. (3.21) into Eq. (3.22) and recognizing that the cross sectional area of the flow passage in

the heat exchanger (Ac) is constant results in:

ΔP ∝ f ρ −1 m! 2 (3.23)

There are a number of different correlations available for calculating the friction factor (f), but for

the purpose of scaling pressure drop with mass flow rate, the simple Blasius correlation (Fox et al., 2008)

is used:

0.316
f = (3.24)
Re1/4

where the Reynolds Number (Re) is defined as:

ρ V DH
Re = (3.25)
µ

The hydraulic diameter (DH) is a constant for a given heat exchanger, so combining Eqs. (3.22),

(3.24), and (3.25) results in the friction factor scaling with mass flow rate and fluid viscosity according to:

f ∝ m! −1/4 µ1/4 (3.26)

Combining Eqs. (3.23) and (3.26) results in:

ΔP ∝ m! 7/4 µ1/4 ρ −1 (3.27)

Assuming that the average fluid properties within the heat exchanger do not change significantly

in off-design conditions, the pressure drop through a heat exchanger scales with mass flow rate according

to:

7/4
⎛ m! ⎞
ΔP = ΔPdesign ⎜ ⎟ (3.28)
⎝ m! design ⎠

where ΔPdesign and ṁ are the pressure drop and mass flow rate associated with the design point.
36

A similar analysis for heat exchanger conductance using the Dittus-Boelter correlation is present-

ed in Patnode (2006) and results in:

0.8
⎛ m! ⎞
UA = UAdesign ⎜ ⎟ (3.29)
⎝ m! design ⎠

The assumption that the viscosity and density do not change significantly in the heat exchanger

under off-design conditions is not valid in the vicinity of the critical point of carbon dioxide. However,

the relationships presented in this section are applied only to the recuperators in the cycle, which typically

operate at higher temperatures away from the critical point. Depending on the type of analysis being per-

formed and the range of off-design conditions being considered, it may be necessary to implement more

detailed scaling relations.

3.5. Cycle Model

The inputs and outputs of the off-design compressor and turbine models (Tables 3.1 and 3.3, re-

spectively) are complimentary in that the main compressor model uses the mass flow rate as an input and

returns the compressor outlet pressure (i.e., there is a head-flow curve that relates pressure rise to mass

flow rate), while the turbine model uses the inlet conditions and outlet pressure as inputs and returns the

mass flow rate (i.e., there is a flow resistance afforded by the fixed area restriction in the turbine). Match-

ing the head-flow curve of the compressor with the flow resistance of the turbine, as well as flow resis-

tance associated with heat exchanger and piping pressure drops, allows the operating point of the system

to be determined. Figure 3.14 illustrates this concept, showing the effects of changing shaft speed and

turbine inlet temperature on the operating point of a simple recuperated Brayton cycle. Note that these

results are intended only to show the general trends of the relationship between compressor and turbine

operation.
37

5.0
650°C
550°C
4.5
450°C

35,000 rpm
4.0

3.5
Pressure Ratio

30,000 rpm
3.0

2.5
25,000 rpm

2.0

1.5
Turbine

1.0
0 20 40 60 80 100 120 140 160 180
Mass Flow Rate (kg/s)

Figure 3.14. Head-flow and flow resistance curves for different shaft speeds and
turbine inlet temperature; the curves intersect at the corresponding
operating point of the cycle.

The intersection points of the compressor and turbine curves correspond to the operating point of

the system. Note that changing the speed of the compressor has a significant impact on the operating

point, whereas a change in turbine inlet temperature has a much smaller effect. Figure 3.14 is meant to il-

lustrate the concept of matching compressor and turbine curves and a number of simplifying assumptions

were made such as no pressure drops in the heat exchangers.

Before discussing the iteration strategy used to determine the operating point of the cycle under

off-design conditions, it is useful to give a brief overview of the off-design model inputs. The inputs,

shown in bold in Figure 3.15, are the main compressor inlet temperature (Tmc,in) and pressure (Pmc,in), the

turbine inlet temperature (Tt,in), the recompression fraction ("rc), and the shaft speeds of the main com-

pressor (Nmc) and turbine (Nt).


38

Tmc,in
Pmc,in

Nmc = Nt
Main Generator Turbine
Comp

1 Tt,in
6

𝝓rc

Primary Heat
Exchanger
Recomp Motor
Comp
(a) Buffer
Volume
10

3 4 5
2

8 7
9
Low Temperature High Temperature
Precooler Recuperator Recuperator

Nt
Turbine
Tmc,in
Pmc,in 𝝓rc
Tt,in
6
Nmc
Main Recomp
Comp Comp

Primary Heat
1

Exchanger
10
(b)
Buffer
Volume 3 4 5
2

8 7
9
Low Temperature High Temperature
Precooler Recuperator Recuperator

Figure 3.15. Diagram of a single-shaft recompression Brayton cycle (a) and a split-
shaft recompression Brayton cycle (b); model inputs are shown in bold.

The split-shaft configuration in Fig. 3.15(b) is characterized by the use of separate shafts for the

main compressor and the turbine. (Not pictured are the motors for each compressor and the generator as-

sociated with the turbine). A split-shaft configuration is advantageous in that it allows for a constant-

speed, synchronous generator tied directly to the electrical grid, but it is more complex than a single-shaft

configuration and the additional motor required to drive the main compressor will introduce an additional

inefficiency in the system. In the interest of maximizing the flexibility of the model, the shaft speeds of

the compressor and turbine are specified separately. The model allows the use of a single shaft by setting

the turbine shaft speed to a negative value; this indicates to the model that the two speeds are linked. It
39

should be noted that the shaft speed of the recompressor is not specified but is rather calculated according

to the desired recompression fraction ("rc). Because the performance of the modeled recompression cycle

is equivalent to the simple recuperated Brayton cycle (shown in Fig. 1.1) when the recompression fraction

goes to zero, this model is capable of simulating both cycle configurations.

The compressor inlet temperature is used as an input because the temperature to which the carbon

dioxide can be cooled before entering the compressor is highly dependent on ambient conditions and the

design of the precooler. In the limit of a perfect precooler, the lowest possible temperature for a dry-only

air-cooled cycle is the ambient dry bulb temperature. The lowest possible temperature for a water-cooled

cycle would be the ambient wet bulb temperature. It is expected that the cycle heat rejection control strat-

egy will target a known compressor inlet temperature (most likely as low as possible) in order to maxi-

mize efficiency. Directly specifying the compressor inlet temperature recognizes that there is a cooling

system in place that is operated in order to minimize the temperature of the carbon dioxide at the com-

pressor inlet. Decoupling the operation of the cycle from the performance of the precooler heat exchang-

er reduces computational overhead.

Depending on the cooling control strategy that is implemented, it is expected that the compressor

inlet temperature will track ambient conditions. In other words, a warmer day will result in higher low-

side cycle operating temperatures. While the thermal performance of the precooler is not considered

when determining the operating point, once the system model has converged a precooler model may be

used to determine the necessary cooling conditions required to achieve the target temperature. If those

conditions are not possible (e.g., the compressor inlet temperature is specified as 33°C but the lowest pos-

sible temperature achievable with the precooler is 36°C), then the compressor inlet temperature can be ad-

justed. In this way the precooler size and design can still be considered when evaluating cycle

performance.

The compressor inlet pressure is specified as an input to the model because it has been deter-

mined that actively controlling the pressure of the CO2 at the compressor inlet is advantageous in regards
40

to maximizing cycle efficiency (these results are discussed in Chapter 6). Specifically, increasing the

compressor inlet pressure can reduce the efficiency degradation that would otherwise occur when operat-

ing a cycle under warmer off-design low side temperatures. This type of control is also referred to as "in-

ventory control" and is one of a few strategies being considered for recuperated SCO2 Brayton cycles

(Carstens, 2007; Dostal, 2004). While a disadvantage of inventory control is that it is slow (i.e., it has a

relatively long time constant) compared to shaft speed or bypass control (Moisseytsev & Sienicki, 2009),

this is not a concern for adjusting the operating point of the cycle based on slow changes in ambient

conditions.

Similar to the Carnot cycle, increasing the CO2 temperature at the turbine inlet of an SCO2 Bray-

ton cycle increases the thermal efficiency. A desirable control strategy is to attempt to run the cycle at the

highest possible temperature, the limit of which is determined by material properties and available solar

resource. In a traditional gas-fired air Brayton cycle, the material properties of the turbine blades limit the

high side gas temperature. For CSP applications, the thermal limit of the high side is likely the break-

down of molten salt, as well as the thermal limits of the materials used to construct the receiver or prima-

ry heat exchanger. As is the case for the compressor, specifying the turbine inlet temperature assumes that

the primary heat exchanger is adequately designed and controlled; this assumption reduces computational

overhead.

In order to determine the operating point of the cycle (illustrated by the intersection of the com-

pressor and turbine curves in Fig. 3.14), the model iteratively determines the corresponding mass flow

rate through the turbomachinery. A flowchart of the iteration logic used in the off-design cycle model is

shown in Figure 3.16.


41

start

read inputs

assume a turbine mass flow rate

calculate compressor mass flow rate using


specified recompression fraction

Off-Design Compressor Model

scale design-point pressure drops

calculate pressure at all states

Off-Design Turbine Model

turbine ṁ equals no adjust turbine


compressor ṁ? mass flow rate

yes
scale design-point conductance values

assume a value for T8


(between T2 and T7)

assume a value for T9


(between T2 and T8)

Off-Design Recompressor Model

Heat Exchanger Model


(low-temperature recuperator)

no
UA exists? increase T9

yes yes

no UA is too no
UA equals (scaled) decrease T9
specified UA? large?

yes
calculate mixing valve outlet state

no
T4 < T8

yes
Heat Exchanger Model
(high-temperature recuperator)

no
UA exists? increase T8

yes yes

no UA is too no
UA equals (scaled) decrease T8
specified UA? large?

yes
calculate performance metrics

write outputs

return

Figure 3.16. Iteration process for the off-design cycle model.


42

The off-design iteration strategy is very similar to the design-point iteration strategy described in

Section 2.3; the only major difference is in the calculation of mass flow rate. In the design-point analysis,

the target power output is used to determine the required mass flow rate through the cycle, while in the

off-design analysis the mass flow rate is determined by matching the head-flow curve of the main com-

pressor with the flow characteristic of the turbine. This matching process corresponds to the first iteration

loop shown in Figure 3.16. The general strategy is to assume a value for the mass flow rate through the

turbine, which also fixes the mass flow rate through the main compressor for the specified (as an input)

recompression fraction. Given the mass flow rate through the compressor, its shaft speed, and the temper-

ature and pressure at the main compressor inlet (state 1), the main compressor model predicts the outlet

temperature and pressure (state 2). Once the pressures at state 1 and 2 are known, all other pressures are

calculated by taking into effect the scaled pressure drops through the various heat exchangers. The tur-

bine model uses the temperature and pressure at state 6 as well as the pressure at state 7 to predict an al-

lowable mass flow rate; if the allowable mass flow rate does not match the current guess, a new value is

chosen using a combination of the bisection and secant root-finding methods (Chapra & Canale, 2009)

and the process repeats. The allowable mass flow rate is the predicted mass flow rate through the turbine

as a function of the pressure drop across it.

Once the mass flow rate through the cycle has converged, control passes to the nested iteration

loop that determines the temperatures at the remaining unknown state points. This process is described in

Section 2.3 and remains fundamentally unchanged, with the exception of the recompressing compressor.

Specifically, the efficiency of the recompressing compressor is determined using the known mass flow

rate (based on the set recompression fraction "rc) and required pressure rise from states 9 to 10; the re-

quired shaft speed is also determined in this manner.


43

4. Modeling Framework
The design-point and off-design modeling methodologies described in Chapters 2 and 3 are im-

plemented as a modeling framework in the Fortran language. The source code for the framework, which

is organized into seven modules, is available online2 and is also included in Appendices I-VII of this doc-

ument. A Fortran module is a self-contained unit of code, the use of which is considered best practice

with modern Fortran because it simplifies the code structure and enforces compile-time argument check-

ing (Brainerd, 2009). The major advantage of the module-based approach used in the current framework

is the ability to easily implement various fluid property libraries and component models at compile time.

Specifically, a user may replace any of the non-required modules in the code with an alternative contain-

ing custom code. A brief description of the seven modules is provided in Table 4.1 and each will be dis-

cussed in turn, though the source code itself is well-commented and is intended to be the primary refer-

ence for the framework. More than one filename is listed for the the compressors, turbines, and

CO2_properties modules; each filename is an alternative implementation of that module that is currently

available. For example, the radial_turbine.f90 file implements the low-reaction radial turbine model

discussed in Chapter 3, while the snl_radial_turbine.f90 file implements the modified radial turbine

model that more closely represents the turbine being investigated by SNL for SCO2 applications.

2. http://sel.me.wisc.edu/software.shtml (The files available online are likely more up-to-date than the
source code listed in the appendices of this dissertation.)
44

Table 4.1. Fortran modules used by the developed modeling framework.


Module Name Filename Description

core.f90
Defines a number of user-defined types and contains
core
(required) a number of subroutines and functions required by
the design_point and off_design_point9modules.

design_point
design_point.f90 Contains the system-level subroutines used to model
(required) cycles at the design point.

off_design_point
off_design_point.f90 Contains the system-level subroutines used to model
(required) cycles under off-design or part-load conditions.

scaling_hxr.f90
Defines the functions responsible for scaling con-
heat_exchangers
(may be replaced) ductance and pressure drop under off-design mass
flow rates.

snl_compressor.f90 Contains compressor and recompressor sizing and


compressors snl_compressor_tsr.f90 performance subroutines based on the SNL
(may be replaced) compressor.

radial_turbine.f90
turbines snl_radial_turbine.f90 Contains the turbine sizing and performance subrou-
(may be replaced) tines based on a radial turbine.

module_CO2_properties.f90
CO2_properties CO2_RP_module.f90 Contains the required fluid property subroutines for
(may be replaced) carbon dioxide.

4.1. core9Module

The core module defines a number of user-defined types that are required by the other modules.

User-defined types in Fortran are similar to structures in C, and are used for representing various compo-

nents because they greatly simplify the calling procedures of the various subroutines.
45

The user-defined types that are defined in core are:

• Compressor - holds information related to the main and recompressing compressors


• Turbine - holds information related to the turbine
• HeatExchanger - holds information related to the recuperators, precooler, and primary heat exchanger
• RecompCycle - holds cycle information, including references to the component types above
• ErrorTrace - holds information related to the type and location of any encountered errors

The core module also includes two subroutines used by the design-point model to calculate the perfor-

mance of turbomachinery based on isentropic or polytropic efficiency. The sub-heat exchanger model

used by both the design-point and off-design models is also contained in this module.

4.2. design_point Module

The design-point cycle model is implemented as the subroutine design in the design_point mod-

ule with the following form:


subroutine9design( W_dot_net,9T_mc_in,9T_t_in,9P_mc_in,9P_mc_out,9DP_LT,9DP_HT,9DP_PC,9
DP_PHX,9UA_LT,9UA_HT,9recomp_frac,9N_t,9eta_mc,9eta_rc,9eta_t,9N_sub_hxrs,
tol,9error_trace,9recomp_cycle)

The required input arguments for the design subroutine are listed in Table 4.2; note that error_trace and

recomp_cycle are output variables of type ErrorTrace and RecompCycle, respectively.

Table 4.2. Description of input arguments used by the design subroutine.


Variable Units Description
W_dot_net kW power output of the cycle, defined as turbine power less compressor(s) power
T_mc_in K main compressor inlet temperature (low-side temperature)
T_t_in K turbine inlet temperature (high-side temperature)
P_mc_in kPa main compressor inlet pressure (low-side pressure)
P_mc_out kPa main compressor outlet pressure (high-side pressure)
DP_LT kPa / % pressure drop in low-temperature recuperator; negative value indicates relative
DP_HT kPa / % pressure drop in high-temperature recuperator; negative value indicates relative
DP_PC kPa / % pressure drop in precooler; negative value indicates a relative pressure drop
DP_PHX kPa / % pressure drop in primary heat exchanger; negative value indicates relative
UA_LT kW/K low-temperature recuperator conductance (UA)
UA_HT kW/K high-temperature recuperator conductance (UA)
recomp_frac - fraction of mass flow rate that bypasses the precooler and main compressor
46

eta_mc - main compressor efficiency; positive is isentropic, negative is polytropic


eta_rc - recompressor efficiency; positive is isentropic, negative is polytropic
eta_t - turbine efficiency; positive is isentropic, negative is polytropic
N_sub_hxrs - number of sub-heat exchangers used to discretize recuperators
tol - relative convergence tolerance for iteration loops

A number of inputs listed in Table 4.2 will be set based on the assumed characteristics of the cycle (e.g.,

turbomachinery efficiency or desired power output), but there are some whose values are not immediately

obvious. Namely, the optimal values of compressor inlet and outlet pressure, the recompression fraction,

and the distribution of the total available conductance between the two recuperators must be determined

numerically. To facilitate the optimization of thermal efficiency by varying these values, another subrou-

tine is implemented in this module that allows an arbitrary set of these four inputs to be used as free vari-

ables in an optimization routine:


subroutine9optimal_design(W_dot_net,9T_mc_in,9T_t_in,9DP_LT,9DP_HT,9DP_PC,9DP_PHX,9
UA_rec_total,9eta_mc,9eta_rc,9eta_t,9N_sub_hxrs,9P_high_limit,9
P_mc_out_guess,9fixed_P_mc_out,9PR_mc_guess,9fixed_PR_mc,999999999
recomp_frac_guess,9fixed_recomp_frac,9LT_frac_guess,9
fixed_LT_frac,9N_t,9tol,9opt_tol,9error_trace,9recomp_cycle)

The inputs for the optimal_design subroutine that are not shared by the design subroutine are listed in

Table 4.3.

Table 4.3. Description of input arguments used by the optimal_design subroutine.


Variable Units Description
P_high_limit kPa maximum allowable high-side pressure
P_mc_out_guess kPa initial value for main compressor outlet pressure
fixed_P_mc_out T/F whether P_mc_out_guess is fixed or available for optimization
PR_mc_guess - initial value for main compressor pressure ratio
fixed_PR_mc T/F whether PR_mc_guess is fixed or available for optimization
recomp_frac_guess - initial value for fraction of mass flow rate that bypasses precooler
fixed_recomp_frac_guess T/F whether recomp_frac_guess is fixed or available for optimization
initial value for fraction of total conductance allocated to the low-
LT_frac_guess -
temperature recuperator
fixed_LT_frac T/F Whether LT_frac_guess is fixed or available for optimization
opt_tol - tolerance for optimization convergence
47

If all four of the optimization variables are "fixed" (i.e., the values for fixed_P_mc_out,

fixed_PR_mc, fixed_recomp_frac_guess, and fixed_LT_frac are all set to .true.), the subroutine simply

runs the design-point model with the specified values. If any of the optimization variables are allowed to

vary, the subroutine uses the subplex algorithm, which is is a hill-climbing algorithm based on an exten-

sion of the Nelder-Mead optimization method (Rowan, 1990), as made available in the Netlib repository

(Browne et al., 1995).

In order to reliably find the global optimum for a given design point, it is often necessary to start

the optimization search with a number of different initial conditions. This process is automated in the

auto_optimal_design subroutine, which is the recommended design-point subroutine to use for deter-

mining a single optimal design point:


subroutine9auto_optimal_design( W_dot_net,9T_mc_in,9T_t_in,9DP_LT,9DP_HT,9DP_PC,9DP_PHX,9
UA_rec_total,9eta_mc,9eta_rc,9eta_t,9N_sub_hxrs,999
P_high_limit,9N_t,9tol,9opt_tol,9return_error_code,9cycle)

Besides initializing the optimization algorithm with a number of different initial conditions, the auto_opL

timal_design subroutine also implements an outer, one-dimensional optimization loop that varies the

high-side pressure of the cycle. This loop uses Brent's Method, which is a combination of the golden

section search and successive parabolic interpolation methods (Brent, 1973), as implemented in the fmin

function of the Netlib repository. This subroutine is more likely to determine the global maximum of effi-

ciency, but it is 20-30 times slower than the optimal_design subroutine due to the outer optimization loop

and multiple initial conditions that are checked.

4.3. off_design_point Module

The iteration strategy shown in Fig. 3.16 is implemented in the subroutine off_design, which is a

part of the off_design_point module and has the form:


subroutine9off_design(recomp_cycle,9T_mc_in,9T_t_in,9P_mc_in,9recomp_frac,9N_mc,9N_t,9
N_sub_hxrs,9tol,9error_trace)

The recomp_cycle argument is an instance of a RecompCycle variable, which contains the necessary de-

sign-point information (e.g., compressor rotor diameter, design-point shaft speed, etc.) and will be updat-
48

ed based on the remaining input arguments, which are listed in Table 4.4. Note that the recompressor

shaft speed is not listed as an input; rather, the shaft speed required to attain the specified recompression

fraction is calculated. This approach assumes that the recompressor is driven independently by a motor

that can be adequately controlled.

Table 4.4. Input arguments to the off-design cycle model.


Variable Units Description
T_mc_in K main compressor inlet temperature (low-side temperature)
T_t_in K turbine inlet temperature (high-side temperature)
P_mc_in kPa main compressor inlet pressure (low-side pressure)
recomp_frac - fraction of mass flow rate that bypasses the precooler and main compressor
N_mc rpm main compressor shaft speed
N_t rpm turbine shaft speed; setting value to -1 links turbine and compressor shafts
N_sub_hxrs - number of sub-heat exchangers used to discretize recuperators
tol - relative convergence tolerance for iteration loops

The off_design subroutine is capable of predicting thermal efficiency and power output for a giv-

en set of inputs, but it is often desired to maximize efficiency or power output given constraints on the

low-side and/or high-side temperature. The optimal_off_design subroutine facilitates this optimization

using an approach nearly identical to the optimal_design subroutine described above. The calling struc-

ture for the optimal_off_design subroutine is:


subroutine9optimal_off_design( recomp_cycle,9T_mc_in,9T_t_in,9value_code,9N_sub_hxrs,9
P_mc_in_guess,9fixed_P_mc_in,9recomp_frac_guess,99999999
fixed_recomp_frac,9N_mc_guess,9fixed_N_mc,9N_t_guess,9
fixed_N_t,9tol,9opt_tol,9error_trace)

The inputs for the optimal_off_design subroutine that are not shared by the off_design subroutine are

listed in Table 4.5.


49

Table 4.5. Description of input arguments used by the optimal_off_design subroutine.


Variable Units Description
value_code - whether to maximize efficiency (1) or power output (2)
P_mc_in_guess kPa initial value for main compressor inlet pressure (low-side pressure)
fixed_P_mc_in T/F whether P_mc_out_guess is fixed or available for optimization
recomp_frac_guess - initial value for fraction of mass flow rate that bypasses precooler
fixed_recomp_frac_guess T/F whether recomp_frac_guess is fixed or available for optimization
N_mc_guess rpm initial value for main compressor shaft speed
fixed_N_mc T/F whether N_mc_guess is fixed or available for optimization
N_t_guess rpm initial value for turbine shaft speed; (-1 links to compressor shaft)
fixed_N_t T/F whether N_t_guess is fixed or available for optimization
opt_tol - tolerance for optimization convergence

As is the case for the design-point subroutines described in the previous section, the optiL

mal_off_design subroutine allows control variables (recomp_frac, N_mc, and N_t, in this case) to be fixed

or to be varied by the subplex method in order to maximize efficiency or power output.

The inputs listed in Table 4.5 do not place any type of constraint on the power produced by the

cycle. However, the highest thermal efficiency that is possible at a given power output is often of interest.

In other words, the model should be capable of varying the inputs listed in Table 4.4 to provide a target

power output at the maximum possible efficiency. This capability is accomplished using the iteration

strategy depicted in Figure 4.1.


50

start

read inputs and parameters

Assume control variables:


Recompression Factor
Compressor Shaft Speed
Turbine Shaft Speed

assume a compressor
inlet pressure

adjust compressor

adjust control variables


inlet pressure
Core Off-Design Cycle Model

power output / heat


no
addition equals target?

yes

efficiency maximized
no
to within tolerance?

yes

write outputs

return

Figure 4.1. Iteration strategy for maximizing off-design cycle efficiency given a
target power output or rate of heat addition.

In general, the low-side pressure is varied to achieve a target power output (or rate of heat addi-

tion) while the recompression fraction, compressor shaft speed, and turbine shaft speed are varied to

maximize efficiency. The subplex algorithm is used for the optimization of the control variables, and the

low-side pressure is iterated upon using a combination of the bisection and secant methods. The main

compressor and turbine shaft speeds can be varied independently (i.e., for the split-shaft configuration) or

linked (i.e., for the single-shaft configuration). It is assumed that an independent motor always drives the

recompressor. This logic is implemented in the subroutine optimal_target_off_design that has the form:
subroutine9optimal_target_off_design( recomp_cycle,9T_mc_in,9T_t_in,9target,9target_code,9
N_sub_hxrs,9lowest_pressure,9highest_pressure,9999999
recomp_frac_guess,9fixed_recomp_frac,9N_mc_guess,9
fixed_N_mc,9N_t_guess,9fixed_N_t,9tol,9opt_tol,999999
error_trace)

The lowest_pressure and highest_pressure inputs define the interval that is assumed to contain low-side

pressure that corresponds to the target specified by the input target. The argument target_code is used to

indicate whether target corresponds to power output (1) or rate of heat addition (2), as the iteration strate-
51

gy shown Fig. 4.1 for target power output also applies to determining the low-side pressure that corre-

sponds to a desired rate of heat input at the primary heat exchanger.

4.4. heat_exchangers Module

The heat_exchangers module contains the functions hxr_pressure_drops and hxr_conductance,

which calculate the scaled pressure drops and conductance of a heat exchanger, respectively. These func-

tions are based on the scaling equations derived in Section 3.4 and can be replaced with any functions that

fit the following forms:


function9hxr_pressure_drops(hxr,9m_dots)
function9hxr_conductance(hxr,9m_dots)

The inputs are hxr, a HeatExchanger type, and m_dots, which is an array of length two containing the cold

(1) and hot (2) stream mass flow rates. The function hxr_pressure_drops returns a double precision array

of length two (corresponding to the two streams), and the hxr_conductance function returns a single dou-

ble precision value. Any code that satisfies these requirements can be used to represent the off-design

pressure drops and conductance of the heat exchangers in the cycle.

4.5. compressors Module

The compressors module is used to size (i.e., determine the required parameters such as rotor di-

ameter and shaft speed) the compressor and recompressor based on the design point of the cycle. The

subroutines responsible for determine the necessary parameters are compressor_sizing and recompresL

sor_sizing, both of which require a RecompCycle variable as an argument. The design-point information

contained in this variable is used to size the respective compressors, and the calculated turbomachinery

parameters are stored in the same cycle variable. Besides sizing the two compressors, the compressors

module is responsible for modeling the off-design performance of the two compressors. The calling

structures for these two subroutines are:


off_design_compressor(comp,9T_in,9P_in,9m_dot,9N,9error_trace,9T_out,9P_out)
off_design_recompressor(comp,9T_in,9P_in,9m_dot,9P_out,9error_trace,9T_out)
52

The argument comp is a Compressor type and the remaining inputs correspond to the inputs and

outputs described in the Component Model Interfaces section of Chapter 3. Note that the off-design com-

pressor model requires shaft speed as an input and calculates an outlet pressure, while the off-design re-

compressor model uses the desired outlet pressure to calculate the corresponding shaft speed. This mod-

ule may be replaced with an alternative implementation that provides these four subroutines, allowing any

type of compressor or recompressor to be represented in the off-design cycle model.

4.6. turbines Module

Similar to the compressors module, the turbines module is responsible for sizing the turbine and

modeling its off-design behavior. As discussed in Section 3.1, the off-design performance subroutine re-

quires the inlet temperature and pressure, the outlet pressure, and the shaft speed as inputs and provides

the mass flow rate and outlet temperature as outputs. The subroutine is:
off_design_turbine(turb,9T_in,9P_in,9P_out,9N,9error_trace,9m_dot,9T_out)

where turb is a Turbine type. The sizing subroutine is named turbine_sizing and, similar to the sizing

subroutines in the compressors module, requires a RecompCycle variable as an input that contains design-

point information.

4.7. CO2_properties Module

The CO2_properties module is responsible for providing the properties of carbon dioxide as a

function of various independent properties. This module can be replaced in order to use a fluid properties

library besides FIT, a limited version of which is included in the framework. For example, an alternative

module (CO2_RP_module.f90) that interfaces with the REFPROP library is included with the source code

online and listed in Appendix VII. Note that the source code for REFPROP is not included and must be

obtained separately in order to use this alternative module. The following subroutines are provided:
CO2_TD(T,9D,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
CO2_TP(T,9P,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
CO2_PH(P,9H,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
CO2_PS(P,9S,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
CO2_HS(H,9S,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
53

5. Design-Point Analysis
5.1. Comparison to Literature

Three different design conditions are considered to compare calculated results for the design-

point cycle model with those appearing in previously published literature. Two of the cycle designs corre-

spond to those suggested by Dostal (2004) as the “Basic” and “High Performance” cycles. The key dis-

tinction between the Basic and High Performance cycles is the turbine inlet temperature, which is 550°C

and 700°C, respectively. The third design, "Dry Cooled", is identical to the High Performance design ex-

cept the compressor inlet temperature is increased to reflect conditions expected when heat is rejected

from the cycle by dry cooling. For this analysis the compressor inlet temperature for the Dry Cooled de-

sign is 55°C (131°F), which is above the maximum dry-bulb temperature for most locations. The 32°C

(89.6°F) compressor inlet temperature for the Basic and High Performance designs was chosen by Dostal

because it is near the critical point of carbon dioxide.

The relevant parameters for each of the cycle designs are summarized in Table 5.1. For this

comparison, the net mechanical power output (i.e., the power generated by the turbine less the power re-

quired by the compressor and recompressor) of the cycles are fixed at 300 MW, while the designs present-

ed by Dostal assume a constant thermal input of 600 MW.

Table 5.1. Design-point conditions for model comparison with literature.


High Dry
Basic
Performance Cooled
Compressor Inlet Temperature 32°C 32°C 55°C
Turbine Inlet Temperature 550°C 700°C 700°C
Compressor Outlet Pressure 20 MPa
Pressure Ratio 2.6
Compressor Isentropic Efficiency 0.89
Recompressor Isentropic Efficiency 0.89
Turbine Isentropic Efficiency 0.90
Net Mechanical Power Output 300 MW
54

The pressure ratio of 2.6 was suggested by Dostal as the optimal pressure ratio for the Basic and

High Performance cases and corresponds to a low-side (i.e., main compressor inlet) pressure of 7.69 MPa

for the fixed 20 MPa high side pressure. It is expected (based on results discussed in Section 5.2) that the

optimal pressure ratio for the Dry Cooled case will be lower; but for consistency, the same low-side

pressure of 7.69 MPa is used for all the results shown in Figures 5.1-5.3. Figure 5.1 shows the thermal ef-

ficiency of the cycle as a function of recompression fraction for various values of the total recuperator

conductance. The optimal distribution of conductance between the two recuperators is varied in order to

maximize efficiency at each design point. The dashed line in Fig. 5.1 represents the recompression frac-

tion, ϕ, that maximizes cycle efficiency for a range of recuperator conductance values. In order to verify

the FIT properties library, the thermal efficiencies calculated using carbon dioxide properties provided by

REFPROP are plotted as open circles. The agreement between the two fluid property libraries is typically

on the order of the six significant figures.

0.60

0.55

0.50
100 MW/K
Thermal Efficiency

0.45 50 MW/K

30 MW
0.40 /K

0.35
15 M
W/K
al φ
optim
0.30

0.25
5 MW/K

0.20
0 0.1 0.2 0.3 0.4 0.5
Recompression Fraction (φ)

Figure 5.1. Thermal efficiency as a function of recompression fraction for the “Ba-
sic” design with fixed low-side and high-side pressures of 7.69 MPa
and 20 MPa, respectively.

The black diamond in Fig. 5.1 indicates the optimal recompression fraction and thermal efficien-

cy as reported by Dostal. It should be noted that Dostal used a detailed heat exchanger model for a partic-
55

ular geometry in his analysis that included the effect of pressure drops. Despite these differences,

Dostal’s predicted optimal recompression fraction and efficiency shows good agreement with the predict-

ed relationship between optimal recompression fraction and efficiency in the present analysis. Figure 5.1

also suggests that the recuperators Dostal used in his analysis had an equivalent total recuperator conduc-

tance of approximately 60 MW/K for the Basic design.

Figure 5.2 is a similar plot for the High Performance design, again showing good agreement with

the optimal recompression fraction suggested by Dostal.

0.60

0.55 100 MW/K


50 MW/K
0.50
Thermal Efficiency

30 MW
/K
0.45

0.40
15 M
al φ W/K
optim
0.35

0.30

0.25 5 MW/K

0.20
0 0.1 0.2 0.3 0.4 0.5
Recompression Fraction (φ)

Figure 5.2. Thermal efficiency as a function of recompression fraction for the


“High Performance” design with fixed low-side and high-side
pressures of 7.69 MPa and 20 MPa, respectively.

As expected based on the Carnot efficiency, increasing the turbine inlet temperature of the cycle

increases its efficiency, but otherwise the relationship between recompression fraction, recuperator con-

ductance, and efficiency shown in Fig. 5.2 is similar to the relationship shown in Fig. 5.1. It is worth not-

ing that for both designs there is a recuperator conductance below which the optimal efficiency corre-

sponds to a recompression fraction of zero, indicating a simple cycle is preferred over a recompression
56

cycle. The observation that small recuperators drive the optimal recompression fraction to zero was also

noted by Bryant et al. (2011).

The plot in Figure 5.3 corresponds to the Dry Cooled design for a fixed low-side pressure of 7.69

MPa; a higher thermal efficiency is likely possible by optimizing the low-side pressure for these condi-

tions, as illustrated by the results shown later in Figure 5.6.

0.60

0.55

0.50
Thermal Efficiency

0.45 100

optima MW
/K
0.40 50
MW
/K
0.35 30
MW
/K

0.30 15 M
W/K
0.25
5 MW/K
0.20
0 0.1 0.2 0.3 0.4 0.5
Recompression Fraction (φ)

Figure 5.3. Thermal efficiency as a function of recompression fraction for the “Dry
Cooled” design with fixed low-side and high-side pressures of 7.69
MPa and 20 MPa, respectively.

Figure 5.3 shows that the optimum cycle efficiency for the warmer low-side temperature of a dry-

cooled cycle configuration tends toward a lower optimal recompression fraction. This trend is consistent

with the results reported by Sarkar and Bhattacharyya (2009), despite their use of an effectiveness-based

heat exchanger analysis that assumes constant properties. The results shown in Figures 5.1-5.3 are not

fully optimized because both the compressor outlet pressure and pressure ratio (and hence compressor in-

let pressure) are constrained to the values shown in Table 5.1. The effect of these constraints is consid-

ered in the following section.


57

5.2. Effect of High-Side Pressure Limit

The highest CO2 pressure in the cycle occurs at the main compressor outlet (state 2 in Fig. 2.1).

Increasing this pressure typically leads to an increase in thermal efficiency, but higher pressures also re-

quire components able to withstand greater stress (typically larger and more expensive). Most previously

published analyses have focused on limiting high-side pressures to the 20-30 MPa range, with a typical

baseline value of 20 MPa providing a balance between thermal efficiency and economic feasibility

(Dostal, 2004). However, it is important to understand the impact that the high-side pressure limit has on

the thermodynamic performance of the cycle because future technological improvements may allow for

more cost-effective high-pressure components. To this end, the maximum possible thermal efficiencies of

two design-point heat rejection conditions are investigated for a number of high-side pressure limits. The

two cooling conditions of interest are wet-cooled, represented by a compressor inlet temperature of 32°C,

and dry-cooled, represented by an inlet temperature of 55°C. Common to each condition is a turbine inlet

temperature of 700°C and the assumption that there are no pressure drops in the cycle piping or heat

exchangers.

At the design point, both power output and the effect of conductance scale linearly with mass

flow rate through the cycle, which allows the results presented in this section to be generalized using a

normalized recuperator conductance. The normalized conductance is defined as the total recuperator con-

ductance divided by the power output. For example, a 10 MW cycle with 2,000 kW/K of total conduc-

tance in its recuperators has a normalized conductance of 0.2 (kW/K)/kW. For each case, the normalized

recuperator conductance is varied as a parameter from 0.001 to 1.0 (kW/K)/kW and two turbomachinery

polytropic efficiencies are considered: 0.8 and 0.9. At every point, the optimal compressor inlet and out-

let pressure (up to the high-side limit) are determined, as well as the optimal recompression fraction and

distribution of total conductance between the two recuperators. The resulting thermal efficiency of the
58

cycle designed to operate with a compressor inlet temperature of 32°C is shown in Figure 5.4, and the

55°C compressor inlet temperature case is shown in Figure 5.5.

As expected, a wider range of high-side design pressures leads to increases of the cycle thermal

efficiency. However, for the 32°C case shown in Fig. 5.4, the thermal performance of the 30, 40, and 50

MPa cases coincide for normalized conductance values above 0.2 (kW/K)/kW. This result indicates that

cycles with design high-side pressures above 30 MPa are unnecessary when the recuperator reaches a

threshold size. The 55°C case in Fig. 5.5 shows a similar trend, but with the recuperator threshold size in-

creased to approximately 0.5 (kW/K)/kW.

0.8 Polytropic Efficiency 0.9 Polytropic Efficiency

0.55

0.50

it
m
Li
Pa
0.45

M
Thermal Efficiency

50
0.40
it
0.35 Lim
Pa
it
m

M
it
aL t

10
i
Li

im
im
Pa

aL

0.30
M

MP
MP
50

it
m
30
40

Li

it
Pa

0.25 Li
m
M

Pa
20

M
10
0.20

0.15

0.001 0.01 0.1 1 0.001 0.01 0.1 1


Total Recuperator Conductance (kW/K)
Net Power Output (kW)

Figure 5.4. Optimal thermal efficiency for a SCO2 cycle with a compressor inlet
temperature of 32°C. The dashed line corresponds to a recompression
fraction of zero (i.e., a simple cycle). The open circles mark the nor-
malized conductance corresponding to a minimum temperature differ-
ence of 10°C in the recuperators while the filled circles correspond to a
2°C minimum temperature difference.
59

0.8 Polytropic Efficiency 0.9 Polytropic Efficiency

0.55

0.50

0.45
Thermal Efficiency

it
m
0.40

Li
Pa
M
50
0.35
it
Lim

it
Lim Pa

it
0.30

it
M imit

m
M

Lim
Pa

Pa it
10

Li
Lim
L
M

Pa
Pa
50

M
Pa
M
0.25
10
M

20
30
40

0.20

0.15

0.001 0.01 0.1 1 0.001 0.01 0.1 1


Total Recuperator Conductance (kW/K)
Net Power Output (kW)

Figure 5.5. Optimal thermal efficiency for a SCO2 cycle with a compressor inlet
temperature of 55°C. The dashed line corresponds to a recompression
fraction of zero (i.e., a simple cycle). The open circles mark the nor-
malized conductance corresponding to a minimum temperature differ-
ence of 10°C in the recuperators while the filled circles correspond to a
2°C minimum temperature difference.

In Figures 5.4 and 5.5, the dashed lines indicate an optimal recompression fraction of zero, which

implies that a simple cycle is preferred over the more complex recompression cycle for those values of

normalized recuperator conductance. Because the advantage of the recompression cycle is that it allows

for a more balanced recuperator, it makes sense that for cycles with smaller recuperators the additional

energy requirements of the recompressing compressor is not outweighed by the increase in the amount of

recuperated energy. The open circles in Figures 5.4 and 5.5 mark the normalized conductance corre-

sponding to a minimum temperature difference in the recuperators of 10°C, while the closed circles indi-

cate a minimum temperature difference of 2°C. The circles are included in the figures to provide another

reference for the size and performance of the recuperators.

The sharp increases in efficiency visible in Fig. 5.4 correspond to an abrupt shift in the optimal

low side pressure of the cycle. This sudden change is apparent in Figure 5.6, which is a plot of the
60

pressures associated with the efficiencies shown in Figures 5.4 and 5.5 for the 0.9 polytropic efficiency

cases. Figure 5.6 also explains why the thermal efficiencies at higher pressure limits and recuperator

sizes coincide; as the recuperators becomes sufficiently large, the optimum high-side pressure no longer

corresponds to the high-pressure limit.

32°C Compressor Inlet 55°C Compressor Inlet


50 MPa Limit 50 MPa Limit
Optimal High-Side Pressure (MPa)

50

40 MPa Limit 40 MPa Limit


40

30 MPa Limit 30 MPa Limit


30

20 MPa Limit 20 MPa Limit


20

10 MPa Limit 10 MPa Limit


10
Optimal Low-Side Pressure (MPa)

12
Psc
10

8
Psc
it
m

6
Li
Pa

it
M

m
Li
50

4 Pa
M
50
2
it it
Pa Lim Pa Lim
10 M 10 M
0
0.001 0.01 0.1 1 0.001 0.01 0.1 1
Total Recuperator Conductance (kW/K)
Net Power Output (kW)

Figure 5.6. Optimal compressor inlet and outlet pressures for the 32°C case (left)
and the 55°C case (right). The polytropic efficiency of the turboma-
chinery is 0.9.

The dashed lines in Fig. 5.6 again indicate an optimal recompression fraction of zero. For the

32°C case, it is interesting to note that the transition from a simple to a recompression cycle occurs inde-

pendently of the abrupt shift in optimal low-side pressure. This abrupt change is not present for the 55°C
61

case, as the CO2 property variations are less severe further from the critical point. However for both cases

as recuperator conductance increases, the optimal low-side pressure converges to the pseudocritical

pressure (Psc) at the compressor inlet temperature. This relationship between the low-side temperature

and optimal low-side pressure explains why the fixed pressure ratio of 2.6 used in Table 5.1 for consisten-

cy is not appropriate for a dry-cooled cycle.

5.3. Effect of Low-Side Temperature

The results of the previous section suggest that, with sufficient recuperation, high-side pressures

above 30 MPa do not result in appreciable increases in performance and, in some cases, the thermal effi-

ciency of the cycle is reduced. The results also indicate that the compressor inlet temperature has a sig-

nificant effect on the optimal low-side pressure; specifically, warmer temperatures require higher

pressures.

In order to explore the effect of the low-side temperature on cycle performance, two high-side

pressures, 20 and 30 MPa, and two normalized recuperator sizes, 0.2 and 0.5 (kW/K)/kW, are considered.

The turbomachinery is modeled using isentropic efficiencies of 0.89 for the compressors and 0.93 for the

turbine. Isentropic efficiencies are used for this analysis, and the remainder of the analyses in this disser-

tation, because the pressure ratios for the different designs under consideration do not vary widely. The

predicted optimal thermal efficiency for these conditions as a function of compressor inlet temperature is

shown in Figure 5.7 for turbine inlet temperatures of 550°C and 700°C. The dot-dash lines correspond to

the smaller recuperator case and the solid lines correspond to the larger recuperator case.
62

0.55 700°C

30 MPa
20 MPa kW/K
0.5
kW
30 MP
0.50 a
kW/K
Thermal Efficiency

550°C 20 MPa 0.2


kW

30 MPa
0.45 20 MP kW/K
a 0.5
kW
30 MP
a
kW/K
20 MP 0.2
a kW
0.40

0.35
ηcomp = 0.89
ηturbine = 0.93

30 35 40 45 50 55
Compressor Inlet Temperature (°C)

Figure 5.7. Thermal efficiency as a function of compressor inlet temperature for


various designs.

It is not surprising that the best cycle performance is obtained with the largest recuperator operat-

ing at the lowest compressor inlet temperature and highest turbine inlet temperature. However, the signif-

icance of Fig. 5.7 is the relative differences in performance among the cases. The optimal cycle design

will ultimately be driven by economics and application-specific design constraints, but Fig. 5.7 provides

some insight into the relative tradeoffs to various design decisions. For example, increasing the high-

pressure limit from 20 MPa to 30 MPa results in increased efficiency; however, the efficiency increase is

not as significant as a cycle using a larger overall recuperator. In cases where capital costs may limit the

recuperator size, increasing the high-side pressure limit can effectively compensate for the effect of com-

paratively lower cycle efficiency with a smaller recuperator. This trend is also apparent in Figures 5.4 and

5.5 for normalized conductance values in the range of 0.01 to 0.2 (kW/K)/kW. Figure 5.7 also shows that

thermal efficiencies in excess of 50 percent are possible under a range of compressor inlet temperatures

appropriate for dry cooling.


63

The low-side pressure, recompression fraction, and fraction of recuperator conductance in the

low-temperature (LT) recuperator corresponding to the efficiencies in Fig. 5.7 for the 700°C case are plot-

ted in Figure 5.8.

kW/K
0.5
11
Low-Side Pressure (MPa)

kW

kW/K
0.2
kW
10 ssu re
Pre
riti cal
30 MPa
u doc
9 Pse
kW/K
0.5
kW
20 MPa
8 kW/K
0.2
kW

7
Recompression Fraction (φ)

20 MPa
0.4 kW/K
0.5
kW

30 MPa
0.3

0.2
kW/K
0.2
kW

0.1

0.7
LT Recuperator Fraction

30 MPa
0.6 kW/K 0.5
kW/K
kW
0.2
kW

0.5
20 MPa
0.4
kW/K
0.5
kW

0.3

30 35 40 45 50 55
Compressor Inlet Temperature (°C)

Figure 5.8. Optimal low-side pressure (top), recompression fraction (middle), and
low-temperature recuperator conductance fraction (bottom) as a func-
tion of low-side temperature with a high-side temperature of 700°C.

The performance of the recompression cycle is strongly dependent on the balance between its

pressure ratio, the amount of recuperation taking place, and the potential for the recompressor to improve
64

that recuperation by balancing the capacitance rates of the hot and cold streams. For a high-side pressure

of 30 MPa, the optimal low-side pressure tracks closely with the pseudocritical pressure of carbon dioxide

at the compressor inlet temperature. For the 20 MPa case, the optimal low-side pressure begins to deviate

from the pseudocritical pressure above low-side temperatures of approximately 38°C (this deviation is

also visible for the 55°C case in Fig. 5.6). The reason for this divergence is that the advantage of favor-

able compression near the pseudocritical region is outweighed by the advantage of operating at a higher

pressure ratio. However, for temperatures near the critical point the reduced work required to compress

carbon dioxide in the pseudocritical region dominates and the optimal pressure ratio becomes secondary.

The results shown in Figs. 5.4-5.8 assume no pressure drops through heat exchangers or piping in

the cycle. Including pressure drop effects will decrease the efficiency of the cycle, but the general trends

do not change significantly. To illustrate this point, Figures 5.9 and 5.10 are plots of thermal efficiency as

a function of low-side temperature for a number of designs (similar to Fig. 5.7) assuming relative pressure

drops through the heat exchangers of one and two percent, respectively. Again, the solid lines represent

recuperators with a normalized conductance of 0.5 (kW/K)/kW and the dot-dash lines represent a normal-

ized conductance of 0.2 (kW/K)/kW.


65

0.55
700°C

30 MP
a
0.50
20 MPa
Thermal Efficiency

30 M
Pa
550°C
20 MPa
0.45
3 0 MP
a

20 MP
a
0.40 30 M
Pa

20 M
Pa

0.35
ηcomp = 0.89
ηturbine = 0.93

30 35 40 45 50 55
Compressor Inlet Temperature (°C)

Figure 5.9. Thermal efficiency as a function of compressor inlet temperature for


various designs assuming a one percent relative pressure drop through
the heat exchangers in the cycle.

0.55

700°C

0.50
30 MP
Thermal Efficiency

2 0 MP
a
0.45 550°C 30 MP
a
20 MP
a
30 M
Pa
0.40
30 M
Pa
20 M
Pa

0.35 20 M
ηcomp = 0.89 Pa
ηturbine = 0.93

30 35 40 45 50 55
Compressor Inlet Temperature (°C)

Figure 5.10. Thermal efficiency as a function of compressor inlet temperature for


various designs assuming a two percent relative pressure drop through
the heat exchangers in the cycle.
66

The sharp bend in the efficiency curve that occurs around a low-side temperature of 37°C for the

20 MPa, 0.2 (kW/K)/kW design is due to the abrupt change in optimal low-side pressure discussed previ-

ously, which is made larger by the pressure drop effects. This exaggeration is clearly shown in Figure

5.11, which is a plot of the low-side pressure, recompression fraction, and fraction of recuperator conduc-

tance in the LT recuperator corresponding to the efficiencies for the one percent relative pressure drops

case in Fig. 5.9 (with a turbine inlet temperature of 700°C). Specifically, the change in optimal low-side

pressure deviates much more sharply for the 20 MPa, 0.2 (kW/K)/kW design than is shown in Fig. 5.8.

11
Low-Side Pressure (MPa)

kW/K
0.5
kW
kW/K
0.2
kW
10 su re
res
al P
critic
30 MPa udo
9 Pse kW/K
0.5
kW
20 MPa
8
kW/K
0.2
7 kW

20 MPa
Recompression Fraction (φ)

0.4
kW/K
0.5
30 MPa kW
0.3

0.2
kW/K
0.2
kW

0.1

0.7
LT Recuperator Fraction

0.6 30 MPa
kW/K kW/K
0.2 0.5
kW kW

0.5
20 MPa
0.4 kW/K
0.5
kW

0.3

30 35 40 45 50 55
Compressor Inlet Temperature (°C)

Figure 5.11. Optimal low-side pressure (top), recompression fraction (middle), and
low-temperature recuperator conductance fraction (bottom) as a func-
tion of low-side temperature with a high-side temperature of 700°C
and a one percent relative pressure drop through the heat exchangers in
the cycle.
67

The results of the analyses presented in this chapter indicate that the optimal balance between the

pressure ratio and recompression fraction of the cycle is strongly dependent on the design-point low-side

temperature, the high-pressure limit, and the size of the recuperators. Therefore, the physical parameters

associated with a given design (e.g., compressor rotor diameter and shaft speed) are also strongly depen-

dent on the design-point of the cycle. For example, designing for a warmer low-side temperature in a dry-

cooled application with small recuperators will require a smaller recompressor (or none at all). This de-

pendence is the reason the design-point and off-design models are intended to be coupled, as described in

Chapter 4. Specifically, the optimal_design or auto_optimal_design subroutines are used to determine

the optimal cycle design for a given set of design-point conditions, after which the corresponding required

turbomachinery parameters are determined and used in the off-design models.

5.4. Convergence Verification

The data presented in this chapter were generated using 10 sub-heat exchangers per recuperator

and a convergence tolerance of 10-5. In order to verify the models are sufficiently converged with these

values, the thermal efficiency and mass flow rate errors for 135 different design points (parametrically se-

lected and representative of the designs considered in this chapter) are plotted as a function of the number

of sub-heat exchangers and convergence tolerance in Figure 5.12. The reference values used to determine

relative errors are provided from the model using 30 sub-heat exchangers and a convergence tolerance of

10-8. While varying the number of sub-heat exchangers in Fig. 5.12 the convergence tolerance is fixed at

10-5, and while varying the convergence tolerance the number of sub-heat exchangers is set to 10.
68

Figure 5.12. Relative error of thermal efficiency (black lines) and mass flow rate
(blue lines) for a number of design points. The reference values used
for the calculating errors are determined from runs using 30 sub-heat
exchangers and a convergence tolerance of 10-8.

Figure 5.12 shows that convergence to within 0.05 percent is achieved for the range of designs

using a minimum of 10 sub-heat exchangers and a convergence tolerance on the order of 10-4. The mini-

mum number of sub-heat exchangers that show convergence is used because the runtime of the model in-

creases proportionally with the number of sub-heat exchangers on the order of O(N2/3). Figure 5.13 shows

the optimal_design subroutine runtime as a function of the number of sub-heat exchangers for two de-

signs, one representative of a wet-cooled application and one representative of a dry-cooled application.

The plotted data were generated on a 2.6 GHz Intel Core i7 using the gfortran (version 4.9) compiler; the

bottom plot uses the FIT properties library and the top plot uses REFPROP.
69

200

Calculation Time with REFPROP (s)


150

100
In let
s or
p res
C om let
50 °C or In
32 ess
o mpr
CC
55°
0

0.5
Calculation Time with FIT (s)

0.4

t
0.3 Inle
sor
p re s
om
CC
0.2 32° let
or In
ess
o mpr
CC
0.1 55°

0
0 10 20 30
Number of Sub-Heat Exchangers

Figure 5.13. Design-point cycle model runtime using FIT (bottom) and REFPROP
(top) for two representative designs.

The variations in the calculation time are due to numerical noise. The 32°C compressor inlet case

is slower than the 55°C inlet case because of the vicinity to the critical point, where property calls are

more computationally expensive. This trend was observed for both REFPROP and FIT.
70

6. Off-Design Analysis
The results presented in Chapter 5 confirm what is expected based on the Second Law of thermo-

dynamics; namely, designing for a colder low-side temperature (with a fixed high-side temperature) will

result in a higher thermal efficiency. It is expected that this relationship between thermal efficiency and

compressor inlet temperature is also true for off-design operation. That is, the off-design thermal efficien-

cy of the cycle will decrease as the temperature of the carbon dioxide at the main compressor inlet in-

creases, and conversely the efficiency will increase as the compressor temperature decreases. What is not

clear, however, is the relative magnitude of the efficiency degradation of a low-temperature design operat-

ing at above design-point temperatures versus the increase in efficiency experienced by a high-tempera-

ture design operating at below design-point temperatures. In order to explore this relationship, the off-de-

sign performance of two design options are considered. One design assumes a compressor inlet

temperature of 32°C and the other design assumes a compressor inlet temperature of 50°C. With respect

to the heat rejection system associated with the power cycle, the low-temperature design is likely more

appropriate for wet-cooling, while the high-temperature design is more representative of a dry-cooled sys-

tem. However, the analyses presented in this chapter do not take into account a specific heat rejection

mechanism. This approach allows for high-level observations that hold true regardless of the type of heat

rejection system utilized by a system.

The off-design model developed for this work effort predicts the off-design performance (i.e.,

power output and thermal efficiency, among other metrics) of a system as a function of compressor inlet

temperature and pressure, turbine inlet temperature, shaft speed, and recompression fraction. However,

combinations of these inputs may result in non-physical or unreasonable operating points. As an example

of this possibility, Figure 6.1 is a plot of the predicted power output and compressor outlet pressure for

two characteristic designs as a function of compressor inlet pressure at various off-design operating tem-

peratures. At the design points, indicated by the black dots in the figure, both cycles operate at a high-
71

side pressure of 25 MPa and a power output of 10 MW. The specifics of the other design-point parame-

ters are unimportant for this example, as these plots are intended only to illustrate the general off-design

trends of the cycles. The primary difference between the two designs is the proximity of the design-point

compressor inlet conditions relative to the critical point of carbon dioxide. The lower temperature design

takes advantage of favorable compression near the critical point, so at higher pressures the power output

decreases. The power output of the higher temperature design will also decrease eventually at higher

pressures, but that occurs at compressor inlet pressures that are not reasonable.

32°C Compressor Inlet at Design Point 50°C Compressor Inlet at Design Point
Compressor Outlet Pressure (MPa)

40

35

30

25

55°C 32°C 55°C


20

32°C
15

20

15
Power Output (MW)

32°C

40°C

°C
°C

°C

55
50
45

10

5
32°C

C
°C

°C

°C
40°
45

55
50

0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.1. Power output and corresponding compressor outlet pressure as a func-
tion of compressor inlet pressure for various off-design temperatures.
The black dots represent the design points for the two cycles, and the
dashed line indicates surge in the main compressor. Note that these
results do not take into account physical limitations of the
turbomachinery.
72

The results shown in Fig. 6.1 are a correct representation of the expected off-design high-side

pressures if the physical limitations of the system are not considered, but these pressures are beyond what

can be reasonably expected for the two designs. In other words, a cycle designed around a 25 MPa high-

side pressure will likely not be constructed to withstand pressures in excess of 40 MPa. Besides the high-

pressure concerns, the results shown in Fig. 6.1 do not take into account the valid operating envelope of

the turbomachinery in the cycle. Compressor surge is not a significant concern for these operating condi-

tions; the dashed line in Fig. 6.1 for the 32°C operating temperature of the 50°C design indicates the only

conditions resulting in surge. However, another important consideration in the off-design performance of

turbomachinery is the ratio of rotor tip speed to the local speed of sound (referred to in this document as

the "tip speed ratio"). Ratios greater than one (1) will result in unstable performance due to shock forma-

tion at the tips of the rotors and should be avoided. For this analysis, the determination of the local speed

of sound is based on the outlet conditions for the radial compressors and at the inlet conditions for the ra-

dial in-flow turbine. While these conditions do not correspond exactly to the conditions at the blades of

the turbomachinery, they are a close approximation and sufficient for this analysis. The tip speed ratios

corresponding to the operating conditions shown in Fig. 6.1 are depicted in Figure 6.2.
73

32°C Compressor Inlet at Design Point 50°C Compressor Inlet at Design Point
0.9 55°C
32°C
Turbine

0.8
55°C
32°C
Ratio of Tip Speed to Local Speed of Sound

0.7

1.1
Recompressor

32°C
1.0
32°C
0.9 55°C
55°C
0.8

0.7

1.0
32°C
Compressor

40°C
45°C
0.8 50°C
55°C
32°C 55°

45
40°C 50 C
0.6

°C
°C

0.4
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.2. Ratio of turbomachinery tip speed to local speed of sound for various
off-design low-side temperatures and pressures; values greater than
one are not physically valid.

Based on the results shown in Fig. 6.2, the recompressor is responsible for limiting the valid oper-

ating envelope of the two representative designs. The reason the recompressor, which is designed using

the same non-dimensional head-flow curve as the compressor, has higher tip speed ratio values is because

it is compressing carbon dioxide away from the critical point (due to its higher inlet temperatures). Recall

that the dimensionless head coefficient of a compressor is its ratio of isentropic enthalpy rise to rotor tip

speed squared. The design-point head coefficient for the recompressor and compressor are identical, but

the required isentropic enthalpy change of the recompressor is larger than the compressor due to its higher

inlet temperature. Therefore, the recompressor requires a larger tip speed.


74

The unreasonably high pressure attained by the system and the non-valid turbomachinery operat-

ing conditions are accounted for in this analysis by setting a high-pressure limit of 30 MPa (while main-

taining the 25 MPa design-point compressor outlet pressure) and by using a two-stage recompressor. The

two-stage recompressor is modeled by applying the same dimensionless head-flow curve based on the

SNL geometry to each stage and is implemented in the file snl_compressor_tsr.f90. The two-stage re-

compressor can also be considered as two single-stage compressors in series on a common shaft, without

intercooling. Setting a high-pressure limit and modeling a two-stage recompressor results in the allow-

able power output and tip speed ratios shown in Figures 6.3 and 6.4.

32°C Compressor Inlet at Design Point 50°C Compressor Inlet at Design Point
Compressor Outlet Pressure (MPa)

40

35

30
32°C 55°C

25
32°C 55°C
20

15

20

15 40°C
Power Output (MW)

32°C
45°C
50°C
55°C
10
32°C

5
C
°C

°C

°C
40°

55
50
45

0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.3. Power output and compressor outlet pressure for various off-design
conditions. Only valid operating points are plotted.
75

32°C Compressor Inlet at Design Point 50°C Compressor Inlet at Design Point
0.9
32°C
Turbine 55°C

0.8
32°C 55°C
Ratio of Tip Speed to Local Speed of Sound

0.7

1.1
Recompressor

1.0
32°C
0.9
32°C
0.8
55°C
0.7 55°C

1.0
32°C
Compressor

40°C
45°C
0.8 50°C
55°C
55°

45
C

°C
0.6 50
32°C °C
40°C
0.4
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.4. Ratio of turbomachinery tip speed to local speed of sound for various
off-design low-side temperatures and pressures.

The predicted power output shown in Figure 6.3 is calculated with the main shaft speed and re-

compression fraction fixed at their design-point values. In order to investigate the relationship between

the optimal off-design performance of the two designs, as well as to compare the performance the recom-

pression cycle to the simple recuperated cycle, four cycle designs are considered: low-temperature recom-

pression, high-temperature recompression, low-temperature simple, and high-temperature simple. The

four designs are constrained to generate 10 MW of mechanical power output, excluding generator losses

and power associated with heat rejection and addition, at the design point with a high-side (turbine inlet)

temperature of 550°C and a high-side pressure of 25 MPa. The recompression cycles assume a total recu-

perator conductance of 3,000 kW/K between the two heat exchangers, while the simple cycles assume a

single recuperator with a conductance of 1,500 kW/K. These values are chosen to balance cycle perfor-
76

mance and heat exchanger size. For the recompression cycles, the distribution of conductance is opti-

mized at the design point. Pressure drops through the heat exchangers, including the precooler and prima-

ry heat exchanger, are assumed to be 1 percent (relative to the inlet pressure). The design-point

compressor, recompressor, and turbine isentropic efficiencies are 0.89, 0.89, and 0.93, respectively, which

are suggested by Dostal (2004) as appropriate targets for SCO2 power cycles. Note that the recompressor

isentropic efficiency is the overall efficiency, which requires a stage efficiency of approximately 0.896.

The parameters for the four designs of interest are summarized in Table 6.1, as well as the resulting de-

sign-point thermal efficiencies. The thermal efficiency of the cycle does not take into account losses as-

sociated with the electric generator or any balance of plant required power (e.g., auxiliary pumping or fan

power for heat addition or heat rejection from the cycle). The distribution of total conductance and re-

compression fraction for the recompression designs is optimized using the optimal_design subroutine dis-

cussed previously.
77

Table 6.1. Four designs of interest.

Low-Temperature Design High-Temperature Design

Simple Recompression Simple Recompression

Power Output 10 MW
Turbine Inlet Temperature 550°C
Compressor Outlet Pressure 25 MPa
Compressor Isentropic Efficiency 0.89
Turbine Isentropic Efficiency 0.93
Heat Exchanger Pressure Drops 1%
Compressor Inlet Temperature 32°C 50°C
Compressor Inlet Pressure 8 MPa 8 MPa 9 MPa 10 MPa
LT Recuperator Conductance 1.5 MW/K 1.7 MW/K 1.5 MW/K 1.5 MW/K
LT Recuperator Minimum ΔT 1.4°C 5.2°C 3.7°C 7.2°C
3 3 3
LT Recuperator Approx. Volume 60 m 81 m 38 m 37 m3
HT Recuperator Conductance - 1.3 MW/K - 1.5 MW/K
HT Recuperator Minimum ΔT - 5.0°C - 11.4°C
3
HT Recuperator Approx. Volume - 38 m - 34 m3
Compressor Rotor Diameter 0.138 m 0.118 m 0.213 m 0.183 m
RC First Stage Rotor Diameter - 0.162 m - 0.157 m
RC Second Stage Rotor Diameter - 0.138 m - 0.139 m
Turbine Rotor Diameter 0.242 m 0.205 m 0.272 m 0.251 m
2 2 2
Turbine Effective Nozzle Area 2,340 mm 2,790 mm 3,090 mm 3,500 mm2
Main Shaft Speed 31,410 rpm 36,670 rpm 26,580 rpm 27,040 rpm
Recompressor Shaft Speed - 33,250 rpm - 32,750 rpm
Recompression Fraction - 0.383 - 0.258
Turbine Mass Flow Rate 82.8 kg/s 98.5 kg/s 114.3 kg/s 134.2 kg/s
Thermal Efficiency 41.6 % 47.4 % 38.8 % 41.8 %

The compressor inlet pressure of 8 MPa for the two low-temperature designs is slightly larger

than the optimal design-point low-side pressures of 7.65 MPa for the recompression cycle and 7.54 MPa

for the simple cycle. The decrease in design-point thermal efficiency associated with increasing these

values to 8 MPa is approximately 0.5 and 0.3 percentage points for the simple and recompression cycles,

respectively, and moving slightly away from the critical pressure increases the numerical stability of the
78

model. The approximate volume of the recuperators is determined by assuming a counterflow configura-

tion with flow channels that are 5 mm wide and 2.5 mm deep, which is representative of the printed cir-

cuit heat exchangers (PCHE) being considered for use with SCO2 power cycles (Dostal, 2004). At the de-

sign point the simple cycle has a lower thermal efficiency than the recompression cycle, but this

disadvantage is balanced by the advantage of requiring one less heat exchanger and one less compressor.

Interestingly, the thermal efficiency advantage of the recompression cycle is not as significant for the

high-temperature designs. The reason for this difference is because the high-temperature designs operate

further from the critical region of CO2, decreasing the heat capacitance imbalance in the recuperators and

reducing the necessity for the recompressor. This effect is also apparent by the decreased recompression

fraction of the high-temperature recompression design compared to the low-temperature recompression

design. The selection of an optimal design and design point will ultimately depend upon application-spe-

cific economics, but it is interesting to note that the efficiency of the high-temperature simple design is

within 3 percentage points of the high-temperature recompression design and does not require a second

recuperator or compressor. The four designs described in Table 6.1 are used to explore the effects of off-

design compressor and turbine inlet temperatures in the following sections.

6.1. Varying Compressor Inlet Temperature

The effect of compressor inlet temperature on cycle performance is non-trivial. Figure 6.5 is a

plot of the predicted power output and thermal efficiency for the low-temperature and high-temperature

recompression designs as the compressor inlet pressure varies for three compressor inlet temperature cas-

es (32°C, 40°C, and 50°C). Figure 6.6 is a similar plot for the designs based on the simple cycle configu-

ration. At each point, the main shaft speed and recompression fraction are either fixed (dotted lines), var-

ied to maximize efficiency (solid lines), or varied to maximize power output of the cycle (dashed lines).
79

Low-Temperature Design High-Temperature Design


0.5
Thermal Efficiency

32°C 40°C
50°C
0.4

0.3
32°C
0.2
40°C 50°C
0.1
Comp. Outlet Pressure (MPa)

30
32°C 40°C 50°C

20

50°C
32°C 40°C
10

15 40°C
32°C
Power Output (MW)

50°C

10

32°C 40°C 50°C


0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.5. Predicted power output, high-side pressure, and thermal efficiency for
the low-temperature and high-temperature recompression designs. The
solid lines indicate operation at maximum efficiency, the dashed lines
indicate operation at maximum power output, and the dotted lines are
operation at maximum efficiency using design-point shaft speed.
80

Low-Temperature Design High-Temperature Design


0.5
Thermal Efficiency

32°C 40°C
0.4
50°C

0.3
32°C
0.2
40°C 50°C
0.1
Comp. Outlet Pressure (MPa)

30
32°C
50°C

20

32°C 50°C 40°C


40°C
10

15 40°C
32°C
Power Output (MW)

50°C
10

32°C
40°C 50°C
0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.6. Predicted power output, high-side pressure, and thermal efficiency for
the low-temperature and high-temperature simple designs. The solid
lines indicate operation at maximum efficiency, the dashed lines indi-
cate operation at maximum power output, and the dotted lines are oper-
ation at design-point shaft speed.

Figures 6.5 and 6.6 reveal a number of interesting operating characteristics of the four designs.

One important conclusion is that, for the low-temperature designs, there are power output values that can-

not be attained at higher off-design compressor inlet temperatures. For example, the maximum possible

power output of the low-temperature recompression design at 50°C is 6.5 MW. Therefore, that design is

incapable of producing the rated 10 MW of power output under those conditions. However, the high-tem-

perature designs do not show this limitation and can operate over a wider range of temperatures at the rat-

ed 10 MW power output. The reason why the high-temperature designs are not as limited is because, for

this analysis, their off-design operation occurs at temperatures below the design point. At lower tempera-
81

tures the density of carbon dioxide increases, allowing for increased mass flow rate and power production

of the cycle.

The optimal (with respect to efficiency) performance of the four designs over a range of compres-

sor inlet temperatures is predicted in Figure 6.7. Three power outputs are considered: 10 MW (the rated

power output of the cycle), 7.5 MW, and 5 MW. Results are only shown if the design is capable of

achieving the target power output. Note that these results are generated using the more conservative low-

reaction radial turbine model (as opposed to the modified, SNL radial turbine model).

Low-Temperature Design High-Temperature Design


0.50

0.45
Thermal Efficiency

10 MW
Simple Cycle

0.40
10 MW
7.5 MW
0.35 5 MW

0.30
5 MW

0.25

0.50
10 MW

0.45
Recompression Cycle
Thermal Efficiency

10 MW
0.40
7.5 MW

5 MW
0.35 7.5 MW

0.30
5 MW
0.25
35 40 45 50 55 35 40 45 50 55

Compressor Inlet Temperature (°C)

Figure 6.7. Thermal efficiency of the four designs as a function of off-design com-
pressor inlet temperature.

The low-temperature designs are limited with respect to operation at the rated power output under

off-design conditions, but the high-temperature designs due not share this limitation. The high-tempera-
82

ture simple design does show a limitation with respect to part-load operation at 5 MW under cooler off-

design temperatures, but this does not take into alternative part-load strategies (e.g., a turbine bypass

valve) that are not included in this analysis. Note that the design-point efficiencies of the low-tempera-

ture designs at 32°C are 41.6 and 47.4 percent for the simple and recompression configurations, respec-

tively, while the off-design efficiencies of the high-temperature designs operating at 32°C are 41.3 and

44.9 percent. This result is significant, as it strongly suggests that a higher temperature design is pre-

ferred over a lower temperature design, especially when considering simple cycles. A case can be made

for the low-temperature recompression design if it will never experience off-design operation, as the 2.5

percentage point increase in efficiency is significant. For power cycles expected to operate under off-de-

sign conditions, however, the results in Fig. 6.7 clearly show the advantage of designing for a higher tem-

perature and taking advantage of lower temperature off-design conditions.

The control parameters corresponding to the efficiencies plotted in Fig. 6.7 are shown in Figure

6.8 for the recompression cycle configurations and Figure 6.9 for the simple cycle configurations. The

optimal control variables are not always represented as smooth curves due to the numerical noise associ-

ated with the optimization algorithms and tolerances chosen for this analysis.
83

Low-Temperature Design High-Temperature Design


14
Compressor Inlet
Pressure (MPa) 7.5 MW 5 MW
12 10 MW
10 MW

10
5 MW

6
Recompression Fracion

0.5 5 MW

0.4 7.5 MW
10 MW
0.3 10 MW

5 MW
0.2

40
Recompressor

35 10 MW
7.5 MW 5 MW 10 MW
30
Shaft Speed (krpm)

25
5 MW

40 10 MW
7.5 MW
5 MW
Compressor

30 10 MW

5 MW
20

35 40 45 50 55 35 40 45 50 55

Compressor Inlet Temperature (°C)

Figure 6.8. Control parameters associated with optimal performance under off-design
compressor inlet temperature for the two recompression cycle designs.
84

Low-Temperature Design High-Temperature Design


15
7.5 MW 5 MW
Compressor Inlet
Pressure (MPa)

10 MW
10 MW
10
5 MW

10 MW 7.5 MW
Shaft Speed (krpm)

35
5 MW
Compressor

30
10 MW

25
5 MW

35 40 45 50 55 35 40 45 50 55

Compressor Inlet Temperature (°C)

Figure 6.9. Control parameters associated with optimal performance under off-de-
sign compressor inlet temperature for the two simple cycle designs.

Figures 6.8 and 6.9 highlight the importance of inventory control while operating under off-de-

sign compressor inlet temperatures in order to maintain a target power output while operating at the high-

est thermal efficiency. The optimal performance of the cycles under off-design conditions results from a

balance of the optimal pressure ratio of the cycle (from a thermodynamic sense) and the off-design effi-

ciencies of the turbomachinery. The head coefficient (") of the compressors and the ratio of tip speed to

spouting velocity (%) for the turbine that corresponds to the efficiencies plotted in Fig. 6.7 are shown in

Figure 6.10 for the recompression designs and Figure 6.11 for the simple designs. The compressor flow

coefficients do not deviate significantly from the design-point value of 0.0297. However, note that the

turbine % values do deviate from the design-point value of 0.707 and values near 0.9 are possible. At

these higher values the conservative efficiency curve of the low-reaction radial turbine model has a signif-

icant effect on the predicted performance of the cycles. The performance of similar cycles modeled with

the higher-performance SNL radial turbine model is explored in Section 6.3.


85

Low-Temperature Design High-Temperature Design


0.9
7.5 MW 5 MW
10 MW

Turbine "
0.8

5 MW
0.7
10 MW

0.05
Recompressor !

0.04
7.5 MW 10 MW
10 MW 5 MW
0.03
5 MW

0.02

0.05
Compressor !

0.04

5 MW 5 MW
0.03 10 MW
10 MW

0.02
35 40 45 50 55 30 40 50 60

Compressor Inlet Temperature (°C)

Figure 6.10. Head coefficient for the compressor and recompressor and turbine
spouting velocity ratio under off-design conditions for the recompres-
sion designs.

Low-Temperature Design High-Temperature Design


1.0

7.5 MW 5 MW
10 MW
Turbine "

0.8 5 MW
7.5 MW

10 MW
0.6

0.05
Compressor !

0.04
5 MW 5 MW
7.5 MW
0.03 10 MW
10 MW

0.02
35 40 45 50 55 35 40 45 50 55

Compressor Inlet Temperature (°C)

Figure 6.11. Head coefficient for the compressor and turbine spouting velocity ratio
under off-design conditions for the simple designs.
86

6.2. Varying Turbine Inlet Temperature

Compared to operation under off-design compressor inlet temperatures, the effect of off-design

turbine inlet temperature is relatively uneventful. Figure 6.13 is a plot of the predicted power output and

thermal efficiency for the recompression designs as the compressor inlet pressure varies for three turbine

inlet temperature. Figure 6.13 is a similar plot for the designs based on the simple cycle configuration.

Low-Temperature Design High-Temperature Design


0.6
Thermal Efficiency

600°C
550°C 550°C
0.4 600°C
500°C

500°C
0.2
Comp. Outlet Pressure (MPa)

30
600°C

C

500°C

60
500°C

20

10
Power Output (MW)

15 600°C

600°C 550°C
500°C
10 550°C
500°C

0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.12. Predicted power output, high-side pressure, and thermal efficiency for
the low-temperature and high-temperature recompression designs. The
solid lines indicate operation at maximum efficiency, the dashed lines
indicate operation at maximum power output, and the dotted lines are
operation at maximum efficiency using design-point shaft speed.
87

Low-Temperature Design High-Temperature Design


0.6
Thermal Efficiency

600°C
550°C
0.4 600°C 550°C
500°C

500°C
0.2
Comp. Outlet Pressure (MPa)

30 600°C
500°C

20

10
Power Output (MW)

15 600°C
550°C
600°C 500°C
10 550°C
500°C

0
6 8 10 12 14 6 8 10 12 14

Compressor Inlet Pressure (MPa)

Figure 6.13. Predicted power output, high-side pressure, and thermal efficiency for
the low-temperature and high-temperature simple designs. The solid
lines indicate operation at maximum efficiency, the dashed lines indi-
cate operation at maximum power output, and the dotted lines are oper-
ation at design-point shaft speed.

Increasing turbine inlet temperature increases the power output and thermal efficiency of the cy-

cle, but the overall impact on cycle operation is minimal. Note that changes to the off-design turbine inlet

temperature do not result in unobtainable power outputs, as is the case for changes to the off-design com-

pressor inlet temperature. This result is also apparent in Figure 6.14, which is the maximum thermal effi-

ciency of the four designs over a range of off-design turbine inlet temperatures.
88

Low-Temperature Design High-Temperature Design

0.50
Thermal Efficiency 10 MW 10 MW

0.45 7.5 MW 7.5 MW


Simple Cycle

5 MW 5 MW
0.40

0.35

0.30

10 MW
7.5 MW
0.50
5 MW 10 MW
Recompression Cycle
Thermal Efficiency

0.45 7.5 MW
5 MW
0.40

0.35

0.30

500 550 600 650 700 500 550 600 650 700

Turbine Inlet Temperature (°C)

Figure 6.14. Thermal efficiency of the four designs as a function of off-design tur-
bine inlet temperature.

6.3. Cycle Performance with Alternative Turbine Model

The alternative turbine model that is based on the SNL radial turbine efficiency curve and imple-

mented in the file snl_radial_turbine.f90 is used to explore the off-design performance of three recom-

pression cycle designs. The three designs correspond to the single-shaft recompression configuration

shown in Fig. 3.15(a) and are characterized by their compressor inlet temperatures of 32°C, 40°C, and

50°C, respectively. Similar to the cycles discussed in Section 6.1, each design is sized to generate 10 MW

of mechanical power output at the design point, excluding generator losses and power associated with

heat rejection and addition, with a high-side (turbine inlet) temperature of 550°C and a high-side pressure

of 25 MPa. The total recuperator conductance at the design point is 3,000 kW/K. Pressure drops through

the heat exchangers, including the precooler and primary heat exchanger, are again assumed to be 1 per-
89

cent. The design-point compressor, recompressor, and turbine isentropic efficiencies are 0.89, 0.89, and

0.93, respectively. The parameters for the three designs are summarized in Table 6.2, as well as the

resulting design-point thermal efficiencies. The thermal efficiency of the cycle does not take into account

losses associated with the electric generator or any balance of plant required power (e.g., auxiliary pump-

ing or fan power for heat addition or heat rejection from the cycle). The compressor inlet pressure, distri-

bution of total conductance, and recompression fraction is optimized using the optimal_design subroutine

contained in the design_point module. The approximate volume of the recuperators is again determined

by assuming a counter-flow configuration with flow channels that are 5 mm wide and 2.5 mm deep.

Table 6.2. Three designs of interest, characterized by their compressor inlet temperatures.
Power Output 10 MW
Turbine Inlet Temperature 550°C
Compressor Outlet Pressure 25 MPa
Compressor Isentropic Efficiency 0.89
Turbine Isentropic Efficiency 0.93
Heat Exchanger Pressure Drops 1%
Compressor Inlet Temperature 32°C 40°C 50°C
Compressor Inlet Pressure 7.7 MPa 9 MPa 10 MPa
LT Recuperator Conductance 1.74 MW/K 1.59 MW/K 1.52 MW/K
LT Recuperator Minimum ΔT 5.3°C 7.2°C 7.2°C
3 3
LT Recuperator Approx. Volume 80 m 50 m 40 m3
HT Recuperator Conductance 1.26 MW/K 1.41 MW/K 1.48 MW/K
HT Recuperator Minimum ΔT 5.1°C 7.7°C 11.4°C
3 3
HT Recuperator Approx. Volume 40 m 35 m 35 m3
Compressor Rotor Diameter 0.120 m 0.148 m 0.183 m
RC First Stage Rotor Diameter 0.162 m 0.162 m 0.157 m
RC Second Stage Rotor Diameter 0.137 m 0.141 m 0.139 m
Turbine Rotor Diameter 0.218 m 0.241 m 0.265 m
2 2
Turbine Effective Nozzle Area 1,140 mm 1,450 mm 1,790 mm2
Main Shaft Speed 37,080 rpm 31,410 rpm 27,030 rpm
Recompressor Shaft Speed 34,620 rpm 32,570 rpm 32,790 rpm
Recompression Fraction 0.3752 0.3266 0.2578
Turbine Mass Flow Rate 96.8 kg/s 114.5 kg/s 134.2 kg/s
Thermal Efficiency 47.7 % 45.0 % 41.8 %
90

The primary difference between the three designs is the size of the turbomachinery, specifically

the main compressor and turbine; designing for warmer compressor inlet temperatures results in slightly

larger turbomachinery operating at lower shaft speeds. The recompressor design does not follow this

trend as its size is driven by the optimal recompression fraction, which decreases as the low-side tempera-

ture increases. The warmer designs require less recompression because the properties of carbon dioxide

do not vary as rapidly at conditions away from the critical point, decreasing the amount of flow that must

be diverted in order to balance the hot and cold stream capacitance rates of the recuperator. Note that the

effective nozzle areas for these designs are significantly smaller than the effective nozzle areas reported in

Table 6.1 for similar designs. The reason for this difference is the alternative turbine model, which uses

the density at the turbine inlet, rather than outlet, when sizing the turbine. The inlet density is larger,

therefore the required effective nozzle area is smaller for a comparable mass flow rate.

The off-design thermal efficiency at the rated power output is plotted in Figure 6.15 for the three

designs, and the corresponding control parameters are plotted in Figure 6.16. Note that the efficiency

degradation associated with the low-temperature (32°C) design operating at warmer low-side tempera-

tures is not as severe as predicted in the analysis presented in Section 6.1. These results are consistent

with the differences between the two turbine models; namely, the higher efficiency of the SNL turbine

model at larger % values.


91

0.50

Off-Design Thermal Efficiency


0.48
32°C Design

0.46

0.44

40°C Design
0.42

50°C Design
0.40

30 35 40 45 50 55 60
Compressor Inlet Temperature (°C)

Figure 6.15. Thermal efficiency of the three designs at the rated 10 MW power output as a function
of off-design compressor inlet temperature. The design points are indicated with a cir-
cle and only achievable values (with a high-pressure limit of 30 MPa) are plotted.
45
Main Shaft Speed (krpm)

32°C Design
40

35
40°C Design

30
50°C Design

25

45
Shaft Speed (krpm)
Recompressor

40

35
50°C Design
30 40°C Design

25
Recompression Fraction

32°C Design
0.35

40°C Design
0.30

50°C Design
0.25

High-Pressure Limit
30
32°C Design 40°C Design 50°C Design
High-Side

25
Pressure (MPa)

20

40°C Design 50°C Design


12
Low-Side

32°C Design
10
8

30 35 40 45 50 55 60
Compressor Inlet Temperature (°C)

Figure 6.16. Control parameters associated with the efficiencies predicted in Fig. 6.15.
92

Three shaft configurations are considered for the 32°C design and 50°C design described in Table

6.2. In the “Normal” configuration, a single shaft connects the main compressor and turbine and shaft

speed is allowed to vary. The “Fixed-Shaft” configuration is identical to the “Normal” configuration,

with the exception that the shaft speed is fixed at its design-point value. In the “Split-Shaft” design, the

main compressor and turbine use separate shafts, with the compressor shaft speed allowed to vary and the

turbine shaft speed fixed at 3,600 rpm to facilitate the use of a grid-tied, synchronous generator. Note that

this configuration does change the geometry of the turbine, while the “Normal” and “Fixed-Shaft” turbine

geometries for the two designs remain as listed in Table 6.2. For the “Split-Shaft” configuration, the tur-

bine rotor diameter is 2.25 m for the 32°C design and 2.0 m for the 50°C design. An independent motor

with variable speed control drives the recompressor for all three configurations.

The predicted off-design thermal efficiencies at the rated 10 MW power output for the six designs

are shown in Figure 6.17. The more complicated “Split-Shaft” configuration performs better under off-

design conditions, but for the 50°C design its advantage is minimal. However, these results do not take

into account the additional losses associated with the efficiency of the motor used to drive the main com-

pressor. The efficiencies plotted in Fig. 6.17 also do not consider the advantages associated with using a

fixed-speed synchronous generator compared to the power electronics that are necessary to condition the

power generated using a variable shaft speed in the “Normal” configuration. The operating envelope of

the “Fixed-Shaft” configuration for the 32°C design is reduced because that configuration has one less

control parameter than the other configurations. The performance of the “Fixed-Shaft” configuration for

the 50°C design is not noticeably different than the “Normal” configuration. This result is expected based

on the relatively constant optimal off-design shaft speed for that design shown in Fig. 6.16. The thermal

efficiency from 10% to 100% of rated power output for the six designs is shown in Figure 6.18, with the

compressor and turbine inlet temperatures held constant at their design-point values. Interestingly, the

part-load thermal efficiency of the “Normal” configuration is consistently higher than the “Split-Shaft”

configuration.
93

0.50
Normal
Split-Shaft
Fixed-Shaft

Off-Design Thermal Efficiency


0.48
32°C Design

0.46

0.44

0.42
50°C Design

0.40

30 35 40 45 50 55 60
Compressor Inlet Temperature (°C)

Figure 6.17. Off-design thermal efficiency of the three shaft configurations for the
32°C and 50°C designs at the rated 10 MW power output. The design
points are indicated with a circle and only achievable values (with a
high-pressure limit of 30 MPa) are plotted.

0.50
32°C Design
Part-Load Thermal Efficiency

0.45

50°C Design

0.40

0.35
Normal
Split-Shaft
Fixed-Shaft
0.30
0 2 4 6 8 10
Power Output (MW)

Figure 6.18. Part-load thermal efficiency of the three shaft configurations for the
32°C and 50°C designs.
94

6.4. Convergence Verification

The data presented in this chapter were generated using convergence tolerance of 10-5, 10 sub-

heat exchangers per recuperator for the recompression designs, and 20 sub-heat exchangers for the recu-

perator in each of the simple designs. More sub-heat exchangers are required for the simple design be-

cause the temperature range is not split between two heat exchangers, as it is for the recompression de-

signs. Due to its proximity to the critical point, the low-temperature simple design requires the most sub-

divisions to accurately capture the changing properties of carbon dioxide. This requirement is shown in

Figure 6.19, which is a plot of the convergence of thermal efficiency for various representative calls to the

optimal_off_design subroutine. Of the four designs of interest discussed in Sections 6.1 and 6.2, the low-

temperature simple design (shown in blue) requires the highest number of sub-heat exchangers to show

convergence. Despite requiring more sub-heat exchangers, the designs based on the simple cycle config-

uration are computationally much faster than the recompression designs, as shown in Figure 6.20.

2.0
Low-Temperature Simple
Low-Temperature Recompression
1.5
High-Temperature Simple
High-Temperature Recompression
1.0
Relative Error (%)

0.5

−0.5

−1.0

−1.5

−2.0
−2 −4 −6 −8
0 10 20 30 10 10 10 10
Number of Sub-Heat Exchangers Convergence Tolerance

Figure 6.19. Convergence of the optimal_off_design subroutine.


95

Calculation Time (s)


−1
10

−2
10

Low-Temperature Simple
−3 Low-Temperature Recompression
10 High-Temperature Simple
High-Temperature Recompression

0 10 20 30
Number of Sub-Heat Exchangers

Figure 6.20. Model runtime for the four designs, using the optimal_off_design sub-
routine with compressor inlet pressure specified for a number of repre-
sentative conditions.

For calls to the optimal_off_design with the low-side pressure specified, the simple designs are

an order of magnitude faster because the only free parameter is shaft speed, while the recompression de-

signs are optimizing on shaft speed and recompression fraction. The plotted data were generated on a 2.6

GHz Intel Core i7 using the gfortran (version 4.9) compiler, and the variations in the calculation time are

due to numerical noise and slightly different starting positions while optimizing thermal efficiency with

the subplex library.


96

7. Conclusions
Supercritical carbon dioxide (SCO2) power cycles show promise for utility scale electricity

production and are generating interest in various industries, including nuclear and concentrating solar

power (CSP). SCO2 power cycles present a number of interesting opportunities for study over a range of

disciplines such as turbomachinery design, SCO2 fluid flow and heat transfer, and corrosion resistance, as

well as system-level questions such as the impact of dry cooling and potential control strategies. As such,

there is need for high-level analysis of the design-point thermodynamic potential and off-design operating

characteristics of these systems in order to provide insight on the most beneficial directions for these in-

vestigations. Furthermore, the study of specific SCO2 applications (e.g., a dry-cooled CSP plant with

thermal storage in a particular location) will require detailed models that take into account the specific de-

sign under consideration. These detailed models will require a core cycle modeling framework that is

computationally efficient and flexible enough to accommodate various design parameters or specific

components.

The modeling framework developed for this work effort is intended to satisfy both of these needs.

Namely, the developed models are able to provide high-level observations into the design-point and off-

design performance of the simple and recompression SCO2 cycle configurations and are designed with

computational efficiency and flexibility in mind. The modeling framework and examples of its usage are

freely available online3 and are intended as building blocks to enable future investigations.

7.1. Design-Point Considerations

The design-point performance of a SCO2 recompression cycle depends on a number of factors, in-

cluding its pressure ratio, the proximity of the compressor inlet conditions to the pseudocritical region of

3. http://sel.me.wisc.edu/software.shtml
97

carbon dioxide, and the trade-off between recompressor work and a more balanced low-temperature recu-

perator. The analyses discussed in Chapter 5 show that there is no "best" design. Rather, the optimal bal-

ance of these factors depends on a number of design decisions, and ultimately the relative merit of various

designs and design points will depend on the intended application and component costs. One interesting

conclusion from the results presented in Chapter 5 is that increasing the design high-side pressure does

not always correspond to higher overall cycle thermal efficiency. Rather, there is an optimal compressor

outlet pressure that is dependent on the operating temperatures of the cycle and is typically in the range of

30 to 35 MPa when the recuperators reach a minimum threshold size.

Results also indicate that the recompression cycle is not inherently more efficient than the simple

recuperated cycle. For cycles with smaller recuperators, the penalty associated with the imbalance in the

heat exchanger does not justify the additional work required by the recompressing compressor. In gener-

al, operating at warmer heat rejection temperatures requires increased compressor inlet pressures to maxi-

mize cycle efficiency. Warmer heat rejection temperatures also reduce the required recompression frac-

tion of the cycle because it is operating further from the critical temperature of carbon dioxide, resulting

in a more naturally-balanced heat transfer process recuperation.

7.2. Off-Design Considerations

The off-design performance characteristics of the designs considered suggest that, for applica-

tions where off-design operation is a possibility, it may be better to design for warmer compressor inlet

temperatures. Designing for colder compressor inlet temperatures will result in higher design-point effi-

ciencies, but operating these designs under warmer off-design conditions results in limited power output

and a reduced operating envelope. The degradation in off-design thermal efficiency as the compressor in-

let temperature increases is largely driven by the increase in the turbine's ratio of tip speed to spouting ve-

locity, which reduces turbine efficiency. For a low-reaction radial turbine, the off-design efficiency of the

turbine decreases significantly as this ratio approaches unity. For a turbine with a non-negligible reaction

ratio, such as the turbine being investigated at SNL, the off-design efficiency of the turbine does not in-
98

crease as significantly at larger ratios of tip speed to spouting velocity. The observation that low-tempera-

ture designs have a more limited off-design operating envelope is significant, as it suggests that investiga-

tions into maximizing the design-point efficiency of SCO2 power cycles under conditions very near the

critical point of carbon dioxide are mainly advantageous to power plants designed to rarely operate under

off-design low-side temperatures. However, SCO2 power plants expected to operate over a large range of

low-side temperatures, as is likely for dry-cooled designs, may benefit from a warmer design point. The

optimal design point is application specific, and the core cycle models developed here are intended to be

used for these types of investigations.

The off-design analyses presented in Chapter 6 suggest that inventory control is very beneficial

for maximizing off-design thermal efficiency at constant power output. In general, increasing the off-de-

sign compressor inlet temperature requires an increase in the low-side pressure of the cycle, though the

high-pressure limit of the equipment must be considered. The off-design operation of the simple and re-

compression cycles are similar, and both designs have limited operational range when designed near the

critical point. Away from the critical point, the efficiency advantage of the recompression cycle is less

substantial; whether the additional heat exchanger and compressor required by that configuration are jus-

tified will depend on the specific application being considered.

7.3. Recommendations for Further Study

The developed modeling framework enables a number of interesting studies. For example, the

ability of the cycle to take advantage of off-design compressor inlet conditions below the critical tempera-

ture is not clear. The results in Chapter 6 suggest that decreasing the low-side temperature will require a

corresponding decrease in low-side pressure, but temperatures and pressures below the critical point could

result in two-phase conditions. One possibility to prevent two-phase conditions from occurring (assum-

ing the system is not designed to handle trans-critical operation) is to limit the low-side pressure to values

above the critical pressure, but this may result in the cycle's turbomachinery operating outside its valid

range. Another option is to introduce additional bypass controls into the cycle in order to prevent the out-
99

put of the cycle from exceeding its rated power, though the effect of such a bypass on the overall efficien-

cy of the cycle must be considered.

Using a two-stage recompressor expanded the operational envelopes of the considered designs. It

is not clear if using a three-stage recompressor or a two-stage main compressor would further expand the

range of possible operating conditions for the cycles. The effect on the off-design operating characteris-

tics of switching to an axial turbine is also of interest. The flexible module-based nature of the code facil-

itates these types of analyses. For example, any model of an axial turbine that satisfies the interface re-

quirements defined in Chapters 3 and 4 can be linked to the cycle models at compile time, and the

parametric studies presented in Chapter 6 can easily be repeated with little to no code modification re-

quired. This capability allows various types and designs of turbomachinery to be considered with mini-

mal effort.

The models can be used to investigate seasonal or annual performance of a specific power plant;

these types of analyses will provide insight into the long-term optimal design-point of a system. The an-

nual performance of a system will need to take into account additional losses such as the power require-

ments of the heat rejection system. An advantage of the core cycle models is that they do not assume any

specific type of heat rejection system. This approach allows the models to be coupled to any system by

using the required heat rate in the precooler that is predicted by the cycle model as an input into a model

of the heat rejection system. Likewise, the required rate of heat into the cycle at the primary heat ex-

changer can be used to couple the cycle to any applicable heat source. For example, modeling a CSP

plant without storage capabilities requires the rate of heat input to the cycle to be specified based on the

available solar irradiance. More complicated interactions (e.g., if the CO2 temperature entering the pre-

cooler affects the amount of heat it can reject) may require iteration between the models, but the computa-

tional efficiency of the core cycle models enables this approach. In general, the modeling framework and

core cycle models presented in this dissertation are intended as tools to be used for more specific simula-

tions involving SCO2 power cycles.


100

References
Angelino, G., “Carbon dioxide condensation cycles for power production,” Journal of Engineering for
Power, Vol. 90, pp. 287, (1968).
Angelino, G., “Real Gas Effects In Carbon Dioxide Cycles”, ASME Paper 69-GT-103, (1969).
Brainerd, W. S., Guide to Fortran 2003 Programming, Springer, (2009).
Brent, R. P., Algorithms for Minimization without Derivatives, Courier Dover Publications, (1973).
Browne, S., Dongarra, J., Grosse, E., & Rowan, T., “The Netlib mathematical software repository,” D-Lib
Magazine, access online: http://www.netlib.org, (1995).
Bryant, J. C., Saari, H., & Zanganeh, K., “An Analysis and Comparison of the Simple and Recompression
Supercritical CO2 Cycles”, Proceedings from the Supercritical CO2 Power Cycle Symposium,
Boulder, CO, (2011).
Carstens, N. A., Control Strategies for Supercritical Carbon Dioxide Power Conversion Systems, Ph.D.
Thesis, Massachusetts Institute of Technology, Cambridge, MA, (2007).
Carter, N. T., & Campbell, R. J., “Water Issues of Concentrating Solar Power (CSP) Electricity in the U.S.
Southwest”, CRS Report for Congress, No. 7-5700, (2009).
Chacartegui, R., Muñoz de Escalona, J. M., Sánchez, D., Monje, B., & Sánchez, T., “Alternative cycles
based on carbon dioxide for central receiver solar power plants,” Applied Thermal Engineering,
Vol. 31, No. 5, pp. 872-879, (2011).
Chapra, S., & Canale, R., Numerical Methods for Engineers, Sixth Edition, 6th ed., McGraw-Hill Science/
Engineering/Math, (2009).
Chen, H., & Baines, N. C., “The aerodynamic loading of radial and mixed-flow turbines,” International
Journal of Mechanical Sciences, Vol. 36, No. 1, pp. 63-79, (1994).
Conboy, T., Wright, S., Pasch, J., Fleming, D., Rochau, G., & Fuller, R., “Performance Characteristics of
an Operating Supercritical CO2 Brayton Cycle,” J. Eng. Gas Turb. Power, Vol. 134, No. 11, pp.
111703, (2012).
DOE (U.S. Department of Energy), “Energy Demands on Water Resources”, Report to Congress, (2006).
Dostal, V., Hejzlar, P., & Driscoll, M. J., “High-performance supercritical carbon dioxide cycle for next-
generation nuclear reactors,” Nucl. Technol., Vol. 154, No. 3, pp. 265-282, (2006).
Dostal, V., A Supercritical Carbon Dioxide Cycle for Next Generation Nuclear Reactors, Ph.D. Thesis,
Massachusetts Institute of Technology, Cambridge, MA, (2004).
F-Chart Software, Engineering Equation Solver (EES), access online: http://www.fchart.com/ees, (2013).
Feher, E. G., “The Supercritical Thermodynamic Power Cycle”, Proceedings from Intersociety Energy
Conversion Engineering Conference, (1967).
Fox, R. W., Pritchard, P. J., & McDonald, A. T., Introduction to Fluid Mechanics, 7th ed., Wiley, (2008).
101

Gibbs, J. P., Hejzlar, P., & Driscoll, M. J., “Applicability of Supercritical CO2 Power Conversion Systems
to GEN IV Reactors”, MIT, Topical Report No. MIT-GFR-037, (2006).
Hexemer, M. J., & Rahner, K., “Supercritical CO2 Brayton Cycle Integrated System Test (IST) TRACE
Model and Control System Design”, Proceedings from the Supercritical CO2 Power Cycle Sym-
posium, Boulder, CO, (2011).
Ishiyama, S., Muto, Y., Kato, Y., Nishio, S., Hayashi, T., & Nomoto, Y., “Study of steam, helium and su-
percritical CO2 turbine power generations in prototype fusion power reactor,” Progress in Nuclear
Energy, Vol. 50, No. 2-6, pp. 325-332, (2008).
Japikse, D., & Baines, N. C., Introduction to Turbomachinery, Concepts ETI, (1997).
Kenny, J. F., Barber, N. L., Hutson, S. S., Linsey, K. S., Lovelace, J. K., & Maupin, M. A., “Estimated
Use of Water in the United States in 2005”, U.S. Geological Survey Circular 1344, (2009).
Legault, D. M., Development and Application of a Steady State Code for Supercritical Carbon Dioxide
Cycles, BS Thesis, Massachusetts Institute of Technology, Cambridge, MA, (2006).
Lemmon, E. W., Huber, M. L., & McLinden, M. O., NIST Standard Reference Database 23: Reference
Fluid Thermodynamic and Transport Properties-REFPROP, http://www.nist.gov/srd/nist23.cfm,
(2013).
Ludington, A. R., Tools for Supercritical Carbon Dioxide Cycle Analysis and the Cycle’s Applicability to
Sodium Fast Reactors, MS Thesis, Massachusetts Institute of Technology, Cambridge, MA,
(2009).
Moisseytsev, A., & Sienicki, J. J., “Investigation of alternative layouts for the supercritical carbon dioxide
Brayton cycle for a sodium-cooled fast reactor,” Nuclear Engineering and Design, Vol. 239, No.
7, pp. 1362-1371, (2009).
Moisseytsev, A., & Sienicki, J. J., “Validation of the ANL Plant Dynamics Code Compressor Model with
SNL/BNI Compressor Test Data”, Proceedings from Supercritical CO2 Power Cycle Symposium,
Boulder, CO, (2011).
Neises, T., & Turchi, C., “A comparison of supercritical carbon dioxide power cycle configurations with
an emphasis on CSP applications”, Proceedings from SolarPACES 2013, Las Vegas, NV, (2013).
Nellis, G., & Klein, S., Heat Transfer, Cambridge University Press, (2012).
Noall, J., & Forsha, M., “Off-Design Turbomachinery Performance Mapping”, Report Prepared by Bar-
ber-Nichols, (2008).
Northland Numerics, access online: http://www.northlandnumerics.com, (2014).
Patnode, A. M., Simulation and Performance Evaluation of Parabolic Trough Solar Power Plants, MS
Thesis, University of Wisconsin-Madison, Madison, WI, (2006).
Peng, W. W., Fundamentals of Turbomachinery, 1st ed., Hoboken, NJ, John Wiley & Sons, (2008).
Rowan, T., Functional Stability Analysis of Numerical Algorithms, Ph.D. Thesis, University of Texas at
Austin, Austin, TX, (1990).
102

Sarkar, J., & Bhattacharyya, S., “Optimization of recompression S-CO2 power cycle with reheating,” En-
ergy Conversion and Management, Vol. 50, No. 8, pp. 1939-1945, (2009).
Sarkar, J., “Second law analysis of supercritical CO2 recompression Brayton cycle,” Energy, Vol. 34, No.
9, pp. 1172-1178, (2009).
Span, R., & Wagner, W., “A New Equation of State for Carbon Dioxide Covering the Fluid Region from
the Triple-Point Temperature to 1100 K at Pressures up to 800 MPa,” J. Phys. Chem. Ref. Data,
Vol. 25, No. 6, pp. 1509, (1996).
Utamura, M., “Thermodynamic Analysis of Part-Flow Cycle Supercritical CO2 Gas Turbines,” J. Eng.
Gas Turb. Power, Vol. 132, No. 11, pp. 111701, (2010).
Wright, S. A., Conboy, T. M., Parma, E. J., Lewis, T. G., Rochau, G. A., & Suo-Anttila, A. J., “Summary
of the Sandia Supercritical CO2 Development Program”, Proceedings from the Supercritical CO2
Power Cycle Symposium, Boulder, CO, (2011).
Wright, S. A., Radel, R. F., Vernon, M. E., Rochau, G. E., & Pickard, P. S., “Operation and Analysis of a
Supercritical CO2 Brayton Cycle”, Sandia Report SAND2010-0171, (2010).
103

Appendix I: core Module


core.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'core',9which9holds9a9number9of9userLdefined9types,9functions,9and9subroutines9required9by9the
!9other9SCO29Brayton9cycle9modeling9modules.99This9module9also9exposes9the9integer9parameter9'dp',9which9should9be9used9when
!9declaring9or9setting9double9precision9values9(e.g.,9real(dp)9::9value9=942.0_dp).
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9August915,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9core

implicit9none
integer,9parameter9::9dp9=9selected_real_kind(15)99!9corresponds9to9double9precision

type9Compressor
9999real(dp)9::9D_rotor9=90.0_dp999999!9rotor9diameter9(m)
9999real(dp)9::9D_rotor_29=90.0_dp9999!9secondary9rotor9diameter9(m)9[used9for9twoLstage9recompressor,9if9necessary]
9999real(dp)9::9N_design9=90.0_dp99999!9designLpoint9shaft9speed9(rpm)
9999real(dp)9::9eta_design9=90.0_dp999!9designLpoint9isentropic9efficiency9(L)9[or9stage9efficiency9in9twoLstage9recompressor]
9999real(dp)9::9phi_design9=90.0_dp999!9designLpoint9flow9coefficient9(L)
9999real(dp)9::9phi_min9=90.0_dp999999!9surge9limit9(L)
9999real(dp)9::9phi_max9=90.0_dp999999!9choke9limit9/9zero9pressure9rise9limit9/9xLintercept9(L)
9999real(dp)9::9N9=90.0_dp999999999999!9shaft9speed9(rpm)
9999real(dp)9::9eta9=90.0_dp9999999999!9isentropic9efficiency9(L)
9999real(dp)9::9phi9=90.0_dp9999999999!9dimensionless9flow9coefficient9(L)
9999real(dp)9::9phi_29=90.0_dp99999999!9secondary9dimensionless9flow9coefficient9(L)9[used9for9second9stage9phi,9if9necessary]
9999real(dp)9::9w_tip_ratio9=90.0_dp99!9ratio9of9the9local9(comp9outlet)9speed9of9sound9to9the9tip9speed9(L)
9999logical99::9surge9=9.false.9999999!9true9if9the9compressor9is9in9the9surge9region
end9type9Compressor

type9Turbine
9999real(dp)9::9D_rotor9=90.0_dp999999!9rotor9diameter9(m)
9999real(dp)9::9A_nozzle9=90.0_dp99999!9effective9nozzle9area9(m2)
9999real(dp)9::9N_design9=90.0_dp99999!9designLpoint9shaft9speed9(rpm)
9999real(dp)9::9eta_design9=90.0_dp999!9designLpoint9isentropic9efficiency9(L)
9999real(dp)9::9N9=90.0_dp999999999999!9shaft9speed9(rpm)
9999real(dp)9::9eta9=90.0_dp9999999999!9isentropic9efficiency9(L)
9999real(dp)9::9nu9=90.0_dp99999999999!9ratio9of9tip9speed9to9spouting9velocity9(L)
9999real(dp)9::9w_tip_ratio9=90.0_dp99!9ratio9of9the9local9(turbine9inlet)9speed9of9sound9to9the9tip9speed9(L)
end9type9Turbine

type9HeatExchanger
9999!9Under9design9conditions,9streams9are9defined9as9cold9(1)9and9hot9(2).
9999real(dp)9::9UA_design9=90.0_dp9999999999999999999!9designLpoint9conductance9(kW/K)
9999real(dp),9dimension(2)9::9DP_design9=90.0_dp99999!9designLpoint9pressure9drops9across9the9heat9exchanger9(kPa)
9999real(dp),9dimension(2)9::9m_dot_design9=90.0_dp99!9designLpoint9mass9flow9rates9of9the9two9streams9(kg/s)
9999real(dp)9::9Q_dot9=90.0_dp99999999999999999999999!9heat9transfer9rate9(kW)
9999real(dp)9::9UA9=90.0_dp99999999999999999999999999!9conductance9(kW/K)
9999real(dp)9::9min_DT9=90.0_dp9999999999999999999999!9minimum9temperature9difference9in9hxr9(K)
9999real(dp)9::9eff9=90.0_dp9999999999999999999999999!9heat9exchanger9effectiveness9(L)
9999real(dp)9::9C_dot_cold9=90.0_dp999999999999999999!9cold9stream9capacitance9rate9(kW/K)
9999real(dp)9::9C_dot_hot9=90.0_dp9999999999999999999!9hot9stream9capacitance9rate9(kW/K)
9999integer99::9N_sub9=919999999999999999999999999999!9number9of9subLheat9exchangers9used9in9model
end9type9HeatExchanger

type9RecompCycle
9999real(dp)9::9W_dot_net999999999999999999999999999999999999!9net9power9output9of9the9cycle9(kW)
9999real(dp)9::9eta_thermal9999999999999999999999999999999999!9thermal9efficiency9of9the9cycle9(L)
9999real(dp)9::9recomp_frac9999999999999999999999999999999999!9amount9of9flow9that9bypasses9the9precooler9and9is9compressed9in9...
9999real(dp)9::9m_dot_turbine99999999999999999999999999999999!9mass9flow9rate9through9the9turbine9(kg/s)
9999real(dp)9::9high_pressure_limit99999999999999999999999999!9maximum9allowable9highLside9pressure9(kPa)
9999real(dp)9::9conv_tol9999999999999999999999999999999999999!9relative9convergence9tolerance9used9during9iteration9loops9involving9...
9999type(Turbine)9::9t999999999999999999999999999999999999999!9turbine9userLdefined9type
9999type(Compressor)9::9mc,9rc9999999999999999999999999999999!9compressor9and9recompressor9userLdefined9types
9999type(HeatExchanger)9::9LT,9HT,9PHX,9PC9999999999999999999!9heat9exchanger9userLdefined9types
9999real(dp),9dimension(10)9::9temp,9pres,9enth,9entr,9dens99!9thermodynamic9properties9at9the9state9points9of9the9cycle9(K,9kPa,9...
end9type9RecompCycle
104

type9ErrorTrace
9999integer9::9code9=9099999999999999999!9the9generated9error9code
9999integer,9dimension(4)9::9lines9=9099!9the9lines9of9the9calls9that9generated9the9error
9999integer,9dimension(4)9::9files9=9099!9the9files9of9the9calls9that9generated9the9error,9using:
end9type9ErrorTrace999999999999999999999!9991:9core,92:9design_point,93:9off_design_point,94:9compressors,95:9turbines,96:9heat9...

contains

subroutine9calculate_turbomachine_outlet(9&
9999T_in,9P_in,9P_out,9eta,9is_comp,9error_trace,9enth_in,9entr_in,9dens_in,9temp_out,9enth_out,9entr_out,9dens_out,9spec_work9&
9999)
9999!9Determine9the9outlet9state9of9a9compressor9or9turbine9using9isentropic9efficiency9and9outlet9pressure.
9999!
9999!9Inputs:
9999!999T_in9LL9inlet9temperature9(K)
9999!999P_in9LL9inlet9pressure9(kPa)
9999!999P_out9LL9outlet9pressure9(kPa)
9999!999eta9LL9isentropic9efficiency9(L)
9999!999is_comp9LL9if9.true.,9model9a9compressor9(w9=9w_s9/9eta);9if9.false.,9model9a9turbine9(w9=9w_s9*9eta)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999enth_in9LL9inlet9specific9enthalpy9(kJ/kg)9[optional]
9999!999entr_in9LL9inlet9specific9entropy9(kJ/kgLK)9[optional]
9999!999dens_in9LL9inlet9fluid9density9(kg/m3)9[optional]
9999!999temp_out9LL9outlet9fluid9temperature9(K)9[optional]
9999!999enth_out9LL9outlet9specific9enthalpy9(kJ/kg)9[optional]
9999!999entr_out9LL9outlet9specific9entropy9(kJ/kgLK)9[optional]
9999!999dens_out9LL9outlet9fluid9density9(kg/m3)9[optional]
9999!999spec_work9LL9specific9work9of9the9turbomachine9(kJ/kg)9[optional]
9999!
9999!9Notes:
9999!9991)9The9specific9work9of9the9turbomachine9is9positive9for9a9turbine9and9negative9for9a9compressor.
9999!9992)9No9error9checking9is9performed9on9the9inlet9and9outlet9pressures;9valid9pressure9ratios9are9assumed.

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH

9999!9Arguments
9999real(dp),9intent(in)9::9T_in,9P_in,9P_out,9eta
9999logical,9intent(in)99::9is_comp
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out),9optional9::9enth_in,9entr_in,9dens_in,9temp_out,9enth_out,9entr_out,9dens_out,9spec_work
9999
9999!9Local9Variables
9999real(dp)9::9h_in,9s_in,9h_s_out,9w_s,9w,9h_out
9999integer99::9error_code

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9enth=h_in,9entr=s_in,9dens=dens_in)99!9properties9at9the9inlet9conditions
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9134
99999999error_trace%files(1)9=91
99999999return
9999end9if

9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9enthalpy9if9compression/expansion9is9isentropic
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9142
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999
9999w_s9=9h_in9L9h_s_out99!9specific9work9if9process9is9isentropic9(negative9for9compression,9positive9for9expansion)
9999if9(is_comp)9then
99999999w9=9w_s9/9eta99999!9actual9specific9work9of9compressor9(negative9value)
9999else
99999999w9=9w_s9*9eta99999!9actual9specific9work9of9turbine9(positive9value)
9999end9if
9999h_out9=9h_in9L9w999999!9energy9balance9on9turbomachine
9999
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=temp_out,9entr=entr_out,9dens=dens_out)99!9properties9at9the9outlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9158
99999999error_trace%files(1)9=91
99999999return
9999end9if

9999if9(present(enth_in))9enth_in9=9h_in
9999if9(present(entr_in))9entr_in9=9s_in
9999if9(present(enth_out))9enth_out9=9h_out
9999if9(present(spec_work))9spec_work9=9w

end9subroutine9calculate_turbomachine_outlet
105

subroutine9isen_eta_from_poly_eta(T_in,9P_in,9P_out,9poly_eta,9is_comp,9error_trace,9isen_eta)
9999!9Calculate9the9isentropic9efficiency9that9corresponds9to9a9given9polytropic9efficiency
9999!9for9the9expansion9or9compression9from9T_in9and9P_in9to9P_out.
9999!
9999!9Inputs:
9999!999T_in9LL9inlet9temperature9(K)
9999!999P_in9LL9inlet9pressure9(kPa)
9999!999P_out9LL9outlet9pressure9(kPa)
9999!999poly_eta9LL9polytropic9efficiency9(L)
9999!999is_comp9LL9if9.true.,9model9a9compressor9(w9=9w_s9/9eta);9if9.false.,9model9a9turbine9(w9=9w_s9*9eta)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999isen_eta9LL9the9equivalent9isentropic9efficiency9(L)
9999!
9999!9Notes:
9999!9991)9Integration9of9small9DP9is9approximated9numerically9by9using92009stages.
9999!9992)9No9error9checking9is9performed9on9the9inlet9and9outlet9pressures;9valid9pressure9ratios9are9assumed.

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH

9999!9Arguments
9999real(dp),9intent(in)99::9T_in,9P_in,9P_out,9poly_eta
9999logical,9intent(in)999::9is_comp
9999real(dp),9intent(out)9::9isen_eta
9999type(ErrorTrace),9intent(out)9::9error_trace
9999
9999!9Parameters
9999integer,9parameter9::9stages9=9200

9999!9Local9Variables
9999real(dp)9::9h_in,9s_in,9h_s_out,9w_s,9w,9stage_DP
9999real(dp)9::9stage_P_in,9stage_P_out,9stage_h_in,9stage_s_in,9stage_h_s_out,9stage_h_out
9999integer99::9error_code,9stage

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9enth=h_in,9entr=s_in)99!9properties9at9the9inlet9conditions
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9209
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9enthalpy9if9compression/expansion9is9isentropic
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9216
99999999error_trace%files(1)9=919999
99999999return
9999end9if

9999stage_P_in9=9P_in999!9initialize9first9stage9inlet9pressure
9999stage_h_in9=9h_in999!9initialize9first9stage9inlet9enthalpy
9999stage_s_in9=9s_in999!9initialize9first9stage9inlet9entropy
9999stage_DP9=9(P_out9L9P_in)9/9real(stages,dp)99!9pressure9change9per9stage
9999do9stage9=91,9stages
99999999stage_P_out9=9stage_P_in9+9stage_DP
99999999call9CO2_PS(P=stage_P_out,9S=stage_s_in,9error_code=error_code,9enth=stage_h_s_out)99!9outlet9enthalpy9if9compression/expansion9...
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9230
999999999999error_trace%files(1)9=91
999999999999return
99999999end9if
99999999w_s9=9stage_h_in9L9stage_h_s_out99!9specific9work9if9process9is9isentropic
99999999if9(is_comp)9then
999999999999w9=9w_s9/9poly_eta999999999999!9actual9specific9work9of9compressor9(negative9value)
99999999else
999999999999w9=9w_s9*9poly_eta999999999999!9actual9specific9work9of9turbine9(positive9value)
99999999end9if
99999999stage_h_out9=9stage_h_in9L9w999999!9energy9balance9on9stage

99999999!9Reset9next9stage9inlet9values.
99999999stage_P_in9=9stage_P_out
99999999stage_h_in9=9stage_h_out
99999999call9CO2_PH(P=stage_P_in,9H=stage_h_in,9error_code=error_code,9entr=stage_s_in)
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9248
999999999999error_trace%files(1)9=91
999999999999return
99999999end9if

9999end9do

9999!9Note:9last9stage9outlet9enthalpy9is9equivalent9to9turbomachine9outlet9enthalpy.
9999if9(is_comp)9then
99999999isen_eta9=9(h_s_out9L9h_in)9/9(stage_h_out9L9h_in)
9999else
99999999isen_eta9=9(stage_h_out9L9h_in)9/9(h_s_out9L9h_in)
9999end9if

end9subroutine9isen_eta_from_poly_eta
106

subroutine9calculate_hxr_UA(9&
9999N_sub_hxrs,9Q_dot,9m_dot_c,9m_dot_h,9T_c_in,9T_h_in,9P_c_in,9P_c_out,9P_h_in,9P_h_out,9error_trace,9UA,9min_DT9&
9999)
9999!9Calculate9the9conductance9(UA9value)9and9minimum9temperature9difference9of9a9heat9exchanger
9999!9given9its9mass9flow9rates,9inlet9temperatures,9and9a9rate9of9heat9transfer.
9999!
9999!9Inputs:
9999!999N_sub_hxrs9LL9the9number9of9subLheat9exchangers9to9use9for9discretization
9999!999Q_dot9LL9rate9of9heat9transfer9in9the9heat9exchanger9(kW)
9999!999m_dot_c9LL9cold9stream9mass9flow9rate9(kg/s)
9999!999m_dot_h9LL9hot9stream9mass9flow9rate9(kg/s)
9999!999T_c_in9LL9cold9stream9inlet9temperature9(K)
9999!999T_h_in9LL9hot9stream9inlet9temperature9(K)
9999!999P_c_in9LL9cold9stream9inlet9pressure9(kPa)
9999!999P_c_out9LL9cold9stream9outlet9pressure9(kPa)
9999!999P_h_in9LL9hot9stream9inlet9pressure9(kPa)
9999!999P_h_out9LL9hot9stream9outlet9pressure9(kPa)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999UA9LL9heat9exchanger9conductance9(kW/K)
9999!999min_DT9LL9minimum9temperature9difference9("pinch9point")9between9hot9and9cold9streams9in9heat9exchanger9(K)
9999!
9999!9Notes:
9999!9991)9Total9pressure9drop9for9each9stream9is9divided9equally9among9the9subLheat9exchangers9(i.e.,9DP9is9a9linear9distribution).

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PH

9999!9Arguments
9999integer,9intent(in)999::9N_sub_hxrs
9999real(dp),9intent(in)99::9Q_dot,9m_dot_c,9m_dot_h,9T_c_in,9T_h_in,9P_c_in,9P_c_out,9P_h_in,9P_h_out
9999real(dp),9intent(out)9::9UA,9min_DT
9999type(ErrorTrace),9intent(out)9::9error_trace
9999
9999!9Local9Variables
9999integer99::9i,9error_code
9999real(dp)9::9h_c_in,9h_h_in,9h_c_out,9h_h_out
9999real(dp),9dimension(N_sub_hxrs+1)9::9P_c,9P_h,9T_c,9T_h,9h_c,9h_h
9999real(dp),9dimension(N_sub_hxrs)9::9C_dot_c,9C_dot_h,9C_dot_min,9C_dot_max,9C_R,9eff,9NTU

9999!9Check9inputs.
9999if9(T_h_in9<9T_c_in)9then
99999999error_trace%code9=95
99999999error_trace%lines(1)9=9309
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999if9(P_h_in9<9P_h_out)9then
99999999error_trace%code9=96
99999999error_trace%lines(1)9=9315
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999if9(P_c_in9<9P_c_out)9then
99999999error_trace%code9=97
99999999error_trace%lines(1)9=9321
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999if9(abs(Q_dot)9<=91dL12)9then99!9very9low9Q_dot;9assume9it9is9zero
99999999UA9=90.0_dp
99999999min_DT9=9T_h_in9L9T_c_in
99999999return
9999end9if

9999!9Assume9pressure9varies9linearly9through9heat9exchanger.
9999P_c9=9[9(9P_c_out9+9i9*9(P_c_in9L9P_c_out)9/9real(N_sub_hxrs,dp)9,9i9=90,9N_sub_hxrs9)9]99!9create9linear9vector9of9cold9stream9...
9999P_h9=9[9(9P_h_in9L9i9*9(P_h_in9L9P_h_out)9/9real(N_sub_hxrs,dp)9,9i9=90,9N_sub_hxrs9)9]999!9create9linear9vector9of9hot9stream9...

9999!9Calculate9inlet9enthalpies9from9known9state9points.
9999call9CO2_TP(T=T_c_in,9P=P_c(N_sub_hxrs+1),9error_code=error_code,9enth=h_c_in)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9338
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999call9CO2_TP(T=T_h_in,9P=P_h(1),9error_code=error_code,9enth=h_h_in)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9345
99999999error_trace%files(1)9=91
99999999return
9999end9if

9999!9Calculate9outlet9enthalpies9from9energy9balances.
9999h_c_out9=9h_c_in9+9Q_dot9/9m_dot_c
9999h_h_out9=9h_h_in9L9Q_dot9/9m_dot_h
99999999999
9999
107

9999!9Set9up9the9enthalpy9vectors9and9loop9through9the9subLheat9exchangers,9calculating9temperatures.
9999h_c9=9[9(9h_c_out9+9i9*9(h_c_in9L9h_c_out)9/9real(N_sub_hxrs,dp)9,9i9=90,9N_sub_hxrs9)9]99!9create9linear9vector9of9cold9...
9999h_h9=9[9(9h_h_in9L9i9*9(h_h_in9L9h_h_out)9/9real(N_sub_hxrs,dp)9,9i9=90,9N_sub_hxrs9)9]999!9create9linear9vector9of9hot9...
9999T_h(1)9=9T_h_in99!9hot9stream9inlet9temperature
9999call9CO2_PH(P=P_c(1),9H=h_c(1),9error_code=error_code,9temp=T_c(1))99!9cold9stream9outlet9temperature
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9361
99999999error_trace%files(1)9=91
99999999return
9999end9if
9999if9(T_c(1)9>=9T_h(1))9then99!9there9was9a9second9law9violation9in9this9subLheat9exchanger
99999999error_trace%code9=911
99999999error_trace%lines(1)9=9368
99999999error_trace%files(1)9=91
99999999return
9999end9if9999
9999do9i9=92,N_sub_hxrs+1
99999999call9CO2_PH(P=P_h(i),9H=h_h(i),9error_code=error_code,9temp=T_h(i))
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9375
999999999999error_trace%files(1)9=91
999999999999return
99999999end9if
99999999call9CO2_PH(P=P_c(i),9H=h_c(i),9error_code=error_code,9temp=T_c(i))9999
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9382
999999999999error_trace%files(1)9=91
999999999999return
99999999end9if
99999999if9(T_c(i)9>=9T_h(i))9then99!9there9was9a9second9law9violation9in9this9subLheat9exchanger
999999999999error_trace%code9=911
999999999999error_trace%lines(1)9=9389
999999999999error_trace%files(1)9=91
999999999999return
99999999end9if
9999end9do
999999999999999
9999!9Perform9effectivenessLNTU9and9UA9calculations9(note:9the9below9are9all9array9operations).
9999C_dot_h9=9m_dot_h9*9(h_h(1:N_sub_hxrs)9L9h_h(2:N_sub_hxrs+1))9/9(T_h(1:N_sub_hxrs)9L9T_h(2:N_sub_hxrs+1))99!9hot9stream9capacitance9rate
9999C_dot_c9=9m_dot_c9*9(h_c(1:N_sub_hxrs)9L9h_c(2:N_sub_hxrs+1))9/9(T_c(1:N_sub_hxrs)9L9T_c(2:N_sub_hxrs+1))99!9cold9stream9capacitance9rate
9999C_dot_min9=9min(C_dot_h,9C_dot_c)99!9minimum9capacitance9stream
9999C_dot_max9=9max(C_dot_h,9C_dot_c)99!9maximum9capacitance9stream
9999C_R9=9C_dot_min9/9C_dot_max99999999!9capacitance9ratio9of9subLheat9exchanger
9999eff9=9Q_dot9/9((N_sub_hxrs9*9C_dot_min9*9(T_h(1:N_sub_hxrs)9L9T_c(2:N_sub_hxrs+1))))99!9effectiveness9of9each9subLheat9exchanger
9999where9(C_R9/=91.0_dp)
99999999NTU9=9log((1.0_dp9L9eff9*9C_R)9/9(1.0_dp9L9eff))9/9(1.0_dp9L9C_R)99!9NTU9if9C_R9does9not9equal91
9999elsewhere
99999999NTU9=9eff9/9(1.0_dp9L9eff)99!9NTU9if9C_R9equals91
9999end9where
9999UA9=9sum(NTU9*9C_dot_min)999!9calculate9total9UA9value9for9the9heat9exchanger
9999min_DT9=9minval(T_h9L9T_c)99!9find9the9smallest9temperature9difference9within9the9heat9exchanger

9999!9Check9for9NaNs.
9999if9(UA9/=9UA)9then
99999999error_trace%code9=914
99999999error_trace%lines(1)9=9413
99999999error_trace%files(1)9=9199999999
99999999return
9999end9if

end9subroutine9calculate_hxr_UA

integer9function9next_trace_index(error_trace)
9999!9Return9the9next9index9that9should9be9used9for9tracing9the9lines9/9files
9999!9that9generated9an9error.
9999type(ErrorTrace),9intent(in)9::9error_trace
9999next_trace_index9=9minloc(error_trace%lines,91)99!9assumes9no9line9numbers9are9negative;9returns9location9of9first909in9array
end9function9next_trace_index

end9module9core
108

Appendix II: design_point Module


design_point.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'design_point',9which9defines9three9systemLlevel9subroutines:
!999design9LL9the9main9designLpoint9model
!999optimal_design9LL9calls9'design'9and9incorporates9optimization9in9order9to9maximize9thermal9efficiency9by9varying9model9inputs
!999auto_optimal_design9LL9calls9'optimal_design'9with9multiple9starting9points9in9an9effort9to9find9the9global9maximum9for9thermal
!99999999999999999999999999efficiency,9but9is9significantly9slower9(if9you9have9a9good9idea9what9the9design9point9should9be,9it9is
!99999999999999999999999999better9to9use9'optimal_design'9with9appropriate9initial9guesses9for9the9inputs)
!
!9Notes:
!9991)9W_dot_net9must9be9positive.
!9992)9Pressure9drops9are9specified9per9heat9exchanger,9with9stream919being9the9cold9stream9and9stream929being9the9hot9stream.
!999999Positive9values9are9absolute9pressure9drops9and9negative9values9are9relative9pressure9drops:9abs(rel_DP)9*9P_in9=9DP.
!9993)9Positive9values9for9turbomachinery9efficiencies9are9treated9as9isentropic,9while9negative9values9are9treated9as9polytropic
!999999efficiencies9(after9taking9the9absolute9value).99Using9polytropic9efficiencies9is9significantly9slower9than9isentropic.
!
!9Cycle9State9Points:
!9991)99mc9in99999999999/9PC9out
!9992)99LT9in9(cold)9999/9mc9out
!9993)99mixing9valve9in9/9LT9out9(cold)
!9994)99HT9in9(cold)9999/9mixing9valve9out
!9995)99PHX9in9999999999/9HT9out9(cold)
!9996)99turbine9in999999/9PHX9out
!9997)99HT9in9(hot)99999/9turbine9out
!9998)99LT9in9(hot)99999/9HT9out9(hot)
!9999)99PC9and9rc9in9999/9LT9out9(hot)
!99910)9mixing9valve9in9/9recomp9out
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9August915,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9design_point

use9core
implicit9none
private
public9::9design,9optimal_design,9auto_optimal_design

contains

subroutine9design(9&
9999W_dot_net,99999&99!9[input]9target9net9cycle9power9(kW)
9999T_mc_in,9999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,99999999&99!9[input]9turbine9inlet9temperature9(K)
9999P_mc_in,9999999&99!9[input]9compressor9inlet9pressure9(kPa)
9999P_mc_out,999999&99!9[input]9compressor9outlet9pressure9(kPa)
9999DP_LT,999999999&99!9[input]9pressure9drops9in9lowLtemperature9recuperator9(kPa9if9positive9values)
9999DP_HT,999999999&99!9[input]9pressure9drops9in9highLtemperature9recuperator9(kPa9if9positive9values)
9999DP_PC,999999999&99!9[input]9pressure9drops9in9precooler9(kPa9if9positive9values)
9999DP_PHX,99999999&99!9[input]9pressure9drops9in9primary9heat9exchanger9(kPa9if9positive9values)
9999UA_LT,999999999&99!9[input]9designLpoint9UA9value9for9the9lowLtemperature9recuperator9(kW/K)
9999UA_HT,999999999&99!9[input]9designLpoint9UA9value9for9the9highLtemperature9recuperator9(kW/K)
9999recomp_frac,999&99!9[input]9fraction9of9flow9that9bypasses9the9precooler9and9main9compressor9at9the9design9point
9999eta_mc,99999999&99!9[input]9designLpoint9efficiency9of9the9main9compressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_rc,99999999&99!9[input]9designLpoint9efficiency9of9the9recompressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_t,999999999&99!9[input]9designLpoint9efficiency9of9the9turbine;9isentropic9if9positive,9polytropic9if9negative
9999N_sub_hxrs,9999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999tol,99999999999&99!9[input]9convergence9tolerance
9999error_trace,999&99!9[output]9an9ErrorTrace9object
9999recomp_cycle999&99!9[output]9a9RecompCycle9object
9999)

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PH

9999!9Arguments
9999real(dp),9intent(in)9::9W_dot_net,9T_mc_in,9T_t_in,9P_mc_in,9P_mc_out,9UA_LT,9UA_HT,9recomp_frac
9999real(dp),9intent(in)9::9eta_mc,9eta_rc,9eta_t,9tol
109

9999integer,9intent(in)99::9N_sub_hxrs
9999real(dp),9dimension(2),9intent(in)9::9DP_LT,9DP_HT,9DP_PC,9DP_PHX
9999type(ErrorTrace),9intent(out)99::9error_trace
9999type(RecompCycle),9intent(out)9::9recomp_cycle

9999!9Parameters
9999integer,9parameter9::9max_iter9=9500
9999real(dp),9parameter9::9temperature_tolerance9=91.0eL6_dp99!9temperature9differences9below9this9are9considered9zero

9999!9Local9Variables
9999integer99::9T9_iter,9T8_iter,9error_code,9index
9999real(dp)9::9w_mc,9w_rc,9w_t,9C_dot_min,9Q_dot_max
9999real(dp)9::9T9_lower_bound,9T9_upper_bound,9T8_lower_bound,9T8_upper_bound,9last_LT_residual,9last_T9_guess
9999real(dp)9::9last_HT_residual,9last_T8_guess,9secant_guess
9999real(dp)9::9m_dot_t,9m_dot_mc,9m_dot_rc,9eta_mc_isen,9eta_rc_isen,9eta_t_isen
9999real(dp)9::9min_DT_LT,9min_DT_HT,9UA_LT_calc,9UA_HT_calc,9Q_dot_LT,9Q_dot_HT,9UA_HT_residual,9UA_LT_residual
9999real(dp),9dimension(10)9::9temp,9pres,9enth,9entr,9dens

9999!9Initialize9a9few9variables.
9999m_dot_t9=90.0_dp
9999m_dot_mc9=90.0_dp
9999m_dot_rc9=90.0_dp
9999Q_dot_LT9=90.0_dp
9999Q_dot_HT9=90.0_dp
9999UA_LT_calc9=90.0_dp
9999UA_HT_calc9=90.0_dp
9999temp(1)9=9T_mc_in
9999pres(1)9=9P_mc_in
9999pres(2)9=9P_mc_out
9999temp(6)9=9T_t_in

9999!9Apply9pressure9drops9to9heat9exchangers,9fully9defining9the9pressures9at9all9states.
9999if9(DP_LT(1)9<90.0_dp)9then
99999999pres(3)9=9pres(2)9L9pres(2)9*9abs(DP_LT(1))999!9relative9pressure9drop9specified9for9LT9recuperator9(cold9stream)
9999else
99999999pres(3)9=9pres(2)9L9DP_LT(1)999999999999999999!9absolute9pressure9drop9specified9for9LT9recuperator9(cold9stream)
9999end9if
9999if9(UA_LT9<91.0eL12_dp)9pres(3)9=9pres(2)999999999!9if9there9is9no9LT9recuperator,9there9is9no9pressure9drop
9999pres(4)9=9pres(3)999999999999999999999999999999999!9assume9no9pressure9drop9in9mixing9valve
9999pres(10)9=9pres(3)99999999999999999999999999999999!9assume9no9pressure9drop9in9mixing9valve
9999if9(DP_HT(1)9<90.0_dp)9then
99999999pres(5)9=9pres(4)9L9pres(4)9*9abs(DP_HT(1))999!9relative9pressure9drop9specified9for9HT9recuperator9(cold9stream)
9999else
99999999pres(5)9=9pres(4)9L9DP_HT(1)999999999999999999!9absolute9pressure9drop9specified9for9HT9recuperator9(cold9stream)
9999end9if
9999if9(UA_HT9<91.0eL12_dp)9pres(5)9=9pres(4)999999999!9if9there9is9no9HT9recuperator,9there9is9no9pressure9drop
9999if9(DP_PHX(1)9<90.0_dp)9then
99999999pres(6)9=9pres(5)9L9pres(5)9*9abs(DP_PHX(1))99!9relative9pressure9drop9specified9for9PHX
9999else
99999999pres(6)9=9pres(5)9L9DP_PHX(1)99999999999999999!9absolute9pressure9drop9specified9for9PHX
9999end9if
9999if9(DP_PC(2)9<90.0_dp)9then
99999999pres(9)9=9pres(1)9/9(1.0_dp9L9abs(DP_PC(2)))99!9relative9pressure9drop9specified9for9precooler:9P1=P9LP9*rel_DP9=>9P1=P9*(1Lrel_DP)
9999else
99999999pres(9)9=9pres(1)9+9DP_PC(2)999999999999999999!9absolute9pressure9drop9specified9for9precooler
9999end9if
9999if9(DP_LT(2)9<90.0_dp)9then
99999999pres(8)9=9pres(9)9/9(1.0_dp9L9abs(DP_LT(2)))99!9relative9pressure9drop9specified9for9LT9recuperator9(hot9stream)
9999else
99999999pres(8)9=9pres(9)9+9DP_LT(2)999999999999999999!9absolute9pressure9drop9specified9for9LT9recuperator9(hot9stream)
9999end9if
9999if9(UA_LT9<91.0eL12_dp)9pres(8)9=9pres(9)999999999!9if9there9is9no9LT9recuperator,9there9is9no9pressure9drop
9999if9(DP_HT(2)9<90.0_dp)9then
99999999pres(7)9=9pres(8)9/9(1.0_dp9L9abs(DP_HT(2)))99!9relative9pressure9drop9specified9for9HT9recuperator9(hot9stream)
9999else
99999999pres(7)9=9pres(8)9+9DP_HT(2)999999999999999999!9absolute9pressure9drop9specified9for9HT9recuperator9(hot9stream)
9999end9if
9999if9(UA_HT9<91.0eL12_dp)9pres(7)9=9pres(8)999999999!9if9there9is9no9HT9recuperator,9there9is9no9pressure9drop

9999!9Determine9equivalent9isentropic9efficiencies9for9main9compressor9and9turbine,9if9necessary.
9999if9(eta_mc9<90.0_dp)9then
99999999call9isen_eta_from_poly_eta(999&
999999999999T_in9=9temp(1),999999999999&
999999999999P_in9=9pres(1),999999999999&
999999999999P_out9=9pres(2),99999999999&
999999999999poly_eta9=9abs(eta_mc),9999&
999999999999is_comp9=9.true.,9999999999&
999999999999error_trace9=9error_trace,9&
999999999999isen_eta9=9eta_mc_isen99999&
999999999999)
99999999if9(error_trace%code9/=90)9then
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9154
999999999999error_trace%files(index)9=92
999999999999return
99999999end9if
9999else
99999999eta_mc_isen9=9eta_mc
9999end9if
110

9999if9(eta_t9<90.0_dp)9then
99999999call9isen_eta_from_poly_eta(999&
999999999999T_in9=9temp(6),999999999999&
999999999999P_in9=9pres(6),999999999999&
999999999999P_out9=9pres(7),99999999999&
999999999999poly_eta9=9abs(eta_t),99999&
999999999999is_comp9=9.false.,999999999&
999999999999error_trace9=9error_trace,9&
999999999999isen_eta9=9eta_t_isen999999&
999999999999)
99999999if9(error_trace%code9/=90)9then
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9173
999999999999error_trace%files(index)9=92
999999999999return
99999999end9if
9999else
99999999eta_t_isen9=9eta_t
9999end9if

9999!9Determine9the9outlet9state9and9specific9work9for9the9main9compressor9and9turbine.
9999call9calculate_turbomachine_outlet(9&99!9main9compressor
99999999T_in9=9temp(1),99999999999999999&
99999999P_in9=9pres(1),99999999999999999&
99999999P_out9=9pres(2),9999999999999999&
99999999eta9=9eta_mc_isen,99999999999999&
99999999is_comp9=9.true.,999999999999999&
99999999error_trace9=9error_trace,999999&
99999999enth_in9=9enth(1),99999999999999&
99999999entr_in9=9entr(1),99999999999999&
99999999dens_in9=9dens(1),99999999999999&
99999999temp_out9=9temp(2),9999999999999&
99999999enth_out9=9enth(2),9999999999999&
99999999entr_out9=9entr(2),9999999999999&
99999999dens_out9=9dens(2),9999999999999&
99999999spec_work9=9w_mc9999999999999999&
99999999)
9999if9(error_trace%code9/=90)9then
99999999index9=9next_trace_index(error_trace)
99999999error_trace%lines(index)9=9193
99999999error_trace%files(index)9=92
99999999return
9999end9if
9999call9calculate_turbomachine_outlet(9&99!9turbine
99999999T_in9=9temp(6),99999999999999999&
99999999P_in9=9pres(6),99999999999999999&
99999999P_out9=9pres(7),9999999999999999&
99999999eta9=9eta_t_isen,999999999999999&
99999999is_comp9=9.false.,99999999999999&
99999999error_trace9=9error_trace,999999&
99999999enth_in9=9enth(6),99999999999999&
99999999entr_in9=9entr(6),99999999999999&
99999999dens_in9=9dens(6),99999999999999&
99999999temp_out9=9temp(7),9999999999999&
99999999enth_out9=9enth(7),9999999999999&
99999999entr_out9=9entr(7),9999999999999&
99999999dens_out9=9dens(7),9999999999999&
99999999spec_work9=9w_t99999999999999999&
99999999)
9999if9(error_trace%code9/=90)9then
99999999index9=9next_trace_index(error_trace)
99999999error_trace%lines(index)9=9215
99999999error_trace%files(index)9=92
99999999return
9999end9if

9999!9Check9that9this9cycle9can9produce9power.
9999if9(recomp_frac9>=91.0dL12)9then
99999999if9(eta_rc9<90.0_dp)9then99!9need9to9convert9polytropic9efficiency9to9isentropic9efficiency
999999999999call9isen_eta_from_poly_eta(999&
9999999999999999T_in9=9temp(2),999999999999&99!9lowest9possible9recompressor9work9occurs9when9temp(9)9==9temp(2)
9999999999999999P_in9=9pres(9),999999999999&
9999999999999999P_out9=9pres(10),9999999999&
9999999999999999poly_eta9=9abs(eta_rc),9999&
9999999999999999is_comp9=9.true.,9999999999&
9999999999999999error_trace9=9error_trace,9&
9999999999999999isen_eta9=9eta_rc_isen99999&
9999999999999999)
999999999999if9(error_trace%code9/=90)9then
9999999999999999index9=9next_trace_index(error_trace)
9999999999999999error_trace%lines(index)9=9241
9999999999999999error_trace%files(index)9=92
9999999999999999return
999999999999end9if
99999999else
999999999999eta_rc_isen9=9eta_rc
99999999end9if
99999999call9calculate_turbomachine_outlet(9&
999999999999T_in9=9temp(2),99999999999999999&99!9lowest9possible9recompressor9work9occurs9when9temp(9)9==9temp(2)
999999999999P_in9=9pres(9),99999999999999999&
999999999999P_out9=9pres(10),999999999999999&
999999999999eta9=9eta_rc_isen,99999999999999&
111

999999999999is_comp9=9.true.,999999999999999&
999999999999error_trace9=9error_trace,999999&
999999999999spec_work9=9w_rc9999999999999999&
999999999999)
99999999if9(error_trace%code9/=90)9then
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9259
999999999999error_trace%files(index)9=92
999999999999return
99999999end9if
9999else
99999999w_rc9=90.0_dp
9999end9if
9999if9(w_mc9+9w_rc9+9w_t9<=90.0_dp)9then99!9positive9net9power9is9impossible;9return9an9error
99999999error_trace%code9=925
99999999error_trace%lines(1)9=9277
99999999error_trace%files(1)9=92
99999999return
9999end9if

9999!9Outer9iteration9loop:9temp(8),9checking9against9UA_HT.
9999if9(UA_HT9<91.0eL12_dp)9then99!9no9highLtemperature9recuperator
99999999T8_lower_bound9=9temp(7)99!9no9iteration9necessary
99999999T8_upper_bound9=9temp(7)99!9no9iteration9necessary
99999999temp(8)9=9temp(7)
99999999UA_HT_calc9=90.0_dp
99999999last_HT_residual9=90.0_dp
99999999last_T8_guess9=9temp(7)
9999else
99999999T8_lower_bound9=9temp(2)9999!9the9absolute9lowest9temp(8)9could9be
99999999T8_upper_bound9=9temp(7)9999!9the9absolutely9highest9temp(8)9could9be
99999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp99!9bisect9bounds9for9first9guess
99999999UA_HT_calc9=9L1.0_dp
99999999last_HT_residual9=9UA_HT9999!9know9a9priori9that9with9T89=9T7,9UA_calc9=909therefore9residual9is9UA_HT9L90.0
99999999last_T8_guess9=9temp(7)
9999end9if
9999T8_loop:9do9T8_iter9=91,max_iter

99999999!9Fully9define9state98.
99999999call9CO2_TP(T=temp(8),9P=pres(8),9error_code=error_code,9enth=enth(8),9entr=entr(8),9dens=dens(8))
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9303
999999999999error_trace%files(1)9=92
999999999999return
99999999end9if

99999999!9Inner9iteration9loop:9temp(9),9checking9against9UA_LT.
99999999if9(UA_LT9<91.0eL12_dp)9then99!9no9lowLtemperature9recuperator
999999999999T9_lower_bound9=9temp(8)99!9no9iteration9necessary
999999999999T9_upper_bound9=9temp(8)99!9no9iteration9necessary
999999999999temp(9)9=9temp(8)
999999999999UA_LT_calc9=90.0_dp
999999999999last_LT_residual9=90.0_dp
999999999999last_T9_guess9=9temp(8)
99999999else
999999999999T9_lower_bound9=9temp(2)9999!9the9absolute9lowest9temp(9)9could9be
999999999999T9_upper_bound9=9temp(8)9999!9the9absolutely9highest9temp(9)9could9be
999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp99!9bisect9bounds9for9first9guess
999999999999UA_LT_calc9=9L1.0_dp
999999999999last_LT_residual9=9UA_LT9999!9know9a9priori9that9with9T99=9T8,9UA_calc9=909therefore9residual9is9UA_LT9L90
999999999999last_T9_guess9=9temp(8)
99999999end9if
99999999T9_loop:9do9T9_iter9=91,max_iter

9999999999999999!9Determine9the9outlet9state9of9the9recompressing9compressor9and9its9specific9work.
9999999999999999if9(recomp_frac9>=91.0eL12_dp)9then
99999999999999999999if9(eta_rc9<90.0_dp)9then99!9recalculate9isentropic9efficiency9of9recompressing9compressor9(because9T99changes)
999999999999999999999999call9isen_eta_from_poly_eta(999&
9999999999999999999999999999T_in9=9temp(9),999999999999&
9999999999999999999999999999P_in9=9pres(9),999999999999&
9999999999999999999999999999P_out9=9pres(10),9999999999&
9999999999999999999999999999poly_eta9=9abs(eta_rc),9999&
9999999999999999999999999999is_comp9=9.true.,9999999999&
9999999999999999999999999999error_trace9=9error_trace,9&
9999999999999999999999999999isen_eta9=9eta_rc_isen99999&
9999999999999999999999999999)
999999999999999999999999if9(error_trace%code9/=90)9then
9999999999999999999999999999index9=9next_trace_index(error_trace)
9999999999999999999999999999error_trace%lines(index)9=9332
9999999999999999999999999999error_trace%files(index)9=92
9999999999999999999999999999return
999999999999999999999999end9if
99999999999999999999else
999999999999999999999999eta_rc_isen9=9eta_rc
99999999999999999999end9if
99999999999999999999call9calculate_turbomachine_outlet(9&
999999999999999999999999T_in9=9temp(9),99999999999999999&
999999999999999999999999P_in9=9pres(9),99999999999999999&
999999999999999999999999P_out9=9pres(10),999999999999999&
999999999999999999999999eta9=9eta_rc_isen,99999999999999&
999999999999999999999999is_comp9=9.true.,999999999999999&
112

999999999999999999999999error_trace9=9error_trace,999999&
999999999999999999999999enth_in9=9enth(9),99999999999999&
999999999999999999999999entr_in9=9entr(9),99999999999999&
999999999999999999999999dens_in9=9dens(9),99999999999999&
999999999999999999999999temp_out9=9temp(10),999999999999&
999999999999999999999999enth_out9=9enth(10),999999999999&
999999999999999999999999entr_out9=9entr(10),999999999999&
999999999999999999999999dens_out9=9dens(10),999999999999&
999999999999999999999999spec_work9=9w_rc9999999999999999&
999999999999999999999999)
99999999999999999999if9(error_trace%code9/=90)9then
999999999999999999999999index9=9next_trace_index(error_trace)
999999999999999999999999error_trace%lines(index)9=9350
999999999999999999999999error_trace%files(index)9=92
999999999999999999999999return
99999999999999999999end9if
9999999999999999else
99999999999999999999w_rc9=90.0_dp99!9the9recompressing9compressor9does9not9exist
99999999999999999999call9CO2_TP(T=temp(9),9P=pres(9),9error_code=error_code,9enth=enth(9),9entr=entr(9),9dens=dens(9))99!9fully9define9...
99999999999999999999if9(error_code9/=90)9then
999999999999999999999999error_trace%code9=9error_code
999999999999999999999999error_trace%lines(1)9=9374
999999999999999999999999error_trace%files(1)9=92
999999999999999999999999return
99999999999999999999end9if
99999999999999999999temp(10)9=9temp(9)99!9assume9state9109is9the9same9as9state99
99999999999999999999enth(10)9=9enth(9)
99999999999999999999entr(10)9=9entr(9)
99999999999999999999dens(10)9=9dens(9)
9999999999999999end9if

9999999999999999!9Knowing9the9specific9work9of9the9the9recompressing9compressor,9the9required9mass9flow9rate9can9be9calculated.
9999999999999999m_dot_t9=9W_dot_net9/9(w_mc9*9(1.0_dp9L9recomp_frac)9+9w_rc9*9recomp_frac9+9w_t)99!9required9mass9flow9rate9through9turbine
9999999999999999if9(m_dot_t9<90.0_dp)9then99!9positive9power9output9is9not9possible9with9these9inputs
99999999999999999999error_trace%code9=929
99999999999999999999error_trace%lines(1)9=9389
99999999999999999999error_trace%files(1)9=92
99999999999999999999return
9999999999999999end9if
9999999999999999m_dot_rc9=9m_dot_t9*9recomp_frac99!9apply9definition9of9recompression9fraction
9999999999999999m_dot_mc9=9m_dot_t9L9m_dot_rc99999!9mass9balance

9999999999999999!9Calculate9the9UA9value9of9the9lowLtemperature9recuperator.
9999999999999999if9(UA_LT9<91.0eL12_dp)9then99!9no9lowLtemp9recuperator9(this9check9is9necessary9to9prevent9pressure9drops9with9...
99999999999999999999Q_dot_LT9=90.0_dp
9999999999999999else
99999999999999999999Q_dot_LT9=9m_dot_t9*9(enth(8)9L9enth(9))
9999999999999999end9if
9999999999999999call9calculate_hxr_UA(999999999&
99999999999999999999N_sub_hxrs9=9N_sub_hxrs,999&
99999999999999999999Q_dot9=9Q_dot_LT,9999999999&
99999999999999999999m_dot_c9=9m_dot_mc,99999999&
99999999999999999999m_dot_h9=9m_dot_t,999999999&
99999999999999999999T_c_in9=9temp(2),9999999999&
99999999999999999999T_h_in9=9temp(8),9999999999&
99999999999999999999P_c_in9=9pres(2),9999999999&
99999999999999999999P_c_out9=9pres(3),999999999&
99999999999999999999P_h_in9=9pres(8),9999999999&
99999999999999999999P_h_out9=9pres(9),999999999&
99999999999999999999error_trace9=9error_trace,9&
99999999999999999999UA9=9UA_LT_calc,99999999999&
99999999999999999999min_DT9=9min_DT_LT999999999&
99999999999999999999)
9999999999999999if9(error_trace%code9>90)9then
99999999999999999999if9(error_trace%code9==911)9then99!9secondLlaw9violation9in9hxr,9therefore9temp(9)9is9too9low
999999999999999999999999T9_lower_bound9=9temp(9)
999999999999999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp99!9bisect9bounds9for9next9guess
999999999999999999999999error_trace%code9=9099!9reset9error9trace
999999999999999999999999error_trace%lines9=90
999999999999999999999999error_trace%files9=90
999999999999999999999999cycle9T9_loop
99999999999999999999else
999999999999999999999999index9=9next_trace_index(error_trace)
999999999999999999999999error_trace%lines(index)9=9404
999999999999999999999999error_trace%files(index)9=92
999999999999999999999999return
99999999999999999999end9if
9999999999999999end9if

9999999999999999!9Check9for9convergence9and9adjust9T99appropriately.
9999999999999999UA_LT_residual9=9UA_LT9L9UA_LT_calc
9999999999999999if9(abs(UA_LT_residual)9<91.0eL12_dp)9exit9T9_loop99!9catches9no9LT9case
9999999999999999secant_guess9=9temp(9)9L9UA_LT_residual9*9(last_T9_guess9L9temp(9))9/9(last_LT_residual9L9UA_LT_residual)99!9next9guess9...
9999999999999999if9(UA_LT_residual9<90.0_dp)9then99!9UA_LT_calc9is9too9big,9temp(9)9needs9to9be9higher
99999999999999999999if9(abs(UA_LT_residual)/UA_LT9<9tol)9exit9T9_loop99!9UA_LT9converged9(residual9is9negative)
99999999999999999999T9_lower_bound9=9temp(9)
9999999999999999else99!9UA_LT_calc9is9too9small,9temp(9)9needs9to9be9lower
99999999999999999999if9(UA_LT_residual/UA_LT9<9tol)9exit9T9_loop99!9UA_LT9converged
99999999999999999999if9(min_DT_LT9<9temperature_tolerance)9exit9T9_loop99!9UA_calc9is9still9too9low9but9there9isn't9anywhere9to9go9so9...
99999999999999999999T9_upper_bound9=9temp(9)
9999999999999999end9if99
9999999999999999last_LT_residual9=9UA_LT_residual99!9reset9last9stored9residual9value
113

9999999999999999last_T9_guess9=9temp(9)99!9reset9last9stored9guess9value

9999999999999999!9Check9if9the9secant9method9overshoots9and9fall9back9to9bisection9if9it9does.
9999999999999999if9(secant_guess9<=9T9_lower_bound9.or.9secant_guess9>=9T9_upper_bound9.or.9secant_guess9/=9secant_guess)9then99!9secant9...
99999999999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp
9999999999999999else
99999999999999999999temp(9)9=9secant_guess
9999999999999999end9if

99999999end9do9T9_loop

99999999!9Check9that9T9_loop9converged.
99999999if9(T9_iter9>=9max_iter)9then
999999999999error_trace%code9=931
999999999999error_trace%lines(1)9=9460
999999999999error_trace%files(1)9=92
999999999999return
99999999end9if

99999999!9State939can9now9be9fully9defined.
99999999enth(3)9=9enth(2)9+9Q_dot_LT9/9m_dot_mc99!9energy9balance9on9cold9stream9of9lowLtemp9recuperator
99999999call9CO2_PH(P=pres(3),9H=enth(3),9error_code=error_code,9temp=temp(3),9entr=entr(3),9dens=dens(3))
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9469
999999999999error_trace%files(1)9=9299999999
999999999999return
99999999end9if

99999999!9Go9through9the9mixing9valve.
99999999if9(recomp_frac9>=91.0eL12_dp)9then
999999999999enth(4)9=9(1.0_dp9L9recomp_frac)9*9enth(3)9+9recomp_frac9*9enth(10)99!9conservation9of9energy9(both9sides9divided9by9m_dot_t)
999999999999call9CO2_PH(P=pres(4),9H=enth(4),9error_code=error_code,9temp=temp(4),9entr=entr(4),9dens=dens(4))
999999999999if9(error_code9/=90)9then
9999999999999999error_trace%code9=9error_code
9999999999999999error_trace%lines(1)9=9480
9999999999999999error_trace%files(1)9=9299999999
9999999999999999return
999999999999end9if9
99999999else99!9no9mixing9valve,9therefore9state949is9equal9to9state93
999999999999temp(4)9=9temp(3)
999999999999enth(4)9=9enth(3)
999999999999entr(4)9=9entr(3)
999999999999dens(4)9=9dens(3)
99999999end9if

99999999!9Check9for9a9second9law9violation9at9the9outlet9of9the9highLtemp9recuperator.
99999999if9(temp(4)9>=9temp(8))9then99!9temp(8)9is9not9valid9and9it9must9be9increased
999999999999T8_lower_bound9=9temp(8)
999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp
999999999999cycle9T8_loop
99999999end9if

99999999!9Calculate9the9UA9value9of9the9highLtemperature9recuperator.
99999999if9(UA_HT9<91.0eL12_dp)9then99!9no9highLtemp9recuperator
999999999999Q_dot_HT9=90.0_dp
99999999else
999999999999Q_dot_HT9=9m_dot_t9*9(enth(7)9L9enth(8))
99999999end9if
99999999call9calculate_hxr_UA(999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,999&
999999999999Q_dot9=9Q_dot_HT,9999999999&
999999999999m_dot_c9=9m_dot_t,999999999&
999999999999m_dot_h9=9m_dot_t,999999999&
999999999999T_c_in9=9temp(4),9999999999&
999999999999T_h_in9=9temp(7),9999999999&
999999999999P_c_in9=9pres(4),9999999999&
999999999999P_c_out9=9pres(5),999999999&
999999999999P_h_in9=9pres(7),9999999999&
999999999999P_h_out9=9pres(8),999999999&
999999999999error_trace9=9error_trace,9&
999999999999UA9=9UA_HT_calc,99999999999&
999999999999min_DT9=9min_DT_HT999999999&
999999999999)
99999999if9(error_trace%code9>90)9then
999999999999if9(error_trace%code9==911)9then99!9secondLlaw9violation9in9hxr,9therefore9temp(8)9is9too9low
9999999999999999T8_lower_bound9=9temp(8)
9999999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp99!9bisect9bounds9for9next9guess
9999999999999999error_trace%code9=9099!9reset9error9trace
9999999999999999error_trace%lines9=90
9999999999999999error_trace%files9=90
9999999999999999cycle9T8_loop
999999999999else
9999999999999999index9=9next_trace_index(error_trace)
9999999999999999error_trace%lines(index)9=9507
9999999999999999error_trace%files(index)9=92
9999999999999999return999999999999
999999999999end9if
99999999end9if

99999999!9Check9for9convergence9and9adjust9T89appropriately.
99999999UA_HT_residual9=9UA_HT9L9UA_HT_calc
114

99999999if9(abs(UA_HT_residual)9<91.0eL12_dp)9exit9T8_loop99!9catches9no9HT9case
99999999secant_guess9=9temp(8)9L9UA_HT_residual9*9(last_T8_guess9L9temp(8))9/9(last_HT_residual9L9UA_HT_residual)99!9next9guess9predicted9...
99999999if9(UA_HT_residual9<90.0_dp)9then99!9UA_HT_calc9is9too9big,9temp(8)9needs9to9be9higher
999999999999if9(abs(UA_HT_residual)/UA_HT9<9tol)9exit9T8_loop99!9UA_HT9converged9(residual9is9negative)
999999999999T8_lower_bound9=9temp(8)
99999999else99!9UA_HT_calc9is9too9small,9temp(8)9needs9to9be9lower
999999999999if9(UA_HT_residual/UA_HT9<9tol)9exit9T8_loop99!9UA_HT9converged
999999999999if9(min_DT_HT9<9temperature_tolerance)9exit9T8_loop99!9UA_calc9is9still9too9low9but9there9isn't9anywhere9to9go9so9it's9ok9...
999999999999T8_upper_bound9=9temp(8)
99999999end9if99
99999999last_HT_residual9=9UA_HT_residual99!9reset9last9stored9residual9value
99999999last_T8_guess9=9temp(8)99!9reset9last9stored9guess9value

99999999!9Check9if9the9secant9method9overshoots9and9fall9back9to9bisection9if9it9does.
99999999if9(secant_guess9<=9T8_lower_bound9.or.9secant_guess9>=9T8_upper_bound)9then99!9secant9method9overshot,9use9bisection
999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp
99999999else
999999999999temp(8)9=9secant_guess
99999999end9if

9999end9do9T8_loop

9999!9Check9that9T8_loop9converged.
9999if9(T8_iter9>=9max_iter)9then
99999999error_trace%code9=935
99999999error_trace%lines(1)9=9563
99999999error_trace%files(1)9=92
99999999return
9999end9if

9999!9State959can9now9be9fully9defined.
9999enth(5)9=9enth(4)9+9Q_dot_HT9/9m_dot_t99!9energy9balance9on9cold9stream9of9highLtemp9recuperator
9999call9CO2_PH(P=pres(5),9H=enth(5),9error_code=error_code,9temp=temp(5),9entr=entr(5),9dens=dens(5))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9572
99999999error_trace%files(1)9=92
99999999return
9999end9if

9999!9Set9cycle9state9point9properties.
9999recomp_cycle%temp9=9temp
9999recomp_cycle%pres9=9pres
9999recomp_cycle%enth9=9enth
9999recomp_cycle%entr9=9entr
9999recomp_cycle%dens9=9dens

9999!9Calculate9performance9metrics9for9lowLtemperature9recuperator.
9999recomp_cycle%LT%C_dot_hot9=9m_dot_t9*9(enth(8)9L9enth(9))9/9(temp(8)9L9temp(9))9999!9LT9recuperator9hot9stream9capacitance9rate
9999recomp_cycle%LT%C_dot_cold9=9m_dot_mc9*9(enth(3)9L9enth(2))9/9(temp(3)9L9temp(2))99!9LT9recuperator9cold9stream9capacitance9rate
9999C_dot_min9=9min(recomp_cycle%LT%C_dot_hot,9recomp_cycle%LT%C_dot_cold)
9999Q_dot_max9=9C_dot_min9*9(temp(8)9L9temp(2))
9999recomp_cycle%LT%eff9=9Q_dot_LT9/9Q_dot_max99!9definition9of9effectiveness
9999recomp_cycle%LT%UA_design9=9UA_LT_calc
9999recomp_cycle%LT%UA9=9UA_LT_calc
9999recomp_cycle%LT%DP_design9=9[pres(2)9L9pres(3),9pres(8)9L9pres(9)]
9999recomp_cycle%LT%m_dot_design9=9[m_dot_mc,9m_dot_t]
9999recomp_cycle%LT%Q_dot9=9Q_dot_LT
9999recomp_cycle%LT%min_DT9=9min_DT_LT
9999recomp_cycle%LT%N_sub9=9N_sub_hxrs

9999!9Calculate9performance9metrics9for9highLtemperature9recuperator.
9999recomp_cycle%HT%C_dot_hot9=9m_dot_t9*9(enth(7)9L9enth(8))9/9(temp(7)9L9temp(8))999!9HT9recuperator9hot9stream9capacitance9rate
9999recomp_cycle%HT%C_dot_cold9=9m_dot_t9*9(enth(5)9L9enth(4))9/9(temp(5)9L9temp(4))99!9HT9recuperator9cold9stream9capacitance9rate
9999C_dot_min9=9min(recomp_cycle%HT%C_dot_hot,9recomp_cycle%HT%C_dot_cold)
9999Q_dot_max9=9C_dot_min9*9(temp(7)9L9temp(4))
9999recomp_cycle%HT%eff9=9Q_dot_HT9/9Q_dot_max99!9definition9of9effectiveness
9999recomp_cycle%HT%UA_design9=9UA_HT_calc
9999recomp_cycle%HT%UA9=9UA_HT_calc
9999recomp_cycle%HT%DP_design9=9[pres(4)9L9pres(5),9pres(7)9L9pres(8)]
9999recomp_cycle%HT%m_dot_design9=9[m_dot_t,9m_dot_t]
9999recomp_cycle%HT%Q_dot9=9Q_dot_HT
9999recomp_cycle%HT%min_DT9=9min_DT_HT
9999recomp_cycle%HT%N_sub9=9N_sub_hxrs

9999!9Set9relevant9values9for9other9heat9exchangers.
9999recomp_cycle%PHX%Q_dot9=9m_dot_t9*9(enth(6)9L9enth(5))
9999recomp_cycle%PHX%DP_design9=9[pres(5)9L9pres(6),90.0_dp]
9999recomp_cycle%PHX%m_dot_design9=9[m_dot_t,90.0_dp]
9999recomp_cycle%PC%Q_dot9=9m_dot_mc9*9(enth(9)9L9enth(1))
9999recomp_cycle%PC%DP_design9=9[0.0_dp,9pres(9)9L9pres(1)]
9999recomp_cycle%PC%m_dot_design9=9[0.0_dp,9m_dot_mc]

9999!9Calculate9cycle9performance9metrics.
9999recomp_cycle%recomp_frac9=9recomp_frac
9999recomp_cycle%W_dot_net9=9w_mc9*9m_dot_mc9+9w_rc9*9m_dot_rc9+9w_t9*9m_dot_t
9999recomp_cycle%eta_thermal9=9recomp_cycle%W_dot_net9/9recomp_cycle%PHX%Q_dot
9999recomp_cycle%m_dot_turbine9=9m_dot_t
9999recomp_cycle%conv_tol9=9tol

end9subroutine9design
115

subroutine9optimal_design(9&
9999W_dot_net,9999999999999&99!9[input]9target9net9cycle9power9(kW)
9999T_mc_in,999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,9999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999DP_LT,99999999999999999&99!9[input]9pressure9drops9in9lowLtemperature9recuperator9(kPa9if9positive9values)
9999DP_HT,99999999999999999&99!9[input]9pressure9drops9in9highLtemperature9recuperator9(kPa9if9positive9values)
9999DP_PC,99999999999999999&99!9[input]9pressure9drops9in9precooler9(kPa9if9positive9values)
9999DP_PHX,9999999999999999&99!9[input]9pressure9drops9in9primary9heat9exchanger9(kPa9if9positive9values)
9999UA_rec_total,9999999999&99!9[input]9total9designLpoint9recuperator9UA9value9(kW/K)
9999eta_mc,9999999999999999&99!9[input]9designLpoint9efficiency9of9the9main9compressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_rc,9999999999999999&99!9[input]9designLpoint9efficiency9of9the9recompressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_t,99999999999999999&99!9[input]9designLpoint9efficiency9of9the9turbine;9isentropic9if9positive,9polytropic9if9negative
9999N_sub_hxrs,999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999P_high_limit,9999999999&99!9[input]9maximum9allowable9pressure9in9cycle9(kPa)
9999P_mc_out_guess,99999999&99!9[input]9initial9guess9for9main9compressor9outlet9pressure9(kPa)
9999fixed_P_mc_out,99999999&99!9[input]9if9.true.,9P_mc_out9is9fixed9at9P_mc_out_guess
9999PR_mc_guess,99999999999&99!9[input]9initial9guess9for9ratio9of9P_mc_out9to9P_mc_in9(L)
9999fixed_PR_mc,99999999999&99!9[input]9if9.true.,9ratio9of9P_mc_out9to9P_mc_in9is9fixed9at9PR_mc_guess
9999recomp_frac_guess,99999&99!9[input]9initial9guess9for9designLpoint9recompression9fraction
9999fixed_recomp_frac,99999&99!9[input]9if9.true.,9recomp_frac9is9fixed9at9recomp_frac_guess
9999LT_frac_guess,999999999&99!9[input]9initial9guess9for9fraction9of9UA_rec_total9that9is9in9the9lowLtemperature9recuperator
9999fixed_LT_frac,999999999&99!9[input]9if9.true.,9LT_frac9is9fixed9at9LT_frac_guess
9999tol,9999999999999999999&99!9[input]9cycle9convergence9tolerance
9999opt_tol,999999999999999&99!9[input]9optimization9convergence9tolerance
9999error_trace,99999999999&99!9[output]9an9ErrorTrace9object
9999recomp_cycle99999999999&99!9[output]9a9RecompCycle9object
9999)
9999
9999!9Arguments
9999real(dp),9intent(in)9::9W_dot_net,9T_mc_in,9T_t_in,9UA_rec_total,9eta_mc,9eta_rc,9eta_t
9999real(dp),9intent(in)9::9P_high_limit,9P_mc_out_guess,9PR_mc_guess,9recomp_frac_guess,9LT_frac_guess,9tol,9opt_tol
9999logical,9intent(in)99::9fixed_P_mc_out,9fixed_PR_mc,9fixed_recomp_frac,9fixed_LT_frac
9999integer,9intent(in)99::9N_sub_hxrs
9999real(dp),9dimension(2),9intent(in)9::9DP_LT,9DP_HT,9DP_PC,9DP_PHX
9999type(ErrorTrace),9intent(out)99::9error_trace
9999type(RecompCycle),9intent(out)9::9recomp_cycle

9999!9Subplex9Parameters9and9Variables
9999integer,9parameter9::9maxf9=9200
9999integer,9parameter9::9max_free_vars9=94
9999integer,9parameter9::9mode9=90
9999integer99::9iflag,9iwork(50),9nfe
9999real(dp)9::9subplex_fmin,9scale(max_free_vars),9work(50),9x(max_free_vars)

9999!9Local9Variables
9999type(RecompCycle)9::9opt_recomp_cycle
9999integer99::9n,9index
9999logical99::9solution_found

9999!9Initialize9guess9array.
9999x9=90.0_dp
9999index9=91
9999if9(.not.9fixed_P_mc_out)9then
99999999x(index)9=9P_mc_out_guess
99999999scale(index)9=9500.0_dp99!9pressure9scale
99999999index9=9index9+91
9999end9if
9999if9(.not.9fixed_PR_mc)9then
99999999x(index)9=9PR_mc_guess
99999999scale(index)9=90.2_dp99!9pressure9ratio9scale
99999999index9=9index9+91
9999end9if9999
9999if9(.not.9fixed_recomp_frac)9then
99999999x(index)9=9recomp_frac_guess
99999999scale(index)9=90.05_dp99!9recompression9fraction9scale
99999999index9=9index9+91
9999end9if9999
9999if9(.not.9fixed_LT_frac)9then
99999999x(index)9=9LT_frac_guess
99999999scale(index)9=90.05_dp99!9recuperator9split9scale
99999999index9=9index9+91
9999end9if
9999n9=9index9L9199

9999!9Call9subplex9if9any9inputs9can9vary,9or9just9call9the9design9subroutine
9999if9(n9>90)9then99!9call9subplex
99999999solution_found9=9.false.
99999999opt_recomp_cycle%eta_thermal9=90.0_dp99!9ensure9thermal9efficiency9is9initialized9to909(should9be,9but9just9to9be9sure)
99999999call9subplx(design_point_eta,9n,9opt_tol,9maxf,9mode,9scale,9x,9subplex_fmin,9nfe,9work,9iwork,9iflag)
99999999if9(solution_found)9then
999999999999recomp_cycle9=9opt_recomp_cycle
99999999else
999999999999error_trace%code9=91
999999999999error_trace%lines(1)9=9711
999999999999error_trace%files(1)9=92
99999999end9if
9999else99!9no9inputs9vary;9just9call9design9subroutine
99999999call9design(99999999999999999999999999999999999999999&
999999999999W_dot_net9=9W_dot_net,999999999999999999999999999&
999999999999T_mc_in9=9T_mc_in,9999999999999999999999999999999&
999999999999T_t_in9=9T_t_in,999999999999999999999999999999999&
116

999999999999P_mc_in9=9P_mc_out_guess9/9PR_mc_guess,9999999999&
999999999999P_mc_out9=9P_mc_out_guess,99999999999999999999999&
999999999999DP_LT9=9DP_LT,99999999999999999999999999999999999&
999999999999DP_HT9=9DP_HT,99999999999999999999999999999999999&
999999999999DP_PC9=9DP_PC,99999999999999999999999999999999999&
999999999999DP_PHX9=9DP_PHX,999999999999999999999999999999999&
999999999999UA_LT9=9UA_rec_total9*9LT_frac_guess,999999999999&
999999999999UA_HT9=9UA_rec_total9*9(1.0_dp9L9LT_frac_guess),9&
999999999999recomp_frac9=9recomp_frac_guess,99999999999999999&
999999999999eta_mc9=9eta_mc,999999999999999999999999999999999&
999999999999eta_rc9=9eta_rc,999999999999999999999999999999999&
999999999999eta_t9=9eta_t,99999999999999999999999999999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,9999999999999999999999999&
999999999999tol9=9tol,999999999999999999999999999999999999999&
999999999999error_trace9=9error_trace,99999999999999999999999&
999999999999recomp_cycle9=9recomp_cycle9999999999999999999999&
999999999999)
99999999if9(error_trace%code9/=90)9then
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9720
999999999999error_trace%files(index)9=92
99999999end9if
9999end9if
9999recomp_cycle%high_pressure_limit9=9P_high_limit99!9store9high9pressure9limit

9999contains

99999999real(dp)9function9design_point_eta(n,9x)
999999999999!9Call9the9design9subroutine9with9inputs9contained9in9the9x9array.99Other9required9inputs9are
999999999999!9passed9transparently9because9of9the9scope.
999999999999integer,9intent(in)99::9n99999!9number9of9inputs9that9are9varied9during9optimization
999999999999real(dp),9intent(in)9::9x(n)99!9inputs9with9order:9P_mc_out,9PR_mc,9recomp_frac,9LT_frac9(some9can9be9missing)
999999999999real(dp)9::9P_mc_in_local,9P_mc_out_local,9PR_mc_local,9recomp_frac_local,9LT_frac_local

999999999999!9Extract9input9variables9from9x.
999999999999index9=91
999999999999if9(.not.9fixed_P_mc_out)9then
9999999999999999P_mc_out_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999P_mc_out_local9=9P_mc_out_guess
999999999999end9if
999999999999if9(.not.9fixed_PR_mc)9then
9999999999999999PR_mc_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999PR_mc_local9=9PR_mc_guess
999999999999end9if
999999999999P_mc_in_local9=9P_mc_out_local9/9PR_mc_local
999999999999if9(.not.9fixed_recomp_frac)9then
9999999999999999recomp_frac_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999recomp_frac_local9=9recomp_frac_guess
999999999999end9if
999999999999if9(.not.9fixed_LT_frac)9then
9999999999999999LT_frac_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999LT_frac_local9=9LT_frac_guess
999999999999end9if

999999999999!9Check9inputs.
999999999999if9(recomp_frac_local9<90.0_dp)9then
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if
999999999999if9(LT_frac_local9<90.0_dp9.or.9LT_frac_local9>91.0_dp)9then
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if
999999999999if9(P_mc_out_local9>9P_high_limit)9then
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if
999999999999if9(P_mc_in_local9>=9P_mc_out_local)9then
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if
999999999999if9(P_mc_in_local9<9100.0_dp)9then99!9lowLpressure9limit
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if
999999999999if9(PR_mc_local9>950.0_dp)9then99!9pressure9ratio9limit
9999999999999999design_point_eta9=90.0_dp
9999999999999999return
999999999999end9if

999999999999!9Call9design9subroutine.
999999999999call9design(99999999999999999999999999999999999999999&
9999999999999999W_dot_net9=9W_dot_net,999999999999999999999999999&
9999999999999999T_mc_in9=9T_mc_in,9999999999999999999999999999999&
117

9999999999999999T_t_in9=9T_t_in,999999999999999999999999999999999&
9999999999999999P_mc_in9=9P_mc_in_local,9999999999999999999999999&
9999999999999999P_mc_out9=9P_mc_out_local,99999999999999999999999&
9999999999999999DP_LT9=9DP_LT,99999999999999999999999999999999999&
9999999999999999DP_HT9=9DP_HT,99999999999999999999999999999999999&
9999999999999999DP_PC9=9DP_PC,99999999999999999999999999999999999&
9999999999999999DP_PHX9=9DP_PHX,999999999999999999999999999999999&
9999999999999999UA_LT9=9UA_rec_total9*9LT_frac_local,999999999999&
9999999999999999UA_HT9=9UA_rec_total9*9(1.0_dp9L9LT_frac_local),9&
9999999999999999recomp_frac9=9recomp_frac_local,99999999999999999&
9999999999999999eta_mc9=9eta_mc,999999999999999999999999999999999&
9999999999999999eta_rc9=9eta_rc,999999999999999999999999999999999&
9999999999999999eta_t9=9eta_t,99999999999999999999999999999999999&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,9999999999999999999999999&
9999999999999999tol9=9tol,999999999999999999999999999999999999999&
9999999999999999error_trace9=9error_trace,99999999999999999999999&
9999999999999999recomp_cycle9=9recomp_cycle9999999999999999999999&
9999999999999999)
999999999999if9(error_trace%code9==90)9then
9999999999999999design_point_eta9=9Lrecomp_cycle%eta_thermal99!9subplex9is9a9minimizer,9so9return9negative9efficiency
9999999999999999if9(recomp_cycle%eta_thermal9>9opt_recomp_cycle%eta_thermal)9then
99999999999999999999solution_found9=9.true.
99999999999999999999opt_recomp_cycle9=9recomp_cycle
9999999999999999end9if
999999999999else
9999999999999999design_point_eta9=90.0_dp
999999999999end9if

99999999end9function9design_point_eta

end9subroutine9optimal_design

subroutine9auto_optimal_design(9&
9999W_dot_net,999999999999999999&99!9[input]9target9net9cycle9power9(kW)
9999T_mc_in,99999999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,999999999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999DP_LT,9999999999999999999999&99!9[input]9pressure9drops9in9lowLtemperature9recuperator9(kPa9if9positive9values)
9999DP_HT,9999999999999999999999&99!9[input]9pressure9drops9in9highLtemperature9recuperator9(kPa9if9positive9values)
9999DP_PC,9999999999999999999999&99!9[input]9pressure9drops9in9precooler9(kPa9if9positive9values)
9999DP_PHX,999999999999999999999&99!9[input]9pressure9drops9in9primary9heat9exchanger9(kPa9if9positive9values)
9999UA_rec_total,999999999999999&99!9[input]9total9designLpoint9recuperator9UA9value9(kW/K)
9999eta_mc,999999999999999999999&99!9[input]9designLpoint9efficiency9of9the9main9compressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_rc,999999999999999999999&99!9[input]9designLpoint9efficiency9of9the9recompressor;9isentropic9if9positive,9polytropic9if9negative
9999eta_t,9999999999999999999999&99!9[input]9designLpoint9efficiency9of9the9turbine;9isentropic9if9positive,9polytropic9if9negative
9999N_sub_hxrs,99999999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999P_high_limit,999999999999999&99!9[input]9maximum9allowable9pressure9in9cycle9(kPa)
9999tol,999999999999999999999999&99!9[input]9cycle9convergence9tolerance
9999opt_tol,99999999999999999999&99!9[input]9optimization9convergence9tolerance
9999error_trace,9999999999999999&99!9[output]9an9ErrorTrace9object
9999recomp_cycle9999999999999999&99!9[output]9a9RecompCycle9object
9999)
9999
9999!9Arguments
9999real(dp),9intent(in)9::9W_dot_net,9T_mc_in,9T_t_in,9UA_rec_total,9eta_mc,9eta_rc,9eta_t,9P_high_limit,9tol,9opt_tol
9999integer,9intent(in)99::9N_sub_hxrs
9999real(dp),9dimension(2),9intent(in)9::9DP_LT,9DP_HT,9DP_PC,9DP_PHX
9999type(ErrorTrace),9intent(out)99::9error_trace
9999type(RecompCycle),9intent(out)9::9recomp_cycle
9999
9999!9Local9Variables
9999real(dp)9::9best_P_high,9PR_mc_guess
9999type(RecompCycle)9::9test_cycle
9999
9999!9External9Functions
9999real(dp),9external9::9fmin
9999
9999!9Outer9optimization9loop9(best9results9are9stored9in9recomp_cycle).
9999recomp_cycle%eta_thermal9=90.0_dp99!9initialize9for9optimization9loop
9999best_P_high9=9fmin(P_high_limit*0.2_dp,9P_high_limit,9opt_eta,91.0_dp)

9999!9Check9model9with9P_mc_out9set9at9P_high_limit9for9a9recompression9and9simple9cycle9and9use9the9better9configuration.
9999PR_mc_guess9=9recomp_cycle%pres(2)9/9recomp_cycle%pres(1)99!9optimal9pressure9ratio9from9outer9optimization9loop
9999call9optimal_design(99999999999999999&99!9recompression9cycle
99999999W_dot_net9=9W_dot_net,99999999999&
99999999T_mc_in9=9T_mc_in,999999999999999&
99999999T_t_in9=9T_t_in,99999999999999999&
99999999DP_LT9=9DP_LT,9999999999999999999&
99999999DP_HT9=9DP_HT,9999999999999999999&
99999999DP_PC9=9DP_PC,9999999999999999999&
99999999DP_PHX9=9DP_PHX,99999999999999999&
99999999UA_rec_total9=9UA_rec_total,99999&
99999999eta_mc9=9eta_mc,99999999999999999&
99999999eta_rc9=9eta_rc,99999999999999999&
99999999eta_t9=9eta_t,9999999999999999999&
99999999N_sub_hxrs9=9N_sub_hxrs,999999999&
99999999P_high_limit9=9P_high_limit,99999&
99999999P_mc_out_guess9=9P_high_limit,999&
99999999fixed_P_mc_out9=9.true.,999999999&
99999999PR_mc_guess9=9PR_mc_guess,9999999&
99999999fixed_PR_mc9=9.false.,99999999999&
99999999recomp_frac_guess9=90.3_dp,999999&
118

99999999fixed_recomp_frac9=9.false.,99999&
99999999LT_frac_guess9=90.5_dp,9999999999&
99999999fixed_LT_frac9=9.false.,999999999&
99999999tol9=9tol,99999999999999999999999&
99999999opt_tol9=9opt_tol,999999999999999&
99999999error_trace9=9error_trace,9999999&
99999999recomp_cycle9=9test_cycle99999999&
99999999)
9999if9(error_trace%code9==909.and.9test_cycle%eta_thermal9>=9recomp_cycle%eta_thermal)9recomp_cycle9=9test_cycle
9999call9optimal_design(99999999999999999&99!9simple9cycle
99999999W_dot_net9=9W_dot_net,99999999999&
99999999T_mc_in9=9T_mc_in,999999999999999&
99999999T_t_in9=9T_t_in,99999999999999999&
99999999DP_LT9=9DP_LT,9999999999999999999&
99999999DP_HT9=9DP_HT,9999999999999999999&
99999999DP_PC9=9DP_PC,9999999999999999999&
99999999DP_PHX9=9DP_PHX,99999999999999999&
99999999UA_rec_total9=9UA_rec_total,99999&
99999999eta_mc9=9eta_mc,99999999999999999&
99999999eta_rc9=9eta_rc,99999999999999999&
99999999eta_t9=9eta_t,9999999999999999999&
99999999N_sub_hxrs9=9N_sub_hxrs,999999999&
99999999P_high_limit9=9P_high_limit,99999&
99999999P_mc_out_guess9=9P_high_limit,999&
99999999fixed_P_mc_out9=9.true.,999999999&
99999999PR_mc_guess9=9PR_mc_guess,9999999&
99999999fixed_PR_mc9=9.false.,99999999999&
99999999recomp_frac_guess9=90.0_dp,999999&
99999999fixed_recomp_frac9=9.true.,999999&
99999999LT_frac_guess9=90.5_dp,9999999999&
99999999fixed_LT_frac9=9.true.,9999999999&
99999999tol9=9tol,99999999999999999999999&
99999999opt_tol9=9opt_tol,999999999999999&
99999999error_trace9=9error_trace,9999999&
99999999recomp_cycle9=9test_cycle99999999&
99999999)
9999if9(error_trace%code9==909.and.9test_cycle%eta_thermal9>=9recomp_cycle%eta_thermal)9recomp_cycle9=9test_cycle

9999contains

99999999real(dp)9function9opt_eta(P_high)
999999999999!9Call9the9optimal_design9subroutine9with9fixed9P_high.99Other9required9inputs9are
999999999999!9passed9transparently9because9of9the9scope.
999999999999real(dp),9intent(in)9::9P_high
999999999999type(RecompCycle)9::9local_simple_cycle,9local_recomp_cycle
999999999999if9(P_high9>9P_pseudocritical(T_mc_in))9then99!9start9with9P_mc_in9at9pseudocritical9pressure
9999999999999999PR_mc_guess9=9P_high9/9P_pseudocritical(T_mc_in)99
999999999999else
9999999999999999PR_mc_guess9=91.1_dp
999999999999end9if

999999999999call9optimal_design(999999999999999999&99!9recompression9cycle
9999999999999999W_dot_net9=9W_dot_net,999999999999&
9999999999999999T_mc_in9=9T_mc_in,9999999999999999&
9999999999999999T_t_in9=9T_t_in,999999999999999999&
9999999999999999DP_LT9=9DP_LT,99999999999999999999&
9999999999999999DP_HT9=9DP_HT,99999999999999999999&
9999999999999999DP_PC9=9DP_PC,99999999999999999999&
9999999999999999DP_PHX9=9DP_PHX,999999999999999999&
9999999999999999UA_rec_total9=9UA_rec_total,999999&
9999999999999999eta_mc9=9eta_mc,999999999999999999&
9999999999999999eta_rc9=9eta_rc,999999999999999999&
9999999999999999eta_t9=9eta_t,99999999999999999999&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,9999999999&
9999999999999999P_high_limit9=9P_high_limit,999999&
9999999999999999P_mc_out_guess9=9P_high,9999999999&
9999999999999999fixed_P_mc_out9=9.true.,9999999999&
9999999999999999PR_mc_guess9=9PR_mc_guess,99999999&
9999999999999999fixed_PR_mc9=9.false.,999999999999&
9999999999999999recomp_frac_guess9=90.3_dp,9999999&
9999999999999999fixed_recomp_frac9=9.false.,999999&
9999999999999999LT_frac_guess9=90.5_dp,99999999999&
9999999999999999fixed_LT_frac9=9.false.,9999999999&
9999999999999999tol9=9tol,999999999999999999999999&
9999999999999999opt_tol9=9opt_tol,9999999999999999&
9999999999999999error_trace9=9error_trace,99999999&
9999999999999999recomp_cycle9=9local_recomp_cycle9&
9999999999999999)
999999999999if9(error_trace%code9==909.and.9local_recomp_cycle%eta_thermal9>=9recomp_cycle%eta_thermal)9then
9999999999999999recomp_cycle9=9local_recomp_cycle
999999999999end9if
999999999999
999999999999call9optimal_design(999999999999999999&99!9simple9cycle
9999999999999999W_dot_net9=9W_dot_net,999999999999&
9999999999999999T_mc_in9=9T_mc_in,9999999999999999&
9999999999999999T_t_in9=9T_t_in,999999999999999999&
9999999999999999DP_LT9=9DP_LT,99999999999999999999&
9999999999999999DP_HT9=9DP_HT,99999999999999999999&
9999999999999999DP_PC9=9DP_PC,99999999999999999999&
9999999999999999DP_PHX9=9DP_PHX,999999999999999999&
9999999999999999UA_rec_total9=9UA_rec_total,999999&
9999999999999999eta_mc9=9eta_mc,999999999999999999&
119

9999999999999999eta_rc9=9eta_rc,999999999999999999&
9999999999999999eta_t9=9eta_t,99999999999999999999&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,9999999999&
9999999999999999P_high_limit9=9P_high_limit,999999&
9999999999999999P_mc_out_guess9=9P_high,9999999999&
9999999999999999fixed_P_mc_out9=9.true.,9999999999&
9999999999999999PR_mc_guess9=9PR_mc_guess,99999999&
9999999999999999fixed_PR_mc9=9.false.,999999999999&
9999999999999999recomp_frac_guess9=90.0_dp,9999999&
9999999999999999fixed_recomp_frac9=9.true.,9999999&
9999999999999999LT_frac_guess9=90.5_dp,99999999999&
9999999999999999fixed_LT_frac9=9.true.,99999999999&
9999999999999999tol9=9tol,999999999999999999999999&
9999999999999999opt_tol9=9opt_tol,9999999999999999&
9999999999999999error_trace9=9error_trace,99999999&
9999999999999999recomp_cycle9=9local_simple_cycle9&
9999999999999999)
999999999999if9(error_trace%code9==909.and.9local_simple_cycle%eta_thermal9>=9recomp_cycle%eta_thermal)9then
9999999999999999recomp_cycle9=9local_simple_cycle
999999999999end9if
999999999999
999999999999opt_eta9=9Lmax(local_recomp_cycle%eta_thermal,9local_simple_cycle%eta_thermal)99!9fmin9is9a9minimizer,9so9return9a9negative9value
99999999
99999999end9function9opt_eta

end9subroutine9auto_optimal_design

real(dp)9function9P_pseudocritical(T)
9999!9Return9the9approximate9pseudocritical9pressure9(kPa)9as9a9function9of
9999!9temperature9(K)9for9carbon9dioxide9using9a9curve9fit.
9999real(dp),9intent(in)9::9T
9999P_pseudocritical9=9(0.191448_dp9*9T9+945.6661_dp)9*9T9L924213.3_dp
end9function9P_pseudocritical

end9module9design_point
120

Appendix III: off_design_point Module


off_design_point.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'off_design_point',9which9defines9five9systemLlevel9subroutines:
!999off_design9LL9the9main9offLdesign9cycle9model
!999target_off_design9LL9given9a9power9or9heat9addition9target,9iterates9on9P19to9match9it9(returns9an9error9if9target9not9possible)
!999target_off_design_alt9LL9given9a9power9or9heat9addition9target,9iterates9on9P19to9match9it9or9return9the9nearest9possible
!999optimal_off_design9LL9iterates9on9inputs9to9off_design9in9order9to9maximize9power9output9or9thermal9efficiency
!999optimal_target_off_design9LL9determines9the9maximum9efficiency9of9the9cycle9for9a9give9target
!
!9Notes:
!9991)9The9optimization9routines9often9need9a9bit9of9tweaking9(initial9guess9values,9variable9scales,9etc.)9and9improvements
!999999could9be9made9w.r.t.9handling9invalid9inputs.99There9are9likely9better9techniques9that9could9be9developed9in
!999999order9to9provide9fast9and9stable9optimization9(especially9in9regards9to9the9optimal_target_off_design9subroutine).
!9992)9Allowing9surge9and9supersonic9tip9speeds9makes9convergence9easier9and9the9optimal9results9typically9end9of9being9valid,9so
!999999the9values9for9the9parameters9'surge_allowed'9and9'supersonic_tip_speed_allowed'9are9.true.9by9default.
!9993)9The9optimal_target_off_design9subroutine9uses9max9W_dot_net9as9proxy9for9max_Q_dot9if9the9target9is9not9possible.
!9994)9The9target_off_design9and9optimal_target_off_design9subroutines9allow9highLside9pressures9slightly9above9the9highLpressure
!999999limit9to9help9the9optimization9routines;9calls9to9these9subroutines9should9be9checked9for9satisfactory9pressures.
!
!9Cycle9State9Points:
!9991)99mc9in99999999999/9PC9out
!9992)99LT9in9(cold)9999/9mc9out
!9993)99mixing9valve9in9/9LT9out9(cold)
!9994)99HT9in9(cold)9999/9mixing9valve9out
!9995)99PHX9in9999999999/9HT9out9(cold)
!9996)99turbine9in999999/9PHX9out
!9997)99HT9in9(hot)99999/9turbine9out
!9998)99LT9in9(hot)99999/9HT9out9(hot)
!9999)99PC9and9rc9in9999/9LT9out9(hot)
!99910)9mixing9valve9in9/9recomp9out
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9August920,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9off_design_point

use9core
use9compressors
use9turbines
use9heat_exchangers
implicit9none
private
public9::9off_design,9target_off_design,9optimal_off_design,9optimal_target_off_design

logical,9parameter9::9surge_allowed9=9.true.
logical,9parameter9::9supersonic_tip_speed_allowed9=9.true.

contains

subroutine9off_design(9&
9999recomp_cycle,999999&99!9[input/output]9a9RecompCycle9object9with9designLpoint9variables9set
9999T_mc_in,99999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999P_mc_in,99999999999&99!9[input]9compressor9inlet9pressure9(kPa)
9999recomp_frac,9999999&99!9[input]9fraction9of9flow9that9bypasses9the9precooler9and9main9compressor
9999N_mc,99999999999999&99!9[input]9main9compressor9shaft9speed9(rpm)
9999N_t,999999999999999&99!9[input]9turbine9shaft9speed9(rpm)
9999N_sub_hxrs,99999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999tol,999999999999999&99!9[input]9convergence9tolerance
9999error_trace99999999&99!9[output]9an9ErrorTrace9object
9999)

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PH
121

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999real(dp),9intent(in)9::9T_mc_in,9T_t_in,9P_mc_in,9recomp_frac,9N_mc,9N_t,9tol
9999integer,9intent(in)99::9N_sub_hxrs
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Parameters
9999integer,9parameter9::9max_iter9=9100
9999real(dp),9parameter9::9temperature_tolerance9=91.0eL6_dp99!9temperature9differences9below9this9are9considered9zero

9999!9Local9Variables
9999integer99::9m_dot_iter,9T9_iter,9T8_iter,9error_code,9index
9999real(dp)9::9rho_in,9C_dot_min,9Q_dot_max,9m_dot_t_allowed,9m_dot_residual,9partial_phi,9tip_speed
9999real(dp)9::9m_dot_lower_bound,9m_dot_upper_bound,9m_dot_mc_guess,9m_dot_mc_max,9last_m_dot_guess,9last_m_dot_residual
9999real(dp)9::9T9_lower_bound,9T9_upper_bound,9T8_lower_bound,9T8_upper_bound,9last_LT_residual,9last_T9_guess
9999real(dp)9::9last_HT_residual,9last_T8_guess,9secant_guess
9999real(dp)9::9m_dot_t,9m_dot_mc,9m_dot_rc,9UA_LT,9UA_HT,9w_mc,9w_rc,9w_t
9999real(dp)9::9min_DT_LT,9min_DT_HT,9UA_LT_calc,9UA_HT_calc,9Q_dot_LT,9Q_dot_HT,9UA_HT_residual,9UA_LT_residual
9999real(dp),9dimension(10)9::9temp,9pres,9enth,9entr,9dens
9999real(dp),9dimension(2)9::9DP_LT,9DP_HT,9DP_PC,9DP_PHX
9999logical9::9first_pass

9999!9Initialize9a9few9variables.
9999temp(1)9=9T_mc_in
9999pres(1)9=9P_mc_in
9999temp(6)9=9T_t_in
9999recomp_cycle%mc%N9=9N_mc
9999recomp_cycle%t%N9=9N_t
9999recomp_cycle%conv_tol9=9tol

9999!9Prepare9the9mass9flow9rate9iteration9loop.
9999call9CO2_TP(T=temp(1),9P=pres(1),9error_code=error_code,9dens=rho_in)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9113
99999999error_trace%files(1)9=93
99999999return
9999end9if
9999tip_speed9=9recomp_cycle%mc%D_rotor9*90.5_dp9*9N_mc9*90.10471975512_dp99!9main9compressor9tip9speed9in9m/s
9999partial_phi9=9rho_in9*9recomp_cycle%mc%D_rotor**29*9tip_speed99999999999!9reduces9computation9on9next9two9lines
9999m_dot_mc_guess9=9recomp_cycle%mc%phi_design9*9partial_phi999999999999999!9mass9flow9rate9corresponding9to9designLpoint9phi9in9...9
9999m_dot_mc_max9=9recomp_cycle%mc%phi_max9*9partial_phi9*91.2_dp99999999999!9largest9possible9mass9flow9rate9in9main9compressor9(with9...
9999m_dot_t9=9m_dot_mc_guess9/9(1.0_dp9L9recomp_frac)99999999999999999999999!9first9guess9for9mass9flow9rate9through9turbine
9999m_dot_upper_bound9=9m_dot_mc_max9/9(1.0_dp9L9recomp_frac)999999999999999!9largest9possible9mass9flow9rate9through9turbine
9999m_dot_lower_bound9=90.0_dp9999999999999999999999999999999999999999999999!9this9lower9bound9allows9for9surge9(checked9after9iteration)
9999first_pass9=9.true.

9999!9Enter9the9mass9flow9rate9iteration9loop.
9999m_dot_loop:9do9m_dot_iter9=91,9max_iter
99999999m_dot_rc9=9m_dot_t9*9recomp_frac99!9mass9flow9rate9through9recompressing9compressor
99999999m_dot_mc9=9m_dot_t9L9m_dot_rc99999!9mass9flow9rate9through9compressor

99999999!9Calculate9the9pressure9rise9through9the9main9compressor.
99999999call9off_design_compressor(9999&
999999999999comp9=9recomp_cycle%mc,9999&
999999999999T_in9=9temp(1),999999999999&
999999999999P_in9=9pres(1),999999999999&
999999999999m_dot9=9m_dot_mc,9999999999&
999999999999N9=9N_mc,999999999999999999&
999999999999error_trace9=9error_trace,9&
999999999999T_out9=9temp(2),99999999999&
999999999999P_out9=9pres(2)999999999999&
999999999999)
99999999if9(error_trace%code9==91)9then99!9m_dot9is9too9high9because9the9given9shaft9speed9is9not9possible
999999999999m_dot_upper_bound9=9m_dot_t
999999999999m_dot_t9=9(m_dot_lower_bound9+9m_dot_upper_bound)9*90.5_dp99!9use9bisection9for9new9mass9flow9rate9guess
999999999999cycle
99999999else9if9(error_trace%code9==92)9then99!9m_dot9is9too9low9because9P_out9is9(likely)9above9properties9limits
999999999999m_dot_lower_bound9=9m_dot_t
999999999999m_dot_t9=9(m_dot_lower_bound9+9m_dot_upper_bound)9*90.5_dp99!9use9bisection9for9new9mass9flow9rate9guess
999999999999cycle
99999999else9if9(error_trace%code9/=90)9then99!9unexpected9error
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9135
999999999999error_trace%files(index)9=93
999999999999return
99999999end9if

99999999!9Calculate9scaled9pressure9drops9through9heat9exchangers.
99999999DP_LT99=9hxr_pressure_drops(hxr=recomp_cycle%LT,9m_dots=[m_dot_mc,9m_dot_t])
99999999DP_HT99=9hxr_pressure_drops(hxr=recomp_cycle%HT,9m_dots=[m_dot_t,9m_dot_t])
99999999DP_PHX9=9hxr_pressure_drops(hxr=recomp_cycle%PHX,9m_dots=[m_dot_t,90.0_dp])99!9not9concerned9with9hot9stream9of9PHX
99999999DP_PC99=9hxr_pressure_drops(hxr=recomp_cycle%PC,9m_dots=[0.0_dp,9m_dot_mc])99!9not9concerned9with9cold9stream9of9precooler

99999999!9Apply9pressure9drops9to9heat9exchangers,9fully9defining9the9pressures9at9all9states.
99999999pres(3)99=9pres(2)9L9DP_LT(1)999!9LT9recuperator9(cold9stream)
99999999pres(4)99=9pres(3)99999999999999!9assume9no9pressure9drop9in9mixing9valve
99999999pres(10)9=9pres(3)99999999999999!9assume9no9pressure9drop9in9mixing9valve
99999999pres(5)99=9pres(4)9L9DP_HT(1)999!9HT9recuperator9(cold9stream)
99999999pres(6)99=9pres(5)9L9DP_PHX(1)99!9PHX
99999999pres(9)99=9pres(1)9+9DP_PC(2)999!9precooler
99999999pres(8)99=9pres(9)9+9DP_LT(2)999!9LT9recuperator9(hot9stream)
122

99999999pres(7)99=9pres(8)9+9DP_HT(2)999!9HT9recuperator9(hot9stream)

99999999!9Calculate9the9mass9flow9rate9through9the9turbine.
99999999call9off_design_turbine(9999999&
999999999999turb9=9recomp_cycle%t,99999&
999999999999T_in9=9temp(6),999999999999&
999999999999P_in9=9pres(6),999999999999&
999999999999P_out9=9pres(7),99999999999&
999999999999N9=9N_t,9999999999999999999&
999999999999error_trace9=9error_trace,9&
999999999999m_dot9=9m_dot_t_allowed,999&
999999999999T_out9=9temp(7)999999999999&
999999999999)
99999999if9(error_trace%code9/=90)9then99!9unexpected9error
999999999999index9=9next_trace_index(error_trace)
999999999999error_trace%lines(index)9=9177
999999999999error_trace%files(index)9=93
999999999999return
99999999end9if99999999

99999999!9Determine9the9mass9flow9rate9residual9and9prepare9the9next9iteration.
99999999m_dot_residual9=9m_dot_t9L9m_dot_t_allowed
99999999secant_guess9=9m_dot_t9L9m_dot_residual9*9(last_m_dot_guess9L9m_dot_t)9/9(last_m_dot_residual9L9m_dot_residual)99!9next9guess9...
99999999if9(m_dot_residual9>90.0_dp)9then99!9pressure9rise9is9too9small,9so9m_dot_t9is9too9big
999999999999if9(m_dot_residual9/9m_dot_t9<9tol)9exit9m_dot_loop99!9residual9is9positive;9check9for9convergence
999999999999m_dot_upper_bound9=9m_dot_t999!9reset9upper9bound
99999999else99!9pressure9rise9is9too9high,9so9m_dot_t9is9too9small
999999999999if9(Lm_dot_residual9/9m_dot_t9<9tol)9exit9m_dot_loop9!9residual9is9negative;9check9for9convergence
999999999999m_dot_lower_bound9=9m_dot_t999!9reset9lower9bound
99999999end9if
99999999last_m_dot_residual9=9m_dot_residual99999999999999999999999999999999!9reset9last9stored9residual9value
99999999last_m_dot_guess9=9m_dot_t999999999999999999999999999999999999!9reset9last9stored9guess9value

99999999!9Check9if9the9secant9method9overshoots9and9fall9back9to9bisection9if9it9does.
99999999if9(first_pass)9then
999999999999m_dot_t9=9(m_dot_upper_bound9+9m_dot_lower_bound)9*90.5_dp9
999999999999first_pass9=9.false.
99999999else9if9(secant_guess9<9m_dot_lower_bound9.or.9secant_guess9>9m_dot_upper_bound)9then99!9secant9method9overshot,9use9bisection
999999999999m_dot_t9=9(m_dot_upper_bound9+9m_dot_lower_bound)9*90.5_dp9
99999999else
999999999999m_dot_t9=9secant_guess
99999999end9if

9999end9do9m_dot_loop
9999
9999!9Check9for9convergence.
9999if9(m_dot_iter9>=9max_iter)9then
99999999error_trace%code9=942
99999999error_trace%lines(1)9=9220
99999999error_trace%files(1)9=93
99999999return
9999end9if

9999!9Fully9define9known9states.
9999call9CO2_TP(T=temp(1),9P=pres(1),9error_code=error_code,9enth=enth(1),9entr=entr(1),9dens=dens(1))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9228
99999999error_trace%files(1)9=93
99999999return
9999end9if
9999call9CO2_TP(T=temp(2),9P=pres(2),9error_code=error_code,9enth=enth(2),9entr=entr(2),9dens=dens(2))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9235
99999999error_trace%files(1)9=93
99999999return
9999end9if
9999call9CO2_TP(T=temp(6),9P=pres(6),9error_code=error_code,9enth=enth(6),9entr=entr(6),9dens=dens(6))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9242
99999999error_trace%files(1)9=9399999999
99999999return
9999end9if
9999call9CO2_TP(T=temp(7),9P=pres(7),9error_code=error_code,9enth=enth(7),9entr=entr(7),9dens=dens(7))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9249
99999999error_trace%files(1)9=93
99999999return
9999end9if
9999
9999!9Get9the9recuperator9conductances9corresponding9to9the9converged9mass9flow9rates.
9999UA_LT9=9hxr_conductance(hxr=recomp_cycle%LT,9m_dots=[m_dot_mc,9m_dot_t])
9999UA_HT9=9hxr_conductance(hxr=recomp_cycle%HT,9m_dots=[m_dot_t,9m_dot_t])

9999!9Outer9iteration9loop:9temp(8),9checking9against9UA_HT.
9999if9(UA_HT9<91.0eL12_dp)9then99!9no9highLtemperature9recuperator
99999999T8_lower_bound9=9temp(7)99!9no9iteration9necessary
99999999T8_upper_bound9=9temp(7)99!9no9iteration9necessary
99999999temp(8)9=9temp(7)
123

99999999UA_HT_calc9=90.0_dp
99999999last_HT_residual9=90.0_dp
99999999last_T8_guess9=9temp(7)
9999else
99999999T8_lower_bound9=9temp(2)9999!9the9absolute9lowest9temp(8)9could9be
99999999T8_upper_bound9=9temp(7)9999!9the9absolutely9highest9temp(8)9could9be
99999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp99!9bisect9bounds9for9first9guess
99999999UA_HT_calc9=9L1.0_dp
99999999last_HT_residual9=9UA_HT9999!9know9a9priori9that9with9T89=9T7,9UA_calc9=909therefore9residual9is9UA_HT9L90.0
99999999last_T8_guess9=9temp(7)
9999end9if
9999T8_loop:9do9T8_iter9=91,max_iter

99999999!9Fully9define9state98.
99999999call9CO2_TP(T=temp(8),9P=pres(8),9error_code=error_code,9enth=enth(8),9entr=entr(8),9dens=dens(8))
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9280
999999999999error_trace%files(1)9=9399999999
999999999999return
99999999end9if

99999999!9Inner9iteration9loop:9temp(9),9checking9against9UA_LT.
99999999if9(UA_LT9<91.0eL12_dp)9then99!9no9lowLtemperature9recuperator
999999999999T9_lower_bound9=9temp(8)99!9no9iteration9necessary
999999999999T9_upper_bound9=9temp(8)99!9no9iteration9necessary
999999999999temp(9)9=9temp(8)
999999999999UA_LT_calc9=90.0_dp
999999999999last_LT_residual9=90.0_dp
999999999999last_T9_guess9=9temp(8)
99999999else
999999999999T9_lower_bound9=9temp(2)9999!9the9absolute9lowest9temp(9)9could9be
999999999999T9_upper_bound9=9temp(8)9999!9the9absolutely9highest9temp(9)9could9be
999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp99!9bisect9bounds9for9first9guess
999999999999UA_LT_calc9=9L1.0_dp
999999999999last_LT_residual9=9UA_LT9999!9know9a9priori9that9with9T99=9T8,9UA_calc9=909therefore9residual9is9UA_LT9L90
999999999999last_T9_guess9=9temp(8)
99999999end9if
99999999T9_loop:9do9T9_iter9=91,max_iter

9999999999999999call9CO2_TP(T=temp(9),9P=pres(9),9error_code=error_code,9enth=enth(9),9entr=entr(9),9dens=dens(9))99!9fully9define9state99
9999999999999999if9(error_code9/=90)9then
99999999999999999999error_trace%code9=9error_code
99999999999999999999error_trace%lines(1)9=9306
99999999999999999999error_trace%files(1)9=93
99999999999999999999return
9999999999999999end9if

9999999999999999if9(recomp_frac9>=91.0eL12_dp)9then99!9determine9the9required9shaft9speed9for9the9recompressing9compressor
99999999999999999999call9off_design_recompressor(99&
999999999999999999999999comp9=9recomp_cycle%rc,9999&
999999999999999999999999T_in9=9temp(9),999999999999&
999999999999999999999999P_in9=9pres(9),999999999999&
999999999999999999999999m_dot9=9m_dot_rc,9999999999&
999999999999999999999999P_out9=9pres(10),9999999999&
999999999999999999999999error_trace9=9error_trace,9&
999999999999999999999999T_out9=9temp(10)99999999999&
999999999999999999999999)
99999999999999999999if9(error_trace%code9/=90)9then
999999999999999999999999index9=9next_trace_index(error_trace)
999999999999999999999999error_trace%lines(index)9=9315
999999999999999999999999error_trace%files(index)9=93
999999999999999999999999return
99999999999999999999end9if
99999999999999999999call9CO2_TP(T=temp(10),9P=pres(10),9error_code=error_code,9enth=enth(10),9entr=entr(10),9dens=dens(10))99!9fully9...
99999999999999999999if9(error_code9/=90)9then
999999999999999999999999error_trace%code9=9error_code
999999999999999999999999error_trace%lines(1)9=9330
999999999999999999999999error_trace%files(1)9=93
999999999999999999999999return
99999999999999999999end9if
9999999999999999else
99999999999999999999temp(10)9=9temp(9)99!9assume9state9109is9the9same9as9state99
99999999999999999999enth(10)9=9enth(9)
99999999999999999999entr(10)9=9entr(9)
99999999999999999999dens(10)9=9dens(9)
9999999999999999end9if

9999999999999999!9Calculate9the9UA9value9of9the9lowLtemperature9recuperator.
9999999999999999if9(UA_LT9<91.0eL12_dp)9then99!9no9lowLtemp9recuperator9(this9check9is9necessary9to9prevent9pressure9drops9with9UA=09...
99999999999999999999Q_dot_LT9=90.0_dp
9999999999999999else
99999999999999999999Q_dot_LT9=9m_dot_t9*9(enth(8)9L9enth(9))
9999999999999999end9if
9999999999999999call9calculate_hxr_UA(999999999&
99999999999999999999N_sub_hxrs9=9N_sub_hxrs,999&
99999999999999999999Q_dot9=9Q_dot_LT,9999999999&
99999999999999999999m_dot_c9=9m_dot_mc,99999999&
99999999999999999999m_dot_h9=9m_dot_t,999999999&
99999999999999999999T_c_in9=9temp(2),9999999999&
99999999999999999999T_h_in9=9temp(8),9999999999&
99999999999999999999P_c_in9=9pres(2),9999999999&
124

99999999999999999999P_c_out9=9pres(3),999999999&
99999999999999999999P_h_in9=9pres(8),9999999999&
99999999999999999999P_h_out9=9pres(9),999999999&
99999999999999999999error_trace9=9error_trace,9&
99999999999999999999UA9=9UA_LT_calc,99999999999&
99999999999999999999min_DT9=9min_DT_LT999999999&
99999999999999999999)
9999999999999999if9(error_trace%code9>90)9then
99999999999999999999if9(error_trace%code9==911)9then99!9secondLlaw9violation9in9hxr,9therefore9temp(9)9is9too9low
999999999999999999999999T9_lower_bound9=9temp(9)
999999999999999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp99!9bisect9bounds9for9next9guess
999999999999999999999999error_trace%code9=9099!9reset9error9trace
999999999999999999999999error_trace%lines9=90
999999999999999999999999error_trace%files9=90
999999999999999999999999cycle9T9_loop
99999999999999999999else
999999999999999999999999index9=9next_trace_index(error_trace)
999999999999999999999999error_trace%lines(index)9=9350
999999999999999999999999error_trace%files(index)9=93
999999999999999999999999return
99999999999999999999end9if
9999999999999999end9if

9999999999999999!9Check9for9convergence9and9adjust9T99appropriately.
9999999999999999UA_LT_residual9=9UA_LT9L9UA_LT_calc
9999999999999999if9(abs(UA_LT_residual)9<91.0eL12_dp)9exit9T9_loop99!9catches9no9LT9case
9999999999999999secant_guess9=9temp(9)9L9UA_LT_residual9*9(last_T9_guess9L9temp(9))9/9(last_LT_residual9L9UA_LT_residual)99!9next9guess9...
9999999999999999if9(UA_LT_residual9<90.0_dp)9then99!9UA_LT_calc9is9too9big,9temp(9)9needs9to9be9higher
99999999999999999999if9(abs(UA_LT_residual)/UA_LT9<9tol)9exit9T9_loop99!9UA_LT9converged9(residual9is9negative)
99999999999999999999T9_lower_bound9=9temp(9)
9999999999999999else99!9UA_LT_calc9is9too9small,9temp(9)9needs9to9be9lower
99999999999999999999if9(UA_LT_residual/UA_LT9<9tol)9exit9T9_loop99!9UA_LT9converged
99999999999999999999if9(min_DT_LT9<9temperature_tolerance)9exit9T9_loop99!9UA_calc9is9still9too9low9but9there9isn't9anywhere9to9go9so9...
99999999999999999999T9_upper_bound9=9temp(9)
9999999999999999end9if99
9999999999999999last_LT_residual9=9UA_LT_residual99!9reset9last9stored9residual9value
9999999999999999last_T9_guess9=9temp(9)99!9reset9last9stored9guess9value

9999999999999999!9Check9if9the9secant9method9overshoots9and9fall9back9to9bisection9if9it9does.
9999999999999999if9(secant_guess9<=9T9_lower_bound9.or.9secant_guess9>=9T9_upper_bound9.or.9secant_guess9/=9secant_guess)9then99!9secant9...
99999999999999999999temp(9)9=9(T9_lower_bound9+9T9_upper_bound)9*90.5_dp
9999999999999999else
99999999999999999999temp(9)9=9secant_guess
9999999999999999end9if

99999999end9do9T9_loop

99999999!9Check9that9T9_loop9converged.
99999999if9(T9_iter9>=9max_iter)9then
999999999999error_trace%code9=931
999999999999error_trace%lines(1)9=9406
999999999999error_trace%files(1)9=93
999999999999return
99999999end9if

99999999!9State939can9now9be9fully9defined.
99999999enth(3)9=9enth(2)9+9Q_dot_LT9/9m_dot_mc99!9energy9balance9on9cold9stream9of9lowLtemp9recuperator
99999999call9CO2_PH(P=pres(3),9H=enth(3),9error_code=error_code,9temp=temp(3),9entr=entr(3),9dens=dens(3))
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9415
999999999999error_trace%files(1)9=9399999999
999999999999return
99999999end9if

99999999!9Go9through9mixing9valve.
99999999if9(recomp_frac9>=91.0eL12_dp)9then
999999999999enth(4)9=9(1.0_dp9L9recomp_frac)9*9enth(3)9+9recomp_frac9*9enth(10)99!9conservation9of9energy9(both9sides9divided9by9m_dot_t)
999999999999call9CO2_PH(P=pres(4),9H=enth(4),9error_code=error_code,9temp=temp(4),9entr=entr(4),9dens=dens(4))
999999999999if9(error_code9/=90)9then
9999999999999999error_trace%code9=9error_code
9999999999999999error_trace%lines(1)9=9426
9999999999999999error_trace%files(1)9=9399999999
9999999999999999return
999999999999end9if9
99999999else99!9no9mixing9valve,9therefore9state949is9equal9to9state93
999999999999temp(4)9=9temp(3)
999999999999enth(4)9=9enth(3)
999999999999entr(4)9=9entr(3)
999999999999dens(4)9=9dens(3)
99999999end9if

99999999!9Check9for9a9second9law9violation9at9the9outlet9of9the9highLtemp9recuperator.
99999999if9(temp(4)9>=9temp(8))9then99!9temp(8)9is9not9valid9and9it9must9be9increased
999999999999T8_lower_bound9=9temp(8)
999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp
999999999999cycle9T8_loop
99999999end9if

99999999!9Calculate9the9UA9value9of9the9highLtemperature9recuperator.
99999999if9(UA_HT9<91.0eL12_dp)9then99!9no9highLtemp9recuperator9(this9check9is9necessary9to9prevent9pressure9drops9with9UA=09from9...
999999999999Q_dot_HT9=90.0_dp
125

99999999else
999999999999Q_dot_HT9=9m_dot_t9*9(enth(7)9L9enth(8))
99999999end9if
99999999call9calculate_hxr_UA(999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,999&
999999999999Q_dot9=9Q_dot_HT,9999999999&
999999999999m_dot_c9=9m_dot_t,999999999&
999999999999m_dot_h9=9m_dot_t,999999999&
999999999999T_c_in9=9temp(4),9999999999&
999999999999T_h_in9=9temp(7),9999999999&
999999999999P_c_in9=9pres(4),9999999999&
999999999999P_c_out9=9pres(5),999999999&
999999999999P_h_in9=9pres(7),9999999999&
999999999999P_h_out9=9pres(8),999999999&
999999999999error_trace9=9error_trace,9&
999999999999UA9=9UA_HT_calc,99999999999&
999999999999min_DT9=9min_DT_HT999999999&
999999999999)
99999999if9(error_trace%code9>90)9then
999999999999if9(error_trace%code9==911)9then99!9secondLlaw9violation9in9hxr,9therefore9temp(8)9is9too9low
9999999999999999T8_lower_bound9=9temp(8)
9999999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp99!9bisect9bounds9for9next9guess
9999999999999999error_trace%code9=9099!9reset9error9trace
9999999999999999error_trace%lines9=90
9999999999999999error_trace%files9=90
9999999999999999cycle9T8_loop
999999999999else
9999999999999999index9=9next_trace_index(error_trace)
9999999999999999error_trace%lines(index)9=9453
9999999999999999error_trace%files(index)9=93
9999999999999999return999999999999
999999999999end9if
99999999end9if

99999999!9Check9for9convergence9and9adjust9T89appropriately.
99999999UA_HT_residual9=9UA_HT9L9UA_HT_calc
99999999if9(abs(UA_HT_residual)9<91.0eL12_dp)9exit9T8_loop99!9catches9no9HT9case
99999999secant_guess9=9temp(8)9L9UA_HT_residual9*9(last_T8_guess9L9temp(8))9/9(last_HT_residual9L9UA_HT_residual)99!9next9guess9predicted9...
99999999if9(UA_HT_residual9<90.0_dp)9then99!9UA_HT_calc9is9too9big,9temp(8)9needs9to9be9higher
999999999999if9(abs(UA_HT_residual)/UA_HT9<9tol)9exit9T8_loop99!9UA_HT9converged9(residual9is9negative)
999999999999T8_lower_bound9=9temp(8)
99999999else99!9UA_HT_calc9is9too9small,9temp(8)9needs9to9be9lower
999999999999if9(UA_HT_residual/UA_HT9<9tol)9exit9T8_loop99!9UA_HT9converged
999999999999if9(min_DT_HT9<9temperature_tolerance)9exit9T8_loop99!9UA_calc9is9still9too9low9but9there9isn't9anywhere9to9go9so9it's9ok9...
999999999999T8_upper_bound9=9temp(8)
99999999end9if99
99999999last_HT_residual9=9UA_HT_residual99!9reset9last9stored9residual9value
99999999last_T8_guess9=9temp(8)99!9reset9last9stored9guess9value

99999999!9Check9if9the9secant9method9overshoots9and9fall9back9to9bisection9if9it9does.
99999999if9(secant_guess9<=9T8_lower_bound9.or.9secant_guess9>=9T8_upper_bound)9then99!9secant9method9overshot,9use9bisection
999999999999temp(8)9=9(T8_lower_bound9+9T8_upper_bound)9*90.5_dp
99999999else
999999999999temp(8)9=9secant_guess
99999999end9if

9999end9do9T8_loop

9999!9Check9that9T8_loop9converged.
9999if9(T8_iter9>=9max_iter)9then
99999999error_trace%code9=935
99999999error_trace%lines(1)9=9509
99999999error_trace%files(1)9=93
99999999return
9999end9if

9999!9State959can9now9be9fully9defined.
9999enth(5)9=9enth(4)9+9Q_dot_HT9/9m_dot_t99!9energy9balance9on9cold9stream9of9highLtemp9recuperator
9999call9CO2_PH(P=pres(5),9H=enth(5),9error_code=error_code,9temp=temp(5),9entr=entr(5),9dens=dens(5))
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9518
99999999error_trace%files(1)9=93
99999999return
9999end9if

9999!9Set9cycle9state9point9properties.
9999recomp_cycle%temp9=9temp
9999recomp_cycle%pres9=9pres
9999recomp_cycle%enth9=9enth
9999recomp_cycle%entr9=9entr
9999recomp_cycle%dens9=9dens

9999!9Calculate9performance9metrics9for9lowLtemperature9recuperator.
9999recomp_cycle%LT%C_dot_hot9=9m_dot_t9*9(enth(8)9L9enth(9))9/9(temp(8)9L9temp(9))9999!9LT9recuperator9hot9stream9capacitance9rate
9999recomp_cycle%LT%C_dot_cold9=9m_dot_mc9*9(enth(3)9L9enth(2))9/9(temp(3)9L9temp(2))99!9LT9recuperator9cold9stream9capacitance9rate
9999C_dot_min9=9min(recomp_cycle%LT%C_dot_hot,9recomp_cycle%LT%C_dot_cold)
9999Q_dot_max9=9C_dot_min9*9(temp(8)9L9temp(2))
9999recomp_cycle%LT%eff9=9Q_dot_LT9/9Q_dot_max99!9definition9of9effectiveness
9999recomp_cycle%LT%Q_dot9=9Q_dot_LT
9999recomp_cycle%LT%min_DT9=9min_DT_LT
9999recomp_cycle%LT%N_sub9=9N_sub_hxrs
126

9999!9Calculate9performance9metrics9for9highLtemperature9recuperator.
9999recomp_cycle%HT%C_dot_hot9=9m_dot_t9*9(enth(7)9L9enth(8))9/9(temp(7)9L9temp(8))999!9HT9recuperator9hot9stream9capacitance9rate
9999recomp_cycle%HT%C_dot_cold9=9m_dot_t9*9(enth(5)9L9enth(4))9/9(temp(5)9L9temp(4))99!9HT9recuperator9cold9stream9capacitance9rate
9999C_dot_min9=9min(recomp_cycle%HT%C_dot_hot,9recomp_cycle%HT%C_dot_cold)
9999Q_dot_max9=9C_dot_min9*9(temp(7)9L9temp(4))
9999recomp_cycle%HT%eff9=9Q_dot_HT9/9Q_dot_max99!9definition9of9effectiveness
9999recomp_cycle%HT%UA_design9=9UA_HT_calc
9999recomp_cycle%HT%DP_design9=9[pres(4)9L9pres(5),9pres(7)9L9pres(8)]
9999recomp_cycle%HT%m_dot_design9=9[m_dot_t,9m_dot_t]
9999recomp_cycle%HT%Q_dot9=9Q_dot_HT
9999recomp_cycle%HT%min_DT9=9min_DT_HT
9999recomp_cycle%HT%N_sub9=9N_sub_hxrs

9999!9Set9relevant9values9for9other9heat9exchangers.
9999recomp_cycle%PHX%Q_dot9=9m_dot_t9*9(enth(6)9L9enth(5))
9999recomp_cycle%PC%Q_dot9=9m_dot_mc9*9(enth(9)9L9enth(1))

9999!9Calculate9cycle9performance9metrics.
9999w_mc9=9enth(1)9L9enth(2)99!9specific9work9of9compressor9(kJ/kg)9[negative]
9999w_t9=9enth(6)9L9enth(7)999!9specific9work9of9turbine9(kJ/kg)9[positive]
9999if9(recomp_frac9>90.0_dp)9then
99999999w_rc9=9enth(9)9L9enth(10)99!9specific9work9of9recompressor9(kJ/kg)9[negative]
9999else
99999999w_rc9=90.0_dp
9999end9if
9999recomp_cycle%W_dot_net9=9w_mc9*9m_dot_mc9+9w_rc9*9m_dot_rc9+9w_t9*9m_dot_t
9999recomp_cycle%eta_thermal9=9recomp_cycle%W_dot_net9/9recomp_cycle%PHX%Q_dot
9999recomp_cycle%recomp_frac9=9recomp_frac
9999recomp_cycle%m_dot_turbine9=9m_dot_t

end9subroutine9off_design

subroutine9target_off_design(99&
9999recomp_cycle,99999999999999&99!9[input/output]9a9RecompCycle9object9with9designLpoint9variables9set
9999T_mc_in,9999999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,99999999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999recomp_frac,999999999999999&99!9[input]9recompression9fraction
9999N_mc,9999999999999999999999&99!9[input]9main9compressor9shaft9speed
9999N_t,99999999999999999999999&99!9[input]9turbine9shaft9speed
9999target,99999999999999999999&99!9[input]9what9value9to9aim9for
9999target_code,999999999999999&99!9[input]9type9of9target:91)9W_dot92)9Q_dot_PHX
9999lowest_pressure,99999999999&99!9[input]9lowest9pressure9to9check
9999highest_pressure,9999999999&99!9[input]9highest9pressure9to9check
9999N_sub_hxrs,9999999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999tol,99999999999999999999999&99!9[input]9convergence9tolerance
9999error_trace9999999999999999&99!9[output]9an9ErrorTrace9object
9999)
9999
9999!9Given9a9target9and9a9target_code,9iterate9on9pressure9to9match9the9target.99This9subroutine9returns9an9error9if9the
9999!9target9is9not9possible9given9the9other9inputs.99Alternatively,9'target_off_design_alt'9subroutine9can9be9used9to9match9the
9999!9target9or9get9as9close9as9possible9to9the9value.9(e.g.,9if9the9target9is9109MW9but9the9maximum9power9output9of9the9cycle9is
9999!98.59MW,9the9alternative9subroutine9will9return98.59MW,9while9this9subroutine9will9return9an9error.)

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999real(dp),9intent(in)9::9T_mc_in,9T_t_in,9recomp_frac,9N_mc,9N_t,9target,9lowest_pressure,9highest_pressure,9tol
9999integer,9intent(in)99::9target_code,9N_sub_hxrs
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Parameters
9999integer,9parameter9::9max_iter9=9100
9999integer,9parameter9::9search_intervals9=92099!9number9of9intervals9to9check9for9valid9bounds9before9starting9secant9loop

9999!9Local9Variables
9999type(RecompCycle)9::9biggest_cycle
9999real(dp)9::9P_low,9P_high,9P_guess,9left_residual,9right_residual,9residual,9last_P_guess,9last_residual,9P_secant
9999real(dp)9::9target_value,9biggest_value
9999real(dp),9dimension(0:search_intervals)9::9P_guesses
9999integer9::9i,9iter
9999logical9::9lower_bound_found,9upper_bound_found

9999!9Determine9the9interval9containing9the9solution.
9999lower_bound_found9=9.false.
9999upper_bound_found9=9.false.
9999left_residual9=9L1.0e12_dp99!9initialized9to9large9negative9value
9999right_residual9=91.0e12_dp99!9initialized9to9large9positive9value
9999P_low9=9lowest_pressure
9999P_high9=9highest_pressure
9999P_guesses9=9[9(9P_low9+9i9*9(P_high9L9P_low)9/9real(search_intervals,dp)9,9i9=90,9search_intervals9)9]99!9create9linear9vector9of9guesses
9999biggest_value9=90.0_dp
9999biggest_cycle9=9recomp_cycle
9999do9i9=90,9search_intervals
99999999P_guess9=9P_guesses(i)
99999999call9off_design(99999999999999999&
999999999999recomp_cycle9=9recomp_cycle,9&
999999999999T_mc_in9=9T_mc_in,99999999999&
999999999999T_t_in9=9T_t_in,9999999999999&
999999999999P_mc_in9=9P_guess,99999999999&
999999999999recomp_frac9=9recomp_frac,999&
999999999999N_mc9=9N_mc,99999999999999999&
127

999999999999N_t9=9N_t,9999999999999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,99999&
999999999999tol9=9tol,9999999999999999999&
999999999999error_trace9=9error_trace9999&
999999999999)
99999999if9(error_trace%code9==90)9then
999999999999if9(recomp_cycle%pres(2)9>9recomp_cycle%high_pressure_limit9*91.2_dp)9exit99!9compressor9inlet9pressure9is9getting9too9big
999999999999select9case9(target_code)
9999999999999999case9(1);9target_value9=9recomp_cycle%W_dot_net
9999999999999999case9(2);9target_value9=9recomp_cycle%PHX%Q_dot
999999999999end9select
999999999999residual9=9target_value9L9target
999999999999if9(target_value9>9biggest_value)9then99!9keep9track9of9the9largest9value9seen
9999999999999999biggest_cycle9=9recomp_cycle
9999999999999999biggest_value9=9target_value
999999999999end9if
999999999999if9(residual9>=90.0_dp)9then99!9value9is9above9target
9999999999999999if9(residual9<9right_residual)9then99!9first9right9bound9or9a9better9bound;9use9it
99999999999999999999P_high9=9P_guess
99999999999999999999right_residual9=9residual
99999999999999999999upper_bound_found9=9.true.
9999999999999999end9if
999999999999else99!9value9is9below9target
9999999999999999if9(residual9>9left_residual)9then99!9note:9residual9and9left_residual9are9negative
99999999999999999999P_low9=9P_guess
99999999999999999999left_residual9=9residual
99999999999999999999lower_bound_found9=9.true.
9999999999999999end9if
999999999999end9if
99999999end9if
99999999if9(lower_bound_found9.and.9upper_bound_found)9exit
9999end9do

9999if9(.not.9(lower_bound_found9.and.9upper_bound_found))9then99!9solution9not9found9in9interval;9return9cycle9with9largest9target
99999999error_trace%code9=92699!9this9is9a9specific9code9that9is9used9by9optimal_target_off_design
99999999error_trace%lines(1)9=9667
99999999error_trace%files(1)9=93
99999999recomp_cycle9=9biggest_cycle
99999999return
9999end9if

9999!9Enter9secant9/9bisection9loop.
9999P_guess9=9(P_low9+9P_high)9*90.5_dp99!9start9with9bisection9(note:9could9use9left9and9right9bounds9and9residuals9to9get9a9better...
9999do9iter9=91,9max_iter

99999999call9off_design(99999999999999999&
999999999999recomp_cycle9=9recomp_cycle,9&
999999999999T_mc_in9=9T_mc_in,99999999999&
999999999999T_t_in9=9T_t_in,9999999999999&
999999999999P_mc_in9=9P_guess,99999999999&
999999999999recomp_frac9=9recomp_frac,999&
999999999999N_mc9=9N_mc,99999999999999999&
999999999999N_t9=9N_t,9999999999999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,99999&
999999999999tol9=9tol,9999999999999999999&
999999999999error_trace9=9error_trace9999&
999999999999)
99999999if9(error_trace%code9/=90)9then99!9results9not9valid;9choose9a9random9value9between9P_low9and9P_high9for9next9guess
999999999999call9random_number(P_guess)99!909<=9P_guess9<91
999999999999P_guess9=9P_low9+9(P_high9L9P_low)9*9P_guess
999999999999cycle
99999999end9if

99999999!9Check9residual
99999999select9case9(target_code)
999999999999case9(1);9residual9=9recomp_cycle%W_dot_net9L9target99!9W_dot
999999999999case9(2);9residual9=9recomp_cycle%PHX%Q_dot9L9target99!9Q_dot_PHX
99999999end9select
99999999if9(residual9>=90.0_dp)9then99!9value9is9above9target
999999999999if9(residual9/9target9<=9tol)9exit99!9converged
999999999999P_high9=9P_guess
99999999else99!9value9is9below9target
999999999999if9(Lresidual9/9target9<=9tol)9exit99!9converged9(residual9is9negative)
999999999999P_low9=9P_guess
99999999end9if
99999999if9(abs(P_highLP_low)9<90.1_dp)9exit99!9interval9is9tiny;9consider9it9converged

99999999!9Determine9next9guess.
99999999P_secant9=9P_guess9L9residual9*9(last_P_guess9L9P_guess)9/9(last_residual9L9residual)99!9next9guess9predicted9using9secant9method9999
99999999last_P_guess9=9P_guess
99999999last_residual9=9residual
99999999P_guess9=9P_secant
99999999if9(P_guess9<=9P_low9.or.9P_guess9>=9P_high)9P_guess9=9(P_low9+9P_high)9*90.5_dp99!9secant9overshot,9use9bisection

9999end9do

9999!9Check9for9convergence.
9999if9(iter9>=9max_iter)9then
99999999error_trace%code9=982
99999999error_trace%lines(1)9=9721
99999999error_trace%files(1)9=93
99999999return
128

9999end9if

end9subroutine9target_off_design

subroutine9target_off_design_alt(9&
9999recomp_cycle,99999999999999&99!9[input/output]9a9RecompCycle9object9with9designLpoint9variables9set
9999T_mc_in,9999999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,99999999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999recomp_frac,999999999999999&99!9[input]9recompression9fraction
9999N_mc,9999999999999999999999&99!9[input]9main9compressor9shaft9speed
9999N_t,99999999999999999999999&99!9[input]9turbine9shaft9speed
9999target,99999999999999999999&99!9[input]9what9value9to9aim9for
9999target_code,999999999999999&99!9[input]9type9of9target:91)9W_dot92)9Q_dot_PHX
9999lowest_pressure,99999999999&99!9[input]9lowest9pressure9to9check
9999highest_pressure,9999999999&99!9[input]9highest9pressure9to9check
9999N_sub_hxrs,9999999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999tol,99999999999999999999999&99!9[input]9convergence9tolerance
9999error_trace9999999999999999&99!9[output]9an9ErrorTrace9object
9999)
9999
9999!9Given9a9target9and9a9target_code,9iterate9on9pressure9to9find9the9minimum9residual9between9the9actual9and9calculated.

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999real(dp),9intent(in)9::9T_mc_in,9T_t_in,9recomp_frac,9N_mc,9N_t,9target,9lowest_pressure,9highest_pressure,9tol
9999integer,9intent(in)99::9target_code,9N_sub_hxrs
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Parameters
9999real(dp),9parameter9::9fmin_tol9=90.01_dp99!9absolute9pressure9tolerance

9999!9External9Functions
9999real(dp),9external9::9fmin

9999!9Local9Variables
9999type(RecompCycle)9::9best_recomp_cycle
9999real(dp)9::9best_residual
9999logical99::9solution_found

9999solution_found9=9.false.
9999best_residual9=91.0e12_dp
9999best_residual9=9fmin(lowest_pressure,9highest_pressure,9target_residual,9fmin_tol)
9999if9(solution_found)9then
99999999recomp_cycle9=9best_recomp_cycle
9999else
99999999error_trace%code9=9999
99999999error_trace%lines(1)9=9768
99999999error_trace%files(1)9=93
9999end9if

9999contains

99999999real(dp)9function9target_residual(P_mc_in)
999999999999!9Return9the9absolute9value9of9the9residual9between9the9target9and
999999999999!9its9calculated9value.99No9validity9checking9is9performed.
999999999999real(dp),9intent(in)9::9P_mc_in

999999999999call9off_design(99999999999999999&
9999999999999999recomp_cycle9=9recomp_cycle,9&
9999999999999999T_mc_in9=9T_mc_in,99999999999&
9999999999999999T_t_in9=9T_t_in,9999999999999&
9999999999999999P_mc_in9=9P_mc_in,99999999999&
9999999999999999recomp_frac9=9recomp_frac,999&
9999999999999999N_mc9=9N_mc,99999999999999999&
9999999999999999N_t9=9N_t,9999999999999999999&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,99999&
9999999999999999tol9=9tol,9999999999999999999&
9999999999999999error_trace9=9error_trace9999&
9999999999999999)
999999999999if9(error_trace%code9/=90)9then
9999999999999999target_residual9=91.0e15_dp
9999999999999999return
999999999999end9if

999999999999select9case9(target_code)
9999999999999999case9(1);9target_residual9=9recomp_cycle%W_dot_net9L9target99!9W_dot
9999999999999999case9(2);9target_residual9=9recomp_cycle%PHX%Q_dot9L9target99!9Q_dot_PHX
999999999999end9select

999999999999if9(abs(target_residual)9<9abs(best_residual))9then
9999999999999999solution_found9=9.true.
9999999999999999best_residual9=9target_residual
9999999999999999best_recomp_cycle9=9recomp_cycle
999999999999end9if

999999999999target_residual9=9abs(target_residual)

99999999end9function9target_residual99999999

end9subroutine9target_off_design_alt
129

subroutine9optimal_off_design(9&
9999recomp_cycle,99999999999999&99!9[input/output]9a9RecompCycle9object9with9designLpoint9variables9set
9999T_mc_in,9999999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,99999999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999value_code,9999999999999999&99!9[input]9value9to9maximize:91)9eta,92)9W_dot
9999N_sub_hxrs,9999999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9heat9exchanger
9999P_mc_in_guess,9999999999999&99!9[input]9initial9guess9for9P_mc_in9when9iterating9to9hit9target,9or9set9P_mc_in9if9value_code9is90
9999fixed_P_mc_in,9999999999999&99!9[input]9if9.true.,9P_mc_in9is9fixed9at9P_mc_in_guess
9999recomp_frac_guess,999999999&99!9[input]9initial9guess9for9recompression9fraction
9999fixed_recomp_frac,999999999&99!9[input]9if9.true.,9recomp_frac9is9fixed9at9recomp_frac_guess
9999N_mc_guess,9999999999999999&99!9[input]9initial9guess9for9main9compressor9shaft9speed
9999fixed_N_mc,9999999999999999&99!9[input]9if9.true.,9N_mc9is9fixed9at9N_mc_guess
9999N_t_guess,99999999999999999&99!9[input]9initial9guess9for9turbine9shaft9speed9(negative9value9links9it9to9N_mc)
9999fixed_N_t,99999999999999999&99!9[input]9if9.true.,9N_t9is9fixed9at9N_t_guess
9999tol,99999999999999999999999&99!9[input]9convergence9tolerance
9999opt_tol,9999999999999999999&99!9[input]9optimization9convergence9tolerance
9999error_trace9999999999999999&99!9[output]9an9ErrorTrace9object
9999)

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999real(dp),9intent(in)9::9T_mc_in,9T_t_in,9P_mc_in_guess,9recomp_frac_guess,9N_mc_guess,9N_t_guess,9tol,9opt_tol
9999logical,9intent(in)99::9fixed_P_mc_in,9fixed_recomp_frac,9fixed_N_mc,9fixed_N_t
9999integer,9intent(in)99::9value_code,9N_sub_hxrs
9999type(ErrorTrace),9intent(out)99::9error_trace

9999!9Subplex9Parameters9and9Variables
9999integer,9parameter9::9maxf9=9200
9999integer,9parameter9::9max_free_vars9=94
9999integer99::9iflag,9iwork(50),9mode,9nfe
9999real(dp)9::9fmin,9scale(max_free_vars),9work(50),9x(max_free_vars)

9999!9Local9Variables
9999real(dp)9::9largest_value,9N_t_local
9999integer99::9n,9index
9999logical99::9solution_found
9999type(RecompCycle)9::9optimal_cycle

9999!9Initialize9guess9array.
9999x9=90.0_dp
9999index9=91
9999if9(.not.9fixed_P_mc_in)9then
99999999x(index)9=9P_mc_in_guess
99999999scale(index)9=950.0_dp99!9P_mc_in9scale
99999999index9=9index9+91
9999end9if9999
9999if9(.not.9fixed_recomp_frac)9then
99999999x(index)9=9recomp_frac_guess
99999999scale(index)9=90.01_dp999!9recomp9scale
99999999index9=9index9+91
9999end9if
9999if9(.not.9fixed_N_mc)9then
99999999x(index)9=9N_mc_guess
99999999scale(index)9=9100.0_dp999!9N_mc_scale
99999999index9=9index9+91
9999end9if9999
9999if9(.not.9fixed_N_t)9then
99999999x(index)9=9N_t_guess
99999999scale(index)9=9100.0_dp999!9N_t_scale
99999999index9=9index9+91
9999end9if
9999n9=9index9L9199

9999if9(n9>90)9then99!9need9to9call9subplex
99999999solution_found9=9.false.
99999999largest_value9=90.0_dp
99999999mode9=90
99999999call9subplx(off_design_point_value,9n,9opt_tol,9maxf,9mode,9scale,9x,9fmin,9nfe,9work,9iwork,9iflag)
99999999if9(solution_found)9then
999999999999recomp_cycle9=9optimal_cycle
999999999999error_trace%code9=90
999999999999error_trace%lines9=90
999999999999error_trace%files9=90
99999999else
999999999999error_trace%code9=9111
999999999999error_trace%lines(1)9=9886
999999999999error_trace%files(1)9=93
999999999999return
99999999end9if
9999else99!9just9call9off_design9subroutine9(with9fixed9inputs)
99999999if9(N_t_guess9<=90.0_dp)9then
999999999999N_t_local9=9N_mc_guess99!9link9turbine9and9main9compressor9shafts
99999999else
999999999999N_t_local9=9N_t_guess
99999999end9if
99999999call9off_design(999999999999999999999&
999999999999recomp_cycle9=9recomp_cycle,99999&
999999999999T_mc_in9=9T_mc_in,999999999999999&
999999999999T_t_in9=9T_t_in,99999999999999999&
999999999999P_mc_in9=9P_mc_in_guess,999999999&
999999999999recomp_frac9=9recomp_frac_guess,9&
130

999999999999N_mc9=9N_mc_guess,999999999999999&
999999999999N_t9=9N_t_local,99999999999999999&
999999999999N_sub_hxrs9=9N_sub_hxrs,999999999&
999999999999tol9=9tol,99999999999999999999999&
999999999999error_trace9=9error_trace99999999&
999999999999)
99999999if9(error_trace%code9==90)9then99!9check9validity9of9results
999999999999solution_found9=9recomp_cycle%pres(2)9<=9recomp_cycle%high_pressure_limit99!9highLpressure9limit
999999999999if9(.not.9surge_allowed)9then
9999999999999999if9(recomp_cycle%mc%surge)9solution_found9=9.false.
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%surge)9solution_found9=9.false.
999999999999end9if
999999999999if9(.not.9supersonic_tip_speed_allowed)9then
9999999999999999if9(recomp_cycle%mc%w_tip_ratio9>91.0_dp)9solution_found9=9.false.
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%w_tip_ratio9>91.0_dp)9solution_found9=9.false.
9999999999999999if9(recomp_cycle%t%w_tip_ratio9>91.0_dp)9solution_found9=9.false.
999999999999end9if
999999999999if9(.not.9solution_found)9then
9999999999999999error_trace%code9=9112
9999999999999999error_trace%lines(1)9=9904
9999999999999999error_trace%files(1)9=93
999999999999end9if
99999999end9if
9999end9if

9999contains

99999999real(dp)9function9off_design_point_value(n,9x)
999999999999!9Call9the9off_design9subroutine9with9inputs9contained9in9the9x9array.
999999999999!9Returns9the9power9output9or9thermal9efficiency,9depending9on9the9value9code.
999999999999integer,9intent(in)99::9n99999!9number9of9inputs9that9are9varied9during9optimization
999999999999real(dp),9intent(in)9::9x(n)99!9inputs9with9order:9recomp_frac,9N_mc,9N_t9(some9can9be9missing)
999999999999real(dp)9::9P_mc_in_local,9recomp_frac_local,9N_mc_local,9N_t_local

999999999999!9Extract9input9variables9from9x.
999999999999index9=91
999999999999if9(.not.9fixed_P_mc_in)9then
9999999999999999P_mc_in_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999P_mc_in_local9=9P_mc_in_guess
999999999999end9if99999999
999999999999if9(.not.9fixed_recomp_frac)9then
9999999999999999recomp_frac_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999recomp_frac_local9=9recomp_frac_guess
999999999999end9if999999999999
999999999999if9(.not.9fixed_N_mc)9then
9999999999999999N_mc_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999N_mc_local9=9N_mc_guess
999999999999end9if
999999999999if9(.not.9fixed_N_t)9then
9999999999999999N_t_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999N_t_local9=9N_t_guess
999999999999end9if
999999999999if9(N_t_local9<=90.0_dp)9N_t_local9=9N_mc_local99!9link9turbine9and9main9compressor9shafts

999999999999!9Check9inputs.
999999999999if9(recomp_frac_local9<90.0_dp)9then
9999999999999999off_design_point_value9=90.0_dp
9999999999999999return
999999999999end9if

999999999999!9Call9off_design9subroutine.
999999999999call9off_design(999999999999999999999&
9999999999999999recomp_cycle9=9recomp_cycle,99999&
9999999999999999T_mc_in9=9T_mc_in,999999999999999&
9999999999999999T_t_in9=9T_t_in,99999999999999999&
9999999999999999P_mc_in9=9P_mc_in_local,999999999&
9999999999999999recomp_frac9=9recomp_frac_local,9&
9999999999999999N_mc9=9N_mc_local,999999999999999&
9999999999999999N_t9=9N_t_local,99999999999999999&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,999999999&
9999999999999999tol9=9tol,99999999999999999999999&
9999999999999999error_trace9=9error_trace99999999&
9999999999999999)
999999999999if9(error_trace%code9/=90)9then
9999999999999999off_design_point_value9=90.0_dp9
9999999999999999return
999999999999end9if
999999999999select9case9(value_code)
9999999999999999case9(1);9off_design_point_value9=9Lrecomp_cycle%eta_thermal
9999999999999999case9(2);9off_design_point_value9=9Lrecomp_cycle%W_dot_net
999999999999end9select

999999999999!9Check9validity.
999999999999if9(recomp_cycle%pres(2)9>9recomp_cycle%high_pressure_limit)9then99!9above9highLpressure9limit;9provide9optimizer9with9...
131

9999999999999999off_design_point_value9=9off_design_point_value9/9(10_dp9+9recomp_cycle%pres(2)9L9recomp_cycle%high_pressure_limit)
999999999999end9if
999999999999if9(.not.9surge_allowed)9then
9999999999999999if9(recomp_cycle%mc%surge)9off_design_point_value9=90.0_dp
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%surge)9off_design_point_value9=90.0_dp
999999999999end9if
999999999999if9(.not.9supersonic_tip_speed_allowed)9then
9999999999999999if9(recomp_cycle%mc%w_tip_ratio9>91.0_dp)9off_design_point_value9=90.0_dp
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%w_tip_ratio9>91.0_dp)9off_design_point_value9=90.0_dp
9999999999999999if9(recomp_cycle%t%w_tip_ratio9>91.0_dp)9off_design_point_value9=90.0_dp
999999999999end9if

999999999999!9Check9if9this9is9the9optimal9cycle.
999999999999if9(abs(off_design_point_value)9>9largest_value)9then
9999999999999999solution_found9=9.true.
9999999999999999optimal_cycle9=9recomp_cycle
9999999999999999largest_value9=9abs(off_design_point_value)
999999999999end9if

99999999end9function9off_design_point_value

end9subroutine9optimal_off_design

subroutine9optimal_target_off_design(9&
9999recomp_cycle,999999999999999999999&99!9[input/output]9a9RecompCycle9object9with9designLpoint9variables9set
9999T_mc_in,99999999999999999999999999&99!9[input]9compressor9inlet9temperature9(K)
9999T_t_in,999999999999999999999999999&99!9[input]9turbine9inlet9temperature9(K)
9999target,999999999999999999999999999&99!9[input]9target9value9for9W_dot_net9or9Q_dot_PHX9(kW)
9999target_code,9999999999999999999999&99!9[input]9type9of9optimization:91)9target9W_dot9(max9eta),92)9target9Q_dot_PHX9(max9eta)
9999N_sub_hxrs,99999999999999999999999&99!9[input]9number9of9subLheat9exchangers9to9use9when9calculating9UA9value9for9a9hxr
9999lowest_pressure,999999999999999999&99!9[input]9the9lowest9pressure9to9check
9999highest_pressure,99999999999999999&99!9[input]9the9highest9pressure9to9check
9999recomp_frac_guess,9999999999999999&99!9[input]9initial9guess9for9recompression9fraction
9999fixed_recomp_frac,9999999999999999&99!9[input]9if9.true.,9recomp_frac9is9fixed9at9recomp_frac_guess
9999N_mc_guess,99999999999999999999999&99!9[input]9initial9guess9for9main9compressor9shaft9speed
9999fixed_N_mc,99999999999999999999999&99!9[input]9if9.true.,9N_mc9is9fixed9at9N_mc_guess
9999N_t_guess,999999999999999999999999&99!9[input]9initial9guess9for9turbine9shaft9speed9(negative9value9links9it9to9N_mc)
9999fixed_N_t,999999999999999999999999&99!9[input]9if9.true.,9N_t9is9fixed9at9N_t_guess
9999tol,999999999999999999999999999999&99!9[input]9convergence9tolerance
9999opt_tol,99999999999999999999999999&99!9[input]9optimization9convergence9tolerance
9999error_trace99999999999999999999999&99!9[output]9an9ErrorTrace9object
9999)
9999
9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999real(dp),9intent(in)9::9T_mc_in,9T_t_in,9target,9lowest_pressure,9highest_pressure,9recomp_frac_guess,9N_mc_guess,9N_t_guess
9999real(dp),9intent(in)9::9tol,9opt_tol
9999logical,9intent(in)99::9fixed_recomp_frac,9fixed_N_mc,9fixed_N_t
9999integer,9intent(in)99::9target_code,9N_sub_hxrs
9999type(ErrorTrace),9intent(out)99::9error_trace

9999!9Subplex9Parameters9and9Variables
9999integer,9parameter9::9maxf9=9200
9999integer,9parameter9::9max_free_vars9=93
9999integer99::9iflag,9iwork(50),9mode,9nfe
9999real(dp)9::9subplex_fmin,9scale(max_free_vars),9work(50),9x(max_free_vars)

9999!9Local9Variables
9999type(RecompCycle)9::9best_recomp_cycle
9999real(dp)9::9best_eta,9biggest_target,9P_low,9unused_var
9999integer99::9index,9n
9999logical99::9solution_found,9point_found

9999!9Determine9the9largest9possible9power9output9of9the9cycle.
9999point_found9=9.false.
9999P_low9=9lowest_pressure
9999do
99999999call9optimal_off_design(9999999999999999999&
999999999999recomp_cycle9=9recomp_cycle,99999999999&
999999999999T_mc_in9=9T_mc_in,999999999999999999999&
999999999999T_t_in9=9T_t_in,99999999999999999999999&
999999999999value_code9=92,999999999999999999999999&99!9max9W_dot
999999999999N_sub_hxrs9=9N_sub_hxrs,999999999999999&
999999999999P_mc_in_guess9=9P_low,99999999999999999&
999999999999fixed_P_mc_in9=9.false.,999999999999999&
999999999999recomp_frac_guess9=9recomp_frac_guess,9&
999999999999fixed_recomp_frac9=9fixed_recomp_frac,9&
999999999999N_mc_guess9=9N_mc_guess,999999999999999&
999999999999fixed_N_mc9=9fixed_N_mc,999999999999999&
999999999999N_t_guess9=9N_t_guess,99999999999999999&
999999999999fixed_N_t9=9fixed_N_t,99999999999999999&
999999999999tol9=9tol,99999999999999999999999999999&
999999999999opt_tol9=9opt_tol,999999999999999999999&
999999999999error_trace9=9error_trace99999999999999&
999999999999)
99999999if9(error_trace%code9==90)9then
999999999999if9(point_found)9exit99!9exit9only9after9testing9two9starting9points9(prevents9optimization9nearLmisses)
999999999999point_found9=9.true.
99999999end9if
99999999P_low9=9P_low9+9500.0_dp
99999999if9(P_low9>9highest_pressure)9exit
132

9999end9do

9999if9(.not.9point_found)9then99!9this9is9an9unexpected9error
99999999error_trace%code9=999
99999999error_trace%lines(1)9=91096
99999999error_trace%files(1)9=93
99999999return
9999end9if

9999select9case9(target_code)
99999999case9(1);9biggest_target9=9recomp_cycle%W_dot_net
99999999case9(2);9biggest_target9=9recomp_cycle%PHX%Q_dot
9999end9select
99999999
9999!9If9the9target9is9not9possible,9return9the9cycle9with9the9largest9(based9on9power9output).
9999if9(biggest_target9<=9target)9then
99999999error_trace%code9=9099!9reset9error9code
99999999error_trace%lines9=90
99999999error_trace%files9=90
99999999return
9999end9if

9999!9Initialize9guess9array.
9999x9=90.0_dp
9999index9=9199
9999if9(.not.9fixed_recomp_frac)9then
99999999x(index)9=9recomp_frac_guess
99999999scale(index)9=90.01_dp999!9recomp9scale
99999999index9=9index9+91
9999end9if
9999if9(.not.9fixed_N_mc)9then
99999999x(index)9=9N_mc_guess
99999999scale(index)9=9100.0_dp999!9N_mc_scale
99999999index9=9index9+91
9999end9if9999
9999if9(.not.9fixed_N_t)9then
99999999x(index)9=9N_t_guess
99999999scale(index)9=9100.0_dp999!9N_t_scale
99999999index9=9index9+91
9999end9if
9999n9=9index9L91999999
9999solution_found9=9.false.
9999best_eta9=90.0_dp
9999if9(n9>90)9then99!9call9subplex
99999999mode9=90
99999999call9subplx(eta_at_target,9n,9opt_tol,9maxf,9mode,9scale,9x,9subplex_fmin,9nfe,9work,9iwork,9iflag)
9999else
99999999unused_var9=9eta_at_target(n,9x)99!9necessary9to9get9recomp_cycle9at9target9(ignores9x9array)9[warning:9somewhat9untested]
9999end9if
9999if9(.not.9solution_found)9then
99999999error_trace%code9=998
99999999error_trace%lines(1)9=91143
99999999error_trace%files(1)9=93
99999999return
9999end9if

9999return

9999contains

99999999real(dp)9function9eta_at_target(n,9x)
999999999999!9Call9the9target_off_design9subroutine9with9inputs9contained9in9the9x9array.
999999999999!9Returns9(negative)9thermal9efficiency.
999999999999integer,9intent(in)99::9n99999!9number9of9inputs9that9are9varied9during9optimization
999999999999real(dp),9intent(in)9::9x(n)99!9inputs9with9order:9recomp_frac,9N_mc,9N_t9(some9can9be9missing)
999999999999real(dp)9::9recomp_frac_local,9N_mc_local,9N_t_local

999999999999!9Extract9input9variables9from9x.
999999999999index9=919999
999999999999if9(.not.9fixed_recomp_frac)9then
9999999999999999recomp_frac_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999recomp_frac_local9=9recomp_frac_guess
999999999999end9if999999999999
999999999999if9(.not.9fixed_N_mc)9then
9999999999999999N_mc_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999N_mc_local9=9N_mc_guess
999999999999end9if
999999999999if9(.not.9fixed_N_t)9then
9999999999999999N_t_local9=9x(index)
9999999999999999index9=9index9+91
999999999999else
9999999999999999N_t_local9=9N_t_guess
999999999999end9if
999999999999if9(N_t_local9<=90.0_dp)9N_t_local9=9N_mc_local99!9link9turbine9and9main9compressor9shafts9if9necessary

999999999999!9Check9inputs.
999999999999if9(recomp_frac_local9<90.0_dp)9then
9999999999999999eta_at_target9=90.0_dp
133

9999999999999999return
999999999999end9if

999999999999!9Call9target_off_design9subroutine.
999999999999call9target_off_design(999999999999999999&
9999999999999999recomp_cycle9=9recomp_cycle,999999999&
9999999999999999T_mc_in9=9T_mc_in,9999999999999999999&
9999999999999999T_t_in9=9T_t_in,999999999999999999999&
9999999999999999recomp_frac9=9recomp_frac_local,99999&
9999999999999999N_mc9=9N_mc_local,9999999999999999999&
9999999999999999N_t9=9N_t_local,999999999999999999999&
9999999999999999target9=9target,999999999999999999999&
9999999999999999target_code9=9target_code,99999999999&
9999999999999999lowest_pressure9=9lowest_pressure,999&
9999999999999999highest_pressure9=9highest_pressure,9&
9999999999999999N_sub_hxrs9=9N_sub_hxrs,9999999999999&
9999999999999999tol9=9tol,999999999999999999999999999&
9999999999999999error_trace9=9error_trace999999999999&
9999999999999999)
999999999999if9(error_trace%code9==926)9then99!9could9not9hit9target
9999999999999999eta_at_target9=91.0_dp9/9(100.0_dp9+9abs(recomp_cycle%W_dot_net))99!9provides9a9directional9hint9to9optimizer
9999999999999999return
999999999999else9if9(error_trace%code9/=90)9then99!9uncaught9error
9999999999999999eta_at_target9=90.0_dp9
9999999999999999return
999999999999else
9999999999999999eta_at_target9=9recomp_cycle%eta_thermal
999999999999end9if

999999999999!9Check9validity.
999999999999if9(recomp_cycle%pres(2)9>9recomp_cycle%high_pressure_limit)9then
9999999999999999eta_at_target9=9eta_at_target9/9(10.0_dp9+9recomp_cycle%pres(2)9L9recomp_cycle%high_pressure_limit)99!9provides9a9...
999999999999end9if
999999999999if9(.not.9surge_allowed)9then
9999999999999999if9(recomp_cycle%mc%surge)9eta_at_target9=90.0_dp
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%surge)9eta_at_target9=90.0_dp
999999999999end9if
999999999999if9(.not.9supersonic_tip_speed_allowed)9then
9999999999999999if9(recomp_cycle%mc%w_tip_ratio9>91.0_dp)9eta_at_target9=90.0_dp
9999999999999999if9(recomp_cycle%recomp_frac9>90.0_dp9.and.9recomp_cycle%rc%w_tip_ratio9>91.0_dp)9eta_at_target9=90.0_dp
9999999999999999if9(recomp_cycle%t%w_tip_ratio9>91.0_dp)9eta_at_target9=90.0_dp
999999999999end9if

999999999999!9Check9if9this9is9the9best9solution.
999999999999if9(eta_at_target9>9best_eta)9then
9999999999999999best_eta9=9eta_at_target
9999999999999999best_recomp_cycle9=9recomp_cycle
9999999999999999solution_found9=9.true.
999999999999end9if

999999999999eta_at_target9=9Leta_at_target99!9subplex9is9minimizer

99999999end9function9eta_at_target

end9subroutine9optimal_target_off_design

end9module9off_design_point
134

Appendix IV: compressors Module


snl_compressor.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'compressors',9which9defines9a9number9of9subroutines9based9on9the9radial9compressor9being
!9studied9at9Sandia9National9Laboratory.
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9July912,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9compressors

use9core
implicit9none
private
public9::9compressor_sizing,9recompressor_sizing,9off_design_compressor,9off_design_recompressor

real(dp),9parameter9::9snl_phi_design9=90.02971_dp99!9designLpoint9flow9coefficient9for9Sandia9compressor9(corresponds9to9max9eta)
real(dp),9parameter9::9snl_phi_min9=90.02_dp99999999!9approximate9surge9limit9for9SNL9compressor
real(dp),9parameter9::9snl_phi_max9=90.05_dp99999999!9approximate9xLintercept9for9SNL9compressor

contains

subroutine9compressor_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9compressor9rotor9diameter9and9designLpoint9shaft9speed
9999!9and9store9values9in9recomp_cycle%mc.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object
9999
9999use9CO2_properties,9only:9CO2_TD,9CO2_PS

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9D_in,9h_in,9s_in,9T_out,9P_out,9h_out,9D_out,9ssnd_out,9h_s_out,9psi_design,9m_dot,9w_i,9U_tip,9N_rad_s

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999D_in9=9recomp_cycle%dens(1)
9999h_in9=9recomp_cycle%enth(1)
9999s_in9=9recomp_cycle%entr(1)
9999T_out9=9recomp_cycle%temp(2)
9999P_out9=9recomp_cycle%pres(2)
9999h_out9=9recomp_cycle%enth(2)
9999D_out9=9recomp_cycle%dens(2)
9999call9CO2_TD(T=T_out,9D=D_out,9error_code=error_code,9ssnd=ssnd_out)99!9speed9of9sound9at9outlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=965
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9compression
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=972
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9psi9at9the9designLpoint9phi9using9Horner's9method9
9999psi_design9=9((((L498626.0_dp9*9snl_phi_design)9+953224.0_dp)9*9snl_phi_design9L92505.0_dp)9*9snl_phi_design9+954.6_dp)9&
99999999999999999*9snl_phi_design9+90.04049_dp99!9from9dimensionless9modified9head9curve9(at9designLpoint,9psi9and9modified9psi9are9equal)
135

999
9999!9Determine9required9size9and9speed9of9compressor.
9999m_dot9=9recomp_cycle%m_dot_turbine9*9(1.0_dp9L9recomp_cycle%recomp_frac)99!9mass9flow9rate9through9compressor9(kg/s)
9999w_i9=9h_s_out9L9h_in99!9positive9isentropic9specific9work9of9compressor9(kJ/kg)
9999U_tip9=9sqrt(1000.0_dp9*9w_i9/9psi_design)99!9rearranging9definition9of9head9coefficient9and9converting9kJ9to9J
9999recomp_cycle%mc%D_rotor9=9sqrt(m_dot9/9(snl_phi_design9*9D_in9*9U_tip))99!9rearranging9definition9of9flow9coefficient
9999N_rad_s9=9U_tip9*92.0_dp9/9recomp_cycle%mc%D_rotor999!9shaft9speed9in9rad/s
9999recomp_cycle%mc%N_design9=9N_rad_s9*99.549296590_dp99!9shaft9speed9in9rpm

9999!9Set9other9compressor9variables.
9999recomp_cycle%mc%w_tip_ratio9=9U_tip9/9ssnd_out99999!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound
9999recomp_cycle%mc%eta_design9=9w_i9/9(h_out9L9h_in)99!9definition9of9isentropic9efficiency
9999recomp_cycle%mc%eta9=9recomp_cycle%mc%eta_design
9999recomp_cycle%mc%phi_design9=9snl_phi_design
9999recomp_cycle%mc%phi9=9snl_phi_design
9999recomp_cycle%mc%phi_min9=9snl_phi_min
9999recomp_cycle%mc%phi_max9=9snl_phi_max
9999recomp_cycle%mc%N9=9recomp_cycle%mc%N_design
9999recomp_cycle%mc%surge9=9.false.

end9subroutine9compressor_sizing

subroutine9recompressor_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9recompressor9rotor9diameter9and9designLpoint9shaft9speed
9999!9and9store9values9in9recomp_cycle%rc.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object

9999use9CO2_properties,9only:9CO2_TD,9CO2_PS

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9D_in,9h_in,9s_in,9T_out,9P_out,9h_out,9D_out,9ssnd_out,9h_s_out,9psi_design,9m_dot,9w_i,9U_tip,9N_rad_s

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999D_in9=9recomp_cycle%dens(9)
9999h_in9=9recomp_cycle%enth(9)
9999s_in9=9recomp_cycle%entr(9)
9999T_out9=9recomp_cycle%temp(10)
9999P_out9=9recomp_cycle%pres(10)
9999h_out9=9recomp_cycle%enth(10)
9999D_out9=9recomp_cycle%dens(10)
9999call9CO2_TD(T=T_out,9D=D_out,9error_code=error_code,9ssnd=ssnd_out)99!9speed9of9sound9at9outlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9132
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9compression
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9139
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9psi9at9the9designLpoint9phi9using9Horner's9method9
9999psi_design9=9((((L498626.0_dp9*9snl_phi_design)9+953224.0_dp)9*9snl_phi_design9L92505.0_dp)9*9snl_phi_design9+954.6_dp)9&
99999999999999999*9snl_phi_design9+90.04049_dp99!9from9dimensionless9modified9head9curve9(at9designLpoint,9psi9and9modified9psi9are9equal)
999
9999!9Determine9required9size9and9speed9of9recompressor.
9999m_dot9=9recomp_cycle%m_dot_turbine9*9recomp_cycle%recomp_frac99!9mass9flow9rate9through9recompressor9(kg/s)
9999w_i9=9h_s_out9L9h_in99!9positive9isentropic9specific9work9of9recompressor9(kJ/kg)
9999U_tip9=9sqrt(1000.0_dp9*9w_i9/9psi_design)99!9rearranging9definition9of9head9coefficient9and9converting9kJ9to9J
9999recomp_cycle%rc%D_rotor9=9sqrt(m_dot9/9(snl_phi_design9*9D_in9*9U_tip))99!9rearranging9definition9of9flow9coefficient
9999N_rad_s9=9U_tip9*92.0_dp9/9recomp_cycle%rc%D_rotor999!9shaft9speed9in9rad/s
9999recomp_cycle%rc%N_design9=9N_rad_s9*99.549296590_dp99!9shaft9speed9in9rpm

9999!9Set9other9recompressor9variables.
9999recomp_cycle%rc%w_tip_ratio9=9U_tip9/9ssnd_out9999!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound
9999recomp_cycle%rc%eta_design9=9w_i9/9(h_out9L9h_in)99!9definition9of9isentropic9efficiency
9999recomp_cycle%rc%eta9=9recomp_cycle%rc%eta_design
9999recomp_cycle%rc%phi_design9=9snl_phi_design
9999recomp_cycle%rc%phi9=9snl_phi_design
9999recomp_cycle%rc%phi_min9=9snl_phi_min
9999recomp_cycle%rc%phi_max9=9snl_phi_max
9999recomp_cycle%rc%N9=9recomp_cycle%rc%N_design
9999recomp_cycle%rc%surge9=9.false.

end9subroutine9recompressor_sizing
136

subroutine9off_design_compressor(comp,9T_in,9P_in,9m_dot,9N,9error_trace,9T_out,9P_out)
9999!9Solve9for9the9outlet9state9of9'comp'9given9its9inlet9conditions,9mass9flow9rate,9and9shaft9speed.
9999!
9999!9Inputs:
9999!999comp9LL9a9Compressor9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9compressor9inlet9temperature9(K)
9999!999P_in9LL9compressor9inlet9pressure9(kPa)
9999!999m_dot9LL9mass9flow9rate9through9compressor9(kg/s)
9999!999N9LL9shaft9speed9of9compressor9(rpm)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999T_out9LL9compressor9outlet9temperature9(K)
9999!999P_out9LL9compressor9outlet9pressure9(kPa)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'comp':9surge,9eta,9w,9w_tip_ratio,9phi

9999use9CO2_Properties,9only:9CO2_TP,9CO2_HS,9CO2_PH

9999!9Arguments
9999type(Compressor),9intent(inout)9::9comp
9999real(dp),9intent(in)9::9T_in,9P_in,9m_dot,9N
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9T_out,9P_out
9999
9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9rho_in,9h_in,9s_in,9U_tip,9phi,9phi_star,9psi_star,9eta_star,9psi,9eta_0,9dh_s,9dh,9h_s_out,9h_out,9ssnd_out

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9dens=rho_in,9enth=h_in,9entr=s_in)99!9fully9define9the9inlet9state9of9the9compressor
9999if9(error_code9/=90)9then
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9203
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9the9modified9flow9and9head9coefficients9and9efficiency9for9the9SNL9compressor.
9999U_tip9=9comp%D_rotor9*90.5_dp9*9N9*90.104719755_dp99!9tip9speed9in9m/s
9999phi9=9m_dot9/9(rho_in9*9U_tip9*9comp%D_rotor**2)9999!9flow9coefficient
9999if9(phi9<9comp%phi_min)9then9!9the9compressor9is9operating9in9the9surge9region
99999999comp%surge9=9.true.99
99999999phi9=9comp%phi_min99!9reset9phi9to9to9its9minimum9value;9this9sets9psi9and9eta9to9be9fixed9at9the9values9at9the9surge9limit
9999else
99999999comp%surge9=9.false.
9999end9if
9999phi_star9=9phi9*9(N9/9comp%N_design)**0.2_dp99!9modified9flow9coefficient
9999psi_star9=9((((L498626.0_dp9*9phi_star)9+953224.0_dp)9*9phi_star9L92505.0_dp)9*9phi_star9+954.6_dp)9*9phi_star9+90.04049_dp99!9from9...
9999eta_star9=9((((L1.638e6_dp9*9phi_star)9+9182725.0_dp)9*9phi_star9L98089.0_dp)9*9phi_star9+9168.6_dp)9*9phi_star9L90.7069_dp99!9from9...
9999psi9=9psi_star9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**3))
9999eta_09=9eta_star9*91.47528_dp9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**5))99!9efficiency9is9normalized9so9it9equals91.09at9...
9999comp%eta9=9max(eta_09*9comp%eta_design,90.0_dp)99!9the9actual9compressor9efficiency,9not9allowed9to9go9negative

9999!9Check9that9the9specified9mass9flow9rate9is9possible9with9the9compressor's9current9shaft9speed.
9999if9(psi9<=90.0_dp)9then99!9shaft9speed9is9too9low9for9the9given9m_dot
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9228
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9the9compressor9outlet9state.
9999dh_s9=9psi9*9U_tip**29*90.001_dp99!9ideal9enthalpy9rise9in9compressor,9from9definition9of9head9coefficient9(kJ/kg)
9999dh9=9dh_s9/9comp%eta99999999999999!9actual9enthalpy9rise9in9compressor
9999h_s_out9=9h_in9+9dh_s9999999999999!9ideal9enthalpy9at9compressor9outlet
9999h_out9=9h_in9+9dh99999999999999999!9actual9enthalpy9at9compressor9outlet
9999call9CO2_HS(H=h_s_out,9S=s_in,9error_code=error_code,9pres=P_out)99!9get9the9compressor9outlet9pressure
9999if9(error_code9/=90)9then99!9most9likely9case9is9that9the9outlet9pressure9is9above9the9high9pressure9limit9of9the9property9routine
99999999error_trace%code9=92
99999999error_trace%lines(1)9=9240
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=T_out,9ssnd=ssnd_out)99!9determines9compressor9outlet9temperature9and9speed9...
9999if9(error_code9/=90)9then99!9most9likely9case9is9that9the9outlet9pressure9is9above9the9high9pressure9limit9of9the9property9routine
99999999error_trace%code9=92
99999999error_trace%lines(1)9=9247
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Set9a9few9compressor9variables.
9999comp%phi9=9phi
9999comp%w_tip_ratio9=9U_tip9/9ssnd_out99999!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound

end9subroutine9off_design_compressor
137

subroutine9off_design_recompressor(comp,9T_in,9P_in,9m_dot,9P_out,9error_trace,9T_out)
9999!9Solve9for9the9outlet9state9(and9shaft9speed)9of9'comp'9given9its9inlet9conditions,9mass9flow9rate,9and9outlet9pressure.
9999!
9999!9Inputs:
9999!999comp9LL9a9Compressor9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9compressor9inlet9temperature9(K)
9999!999P_in9LL9compressor9inlet9pressure9(kPa)
9999!999m_dot9LL9mass9flow9rate9through9compressor9(kg/s)
9999!999P_out9LL9compressor9outlet9pressure9(kPa)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999T_out9LL9compressor9outlet9temperature9(K)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'comp':9N,9surge,9eta,9w,9w_tip_ratio,9phi
9999!9992)9In9order9to9solve9the9compressor,9the9value9for9flow9coefficient9(phi)9is9varied9until9convergence.
9999!9993)9Surge9is9not9allowed;9if9the9corresponding9flow9coefficient9is9not9between9phi_min9and9phi_max9an9error9is9raised.

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH

9999!9Arguments
9999type(Compressor),9intent(inout)9::9comp
9999real(dp),9intent(in)9::9T_in,9P_in,9m_dot,9P_out
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9T_out

9999!9Parameters
9999integer,9parameter9::9max_iter9=9100
9999real(dp),9parameter9::9tolerance9=91.0eL9_dp99!9absolute9tolerance9for9phi

9999!9Local9Variables
9999integer99::9iter,9error_code
9999logical99::9first_pass
9999real(dp)9::9rho_in,9h_in,9s_in,9alpha,9phi,9U_tip,9phi_star,9psi_star,9eta_star,9psi,9eta_0,9dh_s,9dh,9h_s_out,9h_out,9ssnd_out
9999real(dp)9::9N,9dh_s_calc,9residual,9next_phi,9last_phi,9last_residual

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9dens=rho_in,9enth=h_in,9entr=s_in)99!9fully9define9the9inlet9state9of9the9compressor
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9299
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9enthalpy9if9compression/expansion9is9isentropic
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9306
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999dh_s9=9h_s_out9L9h_in99!9ideal9enthalpy9rise9in9compressor

9999!9Iterate9on9phi.
9999alpha9=9m_dot9/9(rho_in9*9comp%D_rotor**2)99!9used9to9reduce9operation9count9in9loop
9999phi9=9comp%phi_design99!9start9with9designLpoint9value
9999first_pass9=9.true.
9999do9iter9=91,9max_iter
99999999U_tip9=9alpha9/9phi99!9flow9coefficient9rearranged9(with9alpha9substitution)
99999999N9=9(U_tip9*92.0_dp9/9comp%D_rotor)9*99.549296590_dp99!9shaft9speed9in9rpm
99999999phi_star9=9phi9*9(N9/9comp%N_design)**0.2_dp99!9modified9flow9coefficient
99999999psi_star9=9((((L498626.0_dp9*9phi_star)9+953224.0_dp)9*9phi_star9L92505.0_dp)9*9phi_star9+954.6_dp)9*9phi_star9+90.04049_dp99!9fro...
99999999psi9=9psi_star9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**3))
99999999dh_s_calc9=9psi9*9U_tip**29*90.001_dp99!9calculated9ideal9enthalpy9rise9in9compressor,9from9definition9of9head9coefficient9(kJ/kg)
99999999residual9=9dh_s9L9dh_s_calc
99999999if9(abs(residual)9<=9tolerance)9exit99!9converged9sufficiently
99999999if9(first_pass)9then
999999999999next_phi9=9phi9*91.0001_dp99!9take9a9small9step
999999999999first_pass9=9.false.
99999999else
999999999999next_phi9=9phi9L9residual9*9(last_phi9L9phi)9/9(last_residual9L9residual)99!9next9guess9predicted9using9secant9method
99999999end9if
99999999last_phi9=9phi
99999999last_residual9=9residual
99999999phi9=9next_phi
9999end9do

9999!9Check9for9convergence.
9999if9(iter9>=9max_iter)9then99!9did9not9converge
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9340
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9efficiency9and9outlet9state.
9999eta_star9=9((((L1.638e6_dp9*9phi_star)9+9182725.0_dp)9*9phi_star9L98089.0_dp)9*9phi_star9+9168.6_dp)9*9phi_star9L90.7069_dp99!9from9...
9999eta_09=9eta_star9*91.47528_dp9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**5))99!9efficiency9is9normalized9so9it9equals91.09at9...
9999comp%eta9=9max(eta_09*9comp%eta_design,90.0_dp)99!9the9actual9compressor9efficiency,9not9allowed9to9go9negative
9999dh9=9dh_s9/9comp%eta99999999999999!9actual9enthalpy9rise9in9compressor
9999h_out9=9h_in9+9dh99999999999999999!9actual9enthalpy9at9compressor9outlet
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=T_out,9ssnd=ssnd_out)99!9determines9compressor9outlet9temperature9and9speed9...
138

9999if9(error_code9/=90)9then99!9most9likely9case9is9that9the9outlet9pressure9is9above9the9high9pressure9limit9of9the9property9routine
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9353
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999comp%N9=9N
9999comp%phi9=9phi
9999comp%w_tip_ratio9=9U_tip9/9ssnd_out99!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound

end9subroutine9off_design_recompressor

end9module9compressors

snl_compressor_tsr.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'compressors',9which9defines9a9number9of9subroutines9based9on9the9radial9compressor9being
!9studied9at9Sandia9National9Laboratory.
!
!9Notes:
!9991)9The9recompressor9is9modeled9using9two9SNL9compressors9in9series.
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9July918,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9compressors

use9core
implicit9none
private
public9::9compressor_sizing,9recompressor_sizing,9off_design_compressor,9off_design_recompressor

real(dp),9parameter9::9snl_phi_design9=90.02971_dp99!9designLpoint9flow9coefficient9for9Sandia9compressor9(corresponds9to9max9eta)
real(dp),9parameter9::9snl_phi_min9=90.02_dp99999999!9approximate9surge9limit9for9SNL9compressor
real(dp),9parameter9::9snl_phi_max9=90.05_dp99999999!9approximate9xLintercept9for9SNL9compressor

contains

subroutine9compressor_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9compressor9rotor9diameter9and9designLpoint9shaft9speed
9999!9and9store9values9in9recomp_cycle%mc.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object
9999
9999use9CO2_properties,9only:9CO2_TD,9CO2_PS

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9D_in,9h_in,9s_in,9T_out,9P_out,9h_out,9D_out,9ssnd_out,9h_s_out,9psi_design,9m_dot,9w_i,9U_tip,9N_rad_s

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999D_in9=9recomp_cycle%dens(1)
9999h_in9=9recomp_cycle%enth(1)
9999s_in9=9recomp_cycle%entr(1)
9999T_out9=9recomp_cycle%temp(2)
9999P_out9=9recomp_cycle%pres(2)
9999h_out9=9recomp_cycle%enth(2)
9999D_out9=9recomp_cycle%dens(2)
9999call9CO2_TD(T=T_out,9D=D_out,9error_code=error_code,9ssnd=ssnd_out)99!9speed9of9sound9at9outlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=968
99999999error_trace%files(1)9=94
99999999return
9999end9if9999
139

9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9compression
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=975
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9psi9at9the9designLpoint9phi9using9Horner's9method9
9999psi_design9=9((((L498626.0_dp9*9snl_phi_design)9+953224.0_dp)9*9snl_phi_design9L92505.0_dp)9*9snl_phi_design9+954.6_dp)9&
99999999999999999*9snl_phi_design9+90.04049_dp99!9from9dimensionless9modified9head9curve9(at9designLpoint,9psi9and9modified9psi9are9equal)
999
9999!9Determine9required9size9and9speed9of9compressor.
9999m_dot9=9recomp_cycle%m_dot_turbine9*9(1.0_dp9L9recomp_cycle%recomp_frac)99!9mass9flow9rate9through9compressor9(kg/s)
9999w_i9=9h_s_out9L9h_in99!9positive9isentropic9specific9work9of9compressor9(kJ/kg)
9999U_tip9=9sqrt(1000.0_dp9*9w_i9/9psi_design)99!9rearranging9definition9of9head9coefficient9and9converting9kJ9to9J
9999recomp_cycle%mc%D_rotor9=9sqrt(m_dot9/9(snl_phi_design9*9D_in9*9U_tip))99!9rearranging9definition9of9flow9coefficient
9999N_rad_s9=9U_tip9*92.0_dp9/9recomp_cycle%mc%D_rotor999!9shaft9speed9in9rad/s
9999recomp_cycle%mc%N_design9=9N_rad_s9*99.549296590_dp99!9shaft9speed9in9rpm

9999!9Set9other9compressor9variables.
9999recomp_cycle%mc%w_tip_ratio9=9U_tip9/9ssnd_out99999!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound
9999recomp_cycle%mc%eta_design9=9w_i9/9(h_out9L9h_in)99!9definition9of9isentropic9efficiency
9999recomp_cycle%mc%eta9=9recomp_cycle%mc%eta_design
9999recomp_cycle%mc%phi_design9=9snl_phi_design
9999recomp_cycle%mc%phi9=9snl_phi_design
9999recomp_cycle%mc%phi_min9=9snl_phi_min
9999recomp_cycle%mc%phi_max9=9snl_phi_max
9999recomp_cycle%mc%N9=9recomp_cycle%mc%N_design
9999recomp_cycle%mc%surge9=9.false.

end9subroutine9compressor_sizing

subroutine9recompressor_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9recompressor9rotor9diameter9and9designLpoint9shaft9speed
9999!9and9store9values9in9recomp_cycle%rc.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object
9999
9999use9CO2_properties,9only:9CO2_TD,9CO2_PS,9CO2_PH

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Parameters
9999integer,9parameter99::9max_iter9=9100
9999real(dp),9parameter9::9tolerance9=91.0eL8_dp99!9absolute9tolerance9for9phi9and9stage9efficiency

9999!9Local9Variables
9999integer99::9iter,9error_code
9999real(dp)9::9P_in,9D_in,9h_in,9s_in,9T_out,9P_out,9h_out,9D_out,9ssnd_out,9h_s_out,9psi_design,9m_dot,9w_i,9U_tip_1,9U_tip_2
9999real(dp)9::9eta_design,9P_int,9D_int,9h_int,9s_int,9ssnd_int,9lower_bound,9upper_bound,9N_design,9D_rotor_1,9D_rotor_2,9w,9phi
9999real(dp)9::9eta_stage,9eta_2_req,9residual,9last_residual,9P_secant,9last_P_int,9secant_step,9N_rad_s

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999P_in9=9recomp_cycle%pres(9)
9999D_in9=9recomp_cycle%dens(9)
9999h_in9=9recomp_cycle%enth(9)
9999s_in9=9recomp_cycle%entr(9)
9999T_out9=9recomp_cycle%temp(10)
9999P_out9=9recomp_cycle%pres(10)
9999h_out9=9recomp_cycle%enth(10)
9999D_out9=9recomp_cycle%dens(10)

9999!9Set9a9few9variables9that9apply9to9the9whole9recompressor.
9999call9CO2_TD(T=T_out,9D=D_out,9error_code=error_code,9ssnd=ssnd_out)99!9speed9of9sound9at9outlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9144
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9ideal9specific9enthalpy9after9compression
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9151
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999eta_design9=9(h_s_out9L9h_in)9/9(h_out9L9h_in)99!9overall9isentropic9efficiency
9999m_dot9=9recomp_cycle%m_dot_turbine9*9recomp_cycle%recomp_frac99!9mass9flow9rate9through9recompressor9(kg/s)
9999psi_design9=9((((L498626.0_dp9*9snl_phi_design)9+953224.0_dp)9*9snl_phi_design9L92505.0_dp)9*9snl_phi_design9+954.6_dp)9&
99999999999999999*9snl_phi_design9+90.04049_dp99!9from9dimensionless9modified9head9curve9(at9designLpoint,9psi9and9modified9psi9are9equal)

9999!9Prepare9intermediate9pressure9iteration9loop.
9999last_residual9=90.0_dp
9999last_P_int9=91.0e12_dp99!9ensures9bisection9will9be9used9for9first9step
9999lower_bound9=9P_in9+91eL6_dp
140

9999upper_bound9=9P_out9L91eL6_dp
9999P_int9=9(lower_bound9+9upper_bound)9*90.5_dp
9999eta_stage9=9eta_design99!9first9guess9for9stage9efficiency
9999do9iter9=91,9max_iter

99999999!9First9stage
99999999call9CO2_PS(P=P_int,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9ideal9outlet9specific9enthalpy9after9first9stage
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9173
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if99999999
99999999w_i9=9h_s_out9L9h_in99!9positive9isentropic9specific9work9of9first9stage
99999999U_tip_19=9sqrt(1000.0_dp9*9w_i9/9psi_design)99!9rearranging9definition9of9head9coefficient9and9converting9kJ9to9J
99999999D_rotor_19=9sqrt(m_dot9/9(snl_phi_design9*9D_in9*9U_tip_1))99!9rearranging9definition9of9flow9coefficient
99999999N_rad_s9=9U_tip_19*92.0_dp9/9D_rotor_1999!9shaft9speed9in9rad/s
99999999N_design9=9N_rad_s9*99.549296590_dp99!9shaft9speed9in9rpm
99999999w9=9w_i9/9eta_stage99!9actual9firstLstage9work
99999999h_int9=9h_in9+9w99!9energy9balance9on9first9stage
99999999call9CO2_PH(P=P_int,9H=h_int,9error_code=error_code,9dens=D_int,9entr=s_int,9ssnd=ssnd_int)
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9187
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if

99999999!9Second9stage
99999999call9CO2_PS(P=P_out,9S=s_int,9error_code=error_code,9enth=h_s_out)99!9ideal9outlet9specific9enthalpy9after9second9stage
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9196
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if99999999
99999999w_i9=9h_s_out9L9h_int99!9positive9isentropic9specific9work9of9second9stage
99999999U_tip_29=9sqrt(1000.0_dp9*9w_i9/9psi_design)99!9rearranging9definition9of9head9coefficient9and9converting9kJ9to9J
99999999D_rotor_29=92.0_dp9*9U_tip_29/9(N_design9*90.104719755_dp)99!9required9secondLstage9diameter
99999999phi9=9m_dot9/9(D_int9*9U_tip_29*9D_rotor_2**2)99!9required9flow9coefficient
99999999eta_2_req9=9w_i9/9(h_out9L9h_int)99!9required9second9stage9efficiency9to9achieve9overall9eta_design

99999999!9Check9convergence9and9update9guesses.
99999999residual9=9snl_phi_design9L9phi
99999999if9(residual9<90.0_dp)9then99!9P_int9guess9is9too9high
999999999999if9(Lresidual9<=9tolerance9.and.9abs(eta_stageLeta_2_req)9<=9tolerance)9exit
999999999999upper_bound9=9P_int
99999999else99!9P_int9guess9is9too9low
999999999999if9(residual9<=9tolerance9.and.9abs(eta_stageLeta_2_req)9<=9tolerance)9exit
999999999999lower_bound9=9P_int
99999999end9if
99999999secant_step9=9Lresidual9*9(last_P_int9L9P_int)9/9(last_residual9L9residual)
99999999P_secant9=9P_int9+9secant_step
99999999last_P_int9=9P_int
99999999last_residual9=9residual
99999999if9(P_secant9<=9lower_bound9.or.9P_secant9>=9upper_bound)9then99!9secant9method9overshot
999999999999P_int9=9(lower_bound9+9upper_bound)9*90.5_dp
99999999else9if9(abs(secant_step)9>9abs((upper_bound9L9lower_bound)9*90.5_dp))9then99!9take9the9smaller9step9to9ensure9convergence
999999999999P_int9=9(lower_bound9+9upper_bound)9*90.5_dp
99999999else
999999999999P_int9=9P_secant99!9use9secant9guess
99999999end9if
99999999eta_stage9=90.5_dp9*9(eta_stage9+9eta_2_req)99!9update9guess9for9stage9efficiency
9999end9do

9999!9Check9for9convergence.
9999if9(iter9>=9max_iter)9then99!9did9not9converge
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9233
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Set9recompressor9variables.
9999recomp_cycle%rc%D_rotor9=9D_rotor_1
9999recomp_cycle%rc%D_rotor_29=9D_rotor_2
9999recomp_cycle%rc%N_design9=9N_design
9999recomp_cycle%rc%eta_design9=9eta_stage
9999recomp_cycle%rc%phi_design9=9snl_phi_design
9999recomp_cycle%rc%phi_min9=9snl_phi_min
9999recomp_cycle%rc%phi_max9=9snl_phi_max
9999recomp_cycle%rc%N9=9N_design
9999recomp_cycle%rc%eta9=9eta_design
9999recomp_cycle%rc%phi9=9snl_phi_design
9999recomp_cycle%rc%phi_29=9snl_phi_design
9999recomp_cycle%rc%w_tip_ratio9=9max(U_tip_19/9ssnd_int,9U_tip_29/9ssnd_out)
9999recomp_cycle%rc%surge9=9.false.

end9subroutine9recompressor_sizing
141

subroutine9off_design_compressor(comp,9T_in,9P_in,9m_dot,9N,9error_trace,9T_out,9P_out)
9999!9Solve9for9the9outlet9state9of9'comp'9given9its9inlet9conditions,9mass9flow9rate,9and9shaft9speed.
9999!
9999!9Inputs:
9999!999comp9LL9a9Compressor9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9compressor9inlet9temperature9(K)
9999!999P_in9LL9compressor9inlet9pressure9(kPa)
9999!999m_dot9LL9mass9flow9rate9through9compressor9(kg/s)
9999!999N9LL9shaft9speed9of9compressor9(rpm)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999T_out9LL9compressor9outlet9temperature9(K)
9999!999P_out9LL9compressor9outlet9pressure9(kPa)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'comp':9surge,9eta,9w,9w_tip_ratio,9phi

9999use9CO2_Properties,9only:9CO2_TP,9CO2_HS,9CO2_PH

9999!9Arguments
9999type(Compressor),9intent(inout)9::9comp
9999real(dp),9intent(in)9::9T_in,9P_in,9m_dot,9N
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9T_out,9P_out
9999
9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9rho_in,9h_in,9s_in,9U_tip,9phi,9phi_star,9psi_star,9eta_star,9psi,9eta_0,9dh_s,9dh,9h_s_out,9h_out,9ssnd_out

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9dens=rho_in,9enth=h_in,9entr=s_in)99!9fully9define9the9inlet9state9of9the9compressor
9999if9(error_code9/=90)9then
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9288
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9the9modified9flow9and9head9coefficients9and9efficiency9for9the9SNL9compressor.
9999U_tip9=9comp%D_rotor9*90.5_dp9*9N9*90.104719755_dp99!9tip9speed9in9m/s
9999phi9=9m_dot9/9(rho_in9*9U_tip9*9comp%D_rotor**2)9999!9flow9coefficient
9999if9(phi9<9comp%phi_min)9then9!9the9compressor9is9operating9in9the9surge9region
99999999comp%surge9=9.true.99
99999999phi9=9comp%phi_min99!9reset9phi9to9to9its9minimum9value;9this9sets9psi9and9eta9to9be9fixed9at9the9values9at9the9surge9limit
9999else
99999999comp%surge9=9.false.
9999end9if
9999phi_star9=9phi9*9(N9/9comp%N_design)**0.2_dp99!9modified9flow9coefficient
9999psi_star9=9((((L498626.0_dp9*9phi_star)9+953224.0_dp)9*9phi_star9L92505.0_dp)9*9phi_star9+954.6_dp)9*9phi_star9+90.04049_dp99!9from9...
9999eta_star9=9((((L1.638e6_dp9*9phi_star)9+9182725.0_dp)9*9phi_star9L98089.0_dp)9*9phi_star9+9168.6_dp)9*9phi_star9L90.7069_dp99!9from9...
9999psi9=9psi_star9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**3))
9999eta_09=9eta_star9*91.47528_dp9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**5))99!9efficiency9is9normalized9so9it9equals91.09at9...
9999comp%eta9=9max(eta_09*9comp%eta_design,90.0_dp)99!9the9actual9compressor9efficiency,9not9allowed9to9go9negative

9999!9Check9that9the9specified9mass9flow9rate9is9possible9with9the9compressor's9current9shaft9speed.
9999if9(psi9<=90.0_dp)9then99!9shaft9speed9is9too9low9for9the9given9m_dot
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9313
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Calculate9the9compressor9outlet9state.
9999dh_s9=9psi9*9U_tip**29*90.001_dp99!9ideal9enthalpy9rise9in9compressor,9from9definition9of9head9coefficient9(kJ/kg)
9999dh9=9dh_s9/9comp%eta99999999999999!9actual9enthalpy9rise9in9compressor
9999h_s_out9=9h_in9+9dh_s9999999999999!9ideal9enthalpy9at9compressor9outlet
9999h_out9=9h_in9+9dh99999999999999999!9actual9enthalpy9at9compressor9outlet
9999call9CO2_HS(H=h_s_out,9S=s_in,9error_code=error_code,9pres=P_out)99!9get9the9compressor9outlet9pressure
9999if9(error_code9/=90)9then99!9most9likely9case9is9that9the9outlet9pressure9is9above9the9high9pressure9limit9of9the9property9routine
99999999error_trace%code9=92
99999999error_trace%lines(1)9=9325
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=T_out,9ssnd=ssnd_out)99!9determines9compressor9outlet9temperature9and9speed9...
9999if9(error_code9/=90)9then99!9most9likely9case9is9that9the9outlet9pressure9is9above9the9high9pressure9limit9of9the9property9routine
99999999error_trace%code9=92
99999999error_trace%lines(1)9=9332
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Set9a9few9compressor9variables.
9999comp%phi9=9phi
9999comp%w_tip_ratio9=9U_tip9/9ssnd_out99999!9ratio9of9the9tip9speed9to9local9(comp9outlet)9speed9of9sound

end9subroutine9off_design_compressor
142

subroutine9off_design_recompressor(comp,9T_in,9P_in,9m_dot,9P_out,9error_trace,9T_out)
9999!9Solve9for9the9outlet9state9(and9shaft9speed)9of9'comp'9given9its9inlet9conditions,9mass9flow9rate,9and9outlet9pressure.
9999!
9999!9Inputs:
9999!999comp9LL9a9Compressor9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9compressor9inlet9temperature9(K)
9999!999P_in9LL9compressor9inlet9pressure9(kPa)
9999!999m_dot9LL9mass9flow9rate9through9compressor9(kg/s)
9999!999P_out9LL9compressor9outlet9pressure9(kPa)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999T_out9LL9compressor9outlet9temperature9(K)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'comp':9N,9surge,9eta,9w,9w_tip_ratio,9phi
9999!9992)9In9order9to9solve9the9compressor,9the9value9for9flow9coefficient9(phi)9is9varied9until9convergence.
9999!9993)9Surge9is9not9allowed;9if9the9corresponding9flow9coefficient9is9not9between9phi_min9and9phi_max9an9error9is9raised.
9999!9994)9TwoLstage9recompressor;9surge9is9true9if9either9stages9are9in9surge9conditions;9w_tip_ratio9is9max9of9the9two9stages.
9999
9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH,9CO2_HS

9999!9Arguments
9999type(Compressor),9intent(inout)9::9comp
9999real(dp),9intent(in)9::9T_in,9P_in,9m_dot,9P_out
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9T_out

9999!9Parameters
9999integer,9parameter9::9max_iter9=9100
9999real(dp),9parameter9::9rel_tol9=91.0eL9_dp99!9relative9tolerance9for9pressure

9999!9Local9Variables
9999integer99::9iter,9error_code
9999logical99::9first_pass
9999real(dp)9::9rho_in,9h_in,9s_in,9phi_1,9U_tip_1,9phi_star,9psi_star,9eta_star,9psi,9eta_0,9dh_s,9dh,9h_s_out,9h_out,9ssnd_out
9999real(dp)9::9N,9dh_s_calc,9residual,9next_phi,9last_phi_1,9last_residual,9P_int,9h_int,9D_int,9s_int,9ssnd_int,9eta_stage_1
9999real(dp)9::9eta_stage_2,9phi_2,9U_tip_2,9P_out_calc

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9dens=rho_in,9enth=h_in,9entr=s_in)99!9fully9define9the9inlet9state9of9the9compressor
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9386
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Iterate9on9firstLstage9phi.
9999phi_19=9comp%phi_design99!9start9with9designLpoint9value
9999first_pass9=9.true.
9999do9iter9=91,9max_iter

99999999!9First9stage9L9dh_s9and9eta_stage_1.
99999999U_tip_19=9m_dot9/9(phi_19*9rho_in9*9comp%D_rotor**2)99!9flow9coefficient9rearranged
99999999N9=9(U_tip_19*92.0_dp9/9comp%D_rotor)9*99.549296590_dp99!9shaft9speed9in9rpm
99999999phi_star9=9phi_19*9(N9/9comp%N_design)**0.2_dp99!9modified9flow9coefficient
99999999psi_star9=9((((L498626.0_dp9*9phi_star)9+953224.0_dp)9*9phi_star9L92505.0_dp)9*9phi_star9+954.6_dp)9*9phi_star9+90.04049_dp99!9fro...
99999999psi9=9psi_star9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**3))
99999999dh_s9=9psi9*9U_tip_1**29*90.001_dp99!9calculated9ideal9enthalpy9rise9in9first9stage9of9compressor,9from9definition9of9head9...
99999999eta_star9=9((((L1.638e6_dp9*9phi_star)9+9182725.0_dp)9*9phi_star9L98089.0_dp)9*9phi_star9+9168.6_dp)9*9phi_star9L90.7069_dp99!9fro...
99999999eta_09=9eta_star9*91.47528_dp9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**5))99!9stage9efficiency9is9normalized9so9it9equals9...
99999999eta_stage_19=9max(eta_09*9comp%eta_design,90.0_dp)99!9the9actual9stage9efficiency,9not9allowed9to9go9negative
99999999
99999999!9Calculate9firstLstage9outlet9(secondLstage9inlet)9state.
99999999dh9=9dh_s9/9eta_stage_19999999999999!9actual9enthalpy9rise9in9first9stage
99999999h_s_out9=9h_in9+9dh_s9999999999999!9ideal9enthalpy9between9stages
99999999h_int9=9h_in9+9dh99999999999999999!9actual9enthalpy9between9stages
99999999call9CO2_HS(H=h_s_out,9S=s_in,9error_code=error_code,9pres=P_int)99!9get9the9firstLstage9outlet9pressure9(secondLstage9inlet9...
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9414
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if
99999999call9CO2_PH(P=P_int,9H=h_int,9error_code=error_code,9dens=D_int,9entr=s_int,9ssnd=ssnd_int)99!9get9secondLstage9inlet9properties
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9421
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if

99999999!9Second9stage9L9dh_s9and9eta_stage_2.
99999999U_tip_29=9comp%D_rotor_29*90.5_dp9*9N9*90.104719755_dp99!9secondLstage9tip9speed9in9m/s
99999999phi_29=9m_dot9/9(D_int9*9U_tip_29*9comp%D_rotor_2**2)99!9secondLstage9flow9coefficient
99999999phi_star9=9phi_29*9(N9/9comp%N_design)**0.2_dp99!9modified9flow9coefficient
99999999psi_star9=9((((L498626.0_dp9*9phi_star)9+953224.0_dp)9*9phi_star9L92505.0_dp)9*9phi_star9+954.6_dp)9*9phi_star9+90.04049_dp99!9fro...
99999999psi9=9psi_star9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**3))
99999999dh_s9=9psi9*9U_tip_2**29*90.001_dp99!9calculated9ideal9enthalpy9rise9in9second9stage9of9compressor,9from9definition9of9head9...
99999999eta_star9=9((((L1.638e6_dp9*9phi_star)9+9182725.0_dp)9*9phi_star9L98089.0_dp)9*9phi_star9+9168.6_dp)9*9phi_star9L90.7069_dp99!9fro...
99999999eta_09=9eta_star9*91.47528_dp9/9((comp%N_design9/9N)**((20.0_dp9*9phi_star)**5))99!9stage9efficiency9is9normalized9so9it9equals9...
99999999eta_stage_29=9max(eta_09*9comp%eta_design,90.0_dp)99!9the9actual9stage9efficiency,9not9allowed9to9go9negative
143

99999999
99999999!9Calculate9secondLstage9outlet9state.
99999999dh9=9dh_s9/9eta_stage_2999999999999!9actual9enthalpy9rise9in9second9stage
99999999h_s_out9=9h_int9+9dh_s9999999999999!9ideal9enthalpy9at9compressor9outlet
99999999h_out9=9h_int9+9dh99999999999999999!9actual9enthalpy9at9compressor9outlet
99999999call9CO2_HS(H=h_s_out,9S=s_int,9error_code=error_code,9pres=P_out_calc)99!9get9the9calculated9compressor9outlet9pressure
99999999if9(error_code9/=90)9then
999999999999error_trace%code9=9error_code
999999999999error_trace%lines(1)9=9444
999999999999error_trace%files(1)9=94
999999999999return
99999999end9if

99999999!9Check9for9convergence9and9adjust9phi_19guess.
99999999residual9=9P_out9L9P_out_calc
99999999if9(abs(residual)9/9P_out9<=9rel_tol)9exit99!9converged9sufficiently
99999999if9(first_pass)9then
999999999999next_phi9=9phi_19*91.0001_dp99!9take9a9small9step
999999999999first_pass9=9.false.
99999999else
999999999999next_phi9=9phi_19L9residual9*9(last_phi_19L9phi_1)9/9(last_residual9L9residual)99!9next9guess9predicted9using9secant9method
99999999end9if
99999999last_phi_19=9phi_1
99999999last_residual9=9residual
99999999phi_19=9next_phi

9999end9do

9999!9Check9for9convergence.
9999if9(iter9>=9max_iter)9then99!9did9not9converge
99999999error_trace%code9=91
99999999error_trace%lines(1)9=9468
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999
9999!9Determine9outlet9temperature9and9speed9of9sound.
9999call9CO2_PH(P=P_out_calc,9H=h_out,9error_code=error_code,9temp=T_out,9ssnd=ssnd_out)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9476
99999999error_trace%files(1)9=94
99999999return
9999end9if
9999call9CO2_PS(P=P_out_calc,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9compression
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9483
99999999error_trace%files(1)9=94
99999999return
9999end9if

9999!9Set9relevant9recompressor9variables.
9999comp%N9=9N
9999comp%eta9=9(h_s_out9L9h_in)9/9(h_out9L9h_in)99!9use9overall9isentropic9efficiency
9999comp%phi9=9phi_1
9999comp%phi_29=9phi_2
9999comp%w_tip_ratio9=9max(U_tip_19/9ssnd_int,9U_tip_29/9ssnd_out)99!9store9maximum9ratio
9999comp%surge9=9(phi_19<9comp%phi_min9.or.9phi_29<9comp%phi_min)

end9subroutine9off_design_recompressor

end9module9compressors
144

Appendix V: turbines Module


radial_turbine.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'turbines',9defining9a9number9of9subroutines9based9on9a9generic,9lowLreaction9radial9turbine.
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9August914,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9turbines

use9core
implicit9none
private
public9::9turbine_sizing,9off_design_turbine

real(dp),9parameter9::9nu_design9=90.707_dp99!9designLpoint9ratio9of9tip9speed9to9spouting9velocity9at9maximum9efficiency

contains

subroutine9turbine_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9turbine9rotor9diameter,9effective9nozzle9area,9and9designLpoint9shaft
9999!9speed9and9store9values9in9recomp_cycle%t.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object
9999!
9999!9Notes:
9999!9991)9The9value9for9recomp_cycle%t%N_design9is9required9to9be9set.99If9it9is9<=90.09then
9999!999999the9value9for9recomp_cycle%mc%N_design9is9used9(i.e.,9link9the9compressor9and9turbine
9999!999999shafts).99For9this9reason,9turbine_sizing9must9be9called9after9compressor_sizing9if
9999!999999the9shafts9are9to9be9linked.
9999
9999use9CO2_properties,9only:9CO2_TD,9CO2_PS

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Local9Variables
9999integer9::9error_code
9999real(dp)9::9T_in,9D_in,9h_in,9s_in,9P_out,9h_out,9D_out,9ssnd_in,9h_s_out,9w_i,9C_s,9U_tip

9999!9Check9that9a9designLpoint9shaft9speed9is9available.
9999if9(recomp_cycle%t%N_design9<=90.0_dp)9then99!9link9shafts
99999999recomp_cycle%t%N_design9=9recomp_cycle%mc%N_design
99999999if9(recomp_cycle%mc%N_design9<=90.0_dp)9then
999999999999error_trace%code9=97
999999999999error_trace%lines(1)9=961
999999999999error_trace%files(1)9=95
999999999999return
99999999end9if99999999
9999end9if

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999T_in9=9recomp_cycle%temp(6)
9999D_in9=9recomp_cycle%dens(6)
9999h_in9=9recomp_cycle%enth(6)
9999s_in9=9recomp_cycle%entr(6)
9999P_out9=9recomp_cycle%pres(7)
9999h_out9=9recomp_cycle%enth(7)
9999D_out9=9recomp_cycle%dens(7)
9999call9CO2_TD(T=T_in,9D=D_in,9error_code=error_code,9ssnd=ssnd_in)99!9speed9of9sound9at9inlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=979
145

99999999error_trace%files(1)9=95
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9expansion
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=986
99999999error_trace%files(1)9=95
99999999return
9999end9if

9999!9Determine9necessary9turbine9parameters.
9999recomp_cycle%t%nu9=9nu_design
9999w_i9=9h_in9L9h_s_out99!9isentropic9specific9work9of9turbine9(kJ/kg)
9999C_s9=9sqrt(2.0_dp9*9w_i9*91000.0_dp)99!9spouting9velocity9in9m/s
9999U_tip9=9recomp_cycle%t%nu9*9C_s99!9rearrange9definition9of9nu
9999recomp_cycle%t%D_rotor9=9U_tip9/9(0.5_dp9*9recomp_cycle%t%N_design9*90.104719755_dp)99!9turbine9diameter9in9m
9999recomp_cycle%t%A_nozzle9=9recomp_cycle%m_dot_turbine9/9(C_s9*9D_out)99!9turbine9effective9nozzle9area9in9m2

9999!9Set9other9turbine9variables.
9999recomp_cycle%t%w_tip_ratio9=9U_tip9/9ssnd_in99!9ratio9of9the9tip9speed9to9local9(turbine9inlet)9speed9of9sound
9999recomp_cycle%t%eta_design9=9(h_in9L9h_out)9/9w_i99!9definition9of9isentropic9efficiency
9999recomp_cycle%t%eta9=9recomp_cycle%t%eta_design
9999recomp_cycle%t%N9=9recomp_cycle%t%N_design

end9subroutine9turbine_sizing

subroutine9off_design_turbine(turb,9T_in,9P_in,9P_out,9N,9error_trace,9m_dot,9T_out)
9999!9Solve9for9the9outlet9state9of9'turb'9given9its9inlet9conditions,9outlet9pressure,9and9shaft9speed.
9999!
9999!9Inputs:
9999!999turb9LL9a9Turbine9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9turbine9inlet9temperature9(K)
9999!999P_in9LL9turbine9inlet9pressure9(kPa)
9999!999P_out9LL9turbine9outlet9pressure9(kPa)
9999!999N9LL9shaft9speed9of9turbine9(rpm)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999m_dot9LL9allowable9mass9flow9rate9through9the9turbine9(kg/s)
9999!999T_out9LL9turbine9outlet9temperature9(K)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'turb':9nu,9eta,9m_dot,9w,9w_tip_ratio

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH

9999!9Arguments
9999type(Turbine),9intent(inout)9::9turb
9999real(dp),9intent(in)9::9T_in,9P_in,9P_out,9N
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9m_dot,9T_out
9999
9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9h_in,9s_in,9ssnd_in,9U_tip,9h_s_out,9h_out,9D_out,9C_s,9eta_0

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9enth=h_in,9entr=s_in,9ssnd=ssnd_in)99!9properties9at9inlet9of9turbine
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9141
99999999error_trace%files(1)9=95
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9enthalpy9at9the9turbine9outlet9if9the9expansion9is9isentropic
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9148
99999999error_trace%files(1)9=95
99999999return
9999end9if

9999!9Apply9the9radial9turbine9equations9for9efficiency.
9999C_s9=9sqrt(2.0_dp9*9(h_in9L9h_s_out)9*91000.0_dp)99!9spouting9velocity9(m/s)
9999U_tip9=9turb%D_rotor9*90.5_dp9*9N9*90.104719755_dp99!9turbine9tip9speed9(m/s)
9999turb%nu9=9U_tip9/9C_s99!9ratio9of9tip9speed9to9spouting9velocity
9999if9(turb%nu9<91.0_dp)9then
99999999eta_09=92.0_dp9*9turb%nu9*9sqrt(1.0_dp9L9turb%nu**2)99!9efficiency9from9Baines9(1.09at9design9point)
9999else
99999999eta_09=90.0_dp99!9catches9nu9values9just9over91,9which9leads9to9sqrt9of9negative9number
9999end9if
9999turb%eta9=9eta_09*9turb%eta_design99!9actual9turbine9efficiency
9999
9999!9Calculate9the9outlet9state9and9allowable9mass9flow9rate.
9999h_out9=9h_in9L9turb%eta9*9(h_in9L9h_s_out)99!9enthalpy9at9turbine9outlet
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=T_out,9dens=D_out)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9169
99999999error_trace%files(1)9=95
99999999return
146

9999end9if
9999m_dot9=9C_s9*9turb%A_nozzle9*9D_out99!9mass9flow9through9turbine9(kg/s)
9999turb%w_tip_ratio9=9U_tip9/9ssnd_in99!9ratio9of9the9tip9speed9to9the9local9(turbine9inlet)9speed9of9sound
9999turb%N9=9N

end9subroutine9off_design_turbine

end9module9turbines

snl_radial_turbine.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'turbines',9defining9a9number9of9subroutines9based9on9the9SNL9radial9turbine.
!
!9Notes:
!9991)9This9model9is9very9similar9to9the9model9defined9in9radial_turbine.f90,9with9the9exception9of9a9modified9efficiency
!999999curve9(and9hence9designLpoint9nu9value)9and9the9use9of9the9compressor9inlet9density9in9the9allowable9mass9flow
!999999rate9equation9(as9opposed9to9the9outlet9density9in9the9lowLreaction9radial9turbine9model).
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9August920,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9turbines

use9core
implicit9none
private
public9::9turbine_sizing,9off_design_turbine

real(dp),9parameter9::9nu_design9=90.7476_dp99!9maximizes9efficiency9for9SNL9turbine9efficiency9curve

contains

subroutine9turbine_sizing(recomp_cycle,9error_trace)
9999!9Determine9the9turbine9rotor9diameter,9effective9nozzle9area,9and9designLpoint9shaft
9999!9speed9and9store9values9in9recomp_cycle%t.
9999!
9999!9Arguments:
9999!999recomp_cycle9LL9a9RecompCycle9object9that9defines9the9simple/recompression9cycle9at9the9design9point
9999!999error_trace9LL9an9ErrorTrace9object
9999!
9999!9Notes:
9999!9991)9The9value9for9recomp_cycle%t%N_design9is9required9to9be9set.99If9it9is9<=90.09then
9999!999999the9value9for9recomp_cycle%mc%N_design9is9used9(i.e.,9link9the9compressor9and9turbine
9999!999999shafts).99For9this9reason,9turbine_sizing9must9be9called9after9compressor_sizing9if
9999!999999the9shafts9are9to9be9linked.
9999
9999use9CO2_properties,9only:9CO2_TD,9CO2_PS

9999!9Arguments
9999type(RecompCycle),9intent(inout)9::9recomp_cycle
9999type(ErrorTrace),9intent(out)9::9error_trace

9999!9Local9Variables
9999integer9::9error_code
9999real(dp)9::9T_in,9D_in,9h_in,9s_in,9P_out,9h_out,9D_out,9ssnd_in,9h_s_out,9w_i,9C_s,9U_tip

9999!9Check9that9a9designLpoint9shaft9speed9is9available.
9999if9(recomp_cycle%t%N_design9<=90.0_dp)9then99!9link9shafts
99999999recomp_cycle%t%N_design9=9recomp_cycle%mc%N_design
99999999if9(recomp_cycle%mc%N_design9<=90.0_dp)9then
999999999999error_trace%code9=97
999999999999error_trace%lines(1)9=965
999999999999error_trace%files(1)9=95
999999999999return
99999999end9if99999999
9999end9if

9999!9Create9references9to9cycle9state9properties9for9clarity.
9999T_in9=9recomp_cycle%temp(6)
9999D_in9=9recomp_cycle%dens(6)
9999h_in9=9recomp_cycle%enth(6)
147

9999s_in9=9recomp_cycle%entr(6)
9999P_out9=9recomp_cycle%pres(7)
9999h_out9=9recomp_cycle%enth(7)
9999D_out9=9recomp_cycle%dens(7)
9999call9CO2_TD(T=T_in,9D=D_in,9error_code=error_code,9ssnd=ssnd_in)99!9speed9of9sound9at9inlet
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=984
99999999error_trace%files(1)9=95
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9outlet9specific9enthalpy9after9isentropic9expansion
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=991
99999999error_trace%files(1)9=95
99999999return
9999end9if

9999!9Determine9necessary9turbine9parameters.
9999recomp_cycle%t%nu9=9nu_design
9999w_i9=9h_in9L9h_s_out99!9isentropic9specific9work9of9turbine9(kJ/kg)
9999C_s9=9sqrt(2.0_dp9*9w_i9*91000.0_dp)99!9spouting9velocity9in9m/s
9999U_tip9=9recomp_cycle%t%nu9*9C_s99!9rearrange9definition9of9nu
9999recomp_cycle%t%D_rotor9=9U_tip9/9(0.5_dp9*9recomp_cycle%t%N_design9*90.104719755_dp)99!9turbine9diameter9in9m
9999recomp_cycle%t%A_nozzle9=9recomp_cycle%m_dot_turbine9/9(C_s9*9D_in)99!9turbine9effective9nozzle9area9in9m2

9999!9Set9other9turbine9variables.
9999recomp_cycle%t%w_tip_ratio9=9U_tip9/9ssnd_in99!9ratio9of9the9tip9speed9to9local9(turbine9inlet)9speed9of9sound
9999recomp_cycle%t%eta_design9=9(h_in9L9h_out)9/9w_i99!9definition9of9isentropic9efficiency
9999recomp_cycle%t%eta9=9recomp_cycle%t%eta_design
9999recomp_cycle%t%N9=9recomp_cycle%t%N_design

end9subroutine9turbine_sizing

subroutine9off_design_turbine(turb,9T_in,9P_in,9P_out,9N,9error_trace,9m_dot,9T_out)
9999!9Solve9for9the9outlet9state9of9'turb'9given9its9inlet9conditions,9outlet9pressure,9and9shaft9speed.
9999!
9999!9Inputs:
9999!999turb9LL9a9Turbine9object,9with9designLpoint9values9and9sizing9set
9999!999T_in9LL9turbine9inlet9temperature9(K)
9999!999P_in9LL9turbine9inlet9pressure9(kPa)
9999!999P_out9LL9turbine9outlet9pressure9(kPa)
9999!999N9LL9shaft9speed9of9turbine9(rpm)
9999!
9999!9Outputs:
9999!999error_trace9LL9an9ErrorTrace9object
9999!999m_dot9LL9allowable9mass9flow9rate9through9the9turbine9(kg/s)
9999!999T_out9LL9turbine9outlet9temperature9(K)
9999!
9999!9Notes:
9999!9991)9This9subroutine9also9sets9the9following9values9in9'turb':9nu,9eta,9m_dot,9w,9w_tip_ratio

9999use9CO2_Properties,9only:9CO2_TP,9CO2_PS,9CO2_PH

9999!9Arguments
9999type(Turbine),9intent(inout)9::9turb
9999real(dp),9intent(in)9::9T_in,9P_in,9P_out,9N
9999type(ErrorTrace),9intent(out)9::9error_trace
9999real(dp),9intent(out)9::9m_dot,9T_out
9999
9999!9Local9Variables
9999integer99::9error_code
9999real(dp)9::9h_in,9s_in,9ssnd_in,9U_tip,9h_s_out,9h_out,9D_in,9D_out,9C_s,9eta_0

9999call9CO2_TP(T=T_in,9P=P_in,9error_code=error_code,9dens=D_in,9enth=h_in,9entr=s_in,9ssnd=ssnd_in)99!9properties9at9inlet9of9turbine
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9146
99999999error_trace%files(1)9=95
99999999return
9999end9if
9999call9CO2_PS(P=P_out,9S=s_in,9error_code=error_code,9enth=h_s_out)99!9enthalpy9at9the9turbine9outlet9if9the9expansion9is9isentropic
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9153
99999999error_trace%files(1)9=95
99999999return
9999end9if

9999!9Apply9the9radial9turbine9equations9for9efficiency.
9999C_s9=9sqrt(2.0_dp9*9(h_in9L9h_s_out)9*91000.0_dp)99!9spouting9velocity9(m/s)
9999U_tip9=9turb%D_rotor9*90.5_dp9*9N9*90.104719755_dp99!9turbine9tip9speed9(m/s)
9999turb%nu9=9U_tip9/9C_s99!9ratio9of9tip9speed9to9spouting9velocity
9999
9999!eta_09=90.179921180_dp9+91.3567_dp*turb%nu9+91.3668_dp*turb%nu**29L93.0874_dp*turb%nu**39+91.0626_dp*turb%nu**4
9999eta_09=9(((1.0626_dp9*9turb%nu9L93.0874_dp)9*9turb%nu9+91.3668_dp)9*9turb%nu9+91.3567_dp)9*9turb%nu9+90.179921180_dp
9999eta_09=9max(eta_0,90.0_dp)
9999eta_09=9min(eta_0,91.0_dp)
9999turb%eta9=9eta_09*9turb%eta_design99!9actual9turbine9efficiency
9999
148

9999!9Calculate9the9outlet9state9and9allowable9mass9flow9rate.
9999h_out9=9h_in9L9turb%eta9*9(h_in9L9h_s_out)99!9enthalpy9at9turbine9outlet
9999call9CO2_PH(P=P_out,9H=h_out,9error_code=error_code,9temp=T_out,9dens=D_out)
9999if9(error_code9/=90)9then
99999999error_trace%code9=9error_code
99999999error_trace%lines(1)9=9174
99999999error_trace%files(1)9=95
99999999return
9999end9if
9999m_dot9=9C_s9*9turb%A_nozzle9*9D_in99!9mass9flow9through9turbine9(kg/s)
9999turb%w_tip_ratio9=9U_tip9/9ssnd_in99!9ratio9of9the9tip9speed9to9the9local9(turbine9inlet)9speed9of9sound
9999turb%N9=9N

end9subroutine9off_design_turbine

end9module9turbines
149

Appendix VI: heat_exchangers Module


scaling_hxr.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9the9the9module9'heat_exchangers',9which9defines9heat9exchanger9pressure9drop9and9conductance9scaling9functions.
!
!9Notes:
!9991)9Pressure9drops9are9scaled9with9mass9flow9rate9according9to9the9Darcy9friction9factor9and9Blasius9correlation.
!9992)9Conductance9values9are9scaled9with9mass9flow9rate9according9to9the9DittusLBoelter9heat9transfer9correlation.
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9July912,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9heat_exchangers

use9core
implicit9none
private
public9::9hxr_pressure_drops,9hxr_conductance

contains

function9hxr_pressure_drops(hxr,9m_dots)
9999!9Return9an9array9of9the9scaled9pressure9drops9(in9kPa)9for9the9two9streams9of9the9heat9exchanger9defined9by9'hxr'.
9999!
9999!9Inputs:
9999!999hxr9LL9a9HeatExchanger9type9with9designLpoint9values9set
9999!999m_dots9LL9mass9flow9rates9of9the9two9streams9(kg/s)9[1:9cold,92:9hot]
9999!
9999type(HeatExchanger),9intent(in)9::9hxr
9999real(dp),9dimension(2),9intent(in)9::9m_dots
9999real(dp),9dimension(2)9::9hxr_pressure_drops
9999hxr_pressure_drops9=9hxr%DP_design9*9(m_dots9/9hxr%m_dot_design)**1.75_dp99!9operates9on9both9streams9simultaneously
end9function9hxr_pressure_drops

real(dp)9function9hxr_conductance(hxr,9m_dots)
9999!9Return9the9scaled9conductance9(in9kW/K)9of9the9heat9exchanger9defined9by9'hxr'.
9999!
9999!9Inputs:
9999!999hxr9LL9a9HeatExchanger9type9with9designLpoint9values9set
9999!999m_dots9LL9mass9flow9rates9of9the9two9streams9(kg/s)9[1:9cold,92:9hot]
9999!
9999type(HeatExchanger),9intent(in)9::9hxr
9999real(dp),9dimension(2),9intent(in)9::9m_dots
9999real(dp)9::9m_dot_ratio
9999m_dot_ratio9=9(m_dots(1)9/9hxr%m_dot_design(1)9+9m_dots(2)9/9hxr%m_dot_design(2))9*90.5_dp99!9average9the9two9streams
9999hxr_conductance9=9hxr%UA_design9*9m_dot_ratio**0.8_dp
end9function9hxr_conductance

end9module9heat_exchangers
150

Appendix VII: CO2_properties Module


module_CO2_properties.f909(not listed, refer to version online)

CO2_RP_module.f90
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9is9free9and9unencumbered9software9released9into9the9public9domain.
!9
!9Anyone9is9free9to9copy,9modify,9publish,9use,9compile,9sell,9or9distribute9this9software,9either9in9source9code9form9or9as9a
!9compiled9binary,9for9any9purpose,9commercial9or9nonLcommercial,9and9by9any9means.
!9
!9THE9SOFTWARE9IS9PROVIDED9"AS9IS",9WITHOUT9WARRANTY9OF9ANY9KIND,9EXPRESS9OR9IMPLIED,9INCLUDING9BUT9NOT9LIMITED9TO9THE9WARRANTIES9OF
!9MERCHANTABILITY,9FITNESS9FOR9A9PARTICULAR9PURPOSE9AND9NONINFRINGEMENT.9IN9NO9EVENT9SHALL9THE9AUTHORS9BE9LIABLE9FOR9ANY9CLAIM,
!9DAMAGES9OR9OTHER9LIABILITY,9WHETHER9IN9AN9ACTION9OF9CONTRACT,9TORT9OR9OTHERWISE,9ARISING9FROM,9OUT9OF9OR9IN9CONNECTION9WITH9THE
!9SOFTWARE9OR9THE9USE9OR9OTHER9DEALINGS9IN9THE9SOFTWARE.
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
!
!9This9file9contains9a9module9with9multiple9subroutines9that9call9the9REFPROP9flash9routines9for9carbon9dioxide.
!
!9For9each9subroutine,9the9first9two9arguments9are9the9known9properties:
!999T9LL9temperature9(K)
!999D9LL9density9(kg/m3)
!999P9LL9pressure9(kPa)
!999H9LL9enthalpy9(kJ/kg)
!999S9LL9entropy9(kJ/kgLK)
!
!9All9the9outputs9except9'error_code'9are9optional:
!999temp9LL9temperature9(K)
!999pres9LL9pressure9(kPa)
!999dens9LL9density9(kg/m3)
!999enth9LL9enthalpy9(kJ/kg)
!999entr9LL9entropy9(kJ/kgLK)
!999ssnd9LL9speed9of9sound9in9the9fluid9(m/s)
!
!9Notes:
!9991)9The9REFPROP9source9code9is9not9provided9and9must9be9purchased9from9http://www.nist.gov/srd/nist23.cfm9and
!999999linked9to9during9compilation9of9this9module.99To9use9REFPROP9with9the9program9"generate_paper_results.py",9the
!999999easiest9way9to9do9this9is9to9copy9all9the9REFPROP9source9code9files9into9the9directory9containing9this9file;9the
!999999"create_python_interface.py"9program9will9then9find9and9compile9them9automatically.
!9992)9The9parameter9'fluid'9is9the9full9path9to9the9CO2.FLD9fluid9definition9file9(syntax9is9platform9specific).
!9993)9If9an9error9occurs9during9initialization,9the9calling9program9will9be9stopped.
!
!9Author:9John9Dyreby,9Solar9Energy9Laboratory,9University9of9WisconsinLMadison9<jjdyreby@uwalumni.com>
!
!9Last9Modified:9July910,92014
!
!LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

module9CO2_properties

implicit9none

!9Parameters
integer,99parameter9::9nc9=919999999999999999999999999999999!9number9of9components9in9the9mixture
integer,9parameter99::9dp9=9selected_real_kind(15)9999999999!9double9precision
real(dp),9parameter9::9comp_array9=91.0_dp999999999999999999!9composition9of9the9mixture
character(len=3),999parameter9::9reference_state9=9'DEF'9999!9use9the9default9reference9state9for9each9fluid
character(len=255),9parameter9::9mixture_file9=9'HMX.BNC'999!9default9mixture9coefficients
character(len=255),9parameter9::9fluid9=9'/Path/To/REFPROP/Fluids/CO2.FLD'99!9path9to9CO2.FLD

!9Module9Variables
logical,9save9::9initialized9=9.false.
character(len=255)9::9error_message
integer9::9error_code
real(dp)9::9wmm

contains

subroutine9initialize()
9999real(dp),9external9::9wmol
9999call9setup(nc,9fluid,9mixture_file,9reference_state,9error_code,9error_message)
9999if9(error_code9/=90)9then
99999999write9(*,*)9'The9following9error9occurred9during9REFPROP9initialization:'
99999999write9(*,*)9error_message
99999999stop
9999end9if
9999wmm9=9wmol(comp_array)
9999initialized9=9.true.
end9subroutine9initialize
151

subroutine9CO2_TD(T,9D,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
9999real(dp),9intent(in)9::9T,9D
9999integer,9intent(out)9::9error_code
9999real(dp),9intent(out),9optional9::9temp,9pres,9dens,9enth,9entr,9ssnd
9999real(dp)9::9pres_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap
9999real(dp)9::9qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP
9999if9(.not.9initialized)9call9initialize()
9999dens_mol9=9D9/9wmm99!9convert9density9to9molar9basis
9999call9TDFLSH(T,9dens_mol,9comp_array,9pres_RP,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap,9&
9999999999999999qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP,9error_code,9error_message)
9999if9(present(temp))9temp9=9T
9999if9(present(pres))9pres9=9pres_RP
9999if9(present(dens))9dens9=9D
9999if9(present(enth))9enth9=9enth_mol9/9wmm
9999if9(present(entr))9entr9=9entr_mol9/9wmm
9999if9(present(ssnd))9ssnd9=9ssnd_RP
end9subroutine9CO2_TD

subroutine9CO2_TP(T,9P,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
9999real(dp),9intent(in)9::9T,9P
9999integer,9intent(out)9::9error_code
9999real(dp),9intent(out),9optional9::9temp,9pres,9dens,9enth,9entr,9ssnd
9999real(dp)9::9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap
9999real(dp)9::9qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP
9999if9(.not.9initialized)9call9initialize()
9999call9TPFLSH(T,9P,9comp_array,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap,9&
9999999999999999qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP,9error_code,9error_message)
9999if9(present(temp))9temp9=9T
9999if9(present(pres))9pres9=9P
9999if9(present(dens))9dens9=9dens_mol9*9wmm
9999if9(present(enth))9enth9=9enth_mol9/9wmm
9999if9(present(entr))9entr9=9entr_mol9/9wmm
9999if9(present(ssnd))9ssnd9=9ssnd_RP
end9subroutine9CO2_TP

subroutine9CO2_PH(P,9H,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
9999real(dp),9intent(in)9::9P,9H
9999integer,9intent(out)9::9error_code
9999real(dp),9intent(out),9optional9::9temp,9pres,9dens,9enth,9entr,9ssnd
9999real(dp)9::9temp_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap
9999real(dp)9::9qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP
9999if9(.not.9initialized)9call9initialize()
9999enth_mol9=9H9*9wmm99!9convert9enthalpy9to9molar9basis
9999call9PHFLSH(P,9enth_mol,9comp_array,9temp_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap,9&
9999999999999999qual,9inte_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP,9error_code,9error_message)
9999if9(present(temp))9temp9=9temp_RP
9999if9(present(pres))9pres9=9P
9999if9(present(dens))9dens9=9dens_mol9*9wmm
9999if9(present(enth))9enth9=9H
9999if9(present(entr))9entr9=9entr_mol9/9wmm
9999if9(present(ssnd))9ssnd9=9ssnd_RP
end9subroutine9CO2_PH

subroutine9CO2_PS(P,9S,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
9999real(dp),9intent(in)9::9P,9S
9999integer,9intent(out)9::9error_code
9999real(dp),9intent(out),9optional9::9temp,9pres,9dens,9enth,9entr,9ssnd
9999real(dp)9::9temp_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap
9999real(dp)9::9qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP
9999if9(.not.9initialized)9call9initialize()
9999entr_mol9=9S9*9wmm99!9convert9entropy9to9molar9basis
9999call9PSFLSH(P,9entr_mol,9comp_array,9temp_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap,9&
9999999999999999qual,9inte_mol,9enth_mol,9cv_mol,9cp_mol,9ssnd_RP,9error_code,9error_message)
9999if9(present(temp))9temp9=9temp_RP
9999if9(present(pres))9pres9=9P
9999if9(present(dens))9dens9=9dens_mol9*9wmm
9999if9(present(enth))9enth9=9enth_mol9/9wmm
9999if9(present(entr))9entr9=9S
9999if9(present(ssnd))9ssnd9=9ssnd_RP
end9subroutine9CO2_PS

subroutine9CO2_HS(H,9S,9error_code,9temp,9pres,9dens,9enth,9entr,9ssnd)
9999real(dp),9intent(in)9::9H,9S
9999integer,9intent(out)9::9error_code
9999real(dp),9intent(out),9optional9::9temp,9pres,9dens,9enth,9entr,9ssnd
9999real(dp)9::9temp_RP,9pres_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9comp_array_liq,9comp_array_vap
9999real(dp)9::9qual,9inte_mol,9enth_mol,9entr_mol,9cv_mol,9cp_mol,9ssnd_RP
9999if9(.not.9initialized)9call9initialize()
9999enth_mol9=9H9*9wmm99!9convert9enthalpy9to9molar9basis
9999entr_mol9=9S9*9wmm99!9convert9entropy9to9molar9basis
9999call9HSFLSH(enth_mol,9entr_mol,9comp_array,9temp_RP,9pres_RP,9dens_mol,9dens_liq_mol,9dens_vap_mol,9&
9999999999999999comp_array_liq,9comp_array_vap,9qual,9inte_mol,9cv_mol,9cp_mol,9ssnd_RP,9error_code,9error_message)
9999if9(present(temp))9temp9=9temp_RP
9999if9(present(pres))9pres9=9pres_RP
9999if9(present(dens))9dens9=9dens_mol9*9wmm
9999if9(present(enth))9enth9=9H
9999if9(present(entr))9entr9=9S
9999if9(present(ssnd))9ssnd9=9ssnd_RP
end9subroutine9CO2_HS

end9module9CO2_properties
152

Appendix VIII: Recorded Data Plots for SNL Compression Test Cases
Map Reference Test Case
153

Supercritical Test Case


154

Liquid Test Case


155

Gas Test Case

You might also like