class MainRun::RunAns1979
Public Instance Methods
# File lib/decay_heat_with_nuclear/main_run.rb, line 103 def run(ts = @ts, t0 = @t0, power = @power) read_data = ThermalData::DataForANS_5_1_1979.new ts.each_index do |i| ts_to_f = ts[i].to_f t0_to_f = t0[i].to_f # power_to_f = power[i].to_f t0_add_ts = ts_to_f + t0_to_f f_ts2t0 = calc_thermal_fission_functions(t0_to_f, ts_to_f, read_data) thePd_apostrophe = calc_sum_thermal_fission(f_ts2t0, read_data) thePd = calc_total_fission_product(thePd_apostrophe, t0_to_f, ts_to_f, read_data) fU239 = calc_thermal_fission_functions_with_U239(t0_to_f, ts_to_f, read_data) fNp239 = calc_thermal_fission_functions_with_Np239(t0_to_f, ts_to_f, read_data) thePd_all = thePd + ((fU239 + fNp239)/read_data.theQ[:others]) un = calc_Un(ts_to_f) if ts_to_f > 1.0E+03 && ts_to_f < 1.0E+04 thePd_all_un = thePd_all * 1.03 elsif ts_to_f >= 1.0E+04 thePd_all_un = thePd_all * (1.0 + un) else thePd_all_un = thePd_all * (1 + 3.0E-06 * ts_to_f) end dataout(ts_to_f, thePd_all_un) end @output_hash end
Private Instance Methods
Calculate Un is a factor which accounts for the SIL-636 additional terms effect. ts: Time after remove (sec)
calc_Un
(ts)
return un
# File lib/decay_heat_with_nuclear/main_run.rb, line 250 def calc_Un(ts) un = (6.0E-02 - 3.0E-02) / (1.0E+06 - 1.0E+04) * (ts - 1.0E+04) + 3.0E-02 if un >= 6.0E-02 un = 6.0E-02 end un end
Calculate P’di (the uncorrected decay heat power) from ANS-5.1-1979 Eq.6 need f_ts2t0, Pi(thePi), Qi(theQ) from class DataForANS_5_1_1979.
calc_sum_thermal_fission
(f_ts2t0, read_data)
return P’d
# File lib/decay_heat_with_nuclear/main_run.rb, line 189 def calc_sum_thermal_fission(f_ts2t0, read_data) prd = ThermalData::HashWithThermalFission.new pd = 0 prd.thermal_fission.each do |key, value| value = value + read_data.thePi[key] * f_ts2t0[key] / read_data.theQ[key] pd += value end pd end
Calculate thermal fission functions from ANS-5.1-1979 Table 7~9 include U235, Pu239 and U238. need t0, ts and data with thermal fission(from class DataForANS_5_1_1979) ts: Time after remove (sec) t0: Cumulative reactor operating time (sec)
calc_thermal_fission_functions
(t0, ts, read_data)
return { :U235 => f_U235(ts, t0)
:Pu239 => f_Pu235(ts, t0) :U238 => f_U238(ts, t0) }
# File lib/decay_heat_with_nuclear/main_run.rb, line 145 def calc_thermal_fission_functions(t0, ts, read_data) total_times = t0 + ts ff = ThermalData::HashWithThermalFission.new (0..read_data.theU235_alpha.size-1).each do |i| f_U235_ts2tinf = read_data.theU235_alpha[i] / read_data.theU235_lamda[i] * Math.exp(-read_data.theU235_lamda[i] * ts) * (1.0 - Math.exp(-read_data.theU235_lamda[i] * read_data.tinf)) f_U235_ts_add_t02tinf = read_data.theU235_alpha[i] / read_data.theU235_lamda[i] * Math.exp(-read_data.theU235_lamda[i] * total_times) * (1.0 - Math.exp(-read_data.theU235_lamda[i] * read_data.tinf)) ff.thermal_fission[:U235] = ff.thermal_fission[:U235] + f_U235_ts2tinf - f_U235_ts_add_t02tinf f_Pu239_ts2tinf = read_data.thePu239_alpha[i] / read_data.thePu239_lamda[i] * Math.exp(-read_data.thePu239_lamda[i] * ts) * (1.0 - Math.exp(-read_data.thePu239_lamda[i] * read_data.tinf)) f_Pu239_ts_add_t02tinf = read_data.thePu239_alpha[i] / read_data.thePu239_lamda[i] * Math.exp(-read_data.thePu239_lamda[i] * total_times) * (1.0 - Math.exp(-read_data.thePu239_lamda[i] * read_data.tinf)) ff.thermal_fission[:Pu239] = ff.thermal_fission[:Pu239] + f_Pu239_ts2tinf - f_Pu239_ts_add_t02tinf f_U238_ts2tinf = read_data.theU238_alpha[i] / read_data.theU238_lamda[i] * Math.exp(-read_data.theU238_lamda[i] * ts) * (1.0 - Math.exp(-read_data.theU238_lamda[i] * read_data.tinf)) f_U235_ts_add_t02tinf = read_data.theU238_alpha[i] / read_data.theU238_lamda[i] * Math.exp(-read_data.theU238_lamda[i] * total_times) * (1.0 - Math.exp(-read_data.theU238_lamda[i] * read_data.tinf)) ff.thermal_fission[:U238] = ff.thermal_fission[:U238] + f_U238_ts2tinf - f_U235_ts_add_t02tinf end ff.thermal_fission end
Calculate Np239 fission product decay heat power from ANS-5.1-1979 Eq.15 ts: Time after remove (sec) t0: Cumulative reactor operating time (sec)
calc_thermal_fission_functions_with_Np239
(t0, ts, read_data)
return fNp239
# File lib/decay_heat_with_nuclear/main_run.rb, line 237 def calc_thermal_fission_functions_with_Np239(t0, ts, read_data) read_data.theENp239 * read_data.theR * ((read_data.lamda1 / (read_data.lamda1 - read_data.lamda2)) * (1 - Math.exp(-read_data.lamda2 * t0)) * Math.exp(-read_data.lamda2 * ts) - (read_data.lamda2 / (read_data.lamda1 - read_data.lamda2)) * (1 - Math.exp(-read_data.lamda1 * t0)) * Math.exp(-read_data.lamda1 * ts)) end
Calculate U239 fission product decay heat power from ANS-5.1-1979 Eq.14 ts: Time after remove (sec) t0: Cumulative reactor operating time (sec)
calc_thermal_fission_functions_with_U239
(t0, ts, read_data)
return fU239
# File lib/decay_heat_with_nuclear/main_run.rb, line 225 def calc_thermal_fission_functions_with_U239(t0, ts, read_data) read_data.theEU239 * read_data.theR * (1 - Math.exp(-read_data.lamda1 * t0)) * Math.exp(-read_data.lamda1 * ts) end
Calculate total fission product decay heat power at t(ts) sec after shutdown from an operating history of T(t0) sec duration. (from ANS-5.1-1979 Eq.1 and 11) need t0, ts and data with thermal fission(from class DataForANS_5_1_1979) ts: Time after remove (sec) t0: Cumulative reactor operating time (sec)
calc_total_fission_product
(thePd_apostrophe, t0, ts, read_data)
return Pd
# File lib/decay_heat_with_nuclear/main_run.rb, line 209 def calc_total_fission_product(thePd_apostrophe, t0, ts, read_data) g = 1.0 + ((3.24E-06 + 5.23E-10 * ts) * (t0 ** (4.0E-01)) * read_data.phi) if g >= 1.1 g = 1.1 end thePd_apostrophe * g end