Class: StructuraidCore::DesignCodes::NSR10::RC::ReductionFactor

Inherits:
Object
  • Object
show all
Includes:
Utils::CodeRequirement
Defined in:
lib/structuraid_core/design_codes/nsr_10/rc/reduction_factor.rb

Constant Summary collapse

CONTROL_STRENGTH_CASES =
%i[
  compression_controlled
  tension_controlled
  transition_controlled
  crushing_controlled
  shear_nonseismic_controlled
  torsion_controlled
  corbel_bracket_controlled
  strud_and_tie_controlled
].freeze
MAX_STRAIN_BEFORE_TRANSITION =
0.002
MIN_STRAIN_AFTER_TRANSITION =
0.005
CODE_REFERENCE =
'NSR-10 C.9.3.2'.freeze

Instance Method Summary collapse

Methods included from Utils::CodeRequirement

included, #initialize

Instance Method Details

#callObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/structuraid_core/design_codes/nsr_10/rc/reduction_factor.rb', line 25

def call
  unless CONTROL_STRENGTH_CASES.include?(strength_controlling_behaviour)
    raise UnrecognizedValueError.new(strength_controlling_behaviour, :strength_controlling_behaviour)
  end

  return tension_controlled_factor if strength_controlling_behaviour == :tension_controlled
  return compression_controlled_factor if strength_controlling_behaviour == :compression_controlled
  return crushing_controlled_factor if strength_controlling_behaviour == :crushing_controlled
  if %i[
    shear_nonseismic_controlled
    torsion_controlled
    corbel_bracket_controlled
    strud_and_tie_controlled
  ].include?(strength_controlling_behaviour)
    return shear_nonseismic_controlled_factor
  end

  transition_controlled_factor
end