Co-simulation analysis method, device, equipment and medium for polymerization reaction in reactor

By combining CFD simulation and moment-quantity method in a stirred reactor, Fluent and MATLAB are used for embedded collaborative simulation, the complexity and stability of polymerization reaction simulation in the stirred reactor in the prior art are solved, and more accurate and efficient reactor design and optimization are achieved.

CN119442950BActive Publication Date: 2025-05-13SOUTH CHINA UNIV OF TECH +1

Patent Information

Application Number
CN202411456221.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-05-13
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

In the prior art, when simulating the polymerization process in agitated reactors, there are design defects such as uneven fluid mixing, incomplete reactions and low molecular weight of polymers, and the computational fluid mechanics (CFD) simulation does not include the polymerization reaction model, resulting in simulation complexity and stability problems.

Method used

Computational fluid mechanics (CFD) is used to simulate the fluid domain of the stirrer, and combined with the moment-to-quantity method and CFD simulation, embedded collaborative simulation is performed through Fluent and MATLAB to deduce and simplify the chemical equilibrium equation of the polymerization reaction to solve the complex polymerization reaction process.

Benefits of technology

The comprehensive analysis and optimization of the polymerization reaction process in the stirred reactor is achieved, the accuracy and efficiency of reactor design is improved, the limitations of single CFD simulation is overcome, and the stability and accuracy of the simulation process are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442950B_ABST
    Figure CN119442950B_ABST
Patent Text Reader

Abstract

The present invention discloses a collaborative simulation analysis method, device, equipment and medium for polymerization reaction in a reactor, wherein the method comprises: three-dimensional modeling of the reactor; meshing the established three-dimensional model; importing the meshed three-dimensional model into Fluent, determining the basic control equations in the acrylonitrile polymerization reaction process; setting the material properties corresponding to the liquid reactant; determining the boundary conditions and source term data required for numerical calculation; deducing the chemical equilibrium equations of each species according to the acrylonitrile polymerization reaction mechanism, simplifying the chemical equilibrium equations of the species by using the moment method, and solving the moment method ordinary differential equations by using MATLAB software; starting Fluent and MATLAB software for embedded collaborative simulation to solve the polymerization reaction process, and repeatedly iterating the basic control equations and the moment method ordinary differential equations until the relevant parameters converge. The present invention uses Fluent and MATLAB for embedded collaborative simulation to accurately and reliably simulate the complex polymerization reaction in the stirred reactor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a technology for computer numerical simulation-assisted analysis of polymerization reactions in a reactor, and in particular to a collaborative simulation analysis method, device, equipment and medium for polymerization reactions in a reactor. Background Art

[0002] Carbon fiber is a typical representative of new materials catalyzed by polymers. Its raw materials can be divided into polyacrylonitrile-based, asphalt-based and viscose-based. Among them, polyacrylonitrile-based carbon fiber accounts for more than 95% of the market and is an important part of the carbon fiber industry. Polyacrylonitrile (PAN) has good chemical, electrical, mechanical and thermal properties and is inexpensive. It is an acrylonitrile polymer with important commercial value.

[0003] PAN preparation is an important step in achieving high performance and low cost of carbon fiber, and the optimization of its production process is of great significance. At present, the industrial production of PAN mainly uses stirred reactors, but the reaction mechanism, fluid flow and operating conditions of the polymerization reaction system are extremely complex, and some stirred reactors have design defects, such as uneven fluid mixing, incomplete reaction and low molecular weight of polymer.

[0004] Studying the design defects of stirred reactors through physical experiments has disadvantages such as high cost and difficulty in obtaining data. Computational fluid dynamics (CFD) has the advantages of low cost and visualization of mixing and reaction processes, and is reliable and predictable in the field of structural design optimization of polymerization reactors. At present, CFD simulation is mostly used to simulate the fluid dynamics behavior of reactors, and the simulation of polymerization dynamics is relatively small, mainly because it does not include a model for solving complex polymerization dynamics, and polymerization reaction modeling requires the definition of a large number of kinetic-related reaction source terms, and the high coupling of the various component equations easily leads to convergence problems.

[0005] In addition, the patents applied for collaborative simulation methods include: a parallel collaborative simulation method of temperature field of high and low temperature test chamber based on Simulink and Fluent with application number CN202311280271.2; a software coupling method and system for CAE full-link structural analysis with application number CN202310778616.0; a PCB design optimization method based on electrothermal collaborative simulation with application number CN202311663002.4; and a joint simulation method and system of nuclear power secondary circuit fluid system and power system with application number CN202311412587.2. However, the current technical solutions in this area do not have collaborative simulation methods for stirred reactors. Summary of the invention

[0006] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the object of the present invention is to provide a collaborative simulation analysis method, device, equipment and medium for polymerization reaction in a reactor.

[0007] The first technical solution adopted by the present invention is:

[0008] A collaborative simulation analysis method for polymerization reaction in a reactor, using computational fluid dynamics (CFD) to simulate the agitator fluid domain, and combining the moment method with CFD simulation during the reaction process, the method includes the following steps:

[0009] Conduct 3D modeling of the reactor;

[0010] Fluent Meshing software was used to mesh the established three-dimensional model;

[0011] The meshed 3D model was imported into Fluent to determine the basic control equations in the acrylonitrile polymerization process;

