File size: 1,461 Bytes
b2c3381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/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()