A method for converting SAP2000 and ANSYS models based on Python and APDL

Through methods based on Python and APDL language, model information is exported from SAP2000 and APDL command flow files are generated, which realizes the all-round transformation of SAP2000 structural analysis model to ANSYS finite element model and solves the problems of insufficient functions and ideological limitations in the existing technology. , improving the accuracy and efficiency of model transformation.

CN115408005BActive Publication Date: 2024-10-22CHINA RAILWAY FIRST SURVEY & DESIGN INST GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210914229.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2024-10-22
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

The existing SAP2000 and ANSYS model conversion methods are too simple in content, insufficient in functionality, and limited in thinking, and cannot effectively convert complex model information such as high-order elements, special sections, special load types, node coordinate system transformations, and beam element coordinate system transformations.

Method used

Using methods based on Python and APDL language, model information is exported from SAP2000 software, and APDL command flow files are generated to achieve all-round transformation of model information, including unit types, material properties, section properties, load forms, node coordinate system transformation, etc. transformation.

Benefits of technology

It enriches the types and functionality of model transformation, improves the accuracy and efficiency of transformation, supports the transformation of high-order units, special sections, and special load types, and meets the needs for accurate transformation of complex models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408005B_ABST
    Figure CN115408005B_ABST
Patent Text Reader

Abstract

The present invention discloses a model conversion method between SAP2000 and ANSYS based on Python and APDL language. The existing model conversion method between structural design and analysis software SAP2000 and finite element software ANSYS is difficult to achieve accurate conversion of model information. The present invention exports a .s2k file containing all model information from SAP2000 software; based on Python language, the .s2k file is converted into an APDL command stream file; and the APDL command stream file is read to generate an ANSYS finite element model. The present invention corresponds the key points of ANSYS to the nodes of SAP2000, uses the idea of ​​first establishing a geometric model and then generating a finite element model, realizes the custom setting of the number of beam unit grids and the transfer of plate and shell loads to the beam, and improves the accuracy of model conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of building structures, and in particular relates to a SAP2000 and ANSYS model conversion method based on Python and APDL languages. Background Art

[0002] With the rapid development of my country's economic strength and science and technology, a series of novel and complex building structures have emerged to meet the needs of people's lives and public transportation. In order to verify the correctness and reliability of the design of such complex building structures, engineers often use various types of software to design and verify the structure. In addition to conventional design software (such as PKPM and YJK), SAP2000, ETABS and other structural professional design and analysis software have been widely used by industry professionals due to their good three-dimensional structural analysis capabilities, convenient spatial modeling capabilities and complete load calculation functions. At the same time, large-scale general finite element analysis software such as ANSYS and ABAQUS are used in the analysis and verification of special components and complex structures due to their super scalability and flexibility, plus built-in accurate numerical calculation methods. However, it is not only time-consuming and laborious to reconstruct more complex structural models relying solely on the pre-processing functions of ANSYS and ABAQUS, but also of little significance. Considering the similarities in the model establishment methods of various types of software, the data conversion of model information can be realized by compiling code, and the workload of manual modeling can be transferred to the program to complete, greatly improving the modeling efficiency and accuracy.

[0003] Structural design and analysis software and general finite element software cannot directly exchange and share data. Therefore, many companies and scientific research teams have launched a series of model conversion methods based on various development platforms. Through in-depth research on existing model conversion technology and software development research, it can be seen that many scholars have shared the conversion ideas between different software and the development of corresponding program platforms, providing strong technical support for the further development of related research. However, the relevant research on the model conversion problem between the structural design and analysis software SAP2000 and the general finite element software ANSYS is still relatively scarce, and there are the following important issues that need to be improved:

[0004] 1) The conversion content is too simple, for example, it does not support the conversion of high-order units (Beam188, Shell181, etc.), special sections (variable sections, custom sections, etc.), and special load types (triangular distributed loads, trapezoidal loads, etc.);

[0005] 2) The conversion function is seriously insufficient, for example: there is no conversion of functions such as customized division of beam-column mesh, connection setting, node coordinate system transformation, beam unit coordinate system transformation, beam end degree of freedom release, rigid domain, etc.;

