Class: Ilm::Chemical::Reactors::Reactor

Inherits:
Object
  • Object
show all
Defined in:
lib/ilm/chemical/reactors/reactor.rb

Overview

This is the base class for the diff kinds of reactors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Reactor

ATTRS = [:system, :volume, :input, :output, :rate_equation]



10
11
12
13
14
15
16
# File 'lib/ilm/chemical/reactors/reactor.rb', line 10

def initialize(args = {})
  self.system = args[:system]
  self.volume = args[:volume] if args[:volume]
  self.input = args[:input] if args[:input]
  self.output = args[:output] if args[:output]
  self.reaction = args[:reaction] if args[:reaction]
end

Instance Attribute Details

#inputObject

Returns the value of attribute input.



6
7
8
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6

def input
  @input
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6

def output
  @output
end

#reactionObject

Returns the value of attribute reaction.



6
7
8
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6

def reaction
  @reaction
end

#systemObject

Returns the value of attribute system.



6
7
8
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6

def system
  @system
end

#volumeObject

Returns the value of attribute volume.



6
7
8
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6

def volume
  @volume
end