Concrete Design Module

Concrete design calculators following IS 456:2000.

Beam Design Calculator

Design reinforced concrete beams for flexure and shear following IS 456:2000.

Enhanced Concrete Beam Design Calculator per IS 456:2000 & IS 13920:2016

This module implements reinforced concrete beam design with: - Multi-section analysis (left/mid/right) - Complete torsion integration (MTu, VTu, torsion stirrups) - Sway shear calculations per IS 13920:2016 Cl 6.3.4 - Zone-wise ductile detailing - Side face reinforcement per IS 456 Cl 26.5.1.3 - Bar arrangement output (“5-T16 + 3-T12” format) - Comprehensive spacing criteria

Version: 2.0.0 Date: November 30, 2025 Author: StructEngine Team

class api.app.calculators.concrete.conc_beam_design.BeamFace(*values)[source]

Bases: str, Enum

Beam face (top or bottom)

TOP = 'top'
BOTTOM = 'bottom'
class api.app.calculators.concrete.conc_beam_design.BeamSection(*values)[source]

Bases: str, Enum

Beam section location

LEFT = 'left'
MID = 'mid'
RIGHT = 'right'
class api.app.calculators.concrete.conc_beam_design.CheckStatus(**data)[source]

Bases: BaseModel

Status model for design checks - legacy compatibility

status: str
utilization_ratio: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

api.app.calculators.concrete.conc_beam_design.ConcBeamDesignCalculator

alias of EnhancedBeamDesignCalculator

class api.app.calculators.concrete.conc_beam_design.ConcBeamDesignInput(**data)[source]

Bases: BaseModel

Legacy input schema for backward compatibility

