Design method of threaded tube heat exchanger based on macro command modeling

The design and modeling of threaded tube heat exchangers is carried out through Solidworks macro commands, combined with ANSYS Fluent simulation, which solves the problems of long time-consuming and incompatible files in traditional experiments, and achieves fast and accurate numerical modeling of threaded tube heat exchangers.

CN113139312BActive Publication Date: 2024-10-01SHANGHAI OCEAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110445096.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-24
Publication Date
2024-10-01
Estimated Expiration
2041-04-24

AI Technical Summary

Technical Problem

It is difficult to observe the effect of threaded tubes on refrigerant flow and boiling in traditional experiments. The numerical simulation method is time-consuming and the files and software are incompatible, making the modeling process of threaded tube heat exchangers complex and time-consuming.

Method used

A threaded tube heat exchanger design method based on Solidworks macro commands was used to generate a compatible numerical calculation model through modeling of the inner fluid, outer tube wall and combined division of the tube wall and fluid, and imported it into ANSYS Fluent for simulation preprocessing.

Benefits of technology

Fast and accurate numerical modeling of threaded tube heat exchangers is achieved, which solves the problems of inaccurate and time-consuming modeling and provides an effective numerical calculation solution for threaded tube heat exchangers.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The design method of a spiral tube heat exchanger based on macro command modeling includes the following specific steps: (1) after opening Solidworks, call out the Macro menu in the blank space of the upper menu bar; (2) select New Macro and save it as Macro1.swp; (3) menu bar ‑ tool ‑ reference, check whether the Solidworks related library Library has been correctly referenced, if not, it needs to be added manually; (4) Solidworks macro command modeling of the internal fluid; (5) Solidworks macro command modeling of the outer tube wall; (6) Solidworks combination division of the tube wall and the fluid; (7) pre-processing of importing ANSYS Fluent simulation. The present invention can effectively solve the problem of inaccurate and time-consuming modeling of spiral bellows, and provide a fast and accurate solution for the modeling of numerical calculation of bellows heat exchangers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of heat transfer research of heat exchangers, and in particular to a method for modeling a threaded tube heat exchanger for numerical calculation, and in particular to a design method for a threaded tube heat exchanger based on Solidworks macro command modeling. Background Art

[0002] Threaded tubes are very representative and have a significant effect on heat transfer enhancement among enhanced tubes. However, due to the complexity and high cost of pipeline processing, it is difficult to observe the influence of the structure on the flow and boiling of the refrigerant in the tube through traditional experiments. Therefore, it is necessary to simulate the heat transfer process of the threaded tube heat exchanger through a CFD numerical simulation method to solve the problems of traditional empirical formulas and experiments, which are limited and not intuitive enough to present the problem. It can also solve the problems of traditional experiments that are time-consuming and costly. In the process of advancing the numerical simulation method, it is necessary to first model the threaded tube heat exchanger. However, due to the complexity of the modeling object, the modeling process is time-consuming, and the incompatibility of the modeled files with the numerical calculation software makes it difficult to perform numerical calculations. Summary of the invention

[0003] The purpose of the present invention is to provide a design method for a threaded tube heat exchanger based on Solidworks macro command modeling, and to provide a model for numerical simulation of the threaded tube heat exchanger.

[0004] To achieve the above-mentioned purpose, an embodiment of the present invention provides a threaded tube heat exchanger design method based on Solidworks macro command modeling, comprising: (1) after opening Solidworks, calling up the Macro menu in the blank space of the upper menu bar; (2) selecting New Macro and saving it as Macro1.swp; (3) menu bar-tool-reference, checking whether the Solidworks related library Library has been correctly referenced, if not, it needs to be added manually; (4) Solidworks macro command modeling of the internal fluid; (5) Solidworks macro command modeling of the outer tube wall; (6) Solidworks combination division of the tube wall and the fluid; (7) preprocessing for importing ANSYS Fluent simulation.

[0005] The steps of Solidworks macro command modeling of the internal fluid are as follows:

[0006] 1) Delete the original code;

[0007] 2) Write new macro code:

[0008] Dim swApp As Object

[0009] Dim Part As Object

[0010] Dim boolstatus As Boolean

[0011] Dim longstatus As Long, longwarnings As Long

[0012] Sub main()

[0013] Set swApp = Application.SldWorks

[0014] End Sub ;

