@@ -35,6 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535#include " sam_csp_util.h"
3636#include < algorithm>
3737#include " numeric_solvers.h"
38+ #include " sco2_cycle_components.h"
3839
3940double NS_HX_counterflow_eqs::calc_max_q_dot_enth (int hot_fl_code /* -*/ , HTFProperties & hot_htf_class,
4041 int cold_fl_code /* -*/ , HTFProperties & cold_htf_class,
@@ -1523,11 +1524,13 @@ void NS_HX_counterflow_eqs::solve_q_dot_for_fixed_UA_enth(int hot_fl_code /*-*/,
15231524 throw (C_csp_exception (" Off-design heat exchanger method failed" ));
15241525 }
15251526
1526- // if (!(od_hx_code == C_monotonic_eq_solver::CONVERGED || od_hx_code == C_monotonic_eq_solver::SLOPE_POS_NO_POS_ERR || od_hx_code == C_monotonic_eq_solver::SLOPE_POS_BOTH_ERRS))
1527- // {
1528- // throw(C_csp_exception("Off-design heat exchanger method failed"));
1529- // }
1527+ /* if (!(od_hx_code == C_monotonic_eq_solver::CONVERGED || od_hx_code == C_monotonic_eq_solver::SLOPE_POS_NO_POS_ERR || od_hx_code == C_monotonic_eq_solver::SLOPE_POS_BOTH_ERRS))
1528+ {
1529+ throw(C_csp_exception("Off-design heat exchanger method failed"));
1530+ }*/
1531+
15301532 }
1533+
15311534 else if (test_code == 0 && diff_UA_max_eff <= 0.0 ) // UA_max_eff <= UA_target)
15321535 {
15331536 // At maximum allowable heat transfer, the calculated UA is less than target
@@ -1785,16 +1788,37 @@ double C_HX_counterflow_CRM::calc_max_q_dot_enth(double h_h_in /*kJ/kg*/, double
17851788
17861789double /* M$*/ C_HX_counterflow_CRM::calculate_equipment_cost(double UA /* kWt/K*/ ,
17871790 double T_hot_in /* K*/ , double P_hot_in /* kPa*/ , double m_dot_hot /* kg/s*/ ,
1788- double T_cold_in /* K*/ , double P_cold_in /* kPa*/ , double m_dot_cold /* kg/s*/ )
1791+ double T_cold_in /* K*/ , double P_cold_in /* kPa*/ , double m_dot_cold /* kg/s*/ ,
1792+ double yr_inflation /* yr*/ )
17891793{
17901794 switch (m_cost_model)
17911795 {
17921796 case C_HX_counterflow_CRM::E_CARLSON_17_RECUP:
1793- return 1.25 *1 .E -3 *UA; // [M$] needs UA in kWt/K
1797+ {
1798+ double yr_base_inflation = 2017 ;
1799+ double f_inflation = calculate_inflation_factor (yr_base_inflation, yr_inflation);
1800+ return 1.25 * 1 .E -3 * UA * f_inflation; // [M$] needs UA in kWt/K
1801+ }
17941802 case C_HX_counterflow_CRM::E_WEILAND_19_RECUP:
1795- return 49.45 *std::pow (UA*1 .E3 , 0.7544 )*1 .E -6 ; // [M$] needs UA in Wt/K
1803+ {
1804+ double C_recup = 49.45 * std::pow (UA * 1 .E3 , 0.7544 ) * 1 .E -6 ; // [M$] needs UA in Wt/K
1805+ double T_factor = 1 ;
1806+ double T_max_C = std::max (T_hot_in, T_cold_in) - 273.15 ;
1807+ if (T_max_C >= 550 )
1808+ {
1809+ T_factor = 1.0 + 0.02141 * (T_max_C - 550 );
1810+ }
1811+ double yr_base_inflation = 2017 ;
1812+ double f_inflation = calculate_inflation_factor (yr_base_inflation, yr_inflation);
1813+ return C_recup * T_factor * f_inflation; // [M$]
1814+ break ;
1815+ }
17961816 case C_HX_counterflow_CRM::E_CARLSON_17_PHX:
1797- return 3.5 *1 .E -3 *UA; // [M$] needs UA in kWt/K
1817+ {
1818+ double yr_base_inflation = 2017 ;
1819+ double f_inflation = calculate_inflation_factor (yr_base_inflation, yr_inflation);
1820+ return 3.5 * 1 .E -3 * UA * f_inflation; // [M$] needs UA in kWt/K
1821+ }
17981822 default :
17991823 return std::numeric_limits<double >::quiet_NaN ();
18001824 }
@@ -1860,7 +1884,8 @@ void C_HX_counterflow_CRM::design_calc_UA(C_HX_counterflow_CRM::S_des_calc_UA_pa
18601884
18611885 ms_des_solved.m_cost_equipment = calculate_equipment_cost (ms_des_solved.m_UA_design ,
18621886 ms_des_calc_UA_par.m_T_h_in , ms_des_calc_UA_par.m_P_h_in , ms_des_calc_UA_par.m_m_dot_hot_des ,
1863- ms_des_calc_UA_par.m_T_c_in , ms_des_calc_UA_par.m_P_c_in , ms_des_calc_UA_par.m_m_dot_cold_des );
1887+ ms_des_calc_UA_par.m_T_c_in , ms_des_calc_UA_par.m_P_c_in , ms_des_calc_UA_par.m_m_dot_cold_des ,
1888+ m_yr_inflation);
18641889
18651890 ms_des_solved.m_cost_bare_erected = calculate_bare_erected_cost (ms_des_solved.m_cost_equipment );
18661891
@@ -1981,7 +2006,7 @@ void C_HX_counterflow_CRM::design_calc_UA_TP_to_PH(C_HX_counterflow_CRM::S_des_c
19812006
19822007 ms_des_solved.m_cost_equipment = calculate_equipment_cost (ms_des_solved.m_UA_design ,
19832008 ms_des_calc_UA_par.m_T_h_in , ms_des_calc_UA_par.m_P_h_in , ms_des_calc_UA_par.m_m_dot_hot_des ,
1984- ms_des_calc_UA_par.m_T_c_in , ms_des_calc_UA_par.m_P_c_in , ms_des_calc_UA_par.m_m_dot_cold_des );
2009+ ms_des_calc_UA_par.m_T_c_in , ms_des_calc_UA_par.m_P_c_in , ms_des_calc_UA_par.m_m_dot_cold_des , m_yr_inflation );
19852010
19862011 ms_des_solved.m_cost_bare_erected = calculate_bare_erected_cost (ms_des_solved.m_cost_equipment );
19872012
@@ -2059,7 +2084,8 @@ void C_HX_counterflow_CRM::design_for_target__calc_outlet(int hx_target_code /*-
20592084
20602085 ms_des_solved.m_cost_equipment = calculate_equipment_cost (ms_des_solved.m_UA_design ,
20612086 T_h_in, P_h_in, m_dot_h,
2062- T_c_in, P_c_in, m_dot_c);
2087+ T_c_in, P_c_in, m_dot_c,
2088+ m_yr_inflation);
20632089
20642090 ms_des_solved.m_cost_bare_erected = calculate_bare_erected_cost (ms_des_solved.m_cost_equipment );
20652091}
@@ -3370,7 +3396,8 @@ double NS_HX_counterflow_eqs::UA_scale_vs_m_dot(double m_dot_cold_over_des /*-*/
33703396 return pow (m_dot_ratio, 0.8 );
33713397}
33723398
3373- void C_HX_co2_to_co2_CRM::initialize (int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type)
3399+ void C_HX_co2_to_co2_CRM::initialize (int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type,
3400+ double yr_inflation)
33743401{
33753402 // Set design parameters member structure
33763403 ms_init_par.m_N_sub_hx = N_sub_hx;
@@ -3379,9 +3406,11 @@ void C_HX_co2_to_co2_CRM::initialize(int N_sub_hx, NS_HX_counterflow_eqs::E_UA_t
33793406 m_is_HX_initialized = true ;
33803407
33813408 m_od_UA_target_type = od_UA_target_type;
3409+ m_yr_inflation = yr_inflation;
33823410}
33833411
3384- void C_HX_co2_to_htf::initialize (int hot_fl, util::matrix_t <double > hot_fl_props, int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type)
3412+ void C_HX_co2_to_htf::initialize (int hot_fl, util::matrix_t <double > hot_fl_props, int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type,
3413+ double yr_inflation)
33853414{
33863415 // Hard-code some of the design parameters
33873416 ms_init_par.m_N_sub_hx = N_sub_hx; // [-]
@@ -3427,13 +3456,16 @@ void C_HX_co2_to_htf::initialize(int hot_fl, util::matrix_t<double> hot_fl_props
34273456 // Class is initialized
34283457 m_is_HX_initialized = true ;
34293458
3459+ m_yr_inflation = yr_inflation;
3460+
34303461}
34313462
3432- void C_HX_co2_to_htf::initialize (int hot_fl, int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type)
3463+ void C_HX_co2_to_htf::initialize (int hot_fl, int N_sub_hx, NS_HX_counterflow_eqs::E_UA_target_type od_UA_target_type,
3464+ double yr_inflation)
34333465{
34343466 util::matrix_t <double > null_fluid_props;
34353467
3436- initialize (hot_fl, null_fluid_props, N_sub_hx, od_UA_target_type);
3468+ initialize (hot_fl, null_fluid_props, N_sub_hx, od_UA_target_type, yr_inflation );
34373469}
34383470
34393471void C_HX_co2_to_htf::design_and_calc_m_dot_htf (C_HX_counterflow_CRM::S_des_calc_UA_par& des_par,
@@ -3691,7 +3723,8 @@ bool C_CO2_to_air_cooler::design_hx(S_des_par_ind des_par_ind, S_des_par_cycle_d
36913723 solver_code = -1 ;
36923724 i_W_par = -1 ;
36933725
3694- while (solver_code != 0 || std::abs (T_hot_in_calc_2 - T_hot_in_calc) / T_hot_in_calc < 0.01 )
3726+ while (solver_code != 0 || std::abs (T_hot_in_calc_2 - T_hot_in_calc) / T_hot_in_calc < 0.01
3727+ || ms_des_par_cycle_dep.m_T_hot_in_des - T_hot_in_calc_2 > 100.0 )
36953728 {
36963729 i_W_par++;
36973730
@@ -3774,7 +3807,7 @@ bool C_CO2_to_air_cooler::design_hx(S_des_par_ind des_par_ind, S_des_par_cycle_d
37743807 ms_hx_des_sol.m_W_dot_fan = ms_des_par_cycle_dep.m_W_dot_fan_des ; // [MWe]
37753808
37763809 ms_hx_des_sol.m_cost_equipment = calculate_equipment_cost (ms_hx_des_sol.m_UA_total *1 .E -3 , ms_hx_des_sol.m_V_total ,
3777- ms_hx_des_sol.m_T_in_co2 , ms_hx_des_sol.m_P_in_co2 , ms_hx_des_sol.m_m_dot_co2 ); // [M$]
3810+ ms_hx_des_sol.m_T_in_co2 , ms_hx_des_sol.m_P_in_co2 , ms_hx_des_sol.m_m_dot_co2 , des_par_ind. m_yr_inflation ); // [M$]
37783811
37793812 ms_hx_des_sol.m_cost_bare_erected = calculate_bare_erected_cost (ms_hx_des_sol.m_cost_equipment );
37803813
@@ -4361,14 +4394,24 @@ int C_CO2_to_air_cooler::C_MEQ_target_T_hot__width_parallel::operator()(double W
43614394}
43624395
43634396double /* M$*/ C_CO2_to_air_cooler::calculate_equipment_cost(double UA /* kWt/K*/ , double V_material /* m^3*/ ,
4364- double T_hot_in /* K*/ , double P_hot_in /* kPa*/ , double m_dot_hot /* kg/s*/ )
4397+ double T_hot_in /* K*/ , double P_hot_in /* kPa*/ , double m_dot_hot /* kg/s*/ , double yr_inflation /* */ )
43654398{
43664399 switch (m_cost_model)
43674400 {
43684401 case C_CO2_to_air_cooler::E_CARLSON_17:
4369- return 2.3 *1 .E -3 *UA; // [M$] needs UA in kWt/K
4402+ {
4403+ double yr_base_inflation = 2017 ;
4404+ double f_inflation = calculate_inflation_factor (yr_base_inflation, yr_inflation);
4405+ return 2.3 * 1 .E -3 * UA * f_inflation; // [M$] needs UA in kWt/K
4406+ }
4407+
43704408 case C_CO2_to_air_cooler::E_WEILAND_19:
4371- return 32.88 *std::pow (UA*1 .E3 , 0.75 )*1 .E -6 ; // [M$] needs UA in Wt/K
4409+ {
4410+ double yr_base_inflation = 2017 ;
4411+ double f_inflation = calculate_inflation_factor (yr_base_inflation, yr_inflation);
4412+ return 32.88 * std::pow (UA * 1 .E3 , 0.75 ) * 1 .E -6 * f_inflation; // [M$] needs UA in Wt/K
4413+ }
4414+
43724415 default :
43734416 return std::numeric_limits<double >::quiet_NaN ();
43744417 }
0 commit comments