Construction method of steady-state multi-component transport OpenFOAM solver

By building a steady-state multi-component transport solver based on the rhoSimpleFoam solver and psiReactionThermo class under the OpenFOAM v2406 platform, the problem of not supporting the multi-component transport function in the existing technology is solved, and efficient industrial flow simulation calculation is realized.

CN120046523APending Publication Date: 2025-05-27ZHEJIANG TIANDI ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411966142.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing OpenFOAM solver does not support steady-state multi-component transport function in industrial flow simulation, resulting in too long calculation time and difficult to meet engineering needs.

Method used

Based on the rhoSimpleFoam solver and psiReactionThermo class under the OpenFOAM v2406 platform, a steady-state multi-component transport OpenFOAM solver is built. By defining the multi-component transport equation and variable name, the psiReactionThermo class is called for the solution, and the multi-component transport function is integrated during the compilation process.

Benefits of technology

The OpenFOAM solver, which realizes the steady-state multi-component transport function, significantly reduces the time-consuming calculation of engineering CFD and greatly improves the calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120046523A_ABST
    Figure CN120046523A_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing a steady-state multi-component transport OpenFOAM solver, and belongs to the technical field of solver construction. The method comprises the following steps of: 1, calling a psiReactionThermo class by a rhoSimple Foam solver to create a YEqn.H file related to multi-component transportation, and establishing a YEqn.H file related to multi-component transportation by a YEqn.H file related to multi-component transportation by a YEqn.H file related to multi-component transportation; 2, adding variable names of multi-component transportation in a file for defining and solving the physical quantity field; 3, a rhoSimple Foam solver directory is copied, a psiReactionThermo class is called for a source file before compiling of a solver in the copied directory, and a multi-component transport equation is solved; 4, compiling a new solver under the OpenFOAM platform according to the multi-component transport equation; 5, simulating a calculation case by using a denitration CFD project; and 6, post-processing a calculation result, and checking and analyzing data. According to the method, the new solver is constructed based on the rhoSimpFoam solver and the psiReactionThermo class under the OpenFOAM platform, the function of solving the multi-component transport equation is added, the calculation time consumption of engineering CFD can be effectively reduced, and the calculation efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of solver construction, and particularly relates to a method for constructing a steady-state multi-component transport OpenFOAM solver. Background Art

[0002] Computational Fluid Dynamics has emerged as an interdisciplinary field between mathematics, fluid mechanics, and computer science since the 1950s with the development of computers. Its main research content is to solve the governing equations of fluid mechanics through numerical methods for simulating and analyzing fluid mechanics problems.

[0003] OpenFOAM is a free and open-source CFD software package released under the GNU General Public License. OpenFOAM has extensive capabilities and can solve any problem from complex fluid flows involving chemical reactions, turbulence, and heat transfer to solid dynamics and electromagnetics. The model implementation uses an equation syntax that strictly follows mathematical notation. For the time derivative of a physical quantity it is expressed as fvc::ddt(phi), for the gradient of a physical quantity it is expressed as fvc::grad(phi), for the divergence as fvc::div(phi), for the Laplacian term as fvc::laplacian(phi), and for the linearized source term of a physical quantity as fvc::Sp(s,phi). Complex equations can be concisely written in a human-readable pseudocode form. Explicit operations of finite volume calculus denoted by the fvc:: prefix are used, and implicit terms are similarly represented in the fvm:: form of the finite volume method. Various very complex numerical methods such as SIMPLE, SIMPLEC, and PISO can also be called in pseudocode form, enabling users to focus on the physical and mathematical problems themselves.

[0004] Currently, OpenFOAM mainly has two branches: OpenFOAM v2406 provided by ESIOpenCFD and OpenFOAM v12 provided by the OpenFOAM Foundation.

[0005] Under the OpenFOAM v2406 platform, the pressure-velocity coupling of rhoSimpleFoam adopts the SIMPLE and SIMPLEC formats, which can achieve CFD simulations of steady-state compressible flows. For industrial flows, fast flow simulations can be realized, but currently, the multi-component transport function is not supported. The pressure-velocity coupling of rhoReactingFoam adopts the PISO and SIMPLE formats, which can support flow simulations of chemical reactions including the solution of multi-component transport equations. However, it is a transient solver based on the PIMPLE algorithm (including the PISO and SIMPLE formats). For industrial flow simulations, due to the Courant number requirement, its Δt is often on the order of 10 -5 seconds, resulting in overly high computational time. For engineering requirements, a solver for steady-state multi-component transport flow simulations needs to be developed to achieve fast simulations of multi-component transport. Summary of the Invention

[0006] Aiming at the above problems existing in the prior art, the purpose of the present invention is to provide a method for constructing a steady-state multi-component transport OpenFOAM solver based on the rhoSimpleFoam solver and the psiReactionThermo class under the OpenFOAM v2406 platform.