[0015] 3) All new macro command codes are written in the Main() function;

[0016] 4) Create a new part: Write the following code in the Main() function:

[0017] Dim swSheetWidth As Double

[0018] swSheetWidth = 0

[0019] Dim swSheetHeight As Double

[0020] swSheetHeight = 0

[0021] Set Part = swApp.NewDocument("C:\ProgramData\SolidWorks\

[0022] SOLIDWORKS 2020\templates\gb_part.prtdot", 0, swSheetWidth,swSheetHeight)

[0023] Dim swPart As PartDoc

[0024] Set swPart = Part

[0025] swApp.ActivateDoc2 "Part 1", False, longstatus

[0026] Set Part = swApp.ActiveDoc

[0027] Dim myModelView As Object

[0028] Set myModelView = Part.ActiveView

[0029] myModelView.FrameState = swWindowState_e.swWindowMaximized;

[0030] 5) Draw the reference circle;

[0031] 6) Draw a spiral line;

[0032] 7) Draw a reference rectangle;

[0033] 8) Draw a reference ellipse;

[0034] 9) Draw the fluid flow area;

[0035] 10) Scan and remove threads along the helical line;

[0036] 11) Save the internal fluid file.

[0037] The steps of Solidworks macro modeling of the outer pipe wall are as follows:

[0038] 1) Draw a reference circle;

[0039] 2) Draw a spiral line;

[0040] 3) Draw a reference rectangle;

[0041] 4) Draw a reference ellipse;

[0042] 5) Draw the pipe body;

[0043] 6) Scan and remove threads along the helical line

[0044] 7) Save the outer tube wall file.

[0045] The steps of combining and dividing the pipe wall and the fluid in Solidworks are as follows:

[0046] 1) Open the saved outer tube wall modeling file and look directly at the front view reference plane;

[0047] 2) Select Insert-Part in the menu and select the saved internal fluid file;

[0048] 3) Align the parts to the center of the circle;

[0049] 4) Select two bottom surfaces as the matching setting entities, check to confirm, and the part insertion is completed;

[0050] 5) Menu-Insert-Feature-Combine;

[0051] 6) Select Delete as the operation type, select the entity after scanning and deleting, and check to confirm;

[0052] 7) Save as a threaded pipe file and the threaded pipe modeling is completed.

[0053] The present invention can effectively solve the problem that the modeling of spiral bellows is not accurate and time-consuming, and provides a fast and accurate solution for the modeling of numerical calculation of bellows heat exchangers. DETAILED DESCRIPTION

[0054] The implementation manner of the present invention is described in detail by taking a specific embodiment as an example.

[0055] Example 1

[0056] 1.Solidworks macro modeling

[0057] 1.1 Basic configuration of Solidworks macro

[0058] After opening Solidworks, call up the Macro menu in the blank space of the upper menu bar. After completion, five new buttons will appear in the upper left corner, which are used to run macros, stop macros, record / pause macros, create new macros, and edit macros. Select New Macro and save it as Macro1.swp (swp format is the common format of Solidworks embedded programming environment VBA (Visual Basic for Application)). In the upper menu bar-Tools-References, check whether the Solidworks related library (Library) has been correctly referenced. If not, you need to add it manually.

[0059] 1.2 Solidworks macro command modeling of internal fluid

[0060] Delete the original code and rewrite it into the following form:

[0061] Dim swApp As Object

[0062] Dim Part As Object

[0063] Dim boolstatus As Boolean

[0064] Dim longstatus As Long, longwarnings As Long

[0065] Sub main()

[0066] Set swApp = Application.SldWorks

[0067] End Sub

[0068] The following macro command codes are all written in the Main() function, and the Main() function uses End Sub as the ending statement.

[0069] Create a new part: Since the part has been created before, this step can be skipped. If the part has not been created yet, write the following code in the Main() function:

[0070] Dim swSheetWidth As Double

[0071] swSheetWidth = 0

[0072] Dim swSheetHeight As Double

[0073] swSheetHeight = 0

