Calculation method for ship shafting design

By integrating EXCEL with VB programs, a calculation method for ship shafting design is realized, which solves the problem that EXCEL cannot be edited, improves calculation efficiency and accuracy, simplifies the operation process and supports standardized design.

CN120596075APending Publication Date: 2025-09-05SHANGHAI HAIZHI ZHIYUAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510738724.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

In the prior art, the EXCEL table cannot be edited in the ship shafting design calculation, which makes the cyclic calculation work inconvenient.

Method used

A deep learning-based image text recognition method is used to integrate the EXCEL interface with the VB program to realize data reading, calculation logic and result display, and the calculation results are displayed in EXCEL through the VB program.

Benefits of technology

It improves the calculation efficiency and accuracy of ship shafting design, simplifies the operation process, ensures the visualization and reliability of the results, and supports standardized and normalized design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596075A_ABST
    Figure CN120596075A_ABST
Patent Text Reader

Abstract

The invention discloses a calculation method for ship shafting design, which comprises the following steps of: S1, storing definition information such as a manufactured EXCEL interface layout format, calculation elements, calculation items and the like and VB program codes in an external integration system to form an initial data packet; the initial data packets comprise all necessary information such as interface layout, font formats and forms, frames and line spacing; s2, the external integration system calls VB to read input data, the input data are derived from initial data existing in EXCEL under one condition, and the input data are data input by a user, related to ship shafting design and needing to calculate a result under the other condition; according to the calculation method for ship shafting design, VB programming is utilized, input data of a user is read, and values of corresponding columns in EXCEL are returned according to a programming calculation result format. Even if a blank EXCEL is used, initial data are read in, and VB is operated, all layouts, formats and results can be restored and reproduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship shafting design and calculation, and in particular to a calculation method for ship shafting design. Background Art

[0002] The ship's shafting system refers to the entire set of equipment from the main engine's output end to the propeller. Its function is to connect the main engine (propulsion unit) and the propeller shaft, transmit the power generated by the main engine to the propeller, and at the same time transmit the thrust generated by the propeller to the hull to achieve the mission of propelling the ship. The design process of the ship's shafting system requires detailed calculations of the hollow shaft, couplings, and bearings. The calculated values ​​of hollow shafts, couplings, and bearings are usually saved in Excel tables. The use of Excel tables is becoming more and more widespread. However, since Excel cannot be edited, it brings a lot of inconvenience to the cyclic calculation work of ship shafting design. It is necessary to design a simple third-party software to solve this problem of ship shafting design calculation through integration. Summary of the Invention

[0003] The object of the present invention is to provide a calculation method for ship shafting design to solve the problems raised in the above background technology.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions: A method for image text recognition based on deep learning, comprising the following steps: S1: Store the prepared EXCEL interface layout format, calculation elements, calculation items and other definition information as well as VB program code in the external integration system to form an initial data package. This initial data package contains all necessary information such as interface layout, font format and form, border and line spacing, etc. S2: The external integration system calls VB to read input data. In one case, the input data comes from the initial data already stored in EXCEL. In another case, the input data is user-entered and related to the ship shafting design, and the results need to be calculated. S3: Based on the theoretical formulas and calculation methods of ship shafting design and the read input data, the specific calculation logic of each calculation item is implemented in the VB program; S4: The calculation results are clearly displayed on the EXCEL interface.

[0005] In one possible design, in S1, the calculation elements, calculation items, and final calculation result display area are clearly listed on the EXCEL interface. The calculation element section lists the various parameters and conditions required for the ship shafting design calculation; the calculation item section details the specific calculation steps and content; and the result section is used to display the final calculated data.

[0006] In a possible design, in S2, the external integration system first opens the specified EXCEL table, and then calls VB to read the data in the EXCEL table. When EXCEL is blank, the external integration system calls VB to read the non-table data input by the user and the data related to the ship shafting design that needs to be calculated.

[0007] In one possible design, the components that need to be calculated for ship shafting design are hollow shafts, couplings, and bearing values; The bending modulus formula of the hollow shaft is: WZ=fracpiD 3 (1−m 4 )32; where D is the outer diameter of the hollow shaft, and m is the hollow coefficient (m=fracdD′, d is the diameter of the center hole); Bending stress calculation of hollow shaft The calculation formula for the bending stress of the hollow shaft is: Where M is the moment and W′ is the bending modulus. The calculation method is the same as that of the solid shaft and can be determined based on the actual stress conditions of the ship's shafting.

[0008] Calculation of maximum bending stress of shafting under different hollow ratios Intermediate shaft: The bending stress it is subjected to mainly comes from the gravity of the shaft system itself. As the hollow ratio increases, the weight of the shaft system decreases, and the bending stress of the intermediate shaft decreases.