[0007] The present invention provides the following technical solution: A method for constructing a steady-state multi-component transport OpenFOAM solver, which constructs a steady-state multi-component transport OpenFOAM solver based on the rhoSimpleFoam solver and the psiReactionThermo class under the OpenFOAM V2406 platform, specifically including the following steps:

[0008] S1: The rhoSimpleFoam solver calls the psiReactionThermo class to create the YEqn.H file for multi-component transport, and defines the multi-component transport solution equation;

[0009] S2: Add the variable names of multi-component transport in the file defining the physical quantity fields to be solved;

[0010] S3: Copy the rhoSimpleFoam solver directory, call the psiReactionThermo class for the solver source files before compilation in the copied directory, and solve the multi-component transport equation;

[0011] S4: Compile a new solver under the OpenFOAM platform according to the multi-component transport equation solved in S3;

[0012] S5: Use the denitration CFD engineering simulation calculation case and solve it using the new solver;

[0013] S6: Post-process the calculation results and check and analyze the data.

[0014] Furthermore, the specific process of S1 is as follows:

[0015] S1.1: Define the data interface of the convection term in the multi-component concentration field diffusion equation, and define the pseudo-code of the concentration field solution equation of OpenFOAM according to the multi-component concentration field diffusion equation.

[0016] S1.2: Perform relaxation iteration on the concentration field equation of OpenFOAM.

[0017] S1.3: Call the fvOptions class to constrain the concentration field equation.

[0018] S1.4: Solve the concentration field equation and call the fvOptions class to correct the concentration field equation.

[0019] Furthermore, the specific process of S2 is as follows:

[0020] Add the variable parameters related to multi-component transport referenced from the psiReactionThermo class to the created physical field file of the multi-component concentration field diffusion equation, and store them in the OpenFOAM environment as the parameters of the solver.

[0021] Furthermore, the specific process of S3 is as follows:

[0022] Call the psiReactionThermo class in the source file before solver compilation. After solving the velocity field equation, solve the multi-component concentration field diffusion equation, and finally solve the energy equation; among them, the solution of the multi-component concentration field diffusion equation and the solution of the energy equation depend on the convection term of the velocity field solution. After all physical quantities are discretized and solved, update the thermodynamic physical properties, and then call the SIMPLE and SIMPLEC formats compiled by OpenFOAM to couple the velocity field and the pressure field.

[0023] Furthermore, the specific process of S4 is as follows:

[0024] Under the OpenFOAM environment, use the wmake-all command to compile in the copied file directory. The top-level source file of the compiled OpenFOAM program includes the OpenFOAM program source code and the Make folder. The Make folder includes the specified solver files and the path files of the libraries called by the specified solver.

[0025] Furthermore, the specific process of S5 is as follows:

[0026] Based on the input denitration engineering simulation model, set the flue gas inlet velocity, flue gas temperature, NOX mass fraction, AIG inlet velocity, AIG temperature, NH3 mass fraction in the simulation model, and the corresponding porous medium coefficient of the denitration catalyst layer, and use the solver to solve in the OpenFOAMv2406 environment to generate file data.

[0027] Further, in S6, post-process the generated file data through paraview, give the velocity contour map and the component transport contour map, and check and analyze the results.

[0028] By adopting the above technology, compared with the prior art, the beneficial effects of the present invention are as follows:

[0029] The present invention is a method for constructing an OpenFOAM solver for steady-state multicomponent transport based on the rhoSimpleFoam solver and the psiReactionThermo class under the OpenFOAM platform, which increases the function of solving the multicomponent transport equation; compared with the existing rhoReactingFoam solver, it can effectively reduce the calculation time of engineering CFD and greatly improve the calculation efficiency. Description of the Drawings

[0030] Figure 1 is a schematic flow chart of a method for constructing an openfoam solver based on the rhoSimpleFoam solver provided by the present invention;

[0031] Figure 2 is a schematic diagram of the denitration engineering CFD simulation model used in the embodiment of the present invention;

[0032] Figure 3 is a schematic diagram of the velocity field distribution of the longitudinal section in the embodiment of the present invention;

[0033] Figure 4 is a schematic diagram of the NH3 concentration field distribution of the longitudinal section in the embodiment of the present invention;

[0034] Figure 5 is a schematic diagram of the NOx concentration field distribution of the longitudinal section in the embodiment of the present invention. Detailed Embodiments

[0035] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings of the specification and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0036] In contrast, the present invention encompasses any alternatives, modifications, equivalent methods, and schemes made to the essence and scope of the invention as defined by the claims. Further, in order to enable the public to better understand the present invention, in the following detailed description of the present invention, some specific details are described in detail. Those skilled in the art can fully understand the present invention without the description of these details.

[0037] Example:

[0038] A method for constructing an OpenFOAM solver for steady-state multicomponent transport based on the rhoSimpleFoam solver and the psiReactionThermo class under the OpenFOAM v2406 platform, comprising the following steps:

[0039] S1: Write the YEqn.H file for the definition and solution of the multicomponent transport equation according to the called psiReactionThermo class; specifically as follows:

[0040] The steady-state multicomponent transport is described by the following equation:

[0041]

[0042] where ρ is the density, is the velocity vector, Y i is the concentration field of the i-th component, R i is the generation term of component i in the chemical reaction, S i is the source term of component i; is the diffusion term of component i.

[0043] Under turbulent flow, the diffusion term of component i adopts the following form:

[0044]

[0045] where ρ is the density, D i,m is the mass diffusion coefficient of component i, μ t is the turbulent viscosity, Sc t is the turbulent Schmidt number.

[0046] In OpenFOAM, the Schmidt numbers of all components are default equal to 1. The corresponding solution of YEqh.H first defines the data interface of the convection term div(phi,Yi_h) in the concentration field diffusion equation, and then for all components, the pseudocode for defining the concentration field solution equation of OpenFOAM according to the multicomponent concentration field diffusion equation:

[0047] Then, the relaxation iteration of the concentration field equation of OpenFOAM is performed using YiEqn.relax(). Next, the constraint of the concentration field equation is carried out by calling fvOptions.constrain(YiEqn) of the fvOptions class. After that, the concentration field equation is solved using YiEqn.solve("Yi"). Finally, the correction of the concentration field equation is performed by calling fvOptions.correct(Yi) of the fvOptions class. All of these are expressed in the form of pseudocode, and the specific algorithm is implemented through the decoding and compilation of the OpenFOAM platform.

[0048] S2: Add variable names related to multicomponent transport in the createFeildsRefs.H file that defines the solution of the physical quantity field; specifically as follows:

[0049] createFieldrefs.H defines the additional physical fields to be solved. rhoSimpleFoam itself defines the field function of thermo.psi(). The variable parameters related to multicomponent transport of the psiReactionThermo class are input into the file createFieldrefs.H and compiled and stored in the OpenFOAM environment as part of the solver parameters.

[0050] S3: Copy the rhoSimpleFoam solver directory and call the psiReactionThermo class and solve the multicomponent transport equation for the rhoSimpleFoam.C file in the copied directory; specifically as follows:

[0051] In the OpenFOAM-v2406 environment, in order not to affect the original rhoSimpleFoam application program, the entire directory corresponding to rhoSimpleFoam is copied to the target directory. The rhoSimpleFoam source program in the copied directory is renamed to rhoSimpleMcFoam.C, where Mc represents Multicomponent transport. The copied directory also includes a Make folder, and the Make folder includes an options file and a files file. Among them, the files file defines the name of the solver set, and the options file specifies the path of the library called by the solver; the operation method on the computer is as follows:

[0052] (1) Copy the file directory of rhoSimpleFoam to the predefined project compilation directory. In the rhoSimpleFoam.C file, change the call to the general thermophysical property class (fluidThermo) to call the thermophysical property class psiReactionThermo that includes multiple components. Solve the concentration field equation YEqn after solving the velocity field equation UEqn, and finally solve the energy field equation EEqn. The pressure-velocity coupling adopts the SIMPLE and SIMPLEC formats;

[0053] Modify the solver name and the default working directory in the make / files file in the copied rhoSimpleFoam folder. Note to add the directory corresponding to the call of the psiReactionThermo class (i.e., the directory where psiReactionThermo.C and psiReactionThermoH are located) in the options file.

[0054] S4: Compile the new solver on the OpenFOAM v2406 platform; specifically as follows:

[0055] In the OpenFOAM-v2406 environment, use the wmake command to compile in the file directory:

[0056] (1) Enter the folder directory in the Linux system terminal and type the wmake-all command to generate the rhoSimpleMcFoam application for calculating steady-state multicomponent transport based on the rhoSimpleFoam application;

[0057] (2) After successful compilation, generate the rhoSimpleMcFoam application for calculating steady-state multicomponent transport corresponding to rhoSimpleMcFoam.C in the copied directory.

[0058] S5: Use the denitration CFD engineering simulation calculation case; as Figure 2 shown, specifically as follows:

[0059] Use the denitration engineering simulation model input through 3dFluentToFoam, with a flue gas inlet velocity of 13.33 m / s, a temperature of 647 K, and a NO X mass fraction of 0.0003465; an AIG inlet velocity of 10.14 m / s, a temperature of 433.15 K, and an NH 3 mass fraction of 0.020923; set the corresponding porous medium coefficients for the denitration catalyst layer. The flat plate engineering application calculation case is solved using the solver in the OpenFOAMv2406 environment to generate file data.

[0060] The specific operations are as follows:

[0061] (1) Transfer the denitration engineering simulation model input through 3dFluentToFoam to the target operating directory;

[0062] (2) Create cyclicAMI pairs at the separated region interfaces to make the mesh interfaces continuous;

[0063] (3) Set the solver and smoother of the solution algorithm in fvSolution under the subdirectory system;

[0064] (4) Set the gradient algorithm, divergence algorithm, etc. in fvSchemes under the subdirectory system;

[0065] (5) In the thermophysicalProperties dictionary under the subdirectory constant, set mixture as reactingMixture, transport as sutherland, thermo as Janaf, set the components as air, NH3, and NOx, and set the sutherland coefficient and Janaf coefficient according to the found data;

[0066] (6) Set the turbulence model in the turbulenceProperties dictionary under the subdirectory constant;

[0067] (7) Set the porosity and limitU of the porous medium in the fvOptions dictionary under the subdirectory constant;

[0068] (8) Set the boundary conditions of the velocity vector U, temperature T, pressure p, the concentrations of components such as air, NH3, and NOx, and various turbulent quantities in the subdirectory 0.

[0069] The specific commands entered in the Linux terminal are: Enter the target operating directory and execute / compile directory / rhoSimpleMcFoam for calculation.

[0070] S6. Execute the paraview command in the target operating directory to open paraview, then read in the saved iteration step calculation results to perform post-processing and check and analyze the results.

[0071] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for constructing a steady-state multi-component transport OpenFOAM solver, characterized in that: The OpenFOAM solver for steady-state multi-component transport is constructed based on the rhoSimpleFoam solver and psiReactionThermo class under the OpenFOAMV2406 platform, which specifically includes the following steps: S1: The rhoSimpleFoam solver calls the psiReactionThermo class to create the YEqn.H file for multi-component transport and define the multi-component transport solution equation; S2: Add the variable name of multi-component transport in the file defining the physical quantity field to be solved; S3: Copy the rhoSimpleFoam solver directory, call the psiReactionThermo class on the solver pre-compilation source file in the copied directory, and solve the multicomponent transport equation; S4: Compile a new solver under the OpenFOAM platform based on the multi-component transport equation solved in S3; S5: Using the denitrification CFD engineering simulation calculation case, the new solver is used for solution calculation; S6: Post-process the calculation results and check and analyze the data.

2. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 1, characterized in that: The specific process of S1 is as follows: S1.

1. Define the data interface of the convection term in the multi-component concentration field diffusion equation, and define the pseudo code of OpenFOAM's concentration field solution equation based on the multi-component concentration field diffusion equation; S1.2, perform relaxation iteration on the concentration field equation of OpenFOAM; S1.3, call the fvOptions class to constrain the concentration field equation; S1.

4. Solve the concentration field equation and call the fvOptions class to correct the concentration field equation.

3. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 2, characterized in that: The specific process of S2 is as follows: In the created physics file that defines the multi-component concentration field diffusion equation, add the variable parameters about multi-component transport referenced from the psiReactionThermo class and store them in the OpenFOAM environment as parameters of the solver.

4. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 3, characterized in that: The specific process of S3 is as follows: The psiReactionThermo class is called in the source file before the solver is compiled. After solving the velocity field equation, the multi-component concentration field diffusion equation is solved, and finally the energy equation is solved. Among them, the solution of the multi-component concentration field diffusion equation and the solution of the energy equation depend on the convection term of the velocity field solution. After all physical quantities are discretized and solved, the thermodynamic properties are updated, and then the SIMPLE and SIMPLEC formats compiled by OpenFOAM are called to couple the velocity field and pressure field.

5. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 4, characterized in that: The specific process of S4 is as follows: In the OpenFOAM environment, use the wmake-all command to compile in the copied file directory. The compiled OpenFOAM program top-level source file includes the OpenFOAM program source code and the Make folder. The Make folder includes the specified solver file and the path file of the library called by the specified solver.

6. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 5, characterized in that: The specific process of S5 is as follows: Based on the input denitrification engineering simulation model, the flue gas inlet velocity, flue gas temperature, NOX mass fraction, AIG inlet velocity, AIG temperature, NH3 mass fraction and the corresponding porous medium coefficient of the denitrification catalyst layer in the simulation model are set, and the solver is used in the OpenFOAMv2406 environment to generate file data.

7. The method for constructing a steady-state multi-component transport OpenFOAM solver according to claim 6, characterized in that: In S6, the generated file data is post-processed by Paraview to provide a velocity cloud map and a component transport cloud map, and to check and analyze the results.