Class OpenFoamBoundary
In: bc.rb
Parent: Object

OpenFOAM boundary class initialize with: OpenFoamBoundary( "INLET", xvel, yvel, zvel, k **for k-epsilon model**, epsilon) for pressure boundary: OpenFoamBoundary( "OUTLET", p *pressure* )

Methods

deselect   hide   new   reset   select   show   update  

Attributes

bcno  [RW] 
bctype  [RW] 
changed  [RW] 
defaultprefix  [RW] 
epsilon  [RW] 
face  [RW] 
info  [RW] 
k  [RW] 
p  [RW] 
ref  [RW] 
reflist  [RW] 
reforder  [RW] 
row  [RW] 
selected  [RW] 
visible  [RW] 
xvel  [RW] 
yvel  [RW] 
zvel  [RW] 

Public Class methods

[Source]

# File bc.rb, line 35
   def initialize(*args)
      @bctype = args[0]
      @defaultprefix = "bc"
      @info = [ self, self, "bc#{@@count}"]
      puts "openfoamboundary with info[2]= #{@info[2]}"
      @selected = false
      case @bctype
         when "INLET"
            @xvel, @yvel, @zvel, @k, @epsilon = args[1,5]
            @reforder = [ "bctype", "xvel", "yvel", "zvel", "k", "epsilon" ]
         when "OUTLET"
            @p = args[1]
            @reforder = [ "bctype", "p" ]
      end
      @@bcno += 1
      @@count += 1
      update
   end

Public Instance methods

[Source]

# File bc.rb, line 67
   def deselect
      @selected = false
      @ref.each do |tmp|
         tmp.deselect
      end
   end

[Source]

# File bc.rb, line 75
   def hide
   end

[Source]

# File bc.rb, line 77
   def reset
      $globalboundary = Array.new
      @@bcno = 0
      @@count = 0
   end

[Source]

# File bc.rb, line 61
   def select
      @selected = true
      @ref.each do |tmp|
         tmp.select
      end
   end

[Source]

# File bc.rb, line 73
   def show
   end

[Source]

# File bc.rb, line 53
   def update
      case @bctype
         when "INLET"
            @reflist = { "bctype" => @bctype, "xvel" => @xvel, "yvel" => @yvel, "zvel" => @zvel, "k" => @k, "epsilon" => @epsilon }
         when "OUTLET"
            @reflist = { "bctype" => @bctype, "p" => @p }
      end
   end

[Validate]