[0012] Setting material properties corresponding to the liquid reactant, wherein the material properties include density, viscosity, specific heat, molecular weight, and mass diffusion coefficient;

[0013] Determine the boundary conditions and source data required for numerical calculations;

[0014] The chemical equilibrium equations of various species were derived according to the polymerization mechanism of acrylonitrile, the moment method was used to simplify the chemical equilibrium equations of the species, and the moment method ordinary differential equations were solved by MATLAB software;

[0015] Fluent and MATLAB software were started to perform embedded collaborative simulation to solve the polymerization reaction process, and the basic control equations and the moment method ordinary differential equations were repeatedly iterated until the relevant parameters converged.

[0016] Further, the reactor is a stirred reactor, wherein the stirrer comprises stirring blades and a hollow rotating shaft, and the fluid region is divided into a rotating domain and a stationary domain;

[0017] In meshing the three-dimensional model, the interface meshes of the rotating domain and the stationary domain share topology, and the multiple reference frame method (MRF) is used to simulate the motion of the fluid in the rotating domain.

[0018] Further, the basic control equations include the continuity equation (mass conservation equation), the momentum conservation equation, the energy conservation equation and the component conservation equation;

[0019] The continuity equation is expressed as:

[0020]

[0021] Where ρ is the fluid density, t is the time, is the local velocity at any point in the flow field;

[0022] The momentum conservation equation is expressed as:

[0023]

[0024] Where P is the static pressure, is the stress tensor, is the gravitational volume force;

[0025] The energy conservation equation is expressed as:

[0026]

[0027] Where K is thermal conductivity, h i are the diffusion flux and enthalpy of component i, S h is the source term;

[0028] The component conservation equation is expressed as:

[0029]

[0030] In the formula, c i , D i are the concentration and diffusion coefficient of component i, S i is the source item.

[0031] Furthermore, the step of determining the boundary conditions and source term data required for the numerical calculation includes:

[0032] Define the boundary conditions of agitator speed, inlet, and temperature, where the inlet velocity, inlet initiator mass fraction, and reaction heat source are set as user-defined functions and compiled into Fluent through the custom function source program.

[0033] Furthermore, the acrylonitrile polymerization reaction mechanism includes chain initiation reaction, chain growth reaction, disproportionation chain termination reaction and coupling chain termination reaction, and the corresponding chemical equation is expressed as follows:

[0034]

[0035] Where APS, P0, AN, P · and P are initiator ammonium persulfate, primary free radical, acrylonitrile monomer, active polyacrylonitrile free radical and dead polyacrylonitrile polymer respectively; x, y represent different polymer chain lengths, f, k d , k p , k td , k tcThey are initiation efficiency, initiator decomposition rate constant, monomer diffusion rate constant, disproportionation termination rate constant and coupling termination rate constant;

[0036] The equilibrium equation corresponding to the reaction mechanism is:

[0037]

[0038] In the formula, t is time, k is t is the total chain termination rate;

[0039] The moment method represents the simplification of the chemical equilibrium equation into a set of ordinary differential equations by replacing moments, and the moments are expressed as:

[0040]

[0041] Where Y i , Q i are the active polyacrylonitrile free radical matrix and the dead polyacrylonitrile polymer matrix, respectively, x is the polymer chain length, and P x are active polyacrylonitrile free radicals and dead polyacrylonitrile polymers with chain length x, respectively, and i is the order of the matrix, including 0th order, 1st order, and 2nd order;

[0042] The concentration, number average molecular weight, weight average molecular weight and polydispersity index parameters of the polyacrylonitrile product were calculated by the moments of active polyacrylonitrile free radicals and dead polyacrylonitrile polymers.

[0043] Furthermore, the ordinary differential equation system simplified by the moment method is expressed as:

[0044]

[0045] Where Y0, Y1, and Y2 are the 0th, 1st, and 2nd order matrices of active polyacrylonitrile free radicals, Q0, Q1, and Q2 are the 0th, 1st, and 2nd order matrices of dead polyacrylonitrile polymers, APS and AN are initiators of ammonium persulfate and acrylonitrile monomers, respectively. d , k p , k td , k tc , k t They are initiation efficiency, initiator decomposition rate constant, monomer diffusion rate constant, disproportionation termination rate constant, coupling termination rate constant and total chain termination rate.

[0046] Furthermore, the post-processing of the moment method ordinary differential equation system includes:

[0047]

[0048]

[0049] Among them, M n 、M w 、M AN , PDI are PAN number average molecular weight, PAN weight average molecular weight, AN monomer molecular weight and polydispersity index, respectively; Y0, Y1, Y2 are the 0th, 1st and 2nd order matrices of active polyacrylonitrile free radicals, respectively; Q0, Q1, Q2 are the 0th, 1st and 2nd order matrices of dead polyacrylonitrile polymers, respectively.

[0050] Furthermore, the polydispersity index (PDI) is an important parameter that describes the uniformity of the molecular weight distribution of a polymer. Its value is always greater than 1. The smaller the value, the more uniform the molecular weight distribution. Conversely, the more non-uniform the molecular weight distribution.

[0051] Furthermore, the basic control equations and the moment method ordinary differential equations are repeatedly iterated until relevant parameters converge, including:

[0052] The finite volume method is used to discretize the basic control equations established in the calculation area and obtain the simulation results;