model_config: ClassVar[ConfigDict] = {'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

width: float
depth: float
span: float
cover: float
dead_load: float
live_load: float
concrete_grade: str
steel_grade: str
bar_diameter: float
stirrup_diameter: float
support_condition: str
is_seismic_design: bool
class api.app.calculators.concrete.conc_beam_design.ConcBeamDesignOutput(**data)[source]

Bases: BaseModel

Legacy output schema for backward compatibility

is_safe: bool
loads: LoadSummary
flexural_design: FlexuralDesign
shear_design: ShearDesign
checks: Dict[str, CheckStatus]
remarks: List[str]
crack_width: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.DesignInput(**data)[source]

Bases: BaseModel

Complete input for beam design with backward compatibility aliases

model_config: ClassVar[ConfigDict] = {'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

geometry: BeamGeometry
materials: MaterialProperties
loads: BeamLoads
is_ductile: bool
exposure_condition: str
main_bar_dia: float
stirrup_dia: float
class api.app.calculators.concrete.conc_beam_design.DesignOutput(**data)[source]

Bases: BaseModel

Complete beam design output

flexure: List[FlexureResult]
shear: List[ShearResult]
side_face_reinforcement: SideFaceReinforcement
overall_status: str
code_references: List[str]
design_summary: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.EnhancedBeamDesignCalculator[source]

Bases: BaseCalculator

Enhanced concrete beam design calculator with complete IS 456 & IS 13920 compliance.

Features: - Multi-section analysis (left/mid/right) - Complete torsion integration (MTu, VTu, torsion stirrups) - Sway shear calculations per IS 13920:2016 Cl 6.3.4 - Zone-wise ductile detailing - Side face reinforcement per IS 456 Cl 26.5.1.3 - Bar arrangement output (“5-T16 + 3-T12” format)

__init__()[source]

Initialize enhanced beam design calculator.

property input_schema: Type[BaseModel]

Return input validation schema.

property output_schema: Type[BaseModel]

Return output validation schema.

validate_inputs(raw_inputs)[source]

Override base validation to handle legacy flat input format.

Converts legacy format to new nested format before validation.

Return type:

Dict[str, Any]

calculate(inputs)[source]

Main calculation method - supports both legacy and enhanced input formats.

Return type:

Dict[str, Any]

class api.app.calculators.concrete.conc_beam_design.FlexuralDesign(**data)[source]

Bases: BaseModel

Flexural reinforcement design results - legacy compatibility

steel_area_required: float
steel_area_provided: float
number_of_bars: int
spacing: float
reinforcement_ratio: float
top_steel_area: float
bottom_steel_area: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.FlexureResult(**data)[source]

Bases: BaseModel

Flexural design results for a section

section: BeamSection
face: BeamFace
mu: float
tu: float
mtu: float
mud: float
ast_required: float
ast_min: float
ast_ductile: float
ast_final: float
asc_required: float
reinforcement: BarArrangement
utilization_ratio: float
status: str
remarks: List[str]
bar_arrangement_logic: List[str]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.LoadSummary(**data)[source]

Bases: BaseModel

Summary of loads and internal forces - legacy compatibility

total_load: float
factored_load: float
max_moment: float
max_shear: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.ShearDesign(**data)[source]

Bases: BaseModel

Shear reinforcement design results - legacy compatibility

shear_capacity: float
stirrup_spacing: float
stirrup_area: float
design_shear_strength: float
concrete_shear_capacity: float
stirrup_shear_capacity: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.ShearResult(**data)[source]

Bases: BaseModel

Shear design results for a section

section: BeamSection
vu: float
tu: float
service_shear: Optional[float]
vtu: float
vut: float
moment_capacity_hogging: Optional[float]
moment_capacity_sagging: Optional[float]
vu_sway: Optional[float]
vud: float
tau_c: float
vc: float
asv_shear: float
asv_torsion: float
asv_required: float
spacing_calculated: float
spacing_provided: float
stirrup_legs: int
stirrup_arrangement: str
utilization_ratio: float
status: str
remarks: List[str]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_beam_design.SideFaceReinforcement(**data)[source]

Bases: BaseModel

Side face reinforcement per IS 456 Cl 26.5.1.3

is_required: bool
trigger_condition: str
asr_required: float
asr_provided: float
bar_arrangement: Optional[str]
spacing: Optional[float]
status: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Doubly Reinforced Beam

Extension for doubly reinforced beam design.

Doubly Reinforced Beam Design Module per IS 456:2000 (Limit State Method)

This module implements doubly reinforced concrete beam design for sections where the applied factored moment exceeds the limiting moment capacity of a singly reinforced section (Mu > Mu,lim).

The module is called from the main beam design calculator when over-reinforcement is detected and compression steel is required.

Design Philosophy:

When Mu > Mu,lim, compression steel is added to increase moment capacity while maintaining ductility. The total capacity is split into: - Mu,lim: Resisted by singly reinforced section (Ast1) - Mu,excess = Mu - Mu,lim: Resisted by compression steel pair (Asc + Ast2)

References

IS 456:2000 Clause 38 - Flexural Strength IS 456:2000 Annex G - Design Aid for Reinforced Concrete

class api.app.calculators.concrete.conc_beam_design_doubly_reinforced.DoublyReinforcedResult(section_type, is_under_reinforced, Mu, Mu_lim, Mu_excess, ast1, ast2, ast_required, ast_method2, asc_required, xu_max, z, d_prime, lever_arm_compression, discriminant, min_area, max_area_tension, max_area_compression, method)[source]

Bases: object

Data class containing doubly reinforced beam design results.

section_type

Section classification (‘singly’ or ‘doubly’)

Type:

str

is_under_reinforced

Whether section meets ductility requirements

Type:

bool

Mu

Applied factored moment in kN-m

Type:

float

Mu_lim

Limiting moment capacity in kN-m

Type:

float

Mu_excess

Excess moment requiring compression steel in kN-m

Type:

float

ast1

Tension steel for Mu_lim in mm²

Type:

float

ast2

Additional tension steel for Mu_excess in mm²

Type:

float

ast_required

Total required tension steel in mm²

Type:

float

ast_method2

Verification steel area by alternate method in mm²

Type:

float

asc_required

Required compression steel area in mm²

Type:

float

xu_max

Maximum neutral axis depth in mm

Type:

float

z

Lever arm in mm

Type:

float

d_prime

Effective cover to compression steel in mm

Type:

float

lever_arm_compression

Lever arm for compression steel in mm

Type:

float

discriminant

Quadratic equation discriminant for validation

Type:

float

min_area

Minimum steel area per IS 456 in mm²

Type:

float

max_area_tension

Maximum tension steel area in mm²

Type:

float

max_area_compression

Maximum compression steel area in mm²

Type:

float

method

Design method identifier

Type:

str

section_type: str
is_under_reinforced: bool
Mu: float
Mu_lim: float
Mu_excess: float
ast1: float
ast2: float
ast_required: float
ast_method2: float
asc_required: float
xu_max: float
z: float
d_prime: float
lever_arm_compression: float
discriminant: float
min_area: float
max_area_tension: float
max_area_compression: float
method: str
__init__(section_type, is_under_reinforced, Mu, Mu_lim, Mu_excess, ast1, ast2, ast_required, ast_method2, asc_required, xu_max, z, d_prime, lever_arm_compression, discriminant, min_area, max_area_tension, max_area_compression, method)
class api.app.calculators.concrete.conc_beam_design_doubly_reinforced.DoublyReinforcedDesigner[source]

Bases: object

Doubly reinforced concrete beam designer per IS 456:2000.

Handles design of beam sections where the applied moment exceeds the limiting moment capacity of a singly reinforced section, requiring compression steel to increase capacity while maintaining ductility.

Design Theory:

When Mu > Mu,lim: 1. A single layer of tension steel at xu,max cannot resist the moment 2. Compression steel is added to reduce neutral axis depth 3. Total capacity = Mu,lim (singly reinforced) + Mu,excess (steel couple) 4. Ast = Ast1 (for Mu,lim) + Ast2 (paired with Asc)

Design Steps:
  1. Calculate Ast1 for Mu,lim using singly reinforced closed-form solution

  2. Calculate excess moment: Mu,excess = Mu - Mu,lim

  3. Design compression steel Asc for Mu,excess

  4. Calculate additional tension steel Ast2 = Asc (force equilibrium)

  5. Total tension steel Ast = Ast1 + Ast2

  6. Verify minimum and maximum steel requirements

Example

>>> designer = DoublyReinforcedDesigner()
>>> result = designer.design_doubly_reinforced(
...     Mu=250,  # kN-m
...     b=300,   # mm
...     d=600,   # mm
...     fck=25,  # MPa
...     fy=415,  # MPa
...     d_prime=50  # mm
... )
>>> print(f"Tension steel: {result.ast_required:.0f} mm²")
>>> print(f"Compression steel: {result.asc_required:.0f} mm²")

References

IS 456:2000 Clause 38 - Flexural Strength IS 456:2000 Clause 38.1 - Assumptions for Limit State Design IS 456:2000 Annex G - Design Aids

__init__()[source]

Initialize doubly reinforced designer with IS 456 parameters.

Sets up stress block factors and neutral axis depth ratios per IS 456:2000.

design_doubly_reinforced(Mu, b, d, fck, fy, d_prime=50.0, steel_grade='Fe415')[source]

Design doubly reinforced beam section per IS 456:2000.

Main entry point for doubly reinforced beam design. Calculates tension and compression steel required for moment exceeding Mu,lim.

Parameters:
  • Mu (float) – Applied factored moment in kN-m

  • b (float) – Beam width in mm (≥150mm)

  • d (float) – Effective depth in mm (≥150mm)

  • fck (float) – Characteristic concrete strength in MPa (M20-M50)

  • fy (float) – Characteristic steel strength in MPa (415, 500, 550)

  • d_prime (float) – Effective cover to compression steel in mm. Default: 50mm

  • steel_grade (str) – Steel grade string (‘Fe415’, ‘Fe500’, ‘Fe550’). Default: ‘Fe415’

Returns:

  • ast_required: Total tension steel in mm²

  • asc_required: Compression steel in mm²

  • Mu_lim: Limiting moment in kN-m

  • Mu_excess: Excess moment in kN-m

  • Complete design parameters and checks

Return type:

DoublyReinforcedResult object containing

Raises:

ValueError – If inputs violate IS 456 limits or discriminant is negative

Example

>>> designer = DoublyReinforcedDesigner()
>>> result = designer.design_doubly_reinforced(
...     Mu=250,
...     b=300,
...     d=600,
...     fck=25,
...     fy=415,
...     d_prime=50
... )
>>> print(f"Ast = {result.ast_required:.0f} mm²")
>>> print(f"Asc = {result.asc_required:.0f} mm²")
Ast = 2845 mm²
Asc = 628 mm²

Note

Design assumes: - Plane sections remain plane (strain compatibility) - Maximum concrete strain εcu = 0.0035 - Steel yields (fy reached) for ductile failure - Compression steel confined and properly detailed

References

IS 456:2000 Clause 38 - Flexural Strength IS 456:2000 Clause 26.5.1 - Minimum and Maximum Reinforcement

verify_design(result)[source]

Verify doubly reinforced design against IS 456:2000 requirements.

Performs comprehensive checks on the design including: - Minimum and maximum steel requirements - Ductility (under-reinforced condition) - Compression steel stress validity - Method cross-verification

Parameters:

result (DoublyReinforcedResult) – DoublyReinforcedResult from design_doubly_reinforced()

Returns:

  • is_valid (bool): Overall design validity

  • checks (dict): Individual check results

  • warnings (list): Design warnings

Return type:

Dictionary containing

Example

>>> verification = designer.verify_design(result)
>>> if verification['is_valid']:
...     print("Design is valid per IS 456:2000")
>>> for warning in verification['warnings']:
...     print(f"Warning: {warning}")

References

IS 456:2000 Clause 26.5.1 - Reinforcement Limits

Column Design Calculator

Design reinforced concrete columns for axial load and biaxial bending following IS 456:2000.

Refactored Column Design Calculator - IS 456:2000 + IS 13920:2016 WITH INTERACTION DIAGRAM SUPPORT (IS 456 ANNEX G)

Concrete column design with reduced complexity and complete shear design. Implements: - Method extraction for calculation steps - Parameter objects for grouped inputs - Strategy pattern for column types - Interaction diagram method for slender columns (IS 456 Annex G) - Functional programming approaches - Cyclomatic complexity < 10 per method

CORRECTED DESIGN MOMENT LOGIC: M_design = max(M_analysis, M_min_ecc) + M_slenderness

INTERACTION DIAGRAM IMPLEMENTATION (v5.0.0): ✨ NEW: Proper IS 456 Annex G interaction diagrams for slender columns ✨ NEW: P-M interaction curves for various fck and steel percentages ✨ NEW: Interpolation for intermediate values ✨ IMPROVED: Steel calculation using biaxial bending interaction

UPDATED FEATURES (Dec 5, 2025 - Version 5.0.0): - ✨ NEW: IS 456 Annex G Interaction Diagrams - ✨ NEW: Biaxial bending P-M interaction curves - ✨ NEW: Interpolation for custom f_ck values - Proper handling of N-M and N-M interaction - D/B ratio classification check (IS 13920:2016) - Special confining reinforcement Ash1, Ash2 (IS 13920:2016 Clause 7.6) - Corrected ductile zone length formula - 100mm cap on ductile link spacing - Enhanced output schema with ductile details - Capacity-based shear design (IS 13920:2016 Clause 7.5) - Simplified seismic design inputs for MRF - IS 13920:2016 full compliance option

class api.app.calculators.concrete.conc_column_design.ColumnGeometry(width, depth, unsupported_length_x, unsupported_length_y, clear_cover, main_bar_dia, tie_dia)[source]

Bases: object

Parameter object for column geometry.

width: float
depth: float
unsupported_length_x: float
unsupported_length_y: float
clear_cover: float
main_bar_dia: float
tie_dia: float
__init__(width, depth, unsupported_length_x, unsupported_length_y, clear_cover, main_bar_dia, tie_dia)
class api.app.calculators.concrete.conc_column_design.MaterialProperties(fck, fy, fyshear)[source]

Bases: object

Parameter object for material properties.

fck: float
fy: float
fyshear: float
__init__(fck, fy, fyshear)
class api.app.calculators.concrete.conc_column_design.LoadParameters(axial_load, moment_x, moment_y, shear_x, shear_y)[source]

Bases: object

Parameter object for loads and forces.

axial_load: float
moment_x: float
moment_y: float
shear_x: float
shear_y: float
__init__(axial_load, moment_x, moment_y, shear_x, shear_y)
class api.app.calculators.concrete.conc_column_design.EffectiveLengthFactors(along_major_axis, along_minor_axis)[source]

Bases: object

Parameter object for effective length factors.

along_major_axis: float
along_minor_axis: float
__init__(along_major_axis, along_minor_axis)
class api.app.calculators.concrete.conc_column_design.SeismicDesignParameters(enabled=False, sum_beam_moment_major=0.0, sum_beam_moment_minor=0.0, story_height=3000.0)[source]

Bases: object

Parameter object for seismic design (IS 13920:2016 Clause 7.5).

enabled: bool = False
sum_beam_moment_major: float = 0.0
sum_beam_moment_minor: float = 0.0
story_height: float = 3000.0
__init__(enabled=False, sum_beam_moment_major=0.0, sum_beam_moment_minor=0.0, story_height=3000.0)
class api.app.calculators.concrete.conc_column_design.ColumnDesignStrategy[source]

Bases: object

Strategy interface for column design calculations.

calculate_slenderness_moment(geometry, factored_axial_load, effective_length, depth_or_width)[source]
Return type:

float

calculate_steel_requirements(geometry, materials, design_moments, factored_axial_load)[source]
Return type:

Dict[str, Any]

class api.app.calculators.concrete.conc_column_design.ShortColumnStrategy[source]

Bases: ColumnDesignStrategy

Strategy for short column calculations using IS 456 Clause 39.4.

calculate_slenderness_moment(geometry, factored_axial_load, effective_length, depth_or_width)[source]

Short columns have no slenderness moment.

Return type:

float

calculate_steel_requirements(geometry, materials, design_moments, factored_axial_load)[source]

Calculate steel using IS 456:2000 Clause 39.4.

Return type:

Dict[str, Any]

class api.app.calculators.concrete.conc_column_design.SlenderColumnInteractionDiagramStrategy[source]

Bases: ColumnDesignStrategy

Strategy for slender column calculations using IS 456 Annex G.

Implements proper P-M interaction diagrams for biaxial bending.

calculate_slenderness_moment(geometry, factored_axial_load, effective_length, depth_or_width)[source]

Calculate slenderness moment per IS 456 Clause 39.7.1.

Return type:

float

calculate_steel_requirements(geometry, materials, design_moments, factored_axial_load)[source]

Calculate steel using IS 456 Annex G interaction diagrams.

Steps: 1. Get interaction diagram for given fck 2. Normalize P_u and M_u 3. Find point on diagram or use interpolation 4. Extract required steel percentage 5. Apply min/max limits

Return type:

Dict[str, Any]

class api.app.calculators.concrete.conc_column_design.ColumnDesignInput(**data)[source]

Bases: BaseModel

Input schema for column design calculation.

column_width: float
column_depth: float
unsupported_length_x: float
unsupported_length_y: float
concrete_grade: str
steel_grade: str
shear_steel_grade: str
axial_load: float
moment_x: float
moment_y: float
shear_x: float
shear_y: float
effective_length_factor_x: float
effective_length_factor_y: float
clear_cover: float
main_bar_diameter: float
tie_diameter: float
enable_seismic_design: bool
sum_beam_moment_capacity_major: Optional[float]
sum_beam_moment_capacity_minor: Optional[float]
story_height: Optional[float]
classmethod validate_seismic_inputs_major(v, values)[source]

Validate that beam moments are provided if seismic design is enabled.

Return type:

Any

classmethod validate_story_height(v, values)[source]

Validate that story height is provided if seismic design is enabled.

Return type:

Any

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_column_design.ColumnDesignOutput(**data)[source]

Bases: BaseModel

Output schema for column design results.

inputs: ColumnDesignInput
fck: float
fy: float
fyshear: float
db_ratio: float
db_ratio_limit: float
column_classification: str
gross_area: float
effective_length_x: float
effective_length_y: float
slenderness_ratio_x: float
slenderness_ratio_y: float
column_type: str
factored_axial_load: float
factored_moment_x: float
factored_moment_y: float
factored_shear_x: float
factored_shear_y: float
min_ecc_x: float
min_ecc_y: float
min_moment_x: float
min_moment_y: float
min_eccentricity_method: str
analysis_moment_x: float
analysis_moment_y: float
max_of_analysis_minecc_x: float
max_of_analysis_minecc_y: float
slenderness_moment_x: float
slenderness_moment_y: float
design_moment_x: float
design_moment_y: float
resultant_moment: float
min_steel_percentage: float
max_steel_percentage: float
required_steel_area: float
provided_steel_area: float
steel_percentage: float
calculation_method: str
main_bars_count: int
main_bars_description: str
ductile_zone_length: float
hoop_dimension_h: float
core_area_Ak: float
Ash1_confinement: float
Ash2_shear: float
Ash_required: float
confining_reinforcement_check: bool
ash_utilization_ratio: float
seismic_design_enabled: bool
estimated_hst_x: Optional[float]
estimated_hst_y: Optional[float]
capacity_based_shear_x: Optional[float]
capacity_based_shear_y: Optional[float]
design_shear_x_value: float
design_shear_y_value: float
governing_shear_case_x: str
governing_shear_case_y: str
shear_stress_x: float
shear_stress_y: float
shear_capacity_concrete_x: float
shear_capacity_concrete_y: float
shear_capacity_enhanced_x: float
shear_capacity_enhanced_y: float
axial_capacity: float
moment_capacity_x: float
moment_capacity_y: float
capacity_interaction_ratio: float
capacity_check: bool
slenderness_check: bool
reinforcement_check: bool
shear_check_x: bool
shear_check_y: bool
is_13920_compliant: bool
status: str
remarks: List[str]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.conc_column_design.RefactoredColumnDesignCalculator[source]

Bases: BaseCalculator

Refactored calculator for concrete column design per IS 456:2000 + IS 13920:2016 WITH INTERACTION DIAGRAM SUPPORT (IS 456 ANNEX G)

Design Moment Calculation: M_design = max(M_analysis, M_min_ecc) + M_slenderness

UPDATES (Dec 5, 2025 - Version 5.0.0): - ✨ IS 456 Annex G Interaction Diagrams for slender columns - ✨ Proper P-M interaction curves - ✨ Biaxial bending support - D/B ratio classification check - Special confining reinforcement (Ash1, Ash2) - Corrected ductile zone length - 100mm cap on ductile link spacing - Capacity-based shear design (IS 13920 Clause 7.5) - Full IS 13920:2016 seismic compliance

__init__()[source]

Initialize the calculator.

Parameters:
  • calculator_type – Type identifier for the calculator

  • version – Calculator version

property input_schema: Type[BaseModel]

Return the Pydantic schema for input validation.

property output_schema: Type[BaseModel]

Return the Pydantic schema for output formatting.

calculate(inputs)[source]

Main calculation method with Interaction Diagram support.

Return type:

Dict[str, Any]

Slab Design Calculator

Design one-way and two-way reinforced concrete slabs following IS 456:2000.

Slab Design Calculator

Concrete slab design as per IS 456:2000. Performs design of one-way and two-way slabs with comprehensive coefficient tables.

Version: 2.0.0 - IS 456 Compliance Update - Integrated crack width calculation (IS 456 Annex F via crack_width module) - Fixed distribution steel using gross area (IS 456 Cl 26.5.2.1) - Improved shear enhancement factor with linear interpolation - Added percentage steel tracking - Enhanced output schema

class api.app.calculators.concrete.slab_design.SlabDesignInput(**data)[source]

Bases: BaseModel

Input schema for slab design calculation.

clear_shorter_span: float
clear_longer_span: float
slab_depth: float
support_condition: Literal['Interior Panel', 'End Panel', 'Next to End Panel', 'One short edge discontinuous', 'One long edge discontinuous', 'Two adjacent edges discontinuous', 'Two short edges discontinuous', 'Two long edges discontinuous', 'One long edge continuous', 'One short edge continuous', 'Four edges discontinuous']
fck: float
fy: float
dead_load: float
live_load: float
clear_cover: float
db_short: float
db_long: float
classmethod validate_fy(v)[source]
Return type:

float

classmethod validate_fck(v)[source]

Validate concrete grade per IS 456.

Return type:

float

classmethod validate_practical_depth(v)[source]

Validate practical slab depth limits.

Return type:

float

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.slab_design.SlabDesignOutput(**data)[source]

Bases: BaseModel

Output schema for slab design results.

inputs: SlabDesignInput
eff_depth_short: float
eff_depth_long: float
eff_shorter_span: float
eff_longer_span: float
span_ratio: float
clear_span_ratio: float
slab_type: str
coefficients: Dict[str, float]
moments: Dict[str, float]
M_mid_kNm: Optional[float]
M_sup_kNm: Optional[float]
V_kN: Optional[float]
d_required_for_maxM: Optional[float]
M_short_mid_kNm: Optional[float]
M_short_sup_kNm: Optional[float]
M_long_mid_kNm: Optional[float]
M_long_sup_kNm: Optional[float]
V_sx_kN: Optional[float]
V_sy_kN: Optional[float]
reinforcement: Dict[str, float]
As_short_mid_req: Optional[float]
As_short_sup_req: Optional[float]
As_long_mid_req: Optional[float]
As_long_sup_req: Optional[float]
As_mid_provided: Optional[float]
As_sup_provided: Optional[float]
As_dist_provided: Optional[float]
spacing_mid_provided: Optional[float]
spacing_sup_provided: Optional[float]
spacing_dist_provided: Optional[float]
tau_v: Optional[float]
tau_v_short: Optional[float]
tau_c_eff: Optional[float]
tau_c_eff_short: Optional[float]
shear_failure: bool
shear_capacity: bool
f_s: Optional[float]
k_t: Optional[float]
l_d_ratio_basic: Optional[float]
l_d_ratio_allowable: Optional[float]
l_d_ratio_actual: Optional[float]
deflection_check: str
rho_actual_short: Optional[float]
rho_actual_long: Optional[float]
rho_critical: Optional[float]
Ec: Optional[float]
Es: float
fs_service: Optional[float]
crack_width: Optional[float]
crack_width_limit: Optional[float]
crack_width_check: Optional[str]
steel_capped_minimum: Optional[Dict[str, bool]]
status: str
error: Optional[str]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.slab_design.SlabDesignCalculator[source]

Bases: BaseCalculator

Calculator for concrete slab design per IS 456:2000.

Supports both one-way and two-way slab design with comprehensive coefficient tables and support conditions. 2.0.0 Updates:

__init__()[source]

Initialize the calculator.

Parameters:
  • calculator_type – Type identifier for the calculator

  • version – Calculator version

property input_schema: Type[SlabDesignInput]

Return the Pydantic schema for input validation.

property output_schema: Type[SlabDesignOutput]

Return the Pydantic schema for output formatting.

get_twoway_coefficients(support_condition, span_ratio)[source]

Get moment coefficients for two-way slab with interpolation per IS 456 Table 10.4.

Return type:

Dict[str, Any]

get_twoway_shear_coefficients(support_condition, span_ratio)[source]

Get shear coefficients for two-way slab with interpolation per IS 456 Table 10.5.

Return type:

Tuple[Any, ...]

required_steel_area(M_kNm, b, d, fck, fy)[source]

Calculate required steel area per IS 456 Cl 38.1.

Return type:

float

round_down_5(value)[source]

Round down to nearest multiple of 5.

Return type:

float

get_tau_c(pt, fck)[source]

Get design shear strength per IS 456 Table 19.

Return type:

float

get_slab_depth_factor(d)[source]

Get depth factor per IS 456 Cl 40.2.1.1 with linear interpolation.

Reference: IS 456:2000 Table 19 (enhancement factor)

Return type:

float

calculate_modulus_of_elasticity_concrete(fck)[source]

Calculate modulus of elasticity of concrete per IS 456 Cl 6.2.3.1.

Reference: IS 456:2000 Clause 6.2.3.1 Ec = 5000 * sqrt(fck) MPa

Return type:

float

calculate_crack_width_via_module(b, h, d, cover, db, spacing, As, M_service_kNm, concrete_grade, exposure='moderate')[source]

Calculate crack width using the standalone CrackWidthCalculator module.

Reference: IS 456:2000 Annex F (via crack_width.py)

Parameters:
  • b (float) – Width of section (mm)

  • h (float) – Overall depth (mm)

  • d (float) – Effective depth (mm)

  • cover (float) – Clear cover (mm)

  • db (float) – Diameter of bar (mm)

  • spacing (float) – Bar spacing (mm)

  • As (float) – Area of steel (mm²)

  • M_service_kNm (float) – Service moment (kN-m)

  • concrete_grade (str) – Concrete grade string (e.g., “M25”)

  • exposure (str) – Exposure condition (moderate/severe/extreme)

Return type:

Dict[str, Any]

Returns:

Dictionary with crack width results from CrackWidthCalculator

beeby_factor(f_s, b, d, As)[source]

Calculate Beeby factor per IS 456 Annex C.

Return type:

float

actual_As_provided(db, spacing)[source]

Calculate provided steel area.

Return type:

float

calculate(inputs)[source]

Perform slab design calculation per IS 456:2000.

Return type:

Dict[str, Any]

Crack Width Calculator

Calculate crack widths in reinforced concrete members following IS 456:2000.

Enhanced Crack Width Calculator per IS 456:2000 Annex F.

Provides contextual safety reporting based on crack width ranges.

class api.app.calculators.concrete.crack_width.CrackWidthCalculator[source]

Bases: BaseCalculator

IS 456:2000 Annex F crack width calculation with contextual safety.

Safety Reporting: - < 0.1mm: SAFE for all exposures - 0.1-0.2mm: SAFE for moderate & severe only - 0.2-0.3mm: SAFE for moderate only - > 0.3mm: UNSAFE for all exposures

ALLOWABLE_CRACK_WIDTH: ClassVar[Dict[str, float]] = {'extreme': 0.1, 'moderate': 0.3, 'severe': 0.2}
E_S = 200000.0
__init__()[source]

Initialize calculator.

property input_schema: Any

Return None - using Dict-based validation.

property output_schema: Any

Return None - using Dict-based output.

get_name()[source]

Get calculator name.

Return type:

str

validate_inputs(raw_inputs)[source]

Validate input parameters for crack width calculation.

Since this calculator uses Dict-based validation instead of Pydantic, we override the base class validation to perform manual validation.

Parameters:

raw_inputs (Dict[str, Any]) – Raw input dictionary

Return type:

Dict[str, Any]

Returns:

Validated input dictionary

Raises:

ValueError – If required inputs are missing or invalid

calculate(inputs)[source]

Main calculation method.

Parameters:

inputs (Dict[str, Any]) – Dictionary with keys (frontend format): - element_type (str): “beam” or “slab” - b (float): Width of beam (mm) - depth (float): Overall depth (mm) - c (float): Clear cover (mm) - f_ck (float): Characteristic compressive strength (MPa) - f_y (float): Yield strength of steel (MPa) - m (float): Service moment for beam (kN-m) - m_slab (float): Service moment for slab (kN-m/m) - num_bars1 (int): Number of bars in layer 1 - db1 (float): Diameter of layer 1 bars (mm) - num_bars2 (int): Number of bars in layer 2 - db2 (float): Diameter of layer 2 bars (mm) - spacing (float): Bar spacing for slab (mm) - db_slab (float): Bar diameter for slab (mm)

Return type:

Dict[str, Any]

Returns:

Dictionary with crack width results and contextual safety

Footing Design Calculators

Isolated Footing

Design isolated footings for columns following IS 456:2000.

StructEngine Isolated Footing Design - Enhanced Calculator v4.2.0 IS 456:2000 Compliance Implementation

Complete implementation of all 7 critical improvements: 1. Load Transfer Check (IS 456 Cl. 34.4) 2. Water Table Calculation Alignment 3. Shear Force Inputs (Vx, Vy) 4. Gross Bearing Capacity 5. SBC Increase Factors 6. Safety Factors Alignment (FOS=1.2, 1.5) 7. Load Combination Iteration

class api.app.calculators.concrete.footing_types.isolated_footing.LoadCombinationType(*values)[source]

Bases: str, Enum

Load combination types per IS 456 and IS 1893

DEAD_LIVE = 'DEAD_LIVE'
DEAD_LIVE_EQ_X = 'DEAD_LIVE_EQ_X'
DEAD_LIVE_EQ_Y = 'DEAD_LIVE_EQ_Y'
DEAD_LIVE_WIND = 'DEAD_LIVE_WIND'
DEAD_ONLY = 'DEAD_ONLY'
class api.app.calculators.concrete.footing_types.isolated_footing.SafetyStatus(*values)[source]

Bases: str, Enum

Status enumeration for safety checks

SAFE = 'SAFE'
UNSAFE = 'UNSAFE'
CRITICAL = 'CRITICAL'
class api.app.calculators.concrete.footing_types.isolated_footing.IsolatedFootingInput(**data)[source]

Bases: BaseModel

Enhanced input schema for isolated footing design Aligned with IS 456:2000 requirements

Implements: - Step 3: Shear Force Inputs (Vx, Vy) - Step 5: Load Combination Type - Step 8: Live Load Reduction & Surcharge Load

column_width: float
column_depth: float
axial_load: float
moment_x: float
moment_y: float
shear_x: float
shear_y: float
load_combination: LoadCombinationType
live_load_reduction: float
soil_bearing_capacity: float
soil_density: float
founding_depth: float
ground_water_level: float
surcharge_load: float
friction_coefficient: float
concrete_grade: Literal['M15', 'M20', 'M25', 'M30', 'M35', 'M40', 'M45', 'M50']
steel_grade: Literal['Fe415', 'Fe500', 'Fe550']
clear_cover: float
footing_length: Optional[float]
footing_width: Optional[float]
footing_depth: Optional[float]
min_footing_length: Optional[float]
max_footing_length: Optional[float]
length_width_ratio: float
classmethod validate_water_table(v)[source]

Validate water table depth

Return type:

float

classmethod validate_reduction(v)[source]

Validate live load reduction percentage

Return type:

float

class Config[source]

Bases: object

Pydantic config

json_schema_extra: ClassVar[Dict[str, Any]] = {'example': {'axial_load': 4158.74, 'clear_cover': 40, 'column_depth': 1000, 'column_width': 850, 'concrete_grade': 'M25', 'footing_depth': 775, 'footing_length': 3400, 'footing_width': 3250, 'founding_depth': 4.0, 'friction_coefficient': 0.5, 'ground_water_level': 10.0, 'length_width_ratio': 1.5, 'live_load_reduction': 0, 'load_combination': 'DEAD_LIVE', 'moment_x': 289.18, 'moment_y': 114.48, 'shear_x': 0, 'shear_y': 0, 'soil_bearing_capacity': 300, 'soil_density': 18, 'steel_grade': 'Fe415', 'surcharge_load': 0}}
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'axial_load': 4158.74, 'clear_cover': 40, 'column_depth': 1000, 'column_width': 850, 'concrete_grade': 'M25', 'footing_depth': 775, 'footing_length': 3400, 'footing_width': 3250, 'founding_depth': 4.0, 'friction_coefficient': 0.5, 'ground_water_level': 10.0, 'length_width_ratio': 1.5, 'live_load_reduction': 0, 'load_combination': 'DEAD_LIVE', 'moment_x': 289.18, 'moment_y': 114.48, 'shear_x': 0, 'shear_y': 0, 'soil_bearing_capacity': 300, 'soil_density': 18, 'steel_grade': 'Fe415', 'surcharge_load': 0}}}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.footing_types.isolated_footing.IsolatedFootingOutput(**data)[source]