[0009] Propeller shaft: Bending stress mainly comes from the gravity of the propeller. As the hollow ratio increases, the shaft's bending modulus decreases rapidly, but the propeller weight remains unchanged, and the propeller shaft's own weight changes little, so the bending stress gradually increases.

[0010] In one possible design, in S3, Calculation formula for coupling axial force and radial force: Axial force calculation formula:

[0011] Radial force calculation formula:

[0012] Parameter Description: Fx: axial force (N).

[0013] Fy: radial force (N).

[0014] Kx: Axial stiffness of the coupling, generally provided by the coupling manufacturer.

[0015] Ky: The radial stiffness of the coupling, generally provided by the coupling manufacturer.

[0016] T: working torque (Ncdotm).

[0017] In one possible design, a non-blank XCEL table already exists in S4. After the calculation is complete, the external integration system uses a VB program to return the calculation results in a predetermined format to the corresponding middle column position (i.e., the result display area) of the existing EXCEL table. This ensures that the results can be accurately and clearly displayed on the interface, making it convenient for users to view and analyze.

[0018] In a possible design, in S4, if it is a blank EXCEL, the external integration system will use VB to run the relevant data of the initial data package, generate the stored interface layout, font format and form, border and line spacing in the blank EXCEL, and then call VB to display the read data and calculation results in the corresponding middle column position in the EXCEL table.

[0019] In a possible design, in S4, the program code in VB that needs to be output to EXCEL for writing the calculation results back is: For i = LBound(inputData, 1) To UBound(inputData, 1) Debug.Print "Data " & i & ": " & inputData(i, 1) Next i ' You can add calculation logic here and write the results back to the corresponding location in EXCEL End Sub.

[0020] In a possible design: in S2, the program code for VB to read data is: Sub ReadDataFromExcel() Dim ws As Worksheet Dim inputRange As Range Dim cell As Range Dim inputData As Variant Dim i As Integer ' Set up the worksheet object, assuming the data is on a worksheet named "Sheet1" Set ws = ThisWorkbook.Sheets("Sheet1") ' Set the input data range, assuming the blue marked input area is from A1 to A10 Set inputRange = ws.Range("A1:A10") ' Initialize the array to store the read data ReDim inputData(1 To inputRange.Rows.Count, 1 To 1) ' Read input data i = 1 For Each cell In inputRange ' Assume that the data is of numerical type and adjust according to the actual situation If IsNumeric(cell.Value) Then inputData(i, 1) = cell.Value Else ' If it is not a numeric value, it can be stored as a string or other type inputData(i, 1) = cell.Value End If i = i + 1 Next cell.

[0021] By adopting the above technical solution, the problem that VB-EXCEL cannot edit (such as circular reference) is solved.

[0022] Compared with the prior art, the present invention has the following beneficial effects: Easy to operate: Using EXCEL as the operation interface, it is easy to get started for users who are familiar with EXCEL, without the need to learn complex software operations.

[0023] Good visualization effect: Through carefully designed interface layout and format settings, the calculation process and results are more intuitive and clear, making it easier for users to conduct data analysis and decision-making.

[0024] Accurate and reliable calculation: Combined with VB programming to achieve automated calculation, it avoids possible errors in manual calculation and improves the accuracy and reliability of calculation results.

[0025] Strong repeatability: The entire calculation process can be restored and reproduced, ensuring that different people at different times and with different personnel obtain consistent results when performing the same calculation, providing strong support for the standardization and normalization of ship shafting design.

[0026] The calculation method for ship shafting design utilizes Visual Basic programming to read user input data and return the values ​​in the corresponding columns of Excel according to the programmed calculation format. Even with a blank Excel file, by reading the initial data and running Visual Basic, all layouts, formats, and results can be restored and reproduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a structural block diagram of the present invention; Figure 2 Flowchart of the present invention. DETAILED DESCRIPTION

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0029] See also Figure 1-2 , the present invention provides a technical solution: a calculation method for ship shafting design, Implementation steps Generation and storage of initial data packets Interface and Data Definition: Design the interface layout for ship shafting design in Excel, clearly listing the calculation elements, calculation items, and the final calculation result display area. The calculation element section should list the various parameters and conditions required for ship shafting design calculations, such as the hollow shaft outer diameter D, the center hole diameter d0, and the operating torque T. The calculation item section should detail the specific calculation steps and content, such as the hollow shaft bending modulus calculation and the bending stress calculation. The results section is used to display the final calculated data.

[0030] VB program code writing: Based on the theoretical formulas and calculation methods of ship shafting design, write VB program code to implement the specific calculation logic of each calculation project.

