class Gtengine::Simple::Burner
Constants
- DEFAULTS
Attributes
input[RW]
options[RW]
output[RW]
q_t[RW]
t_g[RW]
Public Class Methods
new(input, t_g, options = {})
click to toggle source
# File lib/gtengine/simple/burner.rb, line 11 def initialize(input, t_g, options = {}) @input, @t_g = input, t_g @options = DEFAULTS.merge(options) cycle end
Public Instance Methods
alfa()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 41 def alfa begin 1.0 / (q_ks * l_0) rescue 999999999.0 end end
cp_mult_t_0()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 37 def cp_mult_t_0 Gtengine::Gas.new(t_0, 101325.0, 1.0).cp * t_0 end
cp_vh()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 17 def cp_vh input.cp end
cp_vyh()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 21 def cp_vyh output.cp end
cycle()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 49 def cycle @output = Gtengine::Gas.new(t_g, p_vh, input.alfa) 5.times { @output.alfa = alfa } end
eta_g()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 62 def eta_g options[:eta_g] end
info()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 70 def info puts "== Burner q_ks: #{q_ks}, ALFA: #{alfa}" puts "==== Вход T: #{@input.t.to_i} K, P: #{@input.p.to_i} Па" puts "==== Выход T: #{@output.t.to_i} K, P: #{@output.p.to_i} Па\n\n" end
l_0()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 58 def l_0 options[:l_0] end
p_vh()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 29 def p_vh input.p end
q_ks()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 33 def q_ks upper_q_ks / lower_q_ks end
q_n()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 66 def q_n options[:q_n] end
t_0()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 54 def t_0 options[:t_0] end
t_vh()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 25 def t_vh input.t end
Private Instance Methods
lower_q_ks()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 82 def lower_q_ks (q_n * eta_g - (cp_vyh * t_g - cp_mult_t_0)) end
upper_q_ks()
click to toggle source
# File lib/gtengine/simple/burner.rb, line 78 def upper_q_ks (cp_vyh * t_g - cp_vh * t_vh - (cp_vyh - cp_vh) * t_0) end