Bases: BaseModel

Enhanced output schema for isolated footing design IS 456:2000 Compliant with all 7 improvements

status: SafetyStatus
message: str
footing_length: float
footing_width: float
footing_depth: float
footing_area: float
footing_volume: float
gross_bearing_capacity: float
sbc_original: float
load_combination_type: str
sbc_increase_factor: float
sbc_adjusted: float
allowable_bearing_capacity: float
max_pressure: float
min_pressure: float
pressure_check_status: SafetyStatus
pressure_safety_factor: float
water_table_depth_from_base: float
water_table_applicable: bool
footing_weight_no_water: float
footing_weight_with_water: float
soil_weight_no_water: float
soil_weight_with_water: float
submerged_column_weight: float
upward_water_force: float
buoyancy_check_status: SafetyStatus
buoyancy_safety_factor: float
shear_force_x: float
shear_force_y: float
resultant_shear: float
sliding_check_status: SafetyStatus
sliding_safety_factor: float
overturning_check_status: SafetyStatus
overturning_safety_factor_x: float
overturning_safety_factor_y: float
load_transfer_check_status: SafetyStatus
load_transfer_details: Dict[str, float]
design_moment_x: float
design_moment_y: float
steel_area_bottom_x: float
steel_area_bottom_y: float
steel_area_top: float
bottom_bars_x: str
bottom_bars_y: str
top_bars: str
minimum_reinforcement_percent: float
actual_reinforcement_percent_x: float
actual_reinforcement_percent_y: float
critical_shear_x: float
critical_shear_y: float
shear_stress_x: float
shear_stress_y: float
design_shear_strength: float
one_way_shear_status: SafetyStatus
punching_shear_stress: float
punching_shear_strength: float
punching_shear_status: SafetyStatus
development_length_req_x: float
development_length_available_x: float
dev_length_status_x: SafetyStatus
development_length_req_y: float
development_length_available_y: float
dev_length_status_y: SafetyStatus
effective_depth_x: float
effective_depth_y: float
load_combinations_checked: List[str]
governing_combination_sizing: str
governing_combination_pressure: str
governing_combination_stability: str
all_checks_passed: bool
failed_checks: List[str]
recommendations: List[str]
calculated_at: str
standard_reference: str
calculation_version: str
class Config[source]