[0053] If the simulation results do not match the experimental results, go back and reset the material properties corresponding to the liquid reactants and determine the boundary conditions and source term data required for numerical calculations before performing the simulation again.

[0054] Further, the starting of Fluent and MATLAB software to perform embedded collaborative simulation to solve the polymerization reaction process includes:

[0055] The user-defined function encapsulates the built-in ordinary differential equation solver of MATLAB. After the source program is written, it is compiled in C language through Visual Studio software, and the generated dynamic link library files in the formats of .dll, .h and .lib are copied to the example directory, that is, the Fluent user-defined function is embedded;

[0056] After the source code of the Fluent user-defined function is written, the Visual Studio compilation platform is built to compile it in C language, and the generated dynamic link library file in the .dll format is loaded into the Fluent user-defined module;

[0057] Set the time step of Fluent solver and MATLAB ordinary differential equation solver to be consistent. The Fluent user-defined function source program calls the MATLAB ordinary differential equation solver and performs data acquisition, calculation and assignment once in each time step.

[0058] The second technical solution adopted by the present invention is:

[0059] A collaborative simulation analysis device for polymerization reaction in a reactor, comprising:

[0060] A three-dimensional modeling module, used for three-dimensional modeling of the reactor;

[0061] Meshing module, used to mesh the established three-dimensional model using Fluent Meshing software;

[0062] Model import module, used to import the meshed 3D model into Fluent to determine the basic control equations in the acrylonitrile polymerization process;

[0063] A property setting module, used to set the material properties corresponding to the liquid reactant, wherein the material properties include density, viscosity, specific heat, molecular weight and mass diffusion coefficient;

[0064] Condition setting module, which determines the boundary conditions and source data required for numerical calculation;

[0065] The equation simplification module is used to derive the chemical equilibrium equations of various species according to the acrylonitrile polymerization reaction mechanism, simplify the chemical equilibrium equations of the species using the moment method, and solve the moment method ordinary differential equations through MATLAB software;

[0066] The co-simulation module is used to start the Fluent and MATLAB software to perform embedded co-simulation to solve the polymerization reaction process, and repeatedly iterate the basic control equations and the moment method ordinary differential equations until the relevant parameters converge.

[0067] The third technical solution adopted by the present invention is:

[0068] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the collaborative simulation analysis method of a polymerization reaction in a reactor as described above.

[0069] The fourth technical solution adopted by the present invention is:

[0070] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, wherein the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the collaborative simulation analysis method of a polymerization reaction in a reactor as described above.

[0071] The fifth technical solution adopted by the present invention is:

[0072] A computer program product or a computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.

[0073] The beneficial effects of the present invention include:

[0074] (1) The present invention comprehensively analyzes and solves the acrylonitrile polymerization reaction process in a stirred reactor based on CFD simulation, which can effectively reduce the cost of reactor structure design and optimization. The present invention overcomes the difficulty that CFD simulation itself does not include a polymerization reaction model, and uses Fluent and MATLAB for embedded collaborative simulation to accurately and reliably simulate complex polymerization reactions in a stirred reactor.

[0075] (2) The present invention takes into account the influence of highly coupled reaction source terms on numerical stability, and embeds the built-in ordinary differential equation solver of MATLAB into the user-defined function of Fluent to solve the complex polymerization reaction process, thereby avoiding the limitation of a single CFD simulation polymerization reaction and improving the stability and accuracy of the reaction simulation process. The embedded method adopted by the present invention gets rid of the limitation of MATLAB software, and has the advantage of strong data stability compared with the collaborative simulation method based on UDP to realize data transmission.

[0076] (3) The present invention adopts Fluent and MATLAB collaborative simulation to effectively analyze and optimize the structural defects of the reactor through collaborative simulation analysis of the fluid flow behavior and reaction process inside the reactor, thereby improving the quality and production efficiency of the polymer and providing a scientific optimization basis for industrial production. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 is a collaborative simulation calculation flow chart of a polymerization reaction in a stirred reactor proposed in an embodiment of the present invention;

[0079] Figure 2 : is a geometric model diagram of a stirred tank reactor in an embodiment of the present invention;

[0080] Figure 3Schematic diagram of mesh division of fluid calculation area in the geometric model of the stirred tank reactor in an embodiment of the present invention;

[0081] Figure 4 is a distribution cloud diagram of collaborative simulation results of polymerization reaction in a stirred tank reactor according to an embodiment of the present invention; wherein, Figure 4 (a) is the velocity distribution cloud diagram. Figure 4 (b) is the temperature distribution cloud diagram. Figure 4 (c) is the PAN polymer concentration distribution cloud map;

[0082] Figure 5 is a simplified CFD simulation result distribution cloud diagram of the polymerization reaction in the stirred tank reactor in the embodiment of the present invention; wherein, Figure 5 (a) is the velocity distribution cloud diagram. Figure 5 (b) is the temperature distribution cloud diagram. Figure 5 (c) is the PAN polymer concentration distribution cloud map;

[0083] Figure 6 This is a geometric model diagram of a flask reactor in an embodiment of the present invention;

[0084] Figure 7 Schematic diagram of mesh division of fluid calculation area in the flask reactor geometric model in an embodiment of the present invention;

