Class: Pulo::Steam::Header
- Inherits:
-
Object
- Object
- Pulo::Steam::Header
- Defined in:
- lib/pulo/machine/steam/header.rb
Instance Attribute Summary collapse
-
#energy_loss_pct ⇒ Object
readonly
Returns the value of attribute energy_loss_pct.
-
#inlet ⇒ Object
readonly
Returns the value of attribute inlet.
-
#inlet_temperature ⇒ Object
readonly
Returns the value of attribute inlet_temperature.
-
#mass_flow ⇒ Object
readonly
Returns the value of attribute mass_flow.
-
#outlet ⇒ Object
readonly
Returns the value of attribute outlet.
-
#pressure ⇒ Object
readonly
Returns the value of attribute pressure.
Instance Method Summary collapse
-
#initialize(pressure: nil, inlet_temperature: nil, energy_loss_pct: nil) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(pressure: nil, inlet_temperature: nil, energy_loss_pct: nil) ⇒ Header
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pulo/machine/steam/header.rb', line 8 def initialize(pressure: nil,inlet_temperature: nil,energy_loss_pct: nil) raise "Need all parameters" unless pressure && inlet_temperature && energy_loss_pct @pressure=pressure @inlet_temperature=inlet_temperature @energy_loss_pct=energy_loss_pct @inlet=WaterSteam.new(temperature: inlet_temperature,pressure: pressure) @outlet=WaterSteam.new(pressure: pressure, specific_enthalpy: @inlet.specific_enthalpy*(1-energy_loss_pct)) end |
Instance Attribute Details
#energy_loss_pct ⇒ Object (readonly)
Returns the value of attribute energy_loss_pct.
6 7 8 |
# File 'lib/pulo/machine/steam/header.rb', line 6 def energy_loss_pct @energy_loss_pct end |
#inlet ⇒ Object (readonly)
Returns the value of attribute inlet.
5 6 7 |
# File 'lib/pulo/machine/steam/header.rb', line 5 def inlet @inlet end |
#inlet_temperature ⇒ Object (readonly)
Returns the value of attribute inlet_temperature.
6 7 8 |
# File 'lib/pulo/machine/steam/header.rb', line 6 def inlet_temperature @inlet_temperature end |
#mass_flow ⇒ Object (readonly)
Returns the value of attribute mass_flow.
6 7 8 |
# File 'lib/pulo/machine/steam/header.rb', line 6 def mass_flow @mass_flow end |
#outlet ⇒ Object (readonly)
Returns the value of attribute outlet.
5 6 7 |
# File 'lib/pulo/machine/steam/header.rb', line 5 def outlet @outlet end |
#pressure ⇒ Object (readonly)
Returns the value of attribute pressure.
6 7 8 |
# File 'lib/pulo/machine/steam/header.rb', line 6 def pressure @pressure end |