[0031] Data Integration: The prepared Excel interface layout, calculation elements, calculation items, and other definition information, along with the VB program code, are stored in an external integration system to form an initial data package. The external integration system includes a storage module and a communication module. The storage module is used to store the initial data package, and the communication module is used to control the startup and operation of VB and Excel.

[0032] Reading input data System startup: The external integration system starts and opens the specified EXCEL table.

[0033] Data reading: The external integration system calls VB to read data from the EXCEL table. If the EXCEL table already contains initial data, it is read directly; if the EXCEL table is blank, the external integration system calls VB to read the non-table data entered by the user and related to the ship shafting design to calculate the results. The following is an example of the VB program code for reading data: vba Sub ReadDataFromExcel() Dim ws As Worksheet Dim inputRange As Range Dim cell As Range Dim inputData As Variant Dim i As Integer ' Set up the worksheet object, assuming the data is on a worksheet named "Sheet1" Set ws = ThisWorkbook.Sheets("Sheet1") ' Set the input data range and adjust the range according to actual conditions Set inputRange = ws.Range("A1:A10") ' Initialize the array to store the read data ReDim inputData(1 To inputRange.Rows.Count, 1 To 1) ' Read input data i = 1 For Each cell In inputRange ' Assume that the data is of numerical type and adjust according to the actual situation If IsNumeric(cell.Value) Then inputData(i, 1) = cell.Value Else ' If it is not a numeric value, it can be stored as a string or other type inputData(i, 1) = cell.Value End If i = i + 1 Next cell End Sub Implementation of specific calculation logic Hollow shaft calculation: Calculation of flexural modulus: According to the formula WZ=πD 3 (1−m 4 ) / 32, where D is the outer diameter of the hollow shaft and m is the hollow ratio (m=d0 / D, d0 is the center hole diameter). Calculate the flexural modulus of the hollow shaft.

[0034] Bending stress calculation: Calculate the bending stress of the hollow shaft according to the formula σ′=M / WZ, where M is the moment.

[0035] Calculation of maximum bending stress of shafting under different hollow ratios: Analyze the changes in bending stress of the intermediate shaft and propeller shaft under different hollow ratios.

[0036] Coupling calculation: Calculation of axial force: According to the formula Fx=KxT (the specific formula needs to be supplemented according to actual conditions), where Fx is the axial force, Kx is the axial stiffness of the coupling, and T is the working torque.

[0037] Calculation of radial force: According to the formula Fy=KyT (the specific formula needs to be supplemented according to actual conditions), where Fy is the radial force, Ky is the radial stiffness of the coupling, and T is the working torque.

[0038] Display of calculation results Non-blank Excel spreadsheet processing: If the input data comes from an existing non-blank Excel spreadsheet, after the calculation is complete, the external integration system uses a VB program to return the calculation results to the corresponding center column (i.e., the result display area) of the existing Excel spreadsheet in a predetermined format. This ensures that the results are displayed accurately and clearly on the interface, making it easy for users to view and analyze.

[0039] Blank Excel spreadsheet processing: If the input data is user-entered and the Excel spreadsheet is blank, the external integration system will run the initial data package using Visual Basic, generating the stored interface layout, font format and form, borders, and line spacing within the blank Excel spreadsheet. Visual Basic is then called to display the read data and calculation results in the corresponding center columns of the Excel spreadsheet. The following is an example of the VB code that writes the calculation results back to the output file in Excel: vba ' Assume inputData is an array containing the calculation results Sub WriteResultsToExcel() Dim ws As Worksheet Dim outputRange As Range Dim i As Integer ' Set up the worksheet object, assuming that the data is to be written to a worksheet named "Sheet1" Set ws = ThisWorkbook.Sheets("Sheet1") ' Set the output data range and adjust the range according to actual conditions Set outputRange = ws.Range("B1:B10") ' Assume the result is to be written to column B ' Write the calculation results to EXCEL For i = LBound(inputData, 1) To UBound(inputData, 1) outputRange.Cells(i, 1).Value = inputData(i, 1) Next i End Sub Expected results By implementing the above steps, a calculation method for ship shafting design can be implemented, integrating Excel and Visual Basic program code into an external integrated system to enable the reading of input data, the implementation of specific calculation logic, and the clear display of calculation results. This method solves the inconvenience of loop calculations caused by the inability to edit Excel, and improves the efficiency and accuracy of ship shafting design calculations.

Claims

1. A calculation method for ship shafting design, characterized by: The following steps are involved: S1: Store the prepared EXCEL interface layout format, calculation elements, calculation items and other definition information as well as VB program code in the external integration system to form an initial data package; this initial data package contains all necessary information such as interface layout, font format and form, border and line spacing, etc. S2: The external integration system calls VB to read input data. In one case, the input data comes from the initial data already stored in EXCEL. In another case, the input data is user-entered and related to the ship shafting design, and the results need to be calculated. S3: Based on the theoretical formulas and calculation methods of ship shafting design and the read input data, the specific calculation logic of each calculation item is implemented in the VB program; S4: The calculation results are clearly displayed on the EXCEL interface.

