A post-processing method for rapidly calculating relative displacements of a large number of nodes based on NASTRAN result files

The Python-based post-processing method for NASTRAN result files automates the computation and visualization of relative node displacements, addressing inefficiencies in existing ship deformation analysis by directly calculating and displaying relative deformations, thereby enhancing analysis efficiency.

CN114428997BActive Publication Date: 2025-03-25SHANGHAI WISON OFFSHORE & MARINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210085396.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-03-25
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

Current ship deformation finite element analysis methods using NASTRAN results can only read absolute displacement values, making it inefficient to calculate relative deformation between nodes, especially when the structure has components like springs, which cause the coordinate system to tilt, preventing direct calculation of relative deformation.

Method used

A Python-based post-processing method that reads NASTRAN result files to automatically compute and visualize relative displacement between multiple nodes by extracting relevant data and performing batch calculations, including defining nodes, data storage paths, and generating trend graphs.

Benefits of technology

This method significantly improves efficiency by enabling direct computation and visualization of relative deformation between nodes, overcoming the limitations of existing methods by automating the process and reducing the need for extensive data fitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428997B_ABST
    Figure CN114428997B_ABST
Patent Text Reader

Abstract

The present invention discloses a post-processing method for quickly calculating the relative displacement of a large number of nodes based on NASTRAN result files. It includes step 1: establishing a Patran finite element model, submitting NASTRAN analysis and calculation, and obtaining an f06 result file; step 2: selecting the node for which relative displacement needs to be calculated and the node number and initial position coordinate information of a series of nodes around it; step 3: editing a python code program, setting the node number for which relative deformation needs to be calculated, setting the data, image storage path and naming file; step 4: running the program, obtaining the relative deformation result of the target node and the deformation trend graph of a series of nodes nearby. The post-processing method of the present invention can automatically post-process the NASTRAN result data, quickly solve the relative deformation between multiple nodes in the calculation model and display the graph, thereby improving the efficiency of post-processing work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of finite element simulation analysis of hull deformation, and relates to a post-processing method for quickly calculating relative displacements of a large number of nodes based on a NASTRAN result file. Background Art

[0002] At present, in the post-processing method of Nastran finite element analysis results of hull deformation, only the absolute displacement value of the node can be read, and the node deformation cannot be directly read; when the relative deformation of two nodes needs to be solved, if the structure is tilted as a whole relative to the calculation coordinate system (for example, the structure contains spring units), the relative deformation is not equal to the absolute displacement difference and cannot be solved directly. A large amount of data needs to be read for fitting calculation, which is inefficient. Summary of the invention

[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a post-processing method for quickly calculating the relative displacements of a large number of nodes based on NASTRAN result files. The program can automatically post-process the NASTRAN result data, quickly solve the relative deformations between multiple nodes in the calculation model and display them in a graph.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] The present invention discloses a post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files, which comprises the following steps:

[0006] Step 1: Establish a Patran finite element model, read the node number and initial position coordinate information of the node whose relative displacement needs to be calculated and a series of nodes around it;

[0007] Step 2: Submit the finite element model to NASTRAN analysis and calculation to obtain the f06 result file;

[0008] Step 3: Edit the Python code program, set the node number for calculating the relative deformation, set the data and image storage path and name the file;

[0009] Step 4: Run the program to obtain the relative deformation result of the target node and the deformation trend graph of a series of nearby nodes.

[0010] The present invention provides a post-processing method for quickly calculating a large number of node relative displacements based on NASTRAN result files, which specifically comprises the following steps:

[0011] Step 1: Establish a patran finite element model, read the node numbers and initial position coordinate information of the two nodes for which relative displacement calculation is required and a series of nodes distributed longitudinally nearby;

[0012] Step 2: Submit the finite element model to Nastran for analysis and calculation, obtain the calculation results, and generate the f06 result file;

[0013] Step 3: Through the Python code program, by querying keywords, extract the vertical displacement values ​​of each node in step 1 under various working conditions;

[0014] Step 4: Use the Python code program to batch calculate the relative displacement between two nodes that need to be calculated under various working conditions;

[0015] Step 5: Use the Python code program to batch draw the displacement and relative deformation trend graphs of each node in step 1 under various working conditions.

