A fluent-dpm particle post-processing method based on matlab and paraview

CN116629155BActive Publication Date: 2026-09-15ZHEJIANG SCI-TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310596931.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2026-09-15
Estimated Expiration
2043-05-25

AI Technical Summary

Benefits of technology

[0034]The beneficial effects of this invention are as follows: Using the program described above in MATLAB, the DPM particle file calculated by Fluent is converted into a file recognizable by ParaView, enabling ParaView to post-process the DPM particles calculated by Fluent. Compared with existing Fluent DPM particle post-processing methods, the program and method provided in this patent can place the DPM particles calculated by the commercial software Fluent in an open-source environment, making DPM particle post-processing and visualization more convenient and faster, and allowing for more varied data and more complex operations on the original basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116629155B_ABST
    Figure CN116629155B_ABST
Patent Text Reader

Abstract

The application discloses a fluent-DPM particle post-processing method based on MATLAB and paraview, and comprises the following steps: S1, performing calculation on DPM particles by using Fluent software; S2, exporting basic data (particle coordinates, particle velocity, particle diameter and particle ID) of the DPM particles into a file with a suffix ".dpmrpt" format in the Fluent software; and S3, processing the ".dpmrpt" file storing the DPM particle data in MATLAB, and writing the result into a ".vtk" file. The DPM particle file calculated by Fluent is converted into a file recognizable by ParaView, so that the ParaView can post-process the DPM particle calculated by Fluent. Compared with the existing Fluent DPM particle post-processing method, the program and method provided by the application can place the DPM particle calculated by the commercial software Fluent in an open source environment, so that the post-processing and visualization of the DPM particle are more convenient and fast, and more variable data and more complex operations can be obtained on the basis of the original data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of simulation calculation technology in computational fluid dynamics, and more specifically, to a fluent-DPM particle post-processing method based on MATLAB and Paraview. Background Technology

[0002] With the continuous improvement of fluid mechanics theory and the rapid development of high-performance computing technology, computational fluid dynamics (CFD), formed by the combination of the two, has become an important means of solving various engineering problems. In practical engineering applications, situations often arise where the fluid medium contains solid particles. The commercial software Fluent has become one of the mainstream solutions for solving such particulate flow problems. Fluent can calculate the flow of media in hydraulic machinery by solving various fluid mechanics equations, concretely presenting the flow of media inside valves, pumps, etc. After Fluent provides the calculation results, the results need to be processed to obtain the velocity, pressure, streamlines, etc., of the media inside the hydraulic machinery, realizing the visualization of the media flow. This visualization processing is called "post-processing." However, Fluent's own post-processing capabilities are not very robust, often failing to meet user needs, especially when the medium contains particles. Fluent itself cannot perform deep and complex processing of the calculated DPM particles, and even some post-processing software optimized for Fluent is not very friendly to DPM particle processing. Therefore, post-processing of DPM particles calculated by Fluent has become one of the challenges in the simulation field.

[0003] ParaView is a powerful open-source program capable of analyzing and visualizing 2D and 3D data. Its open-source nature and data visualization capabilities make it possible to display DPM granularities computed by Fluent. However, ParaView cannot directly process Fluent DPM granules, and there are no relevant case studies in domestic or international literature.

[0004] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention

[0005] To address the problems in related technologies, this invention proposes a fluent-DPM particle post-processing method based on MATLAB and Paraview, in order to overcome the aforementioned technical problems existing in the current related technologies.

[0006] Therefore, the specific technical solution adopted by the present invention is as follows:

[0007] A fluent-DPM particle post-processing method based on MATLAB and Paraview includes the following steps;

[0008] S1: Calculate DPM particles using Fluent software;

[0009] S2: Export the basic data of DPM particles (particle coordinates, particle velocity, particle diameter, particle ID) from Fluent software as a file with the extension ".dpmrpt".

[0010] S3: In MATLAB, process the ".dpmrpt" file that stores DPM particle data and write the results to the ".vtk" file;

[0011] S4: Open the ".vtk" file in ParaView and perform post-processing on it.

[0012] Preferably, in step S3;

[0013] S31: Use MATLAB to create an ".m" file and store the particle coordinates, particle velocity, particle diameter, and particle ID into a matrix;