[0085] Figure 8 is a distribution cloud diagram of collaborative simulation results of polymerization reaction in a flask reactor in an embodiment of the present invention; wherein, Figure 8 (a) is the velocity distribution cloud diagram. Figure 8 (b) is the temperature distribution cloud diagram. Figure 8 (c) is the PAN polymer concentration distribution cloud map;

[0086] Fig. 9 It is a flowchart of the steps of a collaborative simulation analysis method for a polymerization reaction in a reactor according to an embodiment of the present invention. DETAILED DESCRIPTION

[0087] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0088] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0089] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0090] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0091] Example 1

[0092] like Figure 1 and Fig. 9 As shown, this embodiment provides a collaborative simulation analysis method for polymerization reactions in a reactor, which simulates a complex polymerization reaction process in a reactor to optimize the structural defects of insufficient reactor stirring and improve polymer quality. The method is specifically a numerical simulation method for polymerization reactors based on the method of moments, which discusses fluid mechanics and reaction kinetics separately. The embedded collaborative simulation method used is to encapsulate the built-in ordinary differential equation solver of MATLAB as a user-defined function, call it through Fluent UDF and perform reaction kinetics calculations, assign the results to each component of the flow field, and finally simulate the polymerization process in the reactor. The method comprises the following steps:

[0093] S1. Conduct three-dimensional modeling of the reactor.

[0094] In this embodiment, the reactor is a stirred tank reactor, and the acrylonitrile polymerization reaction is carried out using a stirred tank reactor. The model is built using a 3D modeling software. The geometric model is as follows: Figure 2 As shown, the fluid area is divided into 1 rotating domain and 2 static domain, 3 is two groups of paddle impellers, 4 is a group of frame impellers, 5 is a hollow shaft, and 6 is a cooling coil.

[0095] S2. Use Fluent Meshing software to mesh the established three-dimensional model.

[0096] In this embodiment, step S2 specifically includes: using Fluent Meshing software to mesh the three-dimensional model of the reactor, such as Figure 3 As shown, standard hexahedral mesh is used for meshing, and the agitator wall and rotating domain are locally encrypted. The mesh at the interface between the rotating domain and the stationary domain shares the same topology, and the multiple reference frame method (MRF) is used to simulate the fluid motion in the rotating domain.

[0097] S3. Import the meshed 3D model into Fluent to determine the basic control equations in the acrylonitrile polymerization process.

[0098] In this embodiment, step S3 specifically includes: importing the geometric model and grid file of the stirred tank reactor into Fluent, using the SST k-ω model for the RANS turbulence model, and determining the basic control equations in the polymerization reaction process, wherein the basic control equations include the continuity equation (mass conservation equation), the momentum conservation equation, the energy conservation equation, and the component conservation equation.

[0099] The continuity equation is expressed as:

[0100]

[0101] Where ρ is the fluid density, t is the time, is the local velocity at any point in the flow field;

[0102] The momentum conservation equation is expressed as:

[0103]

[0104] Where P is the static pressure, is the stress tensor, is the gravitational volume force;

[0105] The energy conservation equation is expressed as:

[0106]

[0107] Where K is thermal conductivity, h i are the diffusion flux and enthalpy of component i, S h is the source term;

[0108] The component conservation equation is expressed as:

[0109]

[0110] In the formula, c i , D i are the concentration and diffusion coefficient of component i, S i is the source item.

[0111] S4. Set the material properties corresponding to the liquid reactants.

[0112] In this embodiment, the liquid reactants in step S4 include: acrylonitrile (AN), ammonium persulfate (APS), polyacrylonitrile (PAN) and water, and the material properties include density, viscosity, specific heat capacity, molecular weight and mass diffusion coefficient, wherein density and viscosity are set as user-defined functions.

[0113] S5. Determine the boundary conditions and source data required for numerical calculation.

[0114] In this embodiment, the specific boundary conditions and source item data of step S5 are set as follows: the agitator speed is defined, the isothermal heating boundary is adopted, the inlet velocity, the inlet initiator mass fraction, and the reaction heat source are set as user-defined functions, and the user-defined function source program is compiled into Fluent.

[0115] S6. Based on the acrylonitrile polymerization reaction mechanism, the chemical equilibrium equations of each species are derived, the moment method is used to simplify the chemical equilibrium equations of the species, and the moment method ordinary differential equations are solved by MATLAB software.

[0116] The chemical equilibrium equations of various species were derived according to the polymerization mechanism of acrylonitrile, the moment method was used to simplify the chemical equilibrium equations of the species, and the ordinary differential equations were solved based on the Runge-Kutta method (ode45 solver).

[0117] In this embodiment, the acrylonitrile polymerization reaction mechanism in step S6 includes chain initiation reaction, chain growth reaction, disproportionation chain termination reaction and coupling chain termination reaction, and the corresponding chemical equation is expressed as follows:

[0118]

[0119] Where APS, P0, AN, P · and P are initiator ammonium persulfate, primary free radical, acrylonitrile monomer, active polyacrylonitrile free radical and dead polyacrylonitrile polymer respectively; x, y represent different polymer chain lengths, f, k d , k p , k td , k tc They are initiation efficiency, initiator decomposition rate constant, monomer diffusion rate constant, disproportionation termination rate constant and coupling termination rate constant;

[0120] The equilibrium equation corresponding to the reaction mechanism is:

[0121]

[0122] In the formula, t is time, k is tis the total chain termination rate;