[0074] Set Part = swApp.NewDocument("C:\ProgramData\SolidWorks\

[0075] SOLIDWORKS 2020\templates\gb_part.prtdot", 0, swSheetWidth,swSheetHeight)

[0076] Dim swPart As PartDoc

[0077] Set swPart = Part

[0078] swApp.ActivateDoc2 "Part 1", False, longstatus

[0079] Set Part = swApp.ActiveDoc

[0080] Dim myModelView As Object

[0081] Set myModelView = Part.ActiveView

[0082] myModelView.FrameState = swWindowState_e.swWindowMaximized

[0083] Next, if each program is executed in sections, you need to add the following before each section:

[0084] Set Part = swApp.ActiveDoc to activate the module for command execution; if all program segments are executed continuously, just add: Set Part = swApp.ActiveDoc before the first program segment.

[0085] 1.2.1 Program for drawing a reference circle

[0086] Set Part = swApp.ActiveDoc

[0087] boolstatus = Part.Extension.SelectByID2("Front View Plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0088] Part.SketchManager.InsertSketch True

[0089] Part.ClearSelection2 True

[0090] Dim skSegment As Object

[0091] 'Core statement: Function parameters: center x coordinate, y coordinate, z coordinate, radius (unit: m), radius stretching direction x coordinate, y coordinate

[0092] Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.011, 0,0#)

[0093] Part.ClearSelection2 True

[0094] Part.SketchManager.InsertSketch True

[0095] To rename the base circle:

[0096] boolstatus = Part.Extension.SelectByID2("Sketch 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0097] Part.ClearSelection2 True

[0098] boolstatus = Part.Extension.SelectByID2("Sketch 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0099] boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1,0, "Base Circle 1")

[0100] 1.2.2 Drawing a spiral

[0101] 'Core statement: Function parameters: reverse, clockwise, taper, taper outer length, 0 (definition method, range 0~3), height (unit: m), pitch, number of turns, taper angle, starting angle (note: 3.1415926=180°)

[0102] Part.InsertHelix False, True, False, True, 0, 2, 0.025, 80, 0,6.2831853071796

[0103] Restore the view, normal to the top plane:

[0104] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0105] 1.2.3 Drawing the reference rectangle

[0106] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0107] Part.SketchManager.InsertSketch True

[0108] Part.ClearSelection2 True

[0109] boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e

[0110] .swSketchAddConstToRectEntity,swUserPreferenceOption_e

[0111] .swDetailingNoOptionSpecified, False)

[0112] boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e

[0113] .swSketchAddConstLineDiagonalType,swUserPreferenceOption_e

[0114] .swDetailingNoOptionSpecified, True)

[0115] Dim vSkLines As Variant

[0116] 'Core statement: starting point x coordinate, y coordinate, z coordinate, end point x coordinate, y coordinate, z coordinate (note,

[0117] -2#=2000mm)

[0118] vSkLines = Part.SketchManager.CreateCornerRectangle(0.011, 0, 0, -0.011, -2#, 0)

[0119] Part.ClearSelection2 True

[0120] Part.SketchManager.InsertSketch True

[0121] 1.2.4 Drawing a reference ellipse

[0122] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0123] Part.SketchManager.InsertSketch True

[0124] Part.ClearSelection2 True

[0125] 'Core statement: ellipse center x coordinate, y coordinate, z coordinate, major axis endpoint x coordinate, y coordinate, z coordinate, minor axis endpoint x coordinate, y coordinate, z coordinate

[0126] Set skSegment = Part.SketchManager.CreateEllipse(0.011, 0, 0, 0.011,0.0022, 0, 0.0121, 0, 0.0011)

[0127] Part.ClearSelection2 True

[0128] Part.SketchManager.InsertSketch True

[0129] 1.2.5 Drawing the Fluid Flow Area

[0130] boolstatus = Part.Extension.SelectByID2("Basic Circle 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0131] Dim myFeature As Object

[0132] 'Core statement: The sixth item is the stretching length (2=2000mm)

[0133] Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False,False, 0, 0, 2, 0.01, False, False, False, False, 0, 0, False, False, False,False, True, True, True, 0, 0, False)

[0134] Rename the base ellipse:

[0135] boolstatus = Part.Extension.SelectByID2("Sketch 3", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0136] Part.ClearSelection2 True

[0137] boolstatus = Part.Extension.SelectByID2("Sketch 3", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0138] boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1,0, "Base Ellipse 1")

[0139] 1.2.6 Thread removal by scanning along the helical line

[0140] boolstatus = Part.Extension.SelectByID2("Base Ellipse 1", "SKETCH", 0, 0,0, True, 0, Nothing, 0)