[0006] 3) The conversion idea has limitations. The existing conversion method replaces the node (Joint) in SAP2000 with the node (Node) in ANSYS. Although it can quickly realize the creation of the model, for models with grid division requirements or complex load application forms, the conversion method designed based on the above idea is difficult to achieve accurate conversion of model information. Summary of the invention

[0007] In order to make up for the shortcomings of the prior art, the present invention provides a SAP2000 and ANSYS model conversion method based on Python and APDL language to achieve a comprehensive conversion of the SAP2000 structural analysis model to the ANSYS finite element simulation model, providing necessary technical support for practitioners of structural design and analysis.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is:

[0009] A method for converting SAP2000 and ANSYS models based on Python and APDL language includes the following steps:

[0010] Step 1: Export the .s2k file containing all model information from SAP2000 software;

[0011] Step 2: Convert the .s2k file into an APDL command stream file based on Python language;

[0012] Step 3: Read the APDL command stream file and generate the ANSYS finite element model.

[0013] Specifically, the step 2 specifically includes:

[0014] Step 2.1: Import and read the .s2k file and store the model information in a list or dictionary format;

[0015] Step 2.2: Generate the APDL command stream for defining the unit type in the form of compiling and calling the Python sub-function, and export it to a txt text file;

[0016] Step 2.3: Call the "Material Properties" table of the model information, compile the sub-function, generate the APDL command stream that defines the material properties, and export it to a txt text file;

[0017] Step 2.4: Call the "Frame Section Properties" table, "Surface Section Properties" table, and "Connection Property Definition" table of the model information, compile the sub-function, generate the APDL command stream of the defined unit real constants and unit section properties, and export them to a txt text file;

[0018] Step 2.5: Call the "Connection Data" table of the model information, compile the sub-function, generate the APDL command stream that defines the geometric model and unit division, and export it to a txt text file;

[0019] Step 2.6: Call the "node constraint assignment" table, "node rigid domain assignment" table, "node local axis assignment" table, "frame release assignment" table and "frame local axis assignment" table of the model information, compile the sub-function, generate the APDL code for defining the node coordinate axis transformation, beam element coordinate axis transformation, beam end degree of freedom release, support constraint application, and rigid domain creation, and export it to a txt text file;

[0020] Step 2.7: Call the "Node Additional Mass Assignment" table, "Node Load-Force" table, "Node Load-Displacement" table, "Frame Load-Concentrated" table, "Frame Load-Distributed" table, "Surface Load-Uniformly Distributed" and "Surface Load-Transferred to Beam" tables of the model information, compile the sub-function, generate the APDL code that defines the node mass, node load, node displacement, beam-column concentrated load, beam-column distributed load, floor uniformly distributed load, and floor load transferred to beam, and export it to a txt text file.

[0021] Specifically, in step 2.2, the unit types defined are beam unit, shell unit, spring unit, mass unit, and mesh unit.

[0022] Specifically, in step 2.3, the material properties defined are elasticity, ideal elastic-plasticity, bilinear elastic-plasticity, and multilinear elastic-plasticity.

[0023] Specifically, in step 2.4, the unit real constants defined include:

[0024] 1) Beam element real constants: Create real constant numbers to meet the needs of meshing;

[0025] 2) Shell element real constants: Create real constant numbers to meet the needs of meshing;

[0026] 3) Real constants of spring units: Create real constants of three types of spring units: linear, nonlinear elastic, and nonlinear plastic, to meet the creation of various types of connection units.

[0027] Specifically, in step 2.4, the unit section properties defined include:

[0028] 1) Shell element section properties: By setting the thickness of the plate and shell and the transverse shear stiffness, it is used to define the section properties of thin and thick plates and shells;

[0029] 2) Beam unit section properties: used for the property definition of rectangular, I-shaped, box-shaped, circular tube, custom section and variable section beams, where custom sections and variable sections are implemented through the asec and taper commands of sectype in the APDL language respectively.

[0030] Specifically, in step 2.5, the geometric model defined is a point, line, and surface model, and the unit division defined includes beam unit division, shell unit division, and spring unit division. The spring unit division specifically includes:

[0031] 1) Create a geometric line at the connection link position, select and assign the line model empty material properties and real constants, as well as the mesh unit type Mesh200, and divide it into a unit;

[0032] 2) After determining the element type and real constants, create a spring element based on the coordinates connecting Link nodes I and J.

[0033] Specifically, in step 2.6, the defined node coordinate axis transformation, beam end degree of freedom release, and support constraint application are respectively implemented through the nmodif command, endrelease command, and d command in the APDL language.

[0034] Specifically, in step 2.6, the transformation steps of the defined beam unit coordinate axis changes are as follows:

[0035] 1) Determine the direction vector of the x-axis of the beam unit coordinate system, and calculate the vector modulus and the normalized unit vector;

[0036] 2) Compare the unit direction vector of the x-axis with the direction vector of the z-axis in the global coordinate system. If the two are parallel, the direction of the y-axis in the unit coordinate system is consistent with the direction of the Y-axis in the global coordinate system. If they are not parallel, they are determined by the cross product of the two. The direction of the z-axis in the unit coordinate system is obtained by the cross product of the unit direction vector of the y-axis in the unit coordinate system and the unit direction vector of the x-axis.

[0037] 3) Determine the rotation center axis, rotation angle and starting vector, calculate the target vector, add the elements of the target vector to the coordinates of the starting node I of the beam unit, and obtain the direction node of the beam unit after rotation;

[0038] 4) By creating a new direction control node and using the emodif command to modify the properties of the beam element, the coordinate axis of the beam element can be changed.

[0039] Specifically, in step 2.6, the conversion steps for creating the rigid domain defined are as follows:

[0040] 1) According to the node constraint information, identify the nodes that need to create rigid body constraints, select them and define them as components;

[0041] 2) Select the first node in the component as the main node, and use the cerig command to establish rigid constraints between the main node and other nodes.

[0042] Specifically, in step 2.7, the beam-column load conversion steps defined are as follows:

[0043] 1) Select the frame beam column to which the load needs to be applied, and determine the geometric coordinates of its starting node and the beam length;

[0044] 2) Based on Python language, compile the APDL command stream, which selects all nodes on the beams and columns in the ANSYS model and enters them into the created list;

[0045] 3) According to the method in step 2), traverse the nodes on each beam column in ANSYS and define them as node components;

[0046] 4) Read the load data, determine the load direction, determine the angle between the load and the unit coordinate axis, and finally apply it to the beam-column unit.

[0047] Specifically, in step 2.7, the floor load conversion steps defined are as follows:

[0048] 1) Select the surface shell to which the load needs to be applied, determine the coordinates of the four nodes of the shell element and generate the direction vector;

[0049] 2) Based on Python language, compile the APDL command stream, which is to select the direction vector on the shell element node and determine the element coordinate axis of the shell element, including:

[0050] ① Determine the surface to which the load needs to be applied, select the shell element with the largest number on it, and then define an array of four nodes to store the node coordinates respectively;

[0051] ② According to equations 1) and 2), the reference directions S1 and S2 of the shell element are calculated:

[0052]

[0053]

[0054] Where {x} I , {x} J , {x} K , {x} L is the coordinate of the node in the global coordinate system;

[0055] ③ According to formula 3), the shell unit coordinate axis e3 is calculated

[0056] e3=S1×S2 / |S1×S2 3)

[0057] 3) According to the shell unit coordinate axis obtained in step 2), the direction of the overall coordinate axis is compared and judged in ANSYS to determine the direction of load application;

[0058] 4) According to the load application direction obtained in step 3), by calling the "Surface Load-Uniform Distribution" and "Surface Load-Transferred to Beam" tables in the model information, determine whether the surface load is a projected load. If it is a projected load, the load value needs to be multiplied by the cosine value of the angle between the shell unit coordinate axis e3 and the load direction.

[0059] 5) Finally, based on Python language, compile the APDL command stream and apply the obtained surface load to the shell element along the specified direction through the sfa command.

[0060] Beneficial effects of the present invention:

[0061] 1) The present invention enriches the conversion types of units, material properties, section forms, and load forms, and improves the accuracy of model conversion;