[0123] The moment method represents the simplification of the chemical equilibrium equation into a set of ordinary differential equations by replacing moments, and the moments are expressed as:

[0124]

[0125] Where Y i , Q i are the active polyacrylonitrile free radical matrix and the dead polyacrylonitrile polymer matrix, respectively, x is the polymer chain length, and P x are active polyacrylonitrile free radicals and dead polyacrylonitrile polymers with chain length x, respectively. i is the order of the matrix, including 0th order, 1st order and 2nd order.

[0126] The ordinary differential equation system simplified by the moment method is expressed as:

[0127]

[0128] Where Y0, Y1, and Y2 are the 0th, 1st, and 2nd order matrices of active polyacrylonitrile free radicals, Q0, Q1, and Q2 are the 0th, 1st, and 2nd order matrices of dead polyacrylonitrile polymers, APS and AN are initiators of ammonium persulfate and acrylonitrile monomers, respectively. d , k p , k td , k tc , k t They are initiation efficiency, initiator decomposition rate constant, monomer diffusion rate constant, disproportionation termination rate constant, coupling termination rate constant and total chain termination rate.

[0129] S7. Start Fluent and MATLAB software to perform embedded collaborative simulation to solve the polymerization reaction process, and repeatedly iterate the basic control equations and the moment method ordinary differential equations until the relevant parameters converge.

[0130] As an optional implementation, a user-defined function is used to encapsulate the built-in ode45 solver of MATLAB, and the user-defined function includes a set of ordinary differential equations obtained by the moment method. After the source program is written, it is compiled in C language through VisualStudio, and the generated dynamic link library files in the formats of .dll, .h and .lib are copied to the Fluent example directory to embed the Fluent user-defined function.

[0131] The Fluent source program embedded with the MATLAB ode45 function cannot be compiled by the Fluent built-in compiler. Therefore, it is necessary to build a Visual Studio compilation platform to compile the source program in C language and load the generated dynamic link library file into the Fluent user-defined module.

[0132] Start Fluent and MATLAB software to perform embedded collaborative simulation to solve the acrylonitrile polymerization process. The calculation flow chart is as follows Figure 1 As shown in the figure, the time steps of Fluent solver and MATLAB ordinary differential equation solver are consistent. At the end of each time step, Fluent reads the concentration data and temperature data of each substance in the reactor and forms an array, and calls MATLAB ode45 solver to perform reaction kinetics calculation. The iterative results are assigned to Fluent CFD simulation through a self-written program, and used for the next step of fluid dynamics iterative calculation, forming a closed loop of calculation.

[0133] The polymer-related information is calculated based on the moments of the polymer chains. If the simulation results do not match the experimental results, step S4 and step S5 are re-executed to modify the properties and boundary conditions and continue the simulation.

[0134] The post-processing of the moment method ordinary differential equation system includes:

[0135]

[0136] Among them, M n 、M w 、M AN , PDI are PAN number average molecular weight, PAN weight average molecular weight, AN monomer molecular weight and polydispersity index, respectively; Y0, Y1, Y2 are the 0th, 1st and 2nd order matrices of active polyacrylonitrile free radicals, respectively; Q0, Q1, Q2 are the 0th, 1st and 2nd order matrices of dead polyacrylonitrile polymers, respectively.

[0137] The polydispersity index PDI is an important parameter that describes the uniformity of the molecular weight distribution of polymer components. Its value is always greater than 1. The smaller the value, the more uniform the molecular weight distribution. Conversely, the smaller the value, the more non-uniform the molecular weight distribution.

[0138] Specifically, the simulated cloud diagram results of the polymerization reaction in the stirred tank reactor refer to Figure 4The liquid flow rate in the frame impeller area is the largest, the paddle impeller produces obvious axial diversion, and the coil has an obstructive effect on the liquid flow, resulting in uneven distribution of reactants in this part of the liquid, faster reaction speed than other high-speed flowing liquids, and relatively high liquid temperature. Therefore, the simulation results show that the coil affects the reaction uniformity to a certain extent. From the polydispersity index PDI curve, it can be seen that as the reaction proceeds, the concentration of AN monomer in the system gradually decreases, the chain growth reaction is affected, and a large number of chains with smaller lengths are disproportionated or combined and terminated.

[0139] This embodiment proposes the application of the above method to acrylonitrile polymerization in a stirred tank reactor. In order to reflect the superiority of the method of this embodiment, different simulation methods for polymerization in a stirred tank reactor are compared as follows:

[0140] (1) Simplified single CFD simulation of polymerization reaction

[0141] CFD itself does not include a polymerization reaction kinetic model. To simulate a polymerization reaction based only on CFD, it is necessary to simplify the polymerization reaction mechanism. The simplified mechanism is as follows:

[0142]

[0143] APS, AN and PAN are initiator ammonium persulfate, acrylonitrile monomer and polyacrylonitrile polymer respectively. k is the total polymerization rate.

[0144] A simplified CFD simulation result reference for a polymerization reaction Figure 5 The results can be used to analyze the uniformity of velocity and temperature distribution in the reactor, but the concentration distribution cloud shows that PAN is mainly distributed at the liquid surface of the reactor. Due to the faster polymerization rate after simplification, AN polymerizes quickly after the initiator is injected. The concentration field results cannot correctly reflect the actual polymerization process, and cannot calculate properties such as polymer molecular weight.