[0016] Furthermore, the logical framework of the python code program is as follows:

[0017] S1. Program starts

[0018] S2. Import the Python library needed to execute the code;

[0019] S3. Define the function get_distance_point_to_line for solving the distance from a point to a straight line, in preparation for subsequent code calls;

[0020] S4, import the node numbers and coordinate information of the two nodes (node100, node101) read in Patran and other nodes (node1-node20) distributed vertically nearby;

[0021] S5, read the calculation result f06 file, extract the vertical displacement value of each node in the previous step under various working conditions by querying keywords, and save the data of each working condition in a dataframe;

[0022] S6. Use the get_distance_point_to_line function to batch calculate the relative displacement between the two nodes node100 and node101 under various working conditions, and set the storage path and name to form a result file;

[0023] S7. Batch draw the displacement trend diagram of each node (node100, node101, node1-node20) under each working condition, and display the relative deformation between the two nodes node100 and node101, and set the storage path and name to form a graphic result file;

[0024] S8. The program ends.

[0025] Furthermore, in step S2, the Python libraries required to execute the code include pandas, numpy, matplotlib, etc.

[0026] Furthermore, in step S4, the two nodes whose relative displacements need to be calculated are node100 and node101.

[0027] Furthermore, in step S4, other nodes distributed vertically nearby are node1-node20.

[0028] Furthermore, in step S6, the get_distance_point_to_line function is used to batch calculate the relative displacement between two nodes under various working conditions, and the storage path and name are set to form a result file.

[0029] Furthermore, in step S7, displacement trend diagrams of each node under each working condition are drawn in batches, and the relative deformation between two nodes is displayed, and the storage path and name are set to form a graphic result file.

[0030] Beneficial effects of the present invention:

[0031] The present invention develops a program which can automatically post-process the nastran result data, quickly solve the relative deformation between multiple nodes in the calculation model and display it in a drawing.

[0032] The post-processing method of the present invention can quickly calculate the relative deformation between multiple nodes and display the relative deformation between multiple nodes according to the nastran finite element analysis result file, thereby improving the post-processing work efficiency.

[0033] The post-processing method for quickly calculating the relative displacements of a large number of nodes based on NASTRAN result files of the present invention has the key technical points and advantages of: by editing the Python code program, the required result data is extracted from the finite element calculation result file and a fitting calculation is performed, so that the relative deformations between the nodes to be solved can be obtained quickly in batches. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of a post-processing method for quickly calculating relative displacements of a large number of nodes based on NASTRAN result files of the present invention;

[0035] Figure 2 It is a logical framework diagram of the Python code program in the present invention. DETAILED DESCRIPTION

[0036] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0037] Example

[0038] like Figure 1 As shown, the present invention provides a post-processing method for quickly calculating a large number of node relative displacements based on NASTRAN result files, which comprises the following steps:

[0039] Step 1: Establish a patran finite element model, read the node numbers and initial position coordinate information of the two nodes for which relative displacement calculation is required and a series of nodes distributed longitudinally nearby;

[0040] Step 2: Submit the finite element model to Nastran for analysis and calculation, obtain the calculation results, and generate the f06 result file;

[0041] Step 3: Through the Python code program, by querying keywords, extract the vertical displacement values ​​of each node in step 1 under various working conditions;

[0042] Step 4: Use the Python code program to batch calculate the relative displacement between two nodes that need to be calculated under various working conditions, and set the storage path and name to form a result file;

[0043] Step 5: Use the Python code program to batch draw the displacement and relative deformation trend graphs of each node in step 1 under various working conditions, and set the storage path and name to form a graphic result file.

[0044] This embodiment combines the calculation of relative displacement between nodes of a hull base (relative displacement between nodes node100 and node101), and the calculation steps are as follows:

[0045] Step 1: Establish the patran finite element model, read the node numbers and coordinate information of the two nodes (node100, node101) whose relative displacement needs to be calculated and a series of nodes (node1-node20) distributed longitudinally near them, and save them as the "node.txt" file;

[0046] Step 2: Submit the finite element model to Nastran for calculation and analysis to generate the "result.f06" file;

[0047] Step 3: Use the Python code program to read the "node.txt" file and the "result.f06" file, and extract the vertical displacement values ​​of each node in step 1 under various working conditions by querying keywords;

