from simplex.foundation import *
from simplex.materials import *
from simplex.geometry import *
if __name__ == "__main__":
info = ProjectInfo(
project="Line Foundation Example",
name="Line Foundation Test",
description="This is a line foundation example project.",
location="Test Location",
company="Test Company",
signature="Test Signature",
comments="Line foundation example with simplified imports."
)
top_reinf_1 = ReinfLayer(diameter=10, spacing=50, concrete_cover=50, zone=Zone.TOP, material=Reinforcement.B500())
bottom_reinf_1 = ReinfLayer(diameter=10, spacing=75, concrete_cover=50, zone=Zone.BOTTOM, material=Reinforcement.B500())
reinf = Rebars(
x_direction=[top_reinf_1, bottom_reinf_1]
)
fnd = LineFoundation(
lx_bottom=1.4,
lx_top=0.3,
height=0.4,
eccentricity_x=0.1,
material=Concrete.C30_37(),
reinforcement=reinf,
top_of_footing=-0.6,
position=Point2d(10.0, 12.0),
)
loading = [
LineFoundationLoading(
name="Loadcomb ULS",
type=LoadType.ULTIMATE,
hx=50.0, hy=0.0, n=-700.0,
my=0.0, sw=1.0
),
LineFoundationLoading(
name="Loadcomb SLS",
type=LoadType.CHARACTERISTIC,
hx=0.0, hy=0.0, n=-600.0,
my=0.0, sw=1.0
),
]
soil_material_1 = SoilMaterial.drained(
name="Silty Clay",
phik=35,
ck=0,
gamma=18.0,
gamma_eff=10.0,
m0=20000
)
soil_material_2 = SoilMaterial.undrained(
name="Clay",
cuk=100,
gamma=18.0,
gamma_eff=10.0,
m0=20000
)
borehole = Borehole(
soil_materials=[soil_material_1, soil_material_2],
top_of_layers=[0.0, -0.4]
)
soil_complex = SoilComplex(
borehole=borehole,
depth_limit=-5.0,
ground_water=-1.0
)
code_settings = CodeSettings(
annex=Annex.ANNEX_DENMARK,
consequence=Consequence.CONSEQUENCE_CLASS_2,
reliability=Reliability.RELIABILITY_CLASS_1
)
concrete_settings = ConcreteSettings(
crack=0.001,
distribution=FoundationDistribution.FOUNDATION_DISTRIBUTION_PLASTIC,
fabrication=Fabrication.FABRICATION_IN_SITU,
low_strength_variation=False,
consider_min_reinforcement=True,
exposure_class=Exposure.EXPOSURE_CLASS_XC2,
life_category=LifeCategory.LIFE_CATEGORY_L100,
critical_element=False,
inspection_level=InspectionLevel.INSPECTION_LEVEL_TIGHTENED
)
soil_settings = SoilSettings(
des_appr=DesignApproach.DESIGN_APPROACH_3,
geo_cat=GeotechnicalCategory.GEOTECHNICAL_CATEGORY_2,
check_settl=True,
abs_sttl=20.0,
punching=SoilPunchingType.SOIL_PUNCHING_TYPE_1_2
)
sett = Settings(
code=code_settings,
concrete_sett=concrete_settings,
soil_sett=soil_settings
)
concrete_design = ConcreteDesign(
rnfr_dia=[16],
spacing_limits=Interval(100, 300),
step=25
)
foundation_design = FoundationDesign(
step=0.1,
width=Interval(0.5, 1.5),
length=Interval(0.5, 1.5),
height=Interval(0.2, 0.7),
equal_length_width=False
)
design_settings = DesignSettings(
limit_utilisation=1.0,
foundation_settings=foundation_design,
concrete_settings=concrete_design
)
prj = Project(
project_info=info,
foundation=fnd,
loading=loading,
soil=soil_complex,
settings=sett,
)
prj.save_as_json("sandbox/out_line_project.json")
prj.run_code_check()
print("=== LINE FOUNDATION ANALYSIS RESULTS ===")
print(f"Bearing Capacity Utilization: {prj.results.foundation.bearing_capacity.utilization}")
print(f"Settlement Capacity: {prj.results.foundation.settlement_capacity}")
print(f"Sliding Capacity Utilization: {prj.results.foundation.sliding_capacity.utilization}")
print("\n=== CONCRETE DESIGN RESULTS ===")
print("Moment Positive:")
print(prj.results.rc.concrete_moment_positive())
print("\nMoment Negative:")
print(prj.results.rc.concrete_moment_negative())
print("\nConcrete Shear:")
print(prj.results.rc.concrete_shear())