paint-brush
पायथन और विक्टर का उपयोग करके स्टील बेस प्लेट डिज़ाइन वेब ऐप कैसे बनाएंद्वारा@kamalsamaila
625 रीडिंग
625 रीडिंग

पायथन और विक्टर का उपयोग करके स्टील बेस प्लेट डिज़ाइन वेब ऐप कैसे बनाएं

द्वारा Kamal samaila18m2024/05/06
Read on Terminal Reader

बहुत लंबा; पढ़ने के लिए

यह लेख आपको स्टील बेस प्लेट्स को डिज़ाइन करने के लिए पायथन-आधारित एप्लिकेशन बनाने के बारे में मार्गदर्शन करता है, जो स्तंभ भार को नींव में सुरक्षित रूप से स्थानांतरित करने के लिए आवश्यक है। इसमें टी-स्टब विधि का उपयोग करके बेस प्लेट क्षेत्र, मोटाई, कंक्रीट असर शक्ति और अतिरिक्त चौड़ाई की गणना करना शामिल है। फिर पायथन कोड को विक्टर एसडीके का उपयोग करके एक वेब ऐप में बदल दिया जाता है, जिससे इंजीनियरों को पैरामीटर इनपुट करने और संरचना के 3 डी मॉडल को देखने की अनुमति मिलती है। यह कुशल उपकरण बेसप्लेट डिज़ाइन की सटीकता को बढ़ाता है और मोबाइल उपकरणों के माध्यम से ऑन-साइट जाँच की सुविधा देता है, जिससे निर्माण कार्यप्रवाह सुव्यवस्थित होता है।
featured image - पायथन और विक्टर का उपयोग करके स्टील बेस प्लेट डिज़ाइन वेब ऐप कैसे बनाएं
Kamal samaila HackerNoon profile picture

परिचय

डिजाइन बलों को नींव तक सुरक्षित रूप से स्थानांतरित करने के लिए स्टील के स्तंभों के नीचे स्टील आधार प्लेटें रखी जाती हैं।


जब स्टील के स्तंभ छोटे क्रॉस-सेक्शन वाले भारी भार को सहन करते हैं, तो सीधे नींव पर भार लागू करने से पंचिंग विफलता हो सकती है। इसलिए, भार को बड़े क्षेत्र में वितरित करने के लिए स्तंभ के नीचे एक बेस प्लेट का उपयोग करना महत्वपूर्ण है।


यह आलेख पायथन का उपयोग करके बेसप्लेट डिज़ाइन एप्लिकेशन बनाने के लिए एक मार्गदर्शिका प्रदान करता है, जो CSV प्रारूप में संग्रहीत स्टील ज्यामितीय गुणों का लाभ उठाता है।


यह एप्लिकेशन इंजीनियरों को आवश्यक आधार प्लेट क्षेत्र, मोटाई, कंक्रीट असर शक्ति और अतिरिक्त चौड़ाई का आसानी से निर्धारण करने में सहायता करेगा।


इसके अलावा, विक्टर एसडीके का उपयोग करके, हम अपने पायथन कार्यान्वयन को सहजता से एक वेब अनुप्रयोग में बदल सकते हैं।


यह SDK हमारी संरचना को 3D दृश्य में देखने की क्षमता प्रदान करता है। चलिए सीधे इसमें गोता लगाते हैं और कार्रवाई करते हैं!

बेसप्लेट के डिजाइन के लिए मूल सिद्धांत

बेस प्लेट डिज़ाइन अक्षीय बलों के लिए समतुल्य टी-स्टब विधि का उपयोग करता है, जहाँ संपीड़न में टी-स्टब के लिए 'प्रभावी क्षेत्र' की गणना की जाती है, और तनाव में टी-स्टब के लिए बेस प्लेट झुकने का आकलन किया जाता है। क्षैतिज प्रमुख और/या मामूली कतरनी की अनुमति है, लेकिन कोई क्षण नहीं, यानी पिन किए गए आधार डिजाइन।