[0141] boolstatus = Part.Extension.SelectByID2("Spiral / Vortex 1", "REFERENCECURVES", 0, 0, 0, True, 0, Nothing, 0)

[0142] Part.ClearSelection2 True

[0143] boolstatus = Part.Extension.SelectByID2("Base Ellipse 1", "SKETCH", 0, 0,0, False, 1, Nothing, 0)

[0144] boolstatus = Part.Extension.SelectByID2("Spiral / Vortex 1", "REFERENCECURVES", 0, 0, 0, True, 4, Nothing, 0)

[0145] Dim swFeat As Object

[0146] Dim swFeatMgr As Object

[0147] Set swFeatMgr = Part.FeatureManager

[0148] Dim swFeatData As Object

[0149] Set swFeatData = swFeatMgr.CreateDefinition(swFeatureNameID_e.swFmSweepCut)

[0150] swFeatData.AdvancedSmoothing = False

[0151] swFeatData.AlignWithEndFaces = 1

[0152] swFeatData.AssemblyFeatureScope = True

[0153] swFeatData.AutoSelect = True

[0154] swFeatData.AutoSelectComponents = True

[0155] swFeatData.D1ReverseTwistDir = False

[0156] swFeatData.Direction = -1

[0157] swFeatData.EndTangencyType = 0

[0158] swFeatData.FeatureScope = True

[0159] swFeatData.MaintainTangency = False

[0160] swFeatData.MergeSmoothFaces = True

[0161] swFeatData.PathAlignmentType = 10

[0162] swFeatData.PropagateFeatureToParts = False

[0163] swFeatData.StartTangencyType = 0

[0164] swFeatData.ThinFeature = False

[0165] swFeatData.ThinWallType = 0

[0166] swFeatData.TwistControlType = 0

[0167] swFeatData.SetTwistAngle 0

[0168] swFeatData.SetWallThickness True, 0

[0169] Set swFeat = swFeatMgr.CreateFeature(swFeatData)

[0170] End Sub

[0171] End the program, save as - change the name: fluid.SLDPRT.

[0172] 1.3 Solidworks macro modeling of the outer pipe wall

[0173] The operation steps for the outer tube wall are the same as those for the inner fluid, and only the characteristic parameters need to be modified.

[0174] 1.3.1 Drawing a reference circle

[0175]

Parameter replacement

[0176] Set Part = swApp.ActiveDoc

[0177] boolstatus = Part.Extension.SelectByID2("Front View Plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0178] Part.SketchManager.InsertSketch True

[0179] Part.ClearSelection2 True

[0180] Dim skSegment As Object

[0181] 'Core statement: Function parameters: center x coordinate, y coordinate, z coordinate, radius (unit: m), radius stretching direction x coordinate, y coordinate

[0182] Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.0125,0, 0#)

[0183] Part.ClearSelection2 True

[0184] Part.SketchManager.InsertSketch True

[0185] To rename the base circle:

[0186] boolstatus = Part.Extension.SelectByID2("Sketch 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0187] Part.ClearSelection2 True

[0188] boolstatus = Part.Extension.SelectByID2("Sketch 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0189] boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1,0, "Base Circle 1")

[0190] 1.3.2 Drawing a spiral

[0191]

Parameter replacement

[0192] 'Core statement: Function parameters: reverse, clockwise, taper, taper outer length, 0 (definition method, range 0~3), height (unit: m), pitch, number of turns, taper angle, starting angle (note: 3.1415926=180°)

[0193] Part.InsertHelix False, True, False, True, 0, 2, 0.025, 80, 0,6.2831853071796

[0194] Restore the view, normal to the top plane:

[0195] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0196] 1.3.3 Drawing the reference rectangle

[0197]

Parameter replacement

[0198] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0199] Part.SketchManager.InsertSketch True

[0200] Part.ClearSelection2 True

[0201] boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e

[0202] .swSketchAddConstToRectEntity,swUserPreferenceOption_e

[0203] .swDetailingNoOptionSpecified, False)

[0204] boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e

[0205] .swSketchAddConstLineDiagonalType,swUserPreferenceOption_e

[0206] .swDetailingNoOptionSpecified, True)

[0207] Dim vSkLines As Variant

[0208] 'Core statement: starting point x coordinate, y coordinate, z coordinate, end point x coordinate, y coordinate, z coordinate (note,