[0062] 2) The present invention covers essential functions such as node coordinate system transformation, beam unit coordinate system transformation, beam end degree of freedom release, and rigid domain creation, further meeting the functional requirements in the model transformation process;

[0063] 3) The present invention corresponds the key points of ANSYS to the nodes of SAP2000, and uses the idea of ​​first establishing a geometric model and then generating a finite element model, thereby realizing the custom setting of the number of beam unit grids and the transfer of plate and shell loads to the beam. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 It is a flow chart of model information conversion from SAP2000 to ANSYS in the method of the present invention;

[0065] Figure 2 The single-story industrial plant model conversion result obtained based on the method of the present invention, wherein (a) is the SAP2000 model and (b) is the ANSYS finite element model;

[0066] Figure 3 Comparison of the 1st-order modal calculation results of a single-story industrial plant model converted based on the method of the present invention, including (a) the 1st-order mode calculated by SAP2000, and (b) the 1st-order mode calculated by ANSYS;

[0067] Figure 4 The multi-layer frame structure model conversion results obtained based on the method of the present invention, wherein (a) SAP2000 model, (b) ANSYS finite element model;

[0068] Figure 5Comparison of the 1st-order mode calculation results of the multi-story frame structure model converted based on the method of the present invention, where (a) the 1st-order mode calculated by SAP2000, and (b) the 1st-order mode calculated by ANSYS. DETAILED DESCRIPTION

[0069] The present invention is described in detail below in conjunction with specific implementation modes.

[0070] The present invention is used for accurate and efficient conversion of SAP2000 structural design and analysis models into ANSYS finite element models, such as Figure 1 As shown, the present invention comprises the following steps:

[0071] Step 1: Export the .s2k file containing all model information from SAP2000 software;

[0072] Step 2: Convert the .s2k file into an APDL command stream file based on Python language;

[0073] Step 3: Read the APDL command stream file and generate the ANSYS finite element model;

[0074] Step 2 specifically includes:

[0075] Step 2.1: Import and read the .s2k file and store the model information in a list or dictionary format;

[0076] Step 2.2: Generate an APDL command stream that defines the element type by compiling and calling a Python subroutine, and export it to a txt text file. To meet higher computational requirements, the defined element types include beam elements (Beam188), shell elements (Shell181), spring elements (Combin14 and Combin39), mass elements (Mass21), and mesh elements (Mesh200). Shell elements are divided into two categories through the key item KEYOPT (1), namely, shell elements that consider membrane and bending stiffness, and their corresponding The plate and shell elements in SAP2000, as well as the shell elements that only consider the film stiffness, correspond to the membrane elements in SAP2000; the spring elements include linear spring elements (Combin14) and nonlinear spring elements (Combin39); through the key item KEYOPT(2) of Combin14, the linear spring elements in the six degrees of freedom are defined respectively; through the key items KEYOPT(1) and KEYOPT(2) of Combin39, the elastic nonlinear spring elements and the elastic-plastic nonlinear spring elements are defined in the six degrees of freedom. Taking the spring element as an example, first, a sub-function for converting the spring element is established. Then, the conversion codes for the one-dimensional linear spring, one-dimensional elastic nonlinear spring, and one-dimensional elastic-plastic nonlinear spring are written in turn; finally, the list is returned and the sub-function is called.

[0077] Step 2.3: Call the "Material Properties" table of the model information, compile the sub-function, generate the APDL command stream that defines the material properties, and export it to a txt text file; in order to make the constitutive relationship of the converted model more universal, the defined material properties include elasticity, ideal elastic-plasticity, bilinear elastic-plasticity, and multilinear elastic-plasticity;

[0078] Step 2.4: Call the "Frame Section Properties" table, "Surface Section Properties" table, and "Connection Property Definition" table of the model information, compile the sub-function, generate the APDL command stream of the defined unit real constants and unit section properties, and export them to a txt text file;

