Class: StructuraidCore::Materials::Steel

Inherits:
Base
  • Object
show all
Defined in:
lib/structuraid_core/materials/steel.rb

Constant Summary collapse

DEFAULT_ELASTIC_MODULE =
200_000

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yield_stress:, elastic_module: DEFAULT_ELASTIC_MODULE) ⇒ Steel

Returns a new instance of Steel.



8
9
10
11
# File 'lib/structuraid_core/materials/steel.rb', line 8

def initialize(yield_stress:, elastic_module: DEFAULT_ELASTIC_MODULE)
  @elastic_module = elastic_module.to_f
  @yield_stress = yield_stress.to_f
end

Instance Attribute Details

#elastic_moduleObject (readonly)

Returns the value of attribute elastic_module.



6
7
8
# File 'lib/structuraid_core/materials/steel.rb', line 6

def elastic_module
  @elastic_module
end

#yield_stressObject (readonly)

Returns the value of attribute yield_stress.



6
7
8
# File 'lib/structuraid_core/materials/steel.rb', line 6

def yield_stress
  @yield_stress
end