[0014] S32: Redefine the matrix storing particle coordinates, particle velocity, particle diameter, and particle ID information using MATLAB;

[0015] S33: Rearrange the matrix using the loop structure in MATLAB;

[0016] S34: Use MATLAB to write the necessary information and labeling information into the ".vtk" file;

[0017] S35: Use MATLAB to create a ".vtk" file and write the rearranged matrix into the ".vtk" file.

[0018] Preferably, the key to step S31 is:

[0019] The ".dpmrpt" file is opened using the command fid=fopen('filename', 'permission'), and the basic particle data (particle coordinates, particle velocity, particle diameter, particle ID) in the ".dpmrpt" file is read using the command lines=textscan(fid, '%f%f%f%f%f%f%f%f%f%[^\n]', 'Headerlines', 17), and then converted into a matrix of "M rows × 1 column".

[0020] Preferably, the key to step S32 is:

[0021] MATLAB is used to redefine the matrix storing basic particle data (particle coordinates, particle velocity, particle diameter, and particle ID). The redefined matrix is ​​only used as an intermediate quantity in the processing and is not used as the final result written to the ".vtk" file. At the same time as redefining, the particle diameter is converted into the particle radius.

[0022] Preferably, the key to step S33 is:

[0023] The matrix storing basic data of the particles is rearranged using a for loop, transforming the "M rows × 1 column" matrix into an "N rows × 9 column" matrix.

[0024] Preferably, the key to step S34 is:

[0025] Using MATLAB, the labeling information that can mark the basic data of particles (particle coordinates, particle velocity, particle diameter, particle ID) is written to the ".vtk" file using the fprintf(fileID, 'format', 'vtkData') command. This allows for more convenient and faster identification, labeling, and differentiation of various particle information in the ParaView post-processing steps. At the same time, the necessary information to constitute the ".vtk" file is also written into the ".vtk" file.

[0026] Preferably, the key to step S35 is:

[0027] The converted matrix is ​​written to the ".vtk" file using the fprintf(fileID, 'format', 'vtkData') command, and placed after the necessary information and labeling information in step S34 to ensure that the particle labeling information and its associated matrix can correspond to each other.

[0028] Preferably, the MATLAB program code used in step S3 is as follows (the content after the double percent signs %% is an interpretation and comment of the code):

[0029]

[0030]

[0031]

[0032]

[0033]

[0034] The beneficial effects of this invention are as follows: Using the program described above in MATLAB, the DPM particle file calculated by Fluent is converted into a file recognizable by ParaView, enabling ParaView to post-process the DPM particles calculated by Fluent. Compared with existing Fluent DPM particle post-processing methods, the program and method provided in this patent can place the DPM particles calculated by the commercial software Fluent in an open-source environment, making DPM particle post-processing and visualization more convenient and faster, and allowing for more varied data and more complex operations on the original basis. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart illustrating a fluent-DPM particle post-processing method based on MATLAB and Paraview according to an embodiment of the present invention.

[0037] Figure 2 This is an operational schematic diagram according to an embodiment of the present invention;

[0038] Figure 3 This is a particle information diagram mentioned in an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram illustrating partial post-processing of DPM particles using ParaView according to an embodiment of the present invention. Detailed Implementation

[0040] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0041] According to an embodiment of the present invention, a fluent-DPM particle post-processing method based on MATLAB and Paraview is provided.

[0042] Example 1;

[0043] like Figure 1-4 As shown, the fluent-DPM particle post-processing method based on MATLAB and Paraview according to an embodiment of the present invention includes the following steps;

[0044] S1: Calculate DPM particles using Fluent software;

[0045] S2: Export the basic data of DPM particles (particle coordinates, particle velocity, particle diameter, particle ID) from Fluent software as a file with the extension ".dpmrpt".

[0046] S3: In MATLAB, process the ".dpmrpt" file that stores DPM particle data and write the results to the ".vtk" file;

[0047] S4: Open the ".vtk" file in ParaView and perform post-processing on it.

[0048] Example 2;

[0049] The DPM particles are calculated using Fluent software; however, the specific method for calculating DPM is not described in this patent.