[0079] 1) The defined unit real constants include beam unit real constants, shell unit real constants and spring unit real constants. The beam and shell units only create real constant numbers to meet the needs of meshing and have no other practical significance. The real constants of the spring unit include three parts: linear spring unit real constants, nonlinear elastic spring unit real constants and nonlinear plastic spring unit real constants. The real constants of the linear spring unit are realized by setting stiffness and damping, and the real constants of the nonlinear elastic spring unit and nonlinear plastic spring unit are realized by setting force-displacement curves. The real constants of the mass unit can set the mass in three translational directions and the mass inertia moment in three rotational directions. The corresponding relationship between the real constants in the model information and the overall transformation logic are determined, and the relevant codes are compiled to realize the transformation of the real constant information.

[0080] 2) The defined unit section properties include shell unit section properties and beam unit section properties; the shell unit section only needs to set the thickness of the plate and shell and the transverse shear stiffness. The types of beam unit sections that can be converted include rectangular, I-shaped, box-shaped, circular tube, custom section and variable section. Among them, the conversion of custom section and variable section is more special. For this reason, combined with the APDL command flow of custom beam section and variable section beam in ANSYS, it is implemented through the asec and taper commands of sectype respectively.

[0081] Step 2.5: Call the "Connection Data" table of the model information, compile the sub-function, generate the APDL command stream for defining the geometric model and unit division, and export it to a txt text file; the defined geometric model is a point, line, and surface model; the defined unit division includes beam unit division, shell unit division, and spring unit division;

[0082] 1) Beam unit division: Customize the number of beam unit grid divisions by calling external variables;

[0083] 2) Shell element division: The thin plate shells used to simulate components such as curtain walls and roof panels are realized by directly creating shell elements, and the others are divided in the default way;

[0084] 3) Spring unit division, the steps are as follows:

[0085] ① Create a geometric line at the link position, select and assign the line model empty material properties and real constants, as well as the mesh unit type Mesh200, and divide it into a unit;

[0086] ② After determining the unit type and real constants, create a spring unit based on the coordinates of the link nodes I and J.

[0087] Step 2.6: Call the "node constraint specification" table, "node rigid domain specification" table, "node local axis specification" table, "frame release specification" table and "frame local axis specification" table of the model information, compile the sub-function, generate the APDL code for defining the node coordinate axis transformation, beam unit coordinate axis transformation, beam end degree of freedom release, application of support constraints, and rigid domain creation, and export it to a txt text file; the defined node coordinate axis transformation, beam end degree of freedom release, and application of support constraints are implemented through the nmodif command, endrelease command, d command, etc. in the APDL language respectively;

[0088] 1) The transformation steps of the defined beam element coordinate axis changes are as follows:

[0089] ① Determine the direction vector of the x-axis of the beam unit coordinate system, calculate the vector modulus and the normalized unit vector;

[0090] ② Compare the unit direction vector of the x-axis with the direction vector of the z-axis in the global coordinate system. If the two are parallel, the direction of the y-axis in the unit coordinate system is consistent with the direction of the Y-axis in the global coordinate system; if they are not parallel, they are determined by the cross product of the two; the direction of the z-axis in the unit coordinate system is obtained by the cross product of the unit direction vector of the y-axis in the unit coordinate system and the unit direction vector of the x-axis;

[0091] ③ Determine the rotation center axis, rotation angle and starting vector, calculate the target vector, add the elements of the target vector to the coordinates of the starting node (I node) of the beam unit, and obtain the direction node of the beam unit after rotation;

[0092] ④ By creating a new direction control node and using the emodif command to modify the properties of the beam element, the coordinate axis of the beam element can be changed.

[0093] 2) The transformation steps for creating the defined rigid domain are as follows:

[0094] ① According to the node constraint information, clearly identify the nodes that need to create rigid body constraints, filter them out and define them as components;

[0095] ② Select the first node in the component as the main node, and use the cerig command to establish a rigid constraint between the main node and other nodes.

[0096] Step 2.7: Call the "Node Additional Mass Assignment" table, "Node Load-Force" table, "Node Load-Displacement" table, "Frame Load-Concentrated" table, "Frame Load-Distributed" table, "Surface Load-Uniformly Distributed" and "Surface Load-Transferred to Beam" tables of the model information, compile the sub-function, generate the APDL code that defines the node mass, node load, node displacement, beam-column concentrated load, beam-column distributed load, floor uniformly distributed load, and floor load transferred to beam, and export it to a txt text file.

