Developing Programs for Converting MIDAS GEN to ANSYS Models Based on Python
Abstract
:1. Introduction
2. Model Conversion Requirements
2.1. Overview of the Project
2.2. Special Element Conversion
- (1)
- Steel Spring Vibration Isolation Bearings
- (2)
- Anti-rocking Construction
3. Method for MIDAS to ANSYS Program
3.1. Software Features
- (1)
- The structural properties include the material, section, section parameter scaling, wall thickness, and so on. For some special sections, such as national standard hot rolled section steel or custom sections, manual input is required and automatic conversion cannot be achieved.
- (2)
- The nodes in MIDAS are converted to the key points in ANSYS, resulting in a one-to-one correspondence between the two. The beam-plate element is converted into a line and area in ANSYS. The program automatically selects the corresponding element type. Generally, the BEAM188 element is used for the beam and column, while the SHELL181 element is used for the wall and plate. The mesh size of each unit can be modified according to the user’s specifications. The key points, lines, and surfaces can be further divided into finite element meshes.
- (3)
- Special element transformations, such as node mass, elastic connection element, general connection element, etc. The mass of the joint is simulated by the MASS21 element in ANSYS, and the elastic connection element uses the COMBIN14 element. However, the elastic connection unit and the general connection unit play different roles in MIDAS and possess a multitude of functions. Therefore, it is imperative to correspond to different unit settings according to the attributes of the different units.
- (4)
- Setting the release beam end constraint in MDIAS GEN to realize the hinge of the beam and column. Creating the rigid domain can also be converted to the ANSYS model through the program.
- (5)
- The transformation of a variety of load conditions, such as node load, beam-column distribution load, plate and shell uniform load, etc. A variety of working conditions need to be grouped and converted to generate different models or simple load files.
- (6)
- Time history function conversion is also a function. ARRAY is used to store time history data in ANSYS. For different time history waves or vibration waves, multiple ARRAYs can be used for storage and the time history wave can be pre-scaled by setting the scaling coefficient.
3.2. Key Issues Addressed
- (1)
- Line unit 3 axis direction
Algorithm 1: getAngleVector |
Input: vector1: a three-dimensional vector in space [x1, y1, z1], vector2: a three-dimensional vector in space [x2, y2, z2], angle: target angle (in radians) between the resulting vector and vector2 1. If length(vector1) = 3 or length(vector2) = 3 2. Calculate dot_product = vector1[0]*vector2[0] + vector1[1]*vector2[1] + vector1[2]*vector2[2] 3. Calculate product_length = sqrt((vector1[0]**2 + vector1[1]**2 + vector1[2]**2) * (vector2[0]**2 + vector2[1]**2 + vector2[2]**2)) 4. Calculate cos_angle = dot_product/product_length 5. Calculate delta_angle = angle − acos(cos_angle) 6. Calculate new vector coordinates: x = cos(delta_angle)*vector2[0] + sin(delta_angle)*vector1[0] y = cos(delta_angle)*vector2[1] + sin(delta_angle)*vector1[1] z = cos(delta_angle)*vector2[2] + sin(delta_angle)*vector1[2] 7. Find max_ = max(abs(x), abs(y), abs(z)) 8. Normalize vector coordinates: x’ = x/max_ y’ = y/max_ z’ = z/max_ 9. Return result_vector = [x’, y’, z’] 10. Else if return None 11. End if 12. End |
- (2)
- Rigid domain problem
Algorithm 2: CalculateAreaAndLengthRatio |
Input: iN1, iN2, iN3, iN4: coordinates of four points in 3D space (e.g., iN1 = [x1, y1, z1]) Output: BI: ratio of the area to the square of the longest diagonal; S: total area of the quadrilateral 1. Extract coordinates from input points: x1, y1, z1 = iN1 x2, y2, z2 = iN2 x3, y3, z3 = iN3 x4, y4, z4 = iN4 2. Calculate edge lengths and diagonal lengths: a = sqrt((x2−x1)**2 + (y2−y1)**2 + (z2−z1)**2) // Length of edge between N1 and N2 b = sqrt((x3−x2)**2 + (y3−y2)**2 + (z3−z2)**2) // Length of edge between N2 and N3 c = sqrt((x3−x1)**2 + (y3−y1)**2 + (z3−z1)**2) // Diagonal length between N1 and N3 d = sqrt((x4−x1)**2 + (y4−y1)**2 + (z4−z1)**2) // Length of edge between N1 and N4 e = sqrt((x4−x3)**2 + (y4−y3)**2 + (z4−z3)**2) // Length of edge between N3 and N4 l1 = c // Diagonal length between N1 and N3 l2 = sqrt((x4−x2)**2 + (y4−y2)**2 + (z4−z2)**2) // Diagonal length between N2 and N4 3. Calculate the longest diagonal length: l = max(l1, l2) 4. Calculate areas of two triangles using Heron’s formula: p1 = (a + b + c)/2 p2 = (d + e + c)/2 S1 = sqrt(p1 * (p1 − a) * (p1 − b) * (p1 − c)) // Area of triangle N1N2N3 S2 = sqrt(p2 * (p2 − d) * (p2 − e) * (p2 − c)) // Area of triangle N1N3N4 5. Calculate total area of the quadrilateral: S = S1 + S2 6. Calculate the ratio of the area to the square of the longest diagonal: BI = S/(l**2) 7. Return the area ratio and total area: return [BI, S] |
- (3)
- Beam end bending moment release
- (4)
- Element loads
- (5)
- Simulation of elastic connection unit
- (6)
- Anti-rocking structure simulation
4. Reliability of Developed Program
5. Conclusions
- (1)
- The program is capable of reading the material, section, unit, connection, load, node mass, constraint, time history function, and other model data present within the mgt file. Following the program’s analysis and conversion, a command stream file is generated that can be identified by ANSYS, thereby facilitating the rapid establishment of the ANSYS model.
- (2)
- The program is capable of converting specific connection units, including elastic and general connection units. However, it should be noted that some adjustments may be required depending on the specific functions of the unit in question, particularly in the context of actual conversion applications.
- (3)
- The conversion program can also consider the conversion of the 3-axis direction of the beam-column element section, the release of the degree of freedom at the beam end, the rigid element, the steel spring and the special anti-rocking structure of the structure.
- (4)
- A MIDAS GEN theater model was subjected to a transformation. A comparison of the analysis results of the two models revealed that the quality and mode of the model were essentially unchanged before and after the transformation. The maximum error of the first six orders of the structure was only 2.95%, and the structural displacement under gravity load was also essentially identical.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ma, X.P. Research on the transformation technology and software development of SAP2000 to ANSYS model based on Python. Railw. Stand. Des. 2024, 68, 167–177. [Google Scholar]
- Wang, X.M. Numerical Analysis of ANSYS Engineering Structure; People’s Transportation Publishing House: Beijing, China, 2007. [Google Scholar]
- Zhuo, Z.Y. Elastoplastic Time History Analysis of Complex Steel Structures; Yunnan University: Kunming, China, 2015. [Google Scholar]
- Hu, H.H. Dynamic Characteristics and Seismic Performance Analysis of Concrete-Filled Steel Tubular Railway Arch Bridge; Shijiazhuang Railway University: Shijiazhuang, China, 2013. [Google Scholar]
- Ma, F.; Cheng, X.H. Beam frame supported shear wall structure based on the ANSYS finite element static analysis of beam-type transfer floor. Adv. Mater. Res. 2013, 2621, 508–510. [Google Scholar]
- Han, Z.B.; Zhang, Y.P.; Zhang, Y.H. Static and dynamic analysis of long-span spatial steel structure based on ANSYS. IPPTA Q. J. Indian Pulp Pap. Tech. Assoc. 2018, 30, 190–198. [Google Scholar]
- Ionescu, A.; Calbureanu, M.; Negru, M. Static and dynamic simulation in the seismic behavior of a building structure using ANSYS program. Int. J. Mech. 2013, 7, 210–217. [Google Scholar]
- Jiang, L.; Feng, Y.; Zhou, W.; He, B. Vibration characteristic analysis of high-speed railways simply supported beam bridge-track structure system. Steel Compos. Struct. 2019, 31, 591–600. [Google Scholar]
- Chen, M.; Qian, Y.; Zeng, Q. Finite element analysis of a steel structure landscape bridge based on ANSYS and MIDAS CIVIL. In Proceedings of the 4th National Steel Structure Bridge Technology Innovation Conference, Zhengzhou, China, 1 January 2023. [Google Scholar]
- Deng, X. Design and Mechanical Property Analysis of the Suspendome Structure in Tianjin Cycling Gymnasium for East Asian Games; Tianjin University: Tianjin, China, 2012. [Google Scholar]
- Feng, D. Research on Interface Development Between BIM Model and Mechanical Structure Analysis; Chang’an University: Xi’An, China, 2019. [Google Scholar]
- Zhou, H.; He, X.; Leng, X. Development and application of a Revit-ANSYS model transformation interface. In Proceedings of the 11th Asian Conference on Rock Mechanics (ARMS11), Beijing, China, 21–25 October 2021. [Google Scholar]
- Zhao, X.Y.; Chen, Z.H.; Yu, S.L.; Bu, L. Research on model transformation automation based on Revit and ANSYS. Yangtze River Inf. Commun. 2021, 34, 119–121. [Google Scholar]
- He, S. One-Way Data Mapping from the IFC Model of Building Structure to ANSYS Structural Analysis Model; Huazhong University of Science and Technology: Wuhan, China, 2020. [Google Scholar]
- Wang, Y.; Wang, S.; Xue, Z. Interface design between ANSYS, Midas and AutoCAD for numerical modelling of the tunnel. In Proceedings of the 3rd International Conference on New Development in Rock Mechanics and Engineering (NDRM’2009) & Sanya Forum for the Plan of City and City Construction, Sanya, China, 24–26 May 2009. [Google Scholar]
- Liu, G.; Liu, G.; Jiang, W. Modeling and calculation of shear capacity of prestressed high strength concrete beams with web reinforcement based on BIM. Ain Shams Eng. J. 2024, 15, 102360. [Google Scholar] [CrossRef]
- Porter, S.; Tan, T.; Wang, X.; Pareek, V. LODOS-Going from BIM to CFD via CAD and model abstraction. Autom. Constr. 2018, 94, 85–92. [Google Scholar] [CrossRef]
- Hu, Z.Z.; Zhang, X.Y.; Wang, H.W.; Kassem, M. Improving interoperability between architectural and structural design models: An industry foundation classes-based approach with web-based tools. Autom. Constr. 2016, 66, 29–42. [Google Scholar] [CrossRef]
- Huang, H.; Ruan, B.; Wu, X.; Qin, Y. Parameterized modeling and safety simulation of shield tunnel based on BIM-FEM automation framework. Autom. Constr. 2024, 162, 105362. [Google Scholar] [CrossRef]
- Beijianyuan Architectural Design Shenzhen Co., Ltd. A Kind of Anti-Seismic Rocking Structure of Vibration Isolation Device: CN219569240U; Beijianyuan Architectural Design Shenzhen Co., Ltd.: Shenzhen, China, 2023. [Google Scholar]
- Liang, J. Midas/Gen Structure Finite Element Analysis and Application; Beijing Institute of Technology Press: Beijing, China, 2016. [Google Scholar]
- Yu, X.; Li, Z.; Zheng, X.; Fandango, A. Python Data Analysis Case Tutorial; Tsinghua University Press: Beijing, China, 2022. [Google Scholar]
- Liu, C. Analysis of Seismic, Impact and Progressive Collapse Resistance of ANSYS/LS-DYNA Engineering Structure; China Architecture & Building Press: Beijing, China, 2014. [Google Scholar]
- LS-DYNA Dev. LS-DYNA Keyword User’s Manual Volume I. Available online: https://lsdyna.ansys.com/manuals/ (accessed on 17 October 2024).
- Liu, H. MIDAS Gen Software Foundation and Practical Tutorial; Tianjin University Press: China, Tianjin, 2020. [Google Scholar]
- Wen, J. Discussion on the Stiffness Matrix of Commonly Used Connection Elements in Finite Element; Zhengzhou University: Zhengzhou, China, 2022. [Google Scholar]
- ANSYS, Inc. Ansys User’s Guide; ANSYS, Inc.: Canonsburg, PA, USA, 2012. [Google Scholar]
- Xiong, L.; Shi, B. Numerical Analysis Method and Calculation Example of ANSYS Engineering Structure Part 2: Structural Dynamics and Structural Nonlinear Problems; China Railway Publishing House: Beijing, China, 2015. [Google Scholar]
KEYOPT(7) | 1 | 10 | 100 | 1000 | 10,000 | 100,000 |
---|---|---|---|---|---|---|
Freedom release | ROTZ | ROTY | ROTX | DZ | DY | DX |
Model | MIDAS | Type | ANSYS | Type | Differential | |
---|---|---|---|---|---|---|
Structural Mass (W/t) | 60,320 | - | 60,325 | - | 0.01% | |
Structural Period (T/s) | first period | 0.808 | Y-translation | 0.800 | Y-translation | 0.95% |
second period | 0.743 | X-translation | 0.737 | X-translation | 0.88% | |
third period | 0.580 | Z-rotation | 0.578 | Z-rotation | 0.27% | |
fourth period | 0.381 | Z-translation | 0.392 | Z-translation | 2.95% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yang, Y.; Kong, F.; Jiang, Z.; Mu, Z. Developing Programs for Converting MIDAS GEN to ANSYS Models Based on Python. Buildings 2024, 14, 3404. https://doi.org/10.3390/buildings14113404
Yang Y, Kong F, Jiang Z, Mu Z. Developing Programs for Converting MIDAS GEN to ANSYS Models Based on Python. Buildings. 2024; 14(11):3404. https://doi.org/10.3390/buildings14113404
Chicago/Turabian StyleYang, Yuqing, Fanchang Kong, Zhelong Jiang, and Zaigen Mu. 2024. "Developing Programs for Converting MIDAS GEN to ANSYS Models Based on Python" Buildings 14, no. 11: 3404. https://doi.org/10.3390/buildings14113404
APA StyleYang, Y., Kong, F., Jiang, Z., & Mu, Z. (2024). Developing Programs for Converting MIDAS GEN to ANSYS Models Based on Python. Buildings, 14(11), 3404. https://doi.org/10.3390/buildings14113404