Bases: object

Pydantic config

json_encoders: ClassVar[Dict[type, Any]] = {<class 'datetime.datetime'>: <function IsolatedFootingOutput.Config.<lambda>>}
model_config: ClassVar[ConfigDict] = {'json_encoders': {<class 'datetime.datetime'>: <function IsolatedFootingOutput.Config.<lambda>>}}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class api.app.calculators.concrete.footing_types.isolated_footing.EnhancedIsolatedFootingCalculator(inputs)[source]

Bases: object

Enhanced Isolated Footing Calculator with IS 456:2000 Compliance

CONCRETE_GRADES: ClassVar[Dict[str, int]] = {'M15': 15, 'M20': 20, 'M25': 25, 'M30': 30, 'M35': 35, 'M40': 40, 'M45': 45, 'M50': 50}
STEEL_GRADES: ClassVar[Dict[str, Dict[str, int]]] = {'Fe415': {'fy': 415, 'modulus': 200000}, 'Fe500': {'fy': 500, 'modulus': 200000}, 'Fe550': {'fy': 550, 'modulus': 200000}}
FOS_SLIDING = 1.2
FOS_OVERTURNING = 1.5
FOS_BUOYANCY = 1.4
LOAD_COMBINATIONS: ClassVar[Dict[LoadCombinationType, Dict[str, Any]]] = {LoadCombinationType.DEAD_LIVE: {'dead_factor': 1.35, 'description': 'Dead + Live Loads (Normal)', 'live_factor': 1.5, 'sbc_adjustment': 1.0}, LoadCombinationType.DEAD_LIVE_EQ_X: {'dead_factor': 1.35, 'description': 'Dead + Live + Seismic-X', 'live_factor': 1.5, 'sbc_adjustment': 1.25}, LoadCombinationType.DEAD_LIVE_EQ_Y: {'dead_factor': 1.35, 'description': 'Dead + Live + Seismic-Y', 'live_factor': 1.5, 'sbc_adjustment': 1.25}, LoadCombinationType.DEAD_LIVE_WIND: {'dead_factor': 1.35, 'description': 'Dead + Live + Wind', 'live_factor': 1.5, 'sbc_adjustment': 1.25}, LoadCombinationType.DEAD_ONLY: {'dead_factor': 1.0, 'description': 'Dead Load Only', 'live_factor': 0, 'sbc_adjustment': 1.0}}
__init__(inputs)[source]