[0097] 1) The steps of beam-column load transformation are defined as follows:

[0098] ① Select the frame beam column to which the load needs to be applied, and determine the geometric coordinates of its starting node and the beam length (column height);

[0099] ② Based on Python language, compile the APDL command stream, which selects all nodes on the beams and columns in the ANSYS model and enters them into the created list;

[0100] ③ Consistent with the second step, traverse the nodes on each beam column in ANSYS and define them as node components;

[0101] ④ Read the load data, determine the load direction, determine the angle between the load and the unit coordinate axis, and finally apply it to the beam-column unit.

[0102] 2) The steps for floor load conversion are as follows:

[0103] Similar to the beam element, the difference lies in the determination of the shell element coordinate system in step ④. The steps are as follows:

[0104] 1) Select the surface shell to which the load needs to be applied, determine the coordinates of the four nodes of the shell element and generate the direction vector;

[0105] 2) Based on Python language, compile the APDL command stream, which is to select the direction vector on the shell element node and determine the element coordinate axis of the shell element, including:

[0106] ① Determine the surface to which the load needs to be applied, select the shell element with the largest number on it, and then define an array of four nodes to store the node coordinates respectively;

[0107] ② According to equations 1) and 2), the reference directions S1 and S2 of the shell element are calculated:

[0108]

[0109]

[0110] Where {x} I , {x} J , {x} K , {x} L is the coordinate of the node in the global coordinate system;

[0111] ③ According to formula 3), the shell unit coordinate axis e3 is calculated

[0112] e3=S1×S2 / |S1×S2| 3)

[0113] 3) According to the shell unit coordinate axis obtained in step 2), the direction of the overall coordinate axis is compared and judged in ANSYS to determine the direction of load application;

[0114] 4) According to the load application direction obtained in step 3), by calling the surface load data in the model information, determine whether the surface load is a projected load. If it is a projected load, it is necessary to multiply the load value by the cosine value of the angle between the shell unit coordinate axis e3 and the load direction;

[0115] 5) Finally, based on the Python language, compile the APDL command stream and apply the obtained surface load to the shell element along the specified direction through the sfa command.

[0116] The specific embodiments are as follows:

[0117] 1) Single-storey industrial plant

[0118] The basic layout of a single-story industrial plant is 3 longitudinal spans, each span is 4m; 1 transverse span, span is 12m; the lower chord height of the roof truss is 6m; the eaves height is 7.5m; the ridge height is 8.5m. The columns are made of box steel sections, the beams are made of I-shaped steel sections, the trusses are made of I-shaped steel trusses, and the roof panels are concrete thin shell plates. The structural analysis model established in SAP2000 software is as follows Figure 2 As shown in (a), the conversion software integrating the technology of the present invention converts the SAP2000 model into an ANSYS finite element model, such as Figure 2 (b) shows the comparison of the first-order modal calculation results of the SAP2000 model and the ANSYS model, respectively. Figure 3 (a) and 3(b).

[0119] from Figure 2 It can be seen that based on the method of the present invention, the SAP2000 structural analysis model can be converted into an ANSYS finite element model, and the geometric information of the model is completely consistent. Figure 3 It can be seen that the modal calculation results of the SAP2000 model are basically consistent with the ANSYS model, which further shows that this method can successfully transform all model information of the plant structure, including: steel section, material properties of concrete and steel, component geometric model, constraints and loads, and the conversion accuracy meets the requirements; especially for the transfer of surface shell loads to beam units and the release of node degrees of freedom, based on the inventive method, efficient conversion can be achieved, which improves the functionality of model conversion and makes up for the shortcomings of existing conversion technology.

[0120] 2) Multi-layer frame structure

[0121] The basic layout of a multi-storey frame structure is about 30m long, 18m wide and 18m high. The structure is composed of lower reinforced concrete components. The cross-section of the beam and column components is rectangular or square. The structural analysis model established in SAP2000 software is as follows Figure 4 As shown in (a), the conversion software integrating the technology of the present invention converts the SAP2000 model into an ANSYS finite element model, such as Figure 4 (b) shows the comparison of the first-order modal calculation results of the SAP2000 model and the ANSYS model, respectively. Figure 5 (a) and 5(b).

