Spaces:
Sleeping
Sleeping
#!/usr/bin/env python3 | |
""" | |
Test script for the Continuous Beam RC Design application | |
""" | |
from continuous_beam import ContinuousBeam | |
def test_single_span(): | |
"""Test single span beam""" | |
print("Testing Single Span Beam") | |
print("-" * 30) | |
beam = ContinuousBeam() | |
beam.add_span(length=8.0, distributed_load=30.0) | |
design_results = beam.design_beam() | |
report = beam.generate_report(design_results) | |
print(report) | |
def test_two_span(): | |
"""Test two span continuous beam""" | |
print("\nTesting Two Span Continuous Beam") | |
print("-" * 35) | |
beam = ContinuousBeam() | |
beam.add_span(length=6.0, distributed_load=25.0) | |
beam.add_span(length=8.0, distributed_load=30.0) | |
design_results = beam.design_beam() | |
report = beam.generate_report(design_results) | |
print(report) | |
def test_custom_materials(): | |
"""Test with custom material properties""" | |
print("\nTesting Custom Material Properties") | |
print("-" * 35) | |
beam = ContinuousBeam() | |
beam.fc = 35 # Higher strength concrete | |
beam.fy = 500 # Higher strength steel | |
beam.beam_width = 400 | |
beam.beam_depth = 600 | |
beam.d = beam.beam_depth - beam.cover | |
beam.add_span(length=10.0, distributed_load=40.0) | |
design_results = beam.design_beam() | |
report = beam.generate_report(design_results) | |
print(report) | |
if __name__ == "__main__": | |
test_single_span() | |
test_two_span() | |
test_custom_materials() |