पहली चीज जिसकी हमने गणना की वह थी सहायक कंक्रीट की वहन शक्ति, एफजेडी।

आधार प्लेट के नीचे और ग्राउट स्थान में बिछाने वाली सामग्री के बीच डिज़ाइन असर शक्ति, fjd, निम्न द्वारा दी जाती है:


fjd = βj * α * एफसीडी

कहाँ


βj = नींव संयुक्त सामग्री गुणांक = (2/3)


α = एक गुणांक जो नींव के भीतर केंद्रित बल के प्रसार को दर्शाता है


एफसीडी = डिजाइन मूल्य कंक्रीट संपीड़न शक्ति = αcc * fck / ɣc


αcc = दीर्घकालिक प्रभावों के लिए गुणांक


fck = कंक्रीट अभिलक्षणिक सिलेंडर शक्ति


ɣc = कंक्रीट के लिए आंशिक सुरक्षा कारक

दूसरा चरण आवश्यक बेसप्लेट के क्षेत्रफल की गणना करना है जो सूत्र द्वारा दिया जाता है:

एरेक = नेड / एफजेडी

जहाँ Ned स्टील स्तंभ से अंतिम भार है।

तीसरा चरण c की गणना करना है जो प्रभावी क्षेत्र का कैंटिलीवर आउटस्टैंड है:

C की गणना नीचे दिए गए सूत्र का उपयोग करके की जाती है:

एफ़एफ़ = 4 *( सी**2) + पीसीओएल * सी + एकोल


इसलिए, आप c के लिए हल करें।


और अंत में, हम बेसप्लेट की मोटाई, tp की गणना करते हैं:

टीपी = सी * (3 * fjd * Ym0 / _page_fy)**0.50

बेसप्लेट डिज़ाइन वर्कफ़्लो का पायथन कार्यान्वयन

 # Partial factor of resistance of cross-sections whatever the class is as per EN 1993-1-1. Ym0 = 1.0 # Compute foundation bearing strength which is typically concrete #βj is the foundation joint material coefficient, typically taken as 0.67 as per clause 6.2.5(7) in EN 1993-1-8. beta_j=0.67 #α is a coefficient of diffusion of the vertical load being applied to the foundation. Conservatively this can be taken as 1.5 alpha= 1.5 # αcc is the coefficient that allows for long-term effects on the compressive strength of concrete vs applied actions. Taken as 0.85 in the UK National Annex -> on page # Define alpha_cc # Define gamma_c # define fck # γc is the partial factor of safety of concrete. Taken as 1.5 in the UK National Annex -> on page fjd = beta_j*alpha* (alpha_cc*fck )/gamma_c # Compute the area of the baseplate required Areq = (Ned *1000)/ fjd #Ned is the Ultimate load def calculate_c(Pcol, Acol, Areq): # """ # This function calculates the value of c for the given equation: # Areq = 4 * c^2 + P_col * c + A_col # Args: # Perimeter_of_section: Perimeter of the column section (mm) # Area_of_section: Area of the column section (mm²) # Areq: Required area of the baseplate (mm²) # Returns: # The value of c (mm) # """ a = 4 b = Pcol c = Acol-Areq # Assuming Areq is already calculated discriminant = b**2 - 4 * a * c c1 = (-b + (discriminant)**0.5) / (2 * a) c2 = (-b - (discriminant)**0.5) / (2 * a) return max(c1, c2) c = calculate_c(Pcol,Acol,Areq) # Compute the thickness of the baseplate (tp) tp = c * (3 * fjd* Ym0 / _page_fy)**0.50

अंततः, बेसप्लेट डिज़ाइन के लिए पायथन कोड को वेब एप्लीकेशन में बदलना

इनपुट

मेरे अंतिम अनुप्रयोग को इनपुट सुविधाओं की आवश्यकता होगी जहां उपयोगकर्ता निम्नलिखित पैरामीटर निर्दिष्ट कर सकता है:

यह विक्टर SDK से पैरामीट्रिज़ेशन क्लास का उपयोग करके प्राप्त किया जाता है।

 class Parametrization(ViktorParametrization): input = Tab("Input") input.profile_type = OptionField( "Profile type", options=["IPE", "HEA", "HEB"], default="IPE", variant="radio-inline", flex=80, ) input.nl1 = LineBreak() input.profile = AutocompleteField( "Profile", options=get_profile_types, default="IPE240", description="The source of profile properties can be found [here](https://eurocodeapplied.com/design/en1993/ipe-hea-heb-hem-design-properties)", ) # input.steel_class = OptionField( # "Steel class", options=["S235", "S275", "S355"], default="S235" # ) input.fck = NumberField('Fck', default=25, suffix="MPa") input.Design_load = NumberField('Design_load', default=1000, suffix="KN") input.acc = NumberField('Concrete coeff(acc)', default=0.85) input.yc = NumberField('Partial factor of safety for concrete', default=1.5) input.steel_class = NumberField('steel_class', default=255, suffix="MPa")


उत्पादन

गणना के बाद, उपयोगकर्ता को गणना का परिणाम प्रदर्शित करने के लिए विक्टर SDK से डेटा दृश्य विधि का उपयोग किया गया।

 @DataView("Output", duration_guess=1) def Compute_output(self, params: Munch, **kwargs): Ym0, beta_j, alpha, fjd, Areq, c, tp = self.calculate_plate_geom(params) data = DataGroup( DataItem("ultimate load ", params.input.Design_load, suffix="KN"), DataItem("beta_j", 0.67), DataItem("alpha", 1.5), DataItem("Bearing capacity of concrete support(fjd) ", round(fjd), suffix="MPa"), DataItem("Areq ", round(Areq), suffix="mm2"), DataItem(" c", round(c), suffix="mm"), DataItem("Thickness of plate", round(tp), suffix="mm"), ) return DataResult(data)

कहाँ:

कंक्रीट की वहन क्षमता(Fjd)

आवश्यक स्टील का क्षेत्रफल (एरेक)

बेसप्लेट का अतिरिक्त प्रक्षेपण(सी)

बेसप्लेट की मोटाई

अंत में, स्टील कॉलम, बेसप्लेट और सहायक कंक्रीट नींव का एक 3D मॉडल बनाया जाता है।

नियंत्रक वर्ग के अंदर get_3dview विधि परिभाषित की गई थी जिसे @GeometryView से सजाया गया है।


get_3dview विधि 3D मॉडल बनाने के लिए तर्क को परिभाषित करती है और अंततः निर्मित स्टील कॉलम, बेस प्लेट और कंक्रीट सपोर्ट वाले GeometryResult ऑब्जेक्ट को लौटाती है।


तर्क नीचे दिए गए कोड में निहित है:

 @GeometryView("3D baseplate View", duration_guess=1) def get_3dView(self, params: Munch, **kwargs): """Create geometry for column, base-plate and add a concrete slab underneath""" Ym0, beta_j, alpha, fjd, Areq, c, tp = self.calculate_plate_geom(params) concrete_thickness = 15 * tp steel = Material(color=Color(95, 158, 240), metalness=1) concrete = Material(metalness=0, roughness=1, opacity=0.6) h = self.get_profile_property(params.input.profile_type, params.input.profile, "Depth") b = self.get_profile_property(params.input.profile_type, params.input.profile, "Width") tw = self.get_profile_property(params.input.profile_type, params.input.profile, "Web thickness") tf = self.get_profile_property(params.input.profile_type, params.input.profile, "Flange thickness") r = self.get_profile_property(params.input.profile_type, params.input.profile, "Root radius") beam_profile = self.get_beam_profile(h, b, tw, tf, r) beam = Extrusion(beam_profile, Line(Point(0, 0, tp), Point(0, 0, 3 * h)), material=steel) base_plate = SquareBeam(sqrt(Areq), sqrt(Areq), tp, material=steel) # TODO: This area doesn't seem sufficient for large column sizes base_plate.translate((0, 0, tp / 2)) concrete_plate = SquareBeam(6 * h, 6 * h, concrete_thickness, material=concrete) concrete_plate.translate((0, 0, -concrete_thickness / 2)) return GeometryResult([beam, base_plate, concrete_plate]) 