[0122] from Figure 4 , Figure 5 It can be seen that the ANSYS model converted based on the method of the present invention is basically consistent with the calculation results of the SAP2000 model, indicating that the method can successfully convert all model information of the multi-story concrete frame structure, including: beam and column component dimensions, material properties of concrete and steel, component geometric models, loads and constraints, and the converted model meets the requirements of calculation accuracy; in particular, the custom setting of the number of beam unit grid divisions is realized based on the inventive method, which improves the applicability of model conversion.

[0123] The content of the present invention is not limited to the embodiments listed, and any equivalent changes made to the technical solution of the present invention by ordinary technicians in this field after reading the description of the present invention are covered by the claims of the present invention.

Claims

1. A method for converting SAP2000 and ANSYS models based on Python and APDL language. Features: The steps include: Step 1: Export the .s2k file containing all model information from SAP2000 software; Step 2: Convert the .s2k file into an APDL command stream file based on Python language; Step 3: Read the APDL command stream file and generate the ANSYS finite element model; The step 2 specifically includes: Step 2.1: Import and read the .s2k file and store the model information in a list or dictionary format; Step 2.2: Generate the APDL command stream for defining the unit type in the form of compiling and calling the Python sub-function, and export it to a txt text file; Step 2.3: Call the "Material Properties" table of the model information, compile the sub-function, generate the APDL command stream that defines the material properties, and export it to a txt text file; Step 2.4: Call the "Frame Section Properties" table, "Surface Section Properties" table, and "Connection Property Definition" table of the model information, compile the sub-function, generate the APDL command stream of the defined unit real constants and unit section properties, and export them to a txt text file; Step 2.5: Call the "Connection Data" table of the model information, compile the sub-function, generate the APDL command stream that defines the geometric model and unit division, and export it to a txt text file; Step 2.6: Call the "node constraint assignment" table, "node rigid domain assignment" table, "node local axis assignment" table, "frame release assignment" table and "frame local axis assignment" table of the model information, compile the sub-function, generate the APDL code for defining the node coordinate axis transformation, beam element coordinate axis transformation, beam end degree of freedom release, support constraint application, and rigid domain creation, and export it to a txt text file; Step 2.7: Call the "Node Additional Mass Assignment" table, "Node Load - Force" table, "Node Load - Displacement" table, "Frame Load - Concentrated" table, "Frame Load - Distributed" table, "Surface Load - Uniformly Distributed" table and "Surface Load - Transferred to Beam" table of the model information, compile the sub-function, generate the APDL code that defines the node mass, node load, node displacement, beam-column concentrated load, beam-column distributed load, floor uniformly distributed load, and floor load transferred to beam, and export it to a txt text file.

2. According to the SAP2000 and ANSYS model conversion method based on Python and APDL language as claimed in claim 1, Features: In step 2.2, the defined unit types are beam unit, shell unit, spring unit, mass unit, and mesh unit.

3. According to the SAP2000 and ANSYS model conversion method based on Python and APDL language as claimed in claim 2, Features: In step 2.3, the material properties defined are elasticity, ideal elastic-plasticity, bilinear elastic-plasticity, and multilinear elastic-plasticity.

4. According to the SAP2000 and ANSYS model conversion method based on Python and APDL language as claimed in claim 3, Features: In step 2.4, the defined unit real constants include: 1) Beam element real constants: Create real constant numbers to meet the needs of meshing; 2) Shell element real constants: Create real constant numbers to meet the needs of meshing; 3) Spring unit real constants: Create real constants of three types of spring units: linear, nonlinear elastic, and nonlinear plastic, to meet the creation of various types of connection units; In step 2.4, the unit section properties defined include: 1) Shell element section properties: By setting the thickness of the plate and shell and the transverse shear stiffness, it is used to define the section properties of thin and thick plates and shells; 2) Beam unit section properties: used for the property definition of rectangular, I-shaped, box-shaped, circular tube, custom section and variable section beams, where custom sections and variable sections are implemented through the asec and taper commands of sectype in the APDL language respectively.