[0050] In Fluent, under the "Results > Graphics > ParticleTracks" section, follow the instructions... Figure 2 Steps ① to ④ in the diagram should export the basic data of DPM particles (particle coordinates, particle velocity, particle diameter, particle ID) into a file with the extension "particle.dpmrpt" and save it to drive F on your computer; the selection of DPM particle data in step ③ is shown in the attached diagram. Figure 3 As shown in steps ⑤ to ⑦, the data to be selected includes "ParticleXPosition, ParticleYPosition, ParticleZPosition, ParticleXVelocity, ParticleYVelocity, ParticleZVelocity, ParticleDiameter, ParticleID".

[0051] In MATLAB, process the "particle.dpmrpt" file containing DPM particle data and write the results to the "particle.vtk" file, saving it to drive F on your computer. The required MATLAB program is shown below (the content after the double percent signs %% is code explanation and comments):

[0052]

[0053]

[0054]

[0055]

[0056]

[0057] Open the "particle.vtk" file in ParaView and perform post-processing on it. (See attached file.) Figure 4 ParaView allows visualization of particles inside the ball valve, as well as filtering, statistics, and other processing methods.

[0058] In summary, by utilizing the technical solution described above in this invention, the DPM particle file calculated by Fluent is converted into a ParaView-recognizable file using the aforementioned program in MATLAB, enabling ParaView to perform post-processing on the DPM particles calculated by Fluent. Compared to existing Fluent DPM particle post-processing methods, the program and method provided in this patent can place the DPM particles calculated by the commercial software Fluent in an open-source environment, making DPM particle post-processing and visualization more convenient and efficient, and allowing for the acquisition of more varied data and the performance of more complex operations.

[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A fluent-DPM particle post-processing method based on MATLAB and Paraview, characterized in that, Includes the following steps; S1: Calculate DPM particles using Fluent software; S2: Export the basic data of DPM particles from Fluent software to a file with the extension ".dpmrpt". The basic data includes particle coordinates, particle velocity, particle diameter, and particle ID. S3: In MATLAB, process the ".dpmrpt" file that stores DPM particle data and write the results to the ".vtk" file; S4: Open the ".vtk" file in ParaView and perform post-processing on it; In step S3; S31: Use MATLAB to create a ".m" file and store the particle coordinates, particle velocity, particle diameter, and particle ID into a matrix; S32: Using MATLAB, redefine the matrix that stores information about particle coordinates, particle velocity, particle diameter, and particle ID; S33: Rearrange the matrix using the loop structure in MATLAB; S34: Use MATLAB to write the necessary information and labeling information into the ".vtk" file; S35: Use MATLAB to create a ".vtk" file and write the rearranged matrix into the ".vtk" file; The key to step S31 is: The ".dpmrpt" file is opened using the command fid = fopen('filename', 'permission'), and the basic particle data in the ".dpmrpt" file is read using the command lines = textscan(fid, '%f%f%f%f%f%f%f%f%f%[^\n]', 'Headerlines', 17), which is then converted into a matrix of "M rows × 1 column". The key to step S32 is: MATLAB is used to redefine the matrix storing basic particle data. The redefined matrix is ​​only used as an intermediate quantity in the processing, not as the final result written to the ".vtk" file. At the same time as redefining, the particle diameter is converted into the particle radius. The key to step S33 is: The matrix storing basic data of the particles is rearranged using a for loop, transforming the "M rows × 1 column" matrix into an "N rows × 9 column" matrix.

2. The Fluent-DPM particle post-processing method based on MATLAB and Paraview according to claim 1, characterized in that, The key to step S34 is: Using MATLAB, the labeling information that can mark the basic data of particles is written to the ".vtk" file through the fprintf(fileID, 'format', 'vtkData') command. This makes it easier and faster to identify, mark and distinguish various particle information in the ParaView post-processing step. At the same time, the necessary information to form the ".vtk" file is also written into the ".vtk" file.

3. The Fluent-DPM particle post-processing method based on MATLAB and Paraview according to claim 1, characterized in that, The key to step S35 is: The converted matrix is ​​written to the ".vtk" file using the fprintf(fileID, 'format', 'vtkData') command, and placed after the necessary information and labeling information in step S34 to ensure that the particle labeling information and its associated matrix can correspond to each other.

Citation Information

Patent Citations

  • Particle-based fluid simulation method using multiple processors and fluid simulation apparatus

    US20200065442A1

  • KR20210111011A