[0209] -2#=2000mm)

[0210] vSkLines = Part.SketchManager.CreateCornerRectangle(0.0125, 0, 0, -0.0125, -2#, 0)

[0211] Part.ClearSelection2 True

[0212] Part.SketchManager.InsertSketch True

[0213] 1.3.4 Drawing a reference ellipse

[0214]

Parameter replacement

[0215] boolstatus = Part.Extension.SelectByID2("Top plane", "PLANE", 0, 0,0, False, 0, Nothing, 0)

[0216] Part.SketchManager.InsertSketch True

[0217] Part.ClearSelection2 True

[0218] 'Core statement: ellipse center x coordinate, y coordinate, z coordinate, major axis endpoint x coordinate, y coordinate, z coordinate, minor axis endpoint x coordinate, y coordinate, z coordinate

[0219] Set skSegment = Part.SketchManager.CreateEllipse(0.0125, 0, 0,0.0125, 0.0022, 0, 0.0121, 0, 0.00125)

[0220] Part.ClearSelection2 True

[0221] Part.SketchManager.InsertSketch True

[0222] 1.3.5 Draw the pipe body

[0223] boolstatus = Part.Extension.SelectByID2("Basic Circle 1", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0224] Dim myFeature As Object

[0225] 'Core statement: The sixth item is the stretching length (2=2000mm)

[0226] Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False,False, 0, 0, 2, 0.01, False, False, False, False, 0, 0, False, False, False,False, True, True, True, 0, 0, False)

[0227] Rename the base ellipse:

[0228] boolstatus = Part.Extension.SelectByID2("Sketch 3", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0229] Part.ClearSelection2 True

[0230] boolstatus = Part.Extension.SelectByID2("Sketch 3", "SKETCH", 0, 0, 0,False, 0, Nothing, 0)

[0231] boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1,0, "Base Ellipse 1")

[0232] 1.3.6 Thread removal by scanning along the helical line

[0233] boolstatus = Part.Extension.SelectByID2("Base Ellipse 1", "SKETCH", 0, 0,0, True, 0, Nothing, 0)

[0234] bool status = Part.Extension.SelectByID2("Helix / Spiral1", "REFERENCECURVES", 0, 0, 0, True, 0, Nothing, 0)

[0235] Part.ClearSelection2 True

[0236] bool status = Part.Extension.SelectByID2("Datum Ellipse1", "SKETCH", 0, 0, 0, False, 1, Nothing, 0)

[0237] bool status = Part.Extension.SelectByID2("Helix / Spiral1", "REFERENCECURVES", 0, 0, 0, True, 4, Nothing, 0)

[0238] Dim swFeat As Object

[0239] Dim swFeatMgr As Object

[0240] Set swFeatMgr = Part.FeatureManager

[0241] Dim swFeatData As Object

[0242] Set swFeatData = swFeatMgr.CreateDefinition(swFeatureNameID_e.swFmSweepCut)

[0243] swFeatData.AdvancedSmoothing = False

[0244] swFeatData.AlignWithEndFaces = 1

[0245] swFeatData.AssemblyFeatureScope = True

[0246] swFeatData.AutoSelect = True

[0247] swFeatData.AutoSelectComponents = True

[0248] swFeatData.D1ReverseTwistDir = False

[0249] swFeatData.Direction = -1

[0250] swFeatData.EndTangencyType = 0

[0251] swFeatData.FeatureScope = True

[0252] swFeatData.MaintainTangency = False

[0253] swFeatData.MergeSmoothFaces = True

[0254] swFeatData.PathAlignmentType = 10

[0255] swFeatData.PropagateFeatureToParts = False

[0256] swFeatData.StartTangencyType = 0

[0257] swFeatData.ThinFeature = False

[0258] swFeatData.ThinWallType = 0

[0259] swFeatData.TwistControlType = 0

[0260] swFeatData.SetTwistAngle 0

[0261] swFeatData.SetWallThickness True, 0

[0262] Set swFeat = swFeatMgr.CreateFeature(swFeatData)

[0263] End Sub

[0264] End the program and save as - modify the name: solid.SLDPRT.

[0265] 2. Combination and division of pipe wall and fluid in Solidworks