2. A calculation method for ship shafting design according to claim 1, characterized in that: In the above S1, the external integration system includes a storage module and a communication module. The storage module is used to store the initial data packet, and the communication module is used to control the startup and operation of VB and EXCEL.

3. The calculation method for ship shafting design according to claim 1, characterized in that: In said S1, the calculation elements, calculation items and the final calculation result display area are clearly listed on the EXCEL interface; The calculation elements section lists various parameters and conditions required for ship shafting design calculations; The calculation project section lists the specific calculation steps and contents in detail; the result section is used to display the final data obtained by the calculation.

4. The calculation method for ship shafting design according to claim 1, characterized in that: In S2, the external integration system first opens the specified EXCEL table, and then calls VB to read the data in the EXCEL table. When EXCEL is blank, the external integration system calls VB to read the non-table data input by the user and the data related to the ship shafting design that needs to be calculated.

5. The calculation method for ship shafting design according to claim 1, characterized in that: In S3, the components that need to be calculated for ship shafting design include hollow shafts, couplings, and bearing values; The bending modulus formula of the hollow shaft is: WZ=fracpiD 3 (1−m 4 )32; where D is the outer diameter of the hollow shaft, and m is the hollow coefficient (m=fracdD′, d is the diameter of the center hole); Bending stress calculation of hollow shaft The calculation formula for the bending stress of the hollow shaft is: Where M is the moment and W′ is the bending modulus. The calculation method is the same as that of the solid shaft and can be determined based on the actual stress conditions of the ship's shafting. Calculation of maximum bending stress of shafting under different hollow ratios; Intermediate shaft: The bending stress it is subjected to mainly comes from the gravity of the shaft system itself. As the hollow ratio increases, the weight of the shaft system decreases, and the bending stress of the intermediate shaft decreases. Propeller shaft: Bending stress mainly comes from the gravity of the propeller; as the hollow ratio increases, the bending modulus of the shaft decreases rapidly, but the weight of the propeller remains unchanged, and the weight of the propeller shaft itself changes little, so the bending stress gradually increases.

6. The calculation method for ship shafting design according to claim 1, characterized in that: In the S3, Calculation formula for coupling axial force and radial force: Axial force calculation formula: ; Radial force calculation formula: ; Parameter Description: Fx: axial force (N); Fy: radial force (N); Kx: axial stiffness of the coupling, generally provided by the coupling manufacturer; Ky: radial stiffness of the coupling, generally provided by the coupling manufacturer; T: working torque (Ncdotm).

7. The calculation method for ship shafting design according to claim 1, characterized in that: In the aforementioned S4, a non-blank XCEL table already exists. After the calculation is completed, the external integration system uses the VB program to return the calculation results to the corresponding middle column position (i.e., the result display area) in the existing EXCEL table in a predetermined format, ensuring that the results can be accurately and clearly displayed on the interface for easy viewing and analysis by users.

8. The calculation method for ship shafting design according to claim 1, characterized in that: In said S4, if it is a blank EXCEL, the external integration system will run the relevant data of the initial data package using VB, generate the stored interface layout, font format and form, border and line spacing in the blank EXCEL, and then call VB to display the read data and calculation results in the corresponding middle column position in the EXCEL table.

9. The calculation method for ship shafting design according to claim 1, characterized in that: In S4, the program code that needs to be output in VB to write the calculation results back to EXCEL is: For i = LBound(inputData, 1) To UBound(inputData, 1) Debug.Print "Data " & i & ": " & inputData(i, 1) Next i ' You can add calculation logic here and write the results back to the corresponding location in EXCEL End Sub.

10. The calculation method for ship shafting design according to claim 1, characterized in that: In S2, the program code for VB to read data is: Sub ReadDataFromExcel() Dim ws As Worksheet Dim inputRange As Range Dim cell As Range Dim inputData As Variant Dim i As Integer ' Set up the worksheet object, assuming the data is on a worksheet named "Sheet1" Set ws = ThisWorkbook.Sheets("Sheet1") ' Set the input data range, assuming the blue marked input area is from A1 to A10 Set inputRange = ws.Range("A1:A10") ' Initialize the array to store the read data ReDim inputData(1 To inputRange.Rows.Count, 1 To 1) ' Read input data i = 1 For Each cell In inputRange ' Assume that the data is of numerical type and adjust according to the actual situation If IsNumeric(cell.Value) Then inputData(i, 1) = cell.Value Else ' If it is not a numeric value, it can be stored as a string or other type inputData(i, 1) = cell.Value End If i = i + 1 Next cell.