पूरा कोड नीचे पाया जा सकता है:

 from math import sqrt # import plotly.express as px from pathlib import Path from typing import List import numpy as np import pandas as pd from munch import Munch from viktor import ViktorController, Color from viktor.geometry import Point, Extrusion, Line, Material, SquareBeam from viktor.parametrization import ( ViktorParametrization, OptionField, Text, Tab, AutocompleteField, LineBreak, NumberField ) # from viktor.external.spreadsheet import SpreadsheetCalculation, SpreadsheetCalculationInput from viktor.views import DataGroup, DataItem, DataResult, DataView, GeometryView, GeometryResult def get_profile_types(params: Munch, **kwargs): try: file_path = ( Path(__file__).parent / "profiles" / f"steel-profiles-{params.input.profile_type}.csv" ) df = pd.read_csv(file_path, header=[2], skiprows=[3, 4, 5]) return df["Profile"].values.tolist() except FileNotFoundError: return ["IPE80", "IPE100", "HEA100", "HEA120", "HEB100", "HEB120"] def calculate_c(Pcol, Acol, Areq): # """ # This function calculates the value of c for the given equation: # Areq = 4 * c^2 + P_col * c + A_col # Args: # Perimeter_of_section: Perimeter of the column section (mm) # Area_of_section: Area of the column section (mm²) # Areq: Required area of the baseplate (mm²) # Returns: # The value of c (mm) # """ a = 4 b = Pcol c = Acol - Areq # Assuming Areq is already calculated discriminant = b ** 2 - 4 * a * c c1 = (-b + (discriminant) ** 0.5) / (2 * a) c2 = (-b - (discriminant) ** 0.5) / (2 * a) return max(c1, c2) class Parametrization(ViktorParametrization): info = Tab("Info") info.text_01 = Text( """## Welcome to baseplate design app! """ ) input = Tab("Input") input.profile_type = OptionField( "Profile type", options=["IPE", "HEA", "HEB"], default="IPE", variant="radio-inline", flex=80, ) input.nl1 = LineBreak() input.profile = AutocompleteField( "Profile", options=get_profile_types, default="IPE240", description="The source of profile properties can be found [here](https://eurocodeapplied.com/design/en1993/ipe-hea-heb-hem-design-properties)", ) # input.steel_class = OptionField( # "Steel class", options=["S235", "S275", "S355"], default="S235" # ) input.fck = NumberField('Fck', default=25, suffix="MPa") input.Design_load = NumberField('Design_load', default=1000, suffix="KN") input.acc = NumberField('Concrete coeff(acc)', default=0.85) input.yc = NumberField('Partial factor of safety for concrete', default=1.5) input.steel_class = NumberField('steel_class', default=255, suffix="MPa") class Controller(ViktorController): label = 'My Entity Type' parametrization = Parametrization @DataView("profile geometrical Properties", duration_guess=1) def display_geometrical_properties(self, params: Munch, **kwargs): """Initiates the process of rendering an image of the bending moments of the structure, as well as a view of a few key values related to the bending moments.""" # results = self.calculate_allowable_bending_moment( # params.input.profile_type, params.input.profile # ) results = self.get_geometrical_properties( params.input.profile_type, params.input.profile ) data = DataGroup( DataItem("Depth", results["Depth"], suffix="mm"), DataItem("Width", results["Width"], suffix="mm"), DataItem("Thickness_of_web", results["Thickeness_of_web"], suffix="mm"), DataItem("Thickness_of_flange", results["Thickeness_of_flange"], suffix="mm"), DataItem("Area_col", results["Area_col"], suffix="mm2"), DataItem("Perimeter_col", results["Perimeter_col"], suffix="mm"), ) return DataResult(data) def calculate_plate_geom(self, params, **kwargs): results = self.get_geometrical_properties( params.input.profile_type, params.input.profile ) # Partial factor of resistance of cross-sections whatever the class is as per EN 1993-1-1. Ym0 = 1.0 # Compute ultimate load (Ned) -> on page # Compute foundation bearing strength which is typically concrete # βj is the foundation joint material coefficient, typically taken as 0.67 as per clause 6.2.5(7) in EN 1993-1-8. beta_j = 0.67 # α is a coefficient of diffusion of the vertical load being applied to the foundation. Conservatively this can be taken as 1.5 alpha = 1.5 # αcc is the coefficient that allows for long term effects on the compressive strength of concrete vs applied actions. Taken as 0.85 in the UK National Annex -> on page # γc is the partial factor of safety of concrete. Taken as 1.5 in the UK National Annex -> on page fjd = beta_j * alpha * (params.input.acc * params.input.fck) / params.input.yc # Compute area of baseplate required Areq = (params.input.Design_load * 1000) / fjd c = calculate_c(results["Perimeter_col"], results["Area_col"], Areq) # Compute the thickness of baseplate (tp) tp = c * (3 * fjd * Ym0 / params.input.steel_class) ** 0.50 return Ym0, beta_j, alpha, fjd, Areq, c, tp @DataView("Output", duration_guess=1) def Compute_output(self, params: Munch, **kwargs): Ym0, beta_j, alpha, fjd, Areq, c, tp = self.calculate_plate_geom(params) data = DataGroup( DataItem("ultimate load ", params.input.Design_load, suffix="KN"), DataItem("beta_j", 0.67), DataItem("alpha", 1.5), DataItem("Bearing capacity of concrete support(fjd) ", round(fjd), suffix="MPa"), DataItem("Areq ", round(Areq), suffix="mm2"), DataItem(" c", round(c), suffix="mm"), DataItem("Thickness of plate", round(tp), suffix="mm"), ) return DataResult(data) @staticmethod def get_beam_profile(h, b, tw, tf, r) -> List[Point]: """Generates the points which make up the chosen profile for the column cross-section""" # Get points for top flange points = [ Point(-b / 2, (h / 2) - tf), Point(-b / 2, h / 2), Point(b / 2, h / 2), Point(b / 2, (h / 2) - tf), ] # Get curve for top right angles = np.linspace(np.pi / 2, np.pi, 10) x = r * np.cos(angles) + tw / 2 + r y = r * np.sin(angles) + h / 2 - tf - r for _x, _y in zip(x, y): points.append(Point(_x, _y)) # Get curve for bottom right angles = np.linspace(-np.pi, -np.pi / 2, 10) x = r * np.cos(angles) + tw / 2 + r y = r * np.sin(angles) - h / 2 + tf + r for _x, _y in zip(x, y): points.append(Point(_x, _y)) # Get points for bottom flange points.extend([ Point(b / 2, - (h / 2) + tf), Point(b / 2, -h / 2), Point(-b / 2, -h / 2), Point(-b / 2, -(h / 2) + tf), ]) # Get curve for bottom left angles = np.linspace(1.5 * np.pi, 2 * np.pi, 10) x = r * np.cos(angles) - tw / 2 - r y = r * np.sin(angles) - h / 2 + tf + r for _x, _y in zip(x, y): points.append(Point(_x, _y)) # Get curve for top left angles = np.linspace(0, np.pi/2, 10) x = r * np.cos(angles) - tw / 2 - r y = r * np.sin(angles) + h / 2 - tf - r for _x, _y in zip(x, y): points.append(Point(_x, _y)) # Repeat the first point to close the profile points.append(Point(-b / 2, (h / 2) - tf)) return points @GeometryView("3D baseplate View", duration_guess=1) def get_3dView(self, params: Munch, **kwargs): """Create geometry for column, base-plate and add a concrete slab underneath""" Ym0, beta_j, alpha, fjd, Areq, c, tp = self.calculate_plate_geom(params) concrete_thickness = 15 * tp steel = Material(color=Color(95, 158, 240), metalness=1) concrete = Material(metalness=0, roughness=1, opacity=0.6) h = self.get_profile_property(params.input.profile_type, params.input.profile, "Depth") b = self.get_profile_property(params.input.profile_type, params.input.profile, "Width") tw = self.get_profile_property(params.input.profile_type, params.input.profile, "Web thickness") tf = self.get_profile_property(params.input.profile_type, params.input.profile, "Flange thickness") r = self.get_profile_property(params.input.profile_type, params.input.profile, "Root radius") beam_profile = self.get_beam_profile(h, b, tw, tf, r) beam = Extrusion(beam_profile, Line(Point(0, 0, tp), Point(0, 0, 3 * h)), material=steel) base_plate = SquareBeam(sqrt(Areq), sqrt(Areq), tp, material=steel) # TODO: This area doesn't seem sufficient for large column sizes base_plate.translate((0, 0, tp / 2)) concrete_plate = SquareBeam(6 * h, 6 * h, concrete_thickness, material=concrete) concrete_plate.translate((0, 0, -concrete_thickness / 2)) return GeometryResult([beam, base_plate, concrete_plate]) @staticmethod def get_profile_property( profile_type: str, profile: str, property_name: str ) -> float: """Retrieve the profile properties based on the profile type, profile and property :param profile_type: One of the following profile types: HEA, HEB or IPE. :param profile: Profile name, eg IPE80 (IPE was given as profile_type) :param property_name: The name of the property, eg Weight """ file_path = ( Path(__file__).parent / "profiles" / f"steel-profiles-{profile_type}.csv" ) df = pd.read_csv(file_path, header=[2], skiprows=[3, 4, 5]) return df.loc[df["Profile"] == profile, property_name].item() @staticmethod def get_geometrical_properties( profile_type: str, profile: str ): """Calculates the allowable bending moment based on the given parameters. :param profile_type: One of the following profile types: HEA, HEB or IPE. :param profile: Profile name, eg IPE80 (IPE was given as profile_type) :param steel_class: The steel class, eg S235 :return: A dict with the moment of inertia, profile height, yield strength and allowable bending moment. """ file_path = ( Path(__file__).parent / "profiles" / f"steel-profiles-{profile_type}.csv" ) df = pd.read_csv(file_path, header=[2], skiprows=[3, 4, 5]) Depth = df.loc[df["Profile"] == profile, "Depth"].item() Width = df.loc[df["Profile"] == profile, "Width"].item() Thickeness_of_web = df.loc[df["Profile"] == profile, "Web thickness"].item() Thickeness_of_flange = df.loc[df["Profile"] == profile, "Flange thickness"].item() Area_col = df.loc[df["Profile"] == profile, "Area"].item() Perimeter_col = df.loc[df["Profile"] == profile, "Perimeter"].item() Perimeter_col = Perimeter_col * 1000 return { "Depth": Depth, "Width": Width, "Thickeness_of_web": Thickeness_of_web, "Thickeness_of_flange": Thickeness_of_flange, "Area_col": Area_col, "Perimeter_col": Perimeter_col }


निष्कर्ष

मुझे हमेशा बेसप्लेट की मोटाई और आवश्यक प्रभावी क्षेत्र की जांच करने की समस्या का सामना करना पड़ता है, ताकि स्तंभ भार को प्रभावी रूप से नींव तक पहुंचाया जा सके।


पायथन स्क्रिप्ट का उपयोग करना, जो मुझे ऐसी जांचों में मदद कर सकता है, तथा स्क्रिप्ट को विक्टर एसडीके का उपयोग करके साझा करने योग्य और आसानी से उपयोग किए जाने वाले वेब अनुप्रयोग में परिवर्तित करना आसान था, तथा इससे बेसप्लेट डिजाइन के वर्कफ़्लो में और अधिक दक्षता आई।


इस प्रकार के इंजीनियरिंग अनुप्रयोग का निर्माण करने से आप अपने निर्माण कार्य स्थल पर केवल अपने मोबाइल फोन से ही आश्वस्त हो सकते हैं और बेसप्लेट जैसे संरचनात्मक सदस्यों के डिजाइन की सटीकता की जांच उनके निर्माण और स्थापना से पहले कर सकते हैं।