[0048] Step 4: Use the Python code program to batch calculate the relative displacement between node100 and node101 under various working conditions, set the storage path, and save the results as a "deform.xls" file for easy data verification;

[0049] Step 5: Use the Python code program to batch draw the displacement and relative deformation trend graphs of each node in step 1 under various working conditions, and set the storage path and name to form a graphic result file for easy result viewing.

[0050] Among them, the logical framework of the Python code program is as follows (such as Figure 2 shown):

[0051] S1. Program starts

[0052] S2. Import the Python libraries (pandas, numpy, matplotlib, etc.) needed to execute the code.

[0053] S3. Define the function get_distance_point_to_line for solving the distance from a point to a straight line, in preparation for subsequent code calls;

[0054] S4, import the node numbers and coordinate information of the two nodes (node100, node101) read from patran and other nodes (node1-node20) distributed vertically nearby;

[0055] S5, read the calculation result f06 file, extract the vertical displacement value of each node in the previous step under various working conditions by querying keywords, and save the data of each working condition in a dataframe;

[0056] S6. Use the get_distance_point_to_line function to batch calculate the relative displacement between the two nodes node100 and node101 under various working conditions, and set the storage path and name to form a result file;

[0057] S7. Batch draw the displacement trend diagram of each node (node100, node101, node1-node20) under each working condition, and display the relative deformation between the two nodes node100 and node101, and set the storage path and name to form a graphic result file;

[0058] S8. The program ends.

[0059] The post-processing method of this embodiment can quickly calculate the relative deformation between multiple nodes and display it in a graph based on the Nastran finite element analysis result file, thereby improving the efficiency of post-processing work.

Claims

1. A post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files, characterized in that: The specific steps include: Step 1: Establish a patran finite element model, read the node numbers and initial position coordinate information of the two nodes for which relative displacement calculation is required and a series of nodes distributed longitudinally nearby; Step 2: Submit the finite element model to Nastran for analysis and calculation, obtain the calculation results, and generate the f06 result file; Step 3: Through the Python code program, by querying keywords, extract the vertical displacement values ​​of each node in step 1 under various working conditions; Step 4: Use the Python code program to batch calculate the relative displacement between two nodes that need to be calculated under various working conditions, and set the storage path and name to form a result file; Step 5: Use the Python code program to batch draw the displacement and relative deformation trend graphs of each node in step 1 under various working conditions, and set the storage path and name to form a graphic result file; The logical framework of the python code program is as follows: S1. Program starts S2. Import the Python library needed to execute the code; S3. Define the function get_distance_point_to_line to calculate the distance from a point to a straight line; S4, importing the node numbers and coordinate information of the two nodes read in Patran and other nodes distributed longitudinally nearby; S5, read the calculation result f06 file, extract the vertical displacement value of each node in the previous step under various working conditions by querying keywords, and save the data of each working condition in a dataframe; S6. Use the get_distance_point_to_line function to batch calculate the relative displacement between two nodes under various working conditions; S7. Batch draw the displacement trend diagram of each node under each working condition, and display the relative deformation between two nodes; S8. The program ends.

2. The post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files as claimed in claim 1, characterized in that: In step S2, the Python libraries required to execute the code include pandas, numpy and matplotlib.

3. The post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files as claimed in claim 1, characterized in that: In step S4, the two nodes whose relative displacement needs to be calculated are node100 and node101.

4. The post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files as claimed in claim 1, characterized in that: In step S4, other nodes distributed vertically nearby are node1-node20.

5. The post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files as claimed in claim 1, characterized in that: In step S6, the get_distance_point_to_line function is used to batch calculate the relative displacement between two nodes under various working conditions, and the storage path and name are set to form a result file.

6. The post-processing method for rapidly calculating a large number of node relative displacements based on NASTRAN result files as claimed in claim 1, characterized in that: In the step S7, the displacement trend diagrams of each node under each working condition are drawn in batches, and the relative deformation between two nodes is displayed, and the storage path and name are set to form a graphic result file.

Citation Information

Patent Citations

  • VTK-based carrier rocket structural finite element analysis visualization method

    CN108830000A

  • Coupling method based on ABAQUS finite element and boundary element

    CN111159951A