[0266] 1) Open the saved solid.SLDPRT file and look at the front reference plane. Select Insert-Part in the menu and select the saved fluid.SLDPRT. 2) Align the part to the center of the circle. 3) Select the two bottom surfaces as the matching setting entities respectively, check to confirm, and the part insertion is completed. 4) Top menu-Insert-Feature-Combination. 5) Select the operation type to delete, and select the entity after scanning and cutting, and check to confirm. 6) Save as Solid_tube.SLDPRT, and the threaded tube modeling is completed.

[0267] 3. Preprocessing for importing ANSYS Fluent simulation

[0268] Import into Fluent for simulation and solution. Fluid-solid coupling requires both the threaded pipe and the fluid to be entities. .SLDPRT is not a universal model format for ANSYS, so the model needs to be further preprocessed.

[0269] 1) Look at the front view again and insert the part. 2) Select the bottom surface as the matching entity. 3) Save it in Parasolid (.x_t, .x_b) format, which can be converted into the common model format of ANSYS.

[0270] The present invention can effectively solve the problem that the modeling of spiral bellows is not accurate and time-consuming, and provides a fast and accurate solution for the modeling of numerical calculation of bellows heat exchangers.

[0271] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. Design method of threaded tube heat exchanger based on macro command modeling, It is characterized in that The following steps are involved: (1) After opening Solidworks, call out the Macro menu in the blank space on the upper menu bar; (2) Select Create Macro and save it as Macro1.swp; (3) Menu bar - Tools - References, check whether the Solidworks related library has been correctly referenced. If not, you need to add it manually; (4) Solidworks macro command modeling of internal fluid; (5) Solidworks macro command modeling of the outer pipe wall; (6) Solidworks combination division of pipe wall and fluid; (7) Preprocessing for importing ANSYS Fluent simulation; The steps of Solidworks macro modeling of the internal fluid are as follows: ①Delete the original code; ②Write new macro command code: Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Sub main() Set swApp = Application.SldWorks End Sub ; ③All new macro command codes are written in the Main() function; ④Create a new part: Write the following code in the Main() function: Dim swSheetWidth As Double swSheetWidth = 0 Dim swSheetHeight As Double swSheetHeight = 0 Set Part = swApp.NewDocument("C:\ProgramData\SolidWorks\ SOLIDWORKS 2020\templates\gb_part.prtdot", 0, swSheetWidth,swSheetHeight) Dim swPart As PartDoc Set swPart = Part swApp.ActivateDoc2 "Part 1", False, longstatus Set Part = swApp.ActiveDoc Dim myModelView As Object Set myModelView = Part.ActiveView myModelView.FrameState = swWindowState_e.swWindowMaximized; ⑤Draw the reference circle; ⑥Draw a spiral line; ⑦Draw a reference rectangle; ⑧Draw a reference ellipse; ⑨Draw the fluid flow area; ⑩ Scan and remove threads along the helical line; ⑪Save the internal fluid file; The steps of Solidworks macro modeling of the outer pipe wall are as follows: ①Draw a reference circle; ②Draw a spiral line; ③Draw a reference rectangle; ④Draw a reference ellipse; ⑤Draw the pipe body; ⑥ Scan and remove threads along the spiral line; ⑦Save the outer tube wall file; The steps of combining and dividing the pipe wall and the fluid in Solidworks are as follows: ①Open the saved outer tube wall modeling file and look directly at the front view reference plane; ② Select Insert-Part in the menu and select the saved internal fluid file; ③Align the parts to the center of the circle; ④ Select two bottom surfaces as the matching setting entities respectively, check to confirm, and the part insertion is completed; ⑤Menu-Insert-Feature-Combine; ⑥ Select Delete as the operation type, select the entity after scanning and deleting, and check to confirm; ⑦Save as a threaded pipe file, and the threaded pipe modeling is completed; Import Fluent for simulation and solution. Fluid-solid coupling requires both the threaded pipe and the fluid to be entities. .SLDPRT is not a universal model format for ANSYS, and the model needs to be further preprocessed; The steps of preprocessing for importing ANSYS Fluent simulation are as follows: ① Look at the front reference plane again and insert the part; ②Similarly select the respective bottom surfaces as the matching setting entities; ③Save as Parasolid (.x_t, .x_b) format. Parasolid (.x_t, .x_b) format can be converted into ANSYS general model format.

Citation Information

Patent Citations

  • CFD-based spiral corrugated pipe structure optimization design method

    CN112580246A