5. According to the SAP2000 and ANSYS model conversion method based on Python and APDL language as claimed in claim 4, Features: In step 2.5, the geometric model defined is a point, line, and surface model, and the unit division defined includes beam unit division, shell unit division, and spring unit division. The spring unit division specifically includes: 1) Create a geometric line at the connection link position, select and assign the line model empty material properties and real constants, as well as the mesh unit type Mesh200, and divide it into a unit; 2) After determining the element type and real constants, create a spring element based on the coordinates connecting Link nodes I and J.

6. The SAP2000 and ANSYS model conversion method based on Python and APDL language according to claim 5, Features: In step 2.6, the defined node coordinate axis transformation, beam end degree of freedom release, and support constraint application are respectively implemented by the nmodif command, endrelease command, and d command in the APDL language; In step 2.6, the transformation steps of the defined beam unit coordinate axis changes are as follows: 1) Determine the direction vector of the x-axis of the beam unit coordinate system, and calculate the vector modulus and the normalized unit vector; 2) Compare the unit direction vector of the x-axis with the direction vector of the z-axis in the global coordinate system. If the two are parallel, the direction of the y-axis in the unit coordinate system is consistent with the direction of the Y-axis in the global coordinate system. If they are not parallel, they are determined by the cross product of the two. The direction of the z-axis in the unit coordinate system is obtained by the cross product of the unit direction vector of the y-axis in the unit coordinate system and the unit direction vector of the x-axis. 3) Determine the rotation center axis, rotation angle and starting vector, calculate the target vector, add the elements of the target vector to the coordinates of the starting node I of the beam unit, and obtain the direction node of the beam unit after rotation; 4) By creating a new direction control node and using the emodif command to modify the properties of the beam element, the coordinate axis of the beam element can be changed.

7. The SAP2000 and ANSYS model conversion method based on Python and APDL language according to claim 6, Features: In step 2.6, the transformation steps for creating the rigid domain are defined as follows: 1) According to the node constraint information, identify the nodes that need to create rigid body constraints, select them and define them as components; 2) Select the first node in the component as the main node, and use the cerig command to establish rigid constraints between the main node and other nodes.

8. According to the SAP2000 and ANSYS model conversion method based on Python and APDL language as claimed in claim 7, Features: In step 2.7, the beam-column load conversion steps are defined as follows: 1) Select the frame beam column to which the load needs to be applied, and determine the geometric coordinates of its starting node and the beam length; 2) Based on Python language, compile the APDL command stream, which selects all nodes on the beams and columns in the ANSYS model and enters them into the created list; 3) According to the method in step 2), traverse the nodes on each beam column in ANSYS and define them as node components; 4) Read the load data, determine the load direction, determine the angle between the load and the unit coordinate axis, and finally apply it to the beam-column unit.

9. The SAP2000 and ANSYS model conversion method based on Python and APDL language according to claim 8, Features: In step 2.7, the floor load conversion steps are defined as follows: 1) Select the surface shell to which the load needs to be applied, determine the coordinates of the four nodes of the shell element and generate the direction vector; 2) Based on Python language, compile the APDL command stream, which is to select the direction vector on the shell element node and determine the element coordinate axis of the shell element, including: ① Determine the surface to which the load needs to be applied, select the shell element with the largest number on it, and then define an array of four nodes to store the node coordinates respectively; ② According to equations 1) and 2), the reference direction S of the shell element is calculated: 1 and S 2 Where {x} I , {x} J , {x} K , {x} L is the coordinate of the node in the global coordinate system; ③ According to formula 3), the shell unit coordinate axis e is calculated 3 e 3 =S 1 ×S 2 / |S 1 ×S 2 | 3) 3) According to the shell unit coordinate axis obtained in step 2), the direction of the overall coordinate axis is compared and judged in ANSYS to determine the direction of load application; 4) According to the load application direction obtained in step 3), by calling the "Surface Load-Uniform Distribution" and "Surface Load-Transferred to Beam" tables in the model information, determine whether the surface load is a projected load. If it is a projected load, you need to multiply the load value by the shell unit coordinate axis e 3 The cosine of the angle with the load direction; 5) Finally, based on Python language, compile the APDL command stream and apply the obtained surface load to the shell element along the specified direction through the sfa command.