Initialize calculator with inputs

calculate()[source]

Main calculation entry point

Return type:

IsolatedFootingOutput

class api.app.calculators.concrete.footing_types.isolated_footing.IsolatedFootingCalculator[source]

Bases: BaseCalculator

Wrapper for EnhancedIsolatedFootingCalculator to fit BaseCalculator pattern

__init__()[source]

Initialize the calculator.

Parameters:
  • calculator_type – Type identifier for the calculator

  • version – Calculator version

property input_schema: Type[IsolatedFootingInput]

Return the Pydantic schema for input validation.

property output_schema: Type[IsolatedFootingOutput]

Return the Pydantic schema for output formatting.

calculate(inputs)[source]

Execute calculation using enhanced calculator

Return type:

Dict[str, Any]

Retaining Wall Calculator

Design reinforced concrete retaining walls following IS 456:2000.

Retaining Wall Design Calculator - IS 456:2000

Main retaining wall design calculator that dispatches to specific retaining wall type calculators based on user selection. Provides unified interface for all retaining wall design types.

class api.app.calculators.concrete.retaining_wall_design.RetainingWallDesignCalculator[source]

Bases: BaseCalculator

Main Retaining Wall Design Calculator

Dispatches to specific retaining wall calculators based on type: - Cantilever Retaining Wall - Counterfort Retaining Wall (future implementation)

__init__()[source]

Initialize the calculator.

Parameters:
  • calculator_type – Type identifier for the calculator

  • version – Calculator version

property input_schema: Type[BaseModel]

Return the input schema for validation

property output_schema: Type[BaseModel]

Return the output schema for formatting

calculate(inputs)[source]

Main calculation method that dispatches to appropriate calculator

Return type:

Dict[str, Any]