[0145] The MATLAB embedded collaborative simulation described in this embodiment simplifies the complex polymerization mechanism through the moment method and can calculate the molecular weight and polydispersity index information of PAN polymer. By coupling the polymerization kinetics with CFD simulation, the actual polymerization reaction process can be correctly simulated, reflecting the structural defect problem of the stirred reactor.

[0146] (2) UDF-UDP communication data interaction realizes Fluent and MATLAB collaborative simulation

[0147] The main principle of UDP-based communication is to first bind the local IP address in Fluent UDF and MATLAB, and then use the Socket() function to realize data transmission between the ports automatically assigned by the system.

[0148] UDP communication only transmits char data type. The data exchanged between Fluent and MATLAB is double data type, so data type conversion is required. Split the 8-byte double-precision double data into 8 single-byte uint8 data types, which will not exceed the data range of single-byte char, and transmit them in sequence. After the other party receives it, convert the 8 uint8 combinations into double to perform data transmission.

[0149] The C language used by UDF can perform data type conversion using pointer operations. MATLAB needs to use the sim command to call the Simulink Byte Packing module to convert double to 8 uint8; call Byte Unpacking to convert 8 uint8 to double data.

[0150] The limitations of the Fluent and MATLAB co-simulation based on UDP communication are as follows: UDP is a connectionless data transmission method, which cannot guarantee the stability and reliability of data transmission. The data transmitted by the method is usually a number or an array. The polymerization reaction calculation in the stirred tank reactor requires the transmission of the three species concentration data of all grids, and each time step involves two data type conversions of hundreds of thousands of data. It is difficult to ensure that the data sent and received on the same grid correspond, and the transmission efficiency and stability are poor. The MATLAB embedded co-simulation described in this embodiment encapsulates the ode45 function as a dynamic link library, and directly calls the MATLAB function in the UDF to realize data processing and overcome the instability of UDP data transmission.

[0151] In order to intuitively show the advantages of the present invention in the application of polymerization reaction simulation in a stirred reactor, different simulation methods are compared with reference to Table 1.

[0152] Table 1 Comparison of different simulation methods for polymerization reactions in stirred reactors

[0153]

[0154] The above method proposed in this embodiment is applied to the acrylonitrile polymerization reaction in a stirred tank reactor.

[0155] Example 2

[0156] join Figure 1 This embodiment provides a collaborative simulation analysis method for polymerization reaction in a reactor. The main difference between this embodiment and embodiment 1 is in steps S1-S2, which are as follows:

[0157] In step S1 of this embodiment, the reactor is a flask reactor, and the acrylonitrile polymerization reaction is carried out using the flask reactor. The model is built using a 3D modeling software. The geometric model is as follows: Figure 6 As shown, the fluid region is divided into 1 rotating domain and 2 stationary domain, 3 is a hollow rotating shaft, and 4 is a stirring blade.

[0158] Step S2 of this embodiment specifically includes: using Fluent Meshing software to mesh the three-dimensional model of the flask, such as Figure 7 As shown, standard hexahedral mesh is used for meshing, and the agitator wall and rotating domain are locally encrypted. The mesh at the interface between the rotating domain and the stationary domain shares the same topology, and the multiple reference frame method (MRF) is used to simulate the fluid motion in the rotating domain.

[0159] The other steps of this embodiment can be the same or similar to those in Example 1. The results of the simulation cloud diagram of the polymerization reaction in the flask reactor can be referred to as Figure 8 , the liquid in the flask flows more evenly. After the low-temperature initiator solution is dripped from the liquid surface, it spirally flows downward under the action of stirring. Therefore, the concentration of PAN polymerization product at the hollow shaft is relatively large.

[0160] The above method proposed in this embodiment can be applied to the acrylonitrile polymerization reaction in a flask reactor.

[0161] Example 3

[0162] join Figure 1 This embodiment provides a collaborative simulation analysis method for polymerization reaction in a reactor. The main difference between this embodiment and embodiment 1 is in step S6, which is as follows:

[0163] In this embodiment, the acrylonitrile polymerization reaction in step S6 uses persulfate and ferrous salt as redox initiators, including chain initiation reaction, chain growth reaction, disproportionation chain termination reaction and coupling chain termination reaction, and the corresponding chemical equation is expressed as:

[0164]

[0165]

[0166] in Fe 2+ , Fe 3+ It is an intermediate product in the decomposition process of the initiator. are active free radicals, P and Q are Initiated polyacrylonitrile, I, R, M, P ·and P are initiator, primary free radical, acrylonitrile monomer, active polyacrylonitrile free radical and dead polyacrylonitrile polymer respectively. x and y represent different polymer chain lengths, k1 and k2 are initiator decomposition rate constants, k d , k a , k p , k tr , k r They are the total rate constant for initiator decomposition, the initiation rate constant, the monomer diffusion rate constant, the disproportionation termination rate constant and the coupling termination rate constant.

[0167] The equilibrium equation corresponding to the reaction mechanism is:

[0168]

[0169]

[0170] Where P and Q are Initiated polyacrylonitrile, I, R, M, P · and P are initiator, primary free radical, acrylonitrile monomer, active polyacrylonitrile free radical and dead polyacrylonitrile polymer respectively. t is time, x and y represent different polymer chain lengths, k1 and k2 are initiator decomposition efficiencies, k d , k a , k p , k tr , k r They are the initiator decomposition rate constant, initiation rate constant, monomer diffusion rate constant, disproportionation termination rate constant and coupling termination rate constant.

[0171] The moment method means that the chemical equilibrium equation is simplified to a set of ordinary differential equations by replacing the moment, and the moment is expressed as:

[0172]

[0173] where Y i , Z i are the active polyacrylonitrile free radical matrix and the dead polyacrylonitrile polymer matrix, respectively, x is the polymer chain length, and P x are active polyacrylonitrile free radicals and dead polyacrylonitrile polymers with chain length x, respectively. i is the order of the matrix, including 0th order, 1st order and 2nd order.

[0174] The ordinary differential equation system simplified by the moment method is expressed as:

[0175]

[0176]

[0177] Where Y0, Y1, and Y2 are the 0th, 1st, and 2nd order matrices of active polyacrylonitrile free radicals, respectively; Z0, Z1, and Z2 are the 0th, 1st, and 2nd order matrices of dead polyacrylonitrile, respectively; k1 and k2 are the initiator decomposition efficiencies; k d , k a , k p , k tr , k r They are the initiator decomposition rate constant, initiation rate constant, monomer diffusion rate constant, disproportionation termination rate constant and coupling termination rate constant.

[0178] The other steps of this embodiment may be the same or similar to those in Embodiment 1. This embodiment proposes the application of the above method in the acrylonitrile polymerization reaction initiated by persulfate and ferrous salt as redox.

[0179] In summary, the method of the present invention embeds the built-in ode45 ordinary differential equation solver of MATLAB into the user-defined function of Fluent to solve complex polymerization reaction processes, and is suitable for acrylonitrile polymerization reactions in different reactors and different initiation systems. The present invention avoids the limitations of a single CFD simulation polymerization reaction process and improves the stability and accuracy of the simulation process. The embedded method gets rid of the limitations of MATLAB software and has the advantages of strong data stability and fast transmission compared to the collaborative simulation method based on UDP to realize data transmission. Fluent and MATLAB collaborative simulation are adopted to effectively analyze and optimize the structural defects of the reactor through the collaborative simulation analysis of the fluid flow behavior and reaction process inside the reactor, thereby improving the quality and production efficiency of the polymer, and providing a scientific optimization basis for industrial production.

[0180] Example 4

[0181] This embodiment provides a collaborative simulation analysis device for a polymerization reaction in a reactor, comprising:

[0182] A three-dimensional modeling module, used for three-dimensional modeling of the reactor;

[0183] Meshing module, used to mesh the established three-dimensional model using Fluent Meshing software;

[0184] Model import module, used to import the meshed 3D model into Fluent to determine the basic control equations in the acrylonitrile polymerization process;

[0185] A property setting module, used to set the material properties corresponding to the liquid reactant, wherein the material properties include density, viscosity, specific heat, molecular weight and mass diffusion coefficient;

[0186] Condition setting module, which determines the boundary conditions and source data required for numerical calculation;

[0187] The equation simplification module is used to derive the chemical equilibrium equations of various species according to the acrylonitrile polymerization reaction mechanism, simplify the chemical equilibrium equations of the species using the moment method, and solve the moment method ordinary differential equations through MATLAB software;

[0188] The co-simulation module is used to start the Fluent and MATLAB software to perform embedded co-simulation to solve the polymerization reaction process, and repeatedly iterate the basic control equations and the moment method ordinary differential equations until the relevant parameters converge.

[0189] Since the device is a collaborative simulation and analysis device for polymerization reactions in a reactor according to an embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0190] Example 5

[0191] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 and Fig. 9 A collaborative simulation analysis method for polymerization reaction in a reactor is shown.

[0192] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.

[0193] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.

[0194] Since the electronic device is an electronic device corresponding to a collaborative simulation analysis method for a polymerization reaction in a reactor of an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0195] Example 6

[0196] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 and Fig. 9 A collaborative simulation analysis method for polymerization reaction in a reactor is shown.

[0197] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0198] Since the storage medium is the storage medium corresponding to the collaborative simulation analysis method for polymerization reaction in a reactor of an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0199] Example 7

[0200] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the collaborative simulation analysis method for polymerization reaction in a reactor according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0201] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0202] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0203] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.

Claims

1. A collaborative simulation analysis method for polymerization reaction in a reactor, characterized in that: The following steps are involved: Conduct 3D modeling of the reactor; Fluent Meshing software was used to mesh the established three-dimensional model; The meshed 3D model was imported into Fluent to determine the basic control equations in the acrylonitrile polymerization process; Set the material properties corresponding to the liquid reactant; Determine the boundary conditions and source data required for numerical calculations; The chemical equilibrium equations of various species were derived according to the polymerization mechanism of acrylonitrile, the moment method was used to simplify the chemical equilibrium equations of the species, and the moment method ordinary differential equations were solved by MATLAB software; Start Fluent and MATLAB software for embedded co-simulation to solve the polymerization reaction process, and iterate the basic control equations and the moment method ordinary differential equations until the relevant parameters converge; The reactor is a stirred reactor, wherein the stirrer comprises stirring blades and a hollow rotating shaft, and the fluid region is divided into a rotating domain and a stationary domain; In meshing the three-dimensional model, the interface meshes of the rotating domain and the stationary domain share topology, and the multi-reference system method is used to simulate the motion of the fluid in the rotating domain. The basic control equations include continuity equation, momentum conservation equation, energy conservation equation and component conservation equation; The continuity equation is expressed as: In the formula, ρ is the fluid density, t For time, is the local velocity at any point in the flow field; The momentum conservation equation is expressed as: In the formula, P is the static pressure, is the stress tensor, is the gravitational volume force; The energy conservation equation is expressed as: In the formula, K is the thermal conductivity, , The components The diffusion flux and enthalpy, is the source term; The component conservation equation is expressed as: In the formula, , The components The concentration and diffusion coefficient of is the source term; The boundary conditions and source term data required for the numerical calculation are determined, including: Define the boundary conditions of agitator speed, inlet, and temperature, where the inlet velocity, inlet initiator mass fraction, and reaction heat source are set as user-defined functions and compiled into Fluent through the custom function source program.

2. The collaborative simulation analysis method for polymerization reaction in a reactor according to claim 1, characterized in that: The acrylonitrile polymerization reaction mechanism includes chain initiation reaction, chain growth reaction, disproportionation chain termination reaction and coupling chain termination reaction, and the corresponding chemical equation is expressed as follows: In the formula, APS , P 0. AN , and P They are initiator ammonium persulfate, primary free radicals, acrylonitrile monomer, active polyacrylonitrile free radicals and dead polyacrylonitrile polymer; , represents different polymer chain lengths, , , , , They are initiation efficiency, initiator decomposition rate constant, monomer diffusion rate constant, disproportionation termination rate constant and coupling termination rate constant; The equilibrium equation corresponding to the reaction mechanism is: In the formula, t For time, is the total chain termination rate; The method of moments means simplifying the chemical equilibrium equation into a set of ordinary differential equations by replacing moments, and the moments are expressed as: In the formula, Y i , Q i They are active polyacrylonitrile free radical matrix and dead polyacrylonitrile polymer matrix, is the polymer chain length, and P x The chain lengths are Active polyacrylonitrile radicals and dead polyacrylonitrile polymers, is the order of the matrix, including 0th order, 1st order and 2nd order; The concentration, number average molecular weight, weight average molecular weight and polydispersity index parameters of the polyacrylonitrile product were calculated by the moments of active polyacrylonitrile free radicals and dead polyacrylonitrile polymers.

3. The collaborative simulation analysis method for polymerization reaction in a reactor according to claim 1, characterized in that: The basic control equations and the moment method ordinary differential equations are repeatedly iterated until the relevant parameters converge, including: The finite volume method is used to discretize the basic control equations established in the calculation area and obtain the simulation results; If the simulation results do not match the experimental results, go back and reset the material properties corresponding to the liquid reactants and determine the boundary conditions and source term data required for numerical calculations before performing the simulation again.

4. The collaborative simulation analysis method for polymerization reaction in a reactor according to claim 1, characterized in that: The method of starting Fluent and MATLAB software to perform embedded collaborative simulation to solve the polymerization reaction process includes: The user-defined function encapsulates the built-in ordinary differential equation solver of MATLAB. After the source program is written, it is compiled in C language through Visual Studio software, and the generated dynamic link library files in the formats of .dll, .h and .lib are copied to the example directory, that is, the Fluent user-defined function is embedded; After the source code of the Fluent user-defined function is written, the Visual Studio compilation platform is built to compile it in C language, and the generated dynamic link library file in the .dll format is loaded into the Fluent user-defined module; Set the time step of Fluent solver and MATLAB ordinary differential equation solver to be consistent. The Fluent user-defined function source program calls the MATLAB ordinary differential equation solver and performs data acquisition, calculation and assignment once in each time step.

5. A collaborative simulation analysis device for polymerization reaction in a reactor, applied to the method according to any one of claims 1 to 4, characterized in that: include: A three-dimensional modeling module, used for three-dimensional modeling of the reactor; Meshing module, used to mesh the established three-dimensional model using Fluent Meshing software; Model import module, used to import the meshed 3D model into Fluent to determine the basic control equations in the acrylonitrile polymerization process; The property setting module is used to set the material properties corresponding to the liquid reactant; Condition setting module, which determines the boundary conditions and source data required for numerical calculation; The equation simplification module is used to derive the chemical equilibrium equations of various species according to the acrylonitrile polymerization reaction mechanism, simplify the chemical equilibrium equations of the species using the moment method, and solve the moment method ordinary differential equations through MATLAB software; The co-simulation module is used to start the Fluent and MATLAB software to perform embedded co-simulation to solve the polymerization reaction process, and repeatedly iterate the basic control equations and the moment method ordinary differential equations until the relevant parameters converge.

6. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • A software coupling method and system for CAE end-to-end structural analysis

    CN116522461B

  • Simulink and Fluent-based high and low temperature test chamber temperature field parallel co-simulation method

    CN117473709A

  • Joint simulation method and system for nuclear power secondary circuit fluid system and power system

    CN117763979B

  • PCB design optimization method based on electrothermal co-simulation

    CN117764011A

  • Method for optimizing molecular weight distribution operation conditions of free radical polymers in non-ideal reactors

    CN105740535A

Cited By

  • Analysis method for acrylonitrile polymerization reaction multi-physical field coupling

    CN121905323A