Hydrogen fuel cell water gas heat electric performance simulation software architecture and method

By using a software architecture for simulating the thermoelectric performance of hydrogen fuel cells through water-gas-hydrogen interaction, user-defined hierarchical structures and functions, the complexity and high learning cost of existing simulation software are solved, achieving more efficient simulation and more accurate hydrogen fuel cell simulation.

CN120509177BActive Publication Date: 2026-03-24XI AN JIAOTONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The underlying architecture of the solver and the computational fluid dynamics algorithm of existing hydrogen fuel cell simulation software are relatively complex, with high learning costs and a tendency to over-solve or overdeterminate.

Method used

A software architecture for simulating the thermoelectric performance of hydrogen fuel cells using water and gas is adopted, including a general input layer, a battery input layer, a user-defined layer, a data storage layer, a solver layer, and a battery logic layer. It allows users to define physical quantities, functions, and solution strategies, simplifying the portability of the model to a self-developed solver. It also describes the physical process through custom profile functions, diffusion coefficient functions, and source term functions, and provides a solution strategy interface to control the solution process.

Benefits of technology

It reduces user learning costs, improves the accuracy and reliability of simulation, adapts to different types and specifications of hydrogen fuel cells, simplifies development and maintenance, and enhances data management and simulation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509177B_ABST
    Figure CN120509177B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of hydrogen fuel cell simulation, and discloses a hydrogen fuel cell water-gas-heat-electricity performance simulation software architecture and method, which comprises: a general input layer, which is used for receiving user input flow heat transfer system simulation general parameters; a battery input layer, which is used for receiving user input hydrogen fuel cell specific parameters; a user-defined layer, which is used for defining relevant physical quantities, self-defined profile function, self-defined diffusion coefficient function, self-defined source term function and solution strategy interface based on user input hydrogen fuel cell specific parameters; a data storage layer, which is used for storing operation data or generated data of the simulation process; a solver layer, which is used for solving physical fields; and a battery logic layer, which is used for updating physical properties, source terms and boundaries based on the self-defined profile function, self-defined diffusion coefficient function and self-defined source term function, and calculating the residual of the preset equation through the solver layer; the application simplifies the building process of user customization model, and significantly reduces the user learning cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydrogen fuel cell simulation technology, and specifically relates to a software architecture and method for simulating the water-gas-thermal-electric performance of hydrogen fuel cells. Background Technology

[0002] A hydrogen fuel cell is a power generation device that directly converts the chemical energy of hydrogen and oxygen into electrical energy. Its principle is the reverse reaction of water electrolysis. A hydrogen fuel cell generally includes a proton exchange membrane, an anode, a cathode, a gas diffusion layer, and a catalyst layer. Hydrogen and oxygen are supplied to the anode and cathode, respectively. The introduced gas is transported to the catalyst layer through the gas diffusion layer and the microporous layer. In the catalyst layer, the anode undergoes an oxidation reaction of hydrogen, and the cathode undergoes an reduction reaction of oxygen.

[0003] During the operation of a hydrogen fuel cell, complex multi-physics coupled transport and electrochemical reactions occur within the cell. Accurate prediction of the internal gas-water-electricity-heat multi-physics fields is crucial for the design and hydrothermal management of hydrogen fuel cells. However, a single hydrogen fuel cell contains dozens of physical fields with complex coupling characteristics, and the electrochemical reactions within the cell exhibit highly nonlinear features. Therefore, simulating and predicting the internal physical fields of the cell presents a significant challenge. Currently, existing hydrogen fuel cell simulation software suffers from complex solver architectures and computational fluid dynamics algorithms, high learning costs, and is prone to over-solving or overdeterminism. Summary of the Invention

[0004] To address the technical problems existing in the prior art, this invention provides a software architecture and method for simulating the water-gas thermoelectric performance of hydrogen fuel cells, thereby solving the technical problems that the underlying solver architecture and computational fluid dynamics algorithm of existing hydrogen fuel cell simulation software are relatively complex, have high learning costs, and are prone to over-solving or overdeterminism.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] This invention provides a software architecture for simulating the water-gas thermoelectric performance of hydrogen fuel cells, comprising the following hierarchical structure:

[0007] The general input layer is used to receive general simulation parameters of the flow heat transfer system input by the user;

[0008] The battery input layer is used to receive user-input parameters specific to hydrogen fuel cells.

[0009] The user-defined layer is used to define relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces based on user-input hydrogen fuel cell-specific parameters. The solution strategy interfaces include solution strategy interfaces before program execution, solution strategy interfaces before starting the solution, and solution strategy interfaces before and after iteration.

[0010] The data storage layer is used to store operational or generated data during the simulation process.

[0011] The solver layer is used to solve the physical field according to the preset solver;

[0012] The battery logic layer is used to update physical properties, source terms, and boundaries based on custom profile functions, custom diffusion coefficient functions, and custom source term functions defined in the user-defined layer, and to calculate the residuals of preset equations through the solver layer.

[0013] Furthermore, the user-input general parameters for the flow heat transfer system simulation include the hydrogen fuel cell mesh file, solver general parameter settings, material property settings, boundary condition settings, and operating condition settings.

[0014] Furthermore, the unique parameters of hydrogen fuel cells include the geometric parameters, physical property parameters, electrochemical parameters, and operating parameters of the hydrogen fuel cell.

[0015] Furthermore, the solution strategy interface before program execution is used to read the hydrogen fuel cell-specific parameters input by the user and write them into the relevant physical quantities defined in the user-defined layer; the solution strategy interface before and after iteration is used to process the physical field coupling relationship and statistically analyze the preset key data after iteration.

[0016] Furthermore, the data storage layer includes a low-level data packet module, which is used to store flow and heat transfer data, component data, custom scalar / vector equation data and custom profile data during the simulation process;

[0017] The underlying data package module includes flow and heat transfer data packages, component data packages, custom scalar / vector equation data packages, and custom profile data packages. The flow and heat transfer data packages are used to store density, velocity, and temperature. The component data packages are used to store the mass fractions of hydrogen / water vapor at the anode and oxygen / water vapor / nitrogen at the cathode, respectively. The custom scalar / vector equation data packages are used to store the electron potential, proton potential, and film water content at the anode / cathode. The custom profile data packages are used to store the custom boundary condition profiles for each physical field.

[0018] Furthermore, the solver layer includes a flow field solver, a temperature field solver, and a custom scalar / vector equation solver;

[0019] The custom scalar / vector equation solver has built-in custom diffusion coefficient functions and custom source term functions. The built-in custom diffusion coefficient function modifies the diffusion coefficient field by calling data from the data storage layer, and the built-in custom source term function modifies the source term field by calling data from the data storage layer.

[0020] Furthermore, the battery logic layer includes a flow heat transfer module, an anode / cathode composition module, an anode / cathode electronic potential module, a proton potential module, a membrane water content module, a liquid water pressure module, and a liquid water saturation module.

[0021] The anode / cathode component modules construct independent anode and cathode component systems, respectively. The anode component system includes anode hydrogen and anode water vapor components, while the cathode component system includes cathode oxygen, cathode water vapor, and cathode nitrogen components. In each component system, the mass fraction of the last component is solved using a normalized equation, and the mass fraction of the remaining components is obtained by solving the component conservation equation using a custom scalar / vector equation solver.

[0022] Furthermore, a custom profile function is used to define boundary conditions for velocity, temperature, electronic potential, and liquid water pressure, and is dynamically loaded into the solver layer through the custom profile registration module in the data storage layer.

[0023] Furthermore, the battery logic layer includes a flow heat transfer module, an anode / cathode composition module, an anode / cathode electronic potential module, a proton potential module, a membrane water content module, a liquid water pressure module, and a liquid water saturation module; wherein, the boundary conditions of the flow heat transfer module, the anode / cathode composition module, the anode / cathode electronic potential module, the liquid water pressure module, and the liquid water saturation module are implemented through explicit assignment.

[0024] The present invention also provides a method for simulating the water-gas thermoelectric performance of hydrogen fuel cells, utilizing the aforementioned software architecture for simulating the water-gas thermoelectric performance of hydrogen fuel cells.

[0025] A simulation method for the water-gas thermoelectric performance of hydrogen fuel cells includes the following steps:

[0026] The general input layer receives general simulation parameters of the flow heat transfer system from the user.

[0027] The battery input layer receives user-input parameters specific to hydrogen fuel cells.

[0028] Through the user-defined layer, based on the unique parameters of the hydrogen fuel cell input by the user, relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces are defined;

[0029] The battery logic layer calls the solver layer to perform physical field coupling solutions, and outputs the residuals of each equation and preset key statistical data.

[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0031] The hydrogen fuel cell water-gas-thermal-electric performance simulation software architecture provided by this invention adopts a distinct hierarchical structure consisting of a general input layer, a battery input layer, a user-defined layer, a data storage layer, a solver layer, and a battery logic layer. This makes the software easier to develop, maintain, and upgrade. The user-defined layer allows users to define relevant physical quantities, functions, and solution strategy interfaces based on the unique parameters of the hydrogen fuel cell. This highly customizable approach enables the software to adapt to different types and specifications of hydrogen fuel cells, meeting a wider range of application needs. Furthermore, the user-oriented user-defined layer ensures that users can directly customize new differential equations, inter-equation coupling relationships, initial conditions, and boundary conditions without needing to understand the underlying solver architecture and computational fluid dynamics algorithms. This significantly simplifies the portability of models based on commercial software to self-developed solvers, reducing user learning costs by orders of magnitude. Secondly, the user-defined layer provides custom profile functions, custom diffusion coefficient functions, and custom... The source term function allows users to more flexibly describe the physical processes of hydrogen fuel cells; simultaneously, the solution strategy interface provides users with comprehensive control over the solution process; the data storage layer stores operational and generated data during the simulation process, which helps with data organization and management, improves data readability and accessibility, and facilitates subsequent data analysis and processing; the battery logic layer updates physical properties, source terms, and boundaries based on user-defined custom profile functions, custom diffusion coefficient functions, and custom source term functions, and the dynamic update mechanism enables the software to more accurately simulate the changes of hydrogen fuel cells in actual operation, improving the accuracy and reliability of the simulation; this invention has the advantages of clear hierarchy, high customizability, rich function and interface support, efficient data management, powerful solution capabilities, and dynamic physical property updates and boundary handling, making it widely applicable and practically valuable in the research, design, and optimization of hydrogen fuel cells. Attached Figure Description

[0032] Figure 1 A structural block diagram of the simulation software architecture for the water-gas-thermal-electric performance of hydrogen fuel cells provided by this invention.

[0033] Figure 2 This is a structural block diagram of the user-defined module in this invention;

[0034] Figure 3 A flowchart of the simulation method for the water-gas thermoelectric performance of hydrogen fuel cells provided by the present invention. Detailed Implementation

[0035] To make the technical problems solved by the present invention, the technical solutions, and the beneficial effects clearer, the following specific embodiments provide a further detailed description of the present invention. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.

[0036] As attached Figure 1 As shown, the present invention provides a software architecture for simulating the water-gas-thermal-electric performance of hydrogen fuel cells, including a general input layer, a battery input layer, a user-defined layer, a data storage layer, a solver layer, and a battery logic layer.

[0037] The general input layer is used to receive general simulation parameters of the flow heat transfer system input by the user. These general simulation parameters include the mesh file of the hydrogen fuel cell, solver general parameter settings, solver model settings, material property settings, region parameter settings, boundary condition settings, interface settings, operating condition settings, initialization parameter settings, solution strategy settings, residual requirement settings, solution parameter settings, and output parameter settings.

[0038] Specifically, the mesh file of a hydrogen fuel cell is a data file formed by discretizing the geometric model of the hydrogen fuel cell; the mesh file of a hydrogen fuel cell contains mesh volume, volume center coordinates of the volume mesh, area vector of the surface mesh, surface center coordinates of the surface mesh, adjacent volume meshes of the surface mesh, nodes on the surface mesh, adjacent surface meshes of the volume mesh, and nodes on the volume mesh.

[0039] The general parameters for the solver include solver type, mesh scaling factor, mesh rotation factor, mesh translation factor, and gravity magnitude; the solution model settings include the selection of turbulence model, energy equation, radiation equation, and multiphase equation.

[0040] Material property settings include material density, specific heat capacity, viscosity, and thermal conductivity; region parameter settings include material type and porous media region parameters; boundary condition settings include velocity boundaries and temperature boundaries; interface settings include pairing information for adjacent interface surfaces; operating condition settings include operating pressure and operating temperature; initialization parameter settings include initialization velocity, temperature, and pressure; solution strategy settings include the selection of pressure-velocity coupling algorithm, gradient interpolation algorithm, and interface flow calculation algorithm; residual requirement settings include pressure residual threshold, momentum residual threshold, and energy residual threshold; solution parameter settings include whether it is steady state or calculation time; output parameter settings include output file type and output file time interval.

[0041] The battery input layer is used to receive user-input parameters specific to the hydrogen fuel cell. These parameters include the fuel cell's geometric, physical, electrochemical, and operational parameters. Specifically, the geometric parameters include the thickness of each layer, the length and width of the flow channel, the inlet area, and the activation area. The physical parameters include the anode and cathode reference exchange current density, anode and cathode reference concentration, anode and cathode transfer coefficient, anode and cathode electrochemical reaction order, platinum loading, catalyst layer ionomer volume fraction, catalyst layer electrochemical specific surface area, carbon particle diameter, and exposed carbon particle ratio. The operational parameters include the output voltage, anode and cathode operating pressure, anode and cathode stoichiometry, anode and cathode inlet temperatures, anode and cathode inlet relative humidity, and cooling water temperature.

[0042] The user-defined layer is used to define relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces based on user-input hydrogen fuel cell-specific parameters. Specifically, it defines relevant physical quantities based on user-input hydrogen fuel cell-specific parameters; defines custom profile functions, custom diffusion coefficient functions, and custom source term functions based on the defined relevant physical quantities; and defines solution strategy interfaces based on the defined relevant physical quantities and the defined custom profile functions, custom diffusion coefficient functions, and custom source term functions. The solution strategy interfaces include solution strategy interfaces before program execution, solution start-up strategy interfaces, and solution strategy interfaces before and after iteration.

[0043] Related functions are used in the custom profile function, custom diffusion coefficient function, custom source term function, and solution strategy interface. These related functions include calculation functions for preset physical quantity correlation equations. Among them, the calculation functions for preset physical quantity correlation equations include calculation functions for saturation pressure, inlet hydrogen / oxygen / water vapor mass fraction, water activity, water content, electrochemical drag coefficient, membrane proton conductivity, membrane water diffusion coefficient, anode and cathode electrochemical reaction rate, relative permeability, liquid water viscosity, water vapor viscosity, capillary pressure, liquid water saturation, gas-liquid phase transition rate, water and membrane water phase transition rate, pressure difference diffusion rate, and open circuit voltage.

[0044] The relevant physical quantities include physical quantities related to the user-input hydrogen fuel cell-specific parameters and relevant fixed physical parameters; among them, physical quantities related to the user-input hydrogen fuel cell-specific parameters include the conductivity, porosity, equivalent molar mass, and volume fraction of ionomers in each layer; relevant fixed parameters include molecular weight, Faraday constant, gas constant, number of electrons transferred in the electrochemical reaction, coefficients of each term in the electrochemical reaction equation, and entropy increase in the electrochemical reaction.

[0045] Custom profile functions are used to define the boundary conditions of various physical fields and are dynamically loaded into the solver layer through the custom profile registration module in the data storage layer. Specifically, based on the output voltage in the relevant physical quantities and the calculation functions for the inlet hydrogen / oxygen / water vapor mass fraction and saturation pressure in the relevant functions, the boundary conditions for velocity, temperature, mass fraction of each component, electron potential, liquid water pressure, liquid water saturation, stoichiometry, relative humidity, operating pressure, and operating temperature can be customized. At the same time, it is possible to modify the custom profile data package in the underlying data package module and call the data in the custom scalar field data package.

[0046] A custom diffusion coefficient function is used to define the diffusion coefficient of a custom scalar equation. Specifically, it is defined based on the calculation functions of the conductivity, porosity, equivalent molar mass, and ionomer volume fraction of each layer in the relevant physical quantities, as well as the membrane proton conductivity, membrane water diffusion coefficient, liquid water viscosity, water vapor viscosity, and relative permeability in the custom profile function. The custom diffusion coefficient function is built into the custom scalar / vector equation solver in the solver layer. At the same time, it can call the data access interface to access the data in the custom scalar field data package in the underlying data package module and modify the diffusion coefficient field in the custom scalar equation data package in the underlying data package module.

[0047] Custom source term functions are used to define the source terms for the mass conservation equation, energy conservation equation, and custom scalar equation. Specifically, based on relevant physical quantities such as molecular weight, Faraday constant, number of electrons transferred in electrochemical reactions, and coefficients of various terms in electrochemical reaction equations, the source terms for the mass conservation equation, energy conservation equation, and custom scalar equation are defined. The custom source term functions are built into the custom scalar / vector equation solver in the solver layer. At the same time, they can call the data access interface to access the data in the custom scalar field data package in the underlying data package module and modify the source term field in the custom scalar equation data package in the underlying data package module.

[0048] The solution strategy interface before program execution is used to read the user-input hydrogen fuel cell-specific parameters and write them into the relevant physical quantities defined in the user-defined layer.

[0049] The pre-solve strategy interface is used to initialize the physical field to be solved. The physical field to be solved includes pressure, velocity, temperature, mass fraction of each component, scalar field values ​​of each custom scalar equation, and each custom scalar field. The pre-solve strategy interface can call the inlet hydrogen / oxygen / water vapor mass fraction, water activity, water content, output voltage, and relative humidity stored in the underlying data package module. At the same time, it can modify the flow heat transfer data package, component data package, custom scalar equation data package, and custom scalar field data package in the underlying data package.

[0050] The solution strategy interface before and after iteration is used to process the physical field coupling relationship and statistically analyze the preset key data after iteration; the solution strategy interface before and after iteration includes the solution strategy interface before iteration and the solution strategy interface after iteration.

[0051] Specifically, the pre-iteration solution strategy interface is used to handle the coupling relationship between solutions of different physical fields based on defined relevant physical quantities and defined custom profile functions, custom diffusion coefficient functions, and custom source term functions; it can also modify custom scalar equation data packages and custom scalar field data packages in the underlying data package module; at the same time, it can call data in the custom scalar field data package. The post-iteration solution strategy interface is used to obtain preset key statistical data based on the physical field obtained by iteration using defined relevant functions, and realize current density solution and divergent physical field statistics; at the same time, it can call data in the custom scalar equation data package; and it can calculate the preset key physical statistics to be output.

[0052] The data storage layer is used to store operation data or generated data during the simulation process, and also to mount custom profile functions and modify values ​​in the custom profile data package; the data storage layer includes the underlying data package module and the custom profile registration module.

[0053] The underlying data package module is used to store flow and heat transfer data, component data, custom scalar / vector equation data, custom scalar / vector field data, and custom profile data during the simulation process; the custom profile registration module is used to attach custom profile functions and modify the values ​​in the custom profile data package.

[0054] The underlying data package module includes flow heat transfer data packages, component data packages, custom scalar / vector equation data packages, custom scalar / vector field data packages, and custom profile data packages.

[0055] The flow heat transfer data package stores density, velocity, temperature, viscosity, pressure, and specific heat; the component data package stores the mass fractions of hydrogen / water vapor at the anode and oxygen / water vapor / nitrogen at the cathode, respectively; the custom scalar / vector equation data package stores the electron potential, proton potential, film water content, liquid water pressure, and liquid water saturation at the anode / cathode; the custom scalar / vector field data package stores the overpotential, electrochemical reaction rate, water activity, water content, phase change rate, liquid water saturation, capillary pressure, energy source term, and resistivity; and the custom profile data package stores the custom boundary condition profiles for each physical field. It should be noted that the underlying data package module can be called and its stored data values ​​modified by the user-defined layer, the battery logic layer, and the solver layer.

[0056] The solver layer is used to solve physical fields based on preset solvers. This includes a flow field solver, a temperature field solver, and a custom scalar / vector equation solver. Notably, the custom scalar / vector equation solver incorporates a custom diffusion coefficient function and a custom source term function. The built-in custom diffusion coefficient function modifies the diffusion coefficient field by calling data from the data storage layer, and the built-in custom source term function modifies the source term field by calling data from the data storage layer. Furthermore, the relationship between the solver layer and the user-defined layer is as follows: the user-defined layer's custom diffusion coefficients and custom source terms are mounted within the custom scalar / vector equation solver. The relationship between the solver layer and the battery logic layer is as follows: the battery logic layer calls the solver layer's data structure to modify the data stored in the underlying data package module.

[0057] The battery logic layer is used to update physical properties, source terms, and boundaries based on custom profile functions, custom diffusion coefficient functions, and custom source term functions defined in the user-defined layer, and to calculate the residuals of preset equations through the solver layer. The battery logic layer includes a flow heat transfer module, an anode / cathode composition module, an anode / cathode electronic potential module, a proton potential module, a membrane water content module, a liquid water pressure module, and a liquid water saturation module. Except for the boundary conditions of the proton potential and membrane water content modules, the boundary conditions of the other modules are implemented through explicit assignment; that is, the boundary conditions of the flow heat transfer module, anode / cathode composition module, anode / cathode electronic potential module, liquid water pressure module, and liquid water saturation module are implemented through explicit assignment.

[0058] Specifically, the flow heat transfer module includes the mass conservation equation and the momentum conservation equations in three directions; the anode component module includes the anode hydrogen component conservation equation; the cathode component module includes the cathode oxygen component conservation equation and the cathode water vapor component conservation equation; the anode electron potential module includes the anode electron potential conservation equation; the cathode electron potential module includes the cathode electron potential conservation equation; the proton potential module includes the proton potential conservation equation; the membrane water content module includes the membrane water content conservation equation; the liquid water pressure module includes the liquid water relative pressure conservation equation in the membrane electrode; and the liquid water saturation module includes the liquid water saturation conservation equation in the flow channel.

[0059] It should be noted that the anode / cathode component modules construct independent anode and cathode component systems respectively. The anode component system includes anode hydrogen and anode water vapor components, while the cathode component system includes cathode oxygen, cathode water vapor, and cathode nitrogen components. In each component system, the mass fraction of the last component is solved using a normalized equation, and the mass fractions of the remaining components are obtained by solving the component conservation equations using a custom scalar / vector equation solver. Specifically, for each component system, except for the mass fraction of the last component, the mass fractions of other components are obtained by solving the component conservation equations using a custom scalar / vector equation solver, and the mass fraction of the last component is obtained through a normalized equation. By constructing independent anode and cathode component systems, i.e., using different component systems at the anode and cathode, the over-solving and overdetermined problems caused by single-component systems can be effectively overcome.

[0060] It should also be noted that the simulation software architecture for the water-gas-thermal-electric performance of hydrogen fuel cells described in this invention is based on user-defined modules; as shown in the attached document. Figure 2 As shown, the user-defined modules include a user interface module, a custom scalar / vector equation module, a custom scalar / vector field module, and a custom profile module.

[0061] The user interface module provides users with custom operation interfaces, including data access interfaces, model-related interfaces, and solution strategy interfaces.

[0062] Specifically, the data access interface is used for users to access the data stored in the data package; the data package is a collection of all data in the software architecture, including: the data file formed by discretizing the geometric model of the hydrogen fuel cell, the scalar and vector fields defined in the basic flow and heat transfer architecture, the scalar fields defined in the component modules, the scalar fields, vector fields or tensor fields defined in the custom scalar / vector equations, and the custom profile field data package; the data stored in the user access data package includes the loop interface, mesh information, and physical field information. The loop interface allows users to access values ​​at different locations within a data packet, including looping through regions and looping through volume or surface meshes within a region. Mesh information includes volume mesh volume, volume mesh center coordinates, surface mesh area vector, surface mesh face center coordinates, adjacent volume meshes, nodes on the surface mesh, adjacent surface meshes, and nodes on the volume mesh. Physical field information includes density, pressure, velocity vector, viscosity, thermal conductivity, specific heat capacity, component mass fraction, values ​​of physical fields in the custom scalar / vector equation module, diffusion coefficients, source terms, and values ​​from the custom scalar / vector field module. Specifically, the inputs to the interfaces for accessing mesh volume, volume mesh center coordinates, surface mesh area vector, and surface mesh face center coordinates are mesh cell number, region number, and data packet pointer; the output is scalar or vector data. The inputs to the interfaces for accessing adjacent volume meshes, node coordinates on the surface mesh, adjacent surface meshes, and node coordinates on the volume mesh are incremented by the accessed information number; the output is the extracted data structure object of the volume mesh, surface mesh, or node.

[0063] The model-related interfaces include those for user-defined interfaces with the underlying flow and heat transfer architecture and with user-defined scalar / vector equation modules. The interface with the underlying flow and heat transfer architecture includes setting material properties, setting source terms, and setting user-defined profile functions. Material properties include density, viscosity, specific heat capacity, and thermal conductivity. Source terms include mass, momentum, and energy. Setting user-defined profile functions is used to define boundary conditions. The interface with the user-defined scalar / vector equation modules includes user-defined scalar / vector equation modules and custom profile modules, setting the diffusion coefficient, source terms, convection terms, and user-defined profiles for defining boundary conditions.

[0064] The custom scalar / vector equation module is used to define a new governing equation. Examples of new governing equations include the hydrogen mass fraction equation, oxygen mass fraction equation, water vapor mass fraction equation, electron potential equation, and proton potential equation in the fuel cell module. By defining a new governing equation, the corresponding physical field can be obtained for higher-precision simulation. This module includes two data structures: a custom scalar / vector equation data package and a custom scalar / vector equation solver.

[0065] Specifically, the custom scalar / vector field equation data package is integrated into the underlying data structure used for data storage in the software. The main variables include the specific values ​​of each custom scalar / vector field and the mesh combination. The mesh combination is the mesh region defined by the custom scalar / vector field, enabling functions for setting the number of custom scalar / vector fields, setting the solution domain for each custom scalar / vector field, and initializing the data. The custom scalar / vector equation data package data structure includes data for the physical field, diffusion coefficient field, gradient field, source term field, convection term field, and transport flux field of each scalar equation, as well as functions for setting the solution domain and initializing the data for each custom scalar / vector equation. This data structure is integrated as a whole into the underlying data structure used for data storage in the software.

[0066] The main variables in the custom scalar / vector equation solver data structure include the name of the custom scalar / vector equation, the pointer to the custom scalar / vector equation data package, the mesh combination, the enumeration variable for the convection term processing method, the boolean variable for whether to construct the interface flux, the pointer to the diffusion term update function, the array of pointers to the source term update function, and the pointer to the convection term update function. The main functions include functions for initialization, configuration, setting the user-defined diffusion coefficient solution method, adding the user-defined source term solution method, setting the user-defined convection term solution method, setting the convection term coupling pointer, updating the diffusion term, updating the source term, updating the convection term, setting the relaxation factor, and single-step iterative solution.

[0067] The custom profile module is used to assign custom boundary conditions and custom values ​​to various physical fields. It includes two data structures: a custom profile data package and a custom profile registration structure. Specifically, the custom profile registration structure registers the region information where the custom profile applies, the custom profile update method, and updates the data in the custom profile data package. Key variables include the number of custom profiles, custom profile region information, and an array of pointers to custom profile update functions. Key functions include an initialization function, a function to add custom profiles, and a custom profile update function.

[0068] In this invention, the anode / cathode electron potential module, proton potential module, membrane water content module, liquid water pressure module, and liquid water saturation module are all scalar equations that are solved in certain regions and include transient, convection, diffusion, and source terms. Therefore, the above six physical fields are all defined in a custom scalar equation solver. For boundary conditions, the boundary conditions defined based on the custom profile are implemented through explicit assignment. Specifically, in the underlying implementation of the user-defined module, after registering the pointer of the user-defined profile function to the solver layer, the user-defined profile function is updated during the iteration process, and then the profile is assigned to the boundary conditions of each equation.

[0069] Simulation principles and methods:

[0070] This invention also provides a method for simulating the water-gas thermoelectric performance of a hydrogen fuel cell, comprising:

[0071] The system receives general simulation parameters for the flow and heat transfer system from the user through the general input layer; it also receives hydrogen fuel cell-specific parameters from the user through the battery input layer; the user-defined layer defines relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces based on the user-input hydrogen fuel cell-specific parameters; and the battery logic layer calls the solver layer to perform physical field coupling solutions, outputting the residuals of each equation and preset key statistical data.

[0072] As attached Figure 3 As shown, the simulation method for the water-gas thermoelectric performance of a hydrogen fuel cell includes the following steps:

[0073] Step 1: Receive the general simulation parameters of the flow heat transfer system input by the user through the general input layer, and receive the hydrogen fuel cell-specific parameters input by the user through the battery input layer.

[0074] Step 2: Perform initialization operations; specifically, call the pre-solve strategy interface in the user-defined layer to update the data in the underlying data packet module of the data storage layer.

[0075] Step 3: Couple the physical fields. Specifically, in the custom profile registration module of the data storage layer, call the custom profile function in the user-defined layer; in the custom scalar / vector equation solver, call the custom diffusion coefficient function and custom source term function in the user-defined layer; update the physical properties, source terms, and boundaries in the underlying data package module of the data storage layer; then, call the pre-iteration solution strategy interface in the user-defined layer to update the data in the custom scalar / vector equation data package, the custom scalar / vector field data package, and the data in the relevant physical quantities in the user-defined layer.

[0076] Step 4: Solve the flow field and temperature field; specifically, call the flow field solver in the solver layer to solve the momentum equation and continuity equation through the pressure-velocity coupling algorithm to obtain the pressure and velocity; then, call the temperature field solver in the solver layer to solve the energy equation; and modify the data in the flow and heat transfer data package in the bottom data package module of the data storage layer.

[0077] Step 5: Solve the component equations; specifically, set the number of equations in the component equations to the number of components in the corresponding component system minus 1, call the custom scalar / vector equation solver in the solver layer, and modify the data in the custom scalar / vector equation data package in the data storage layer.

[0078] Step 6: Solve the six custom scalar equations for anode electron potential, cathode electron potential, proton potential, membrane water content, liquid water pressure, and liquid water saturation; then call the custom scalar / vector equation solver in the solver layer.

[0079] Step 7: Calculate and update the physical quantities that need to be output, such as current density and maximum membrane water content; call the iterative solution strategy interface in the user-defined layer to access and modify the data in the custom scalar / vector equation data package and custom scalar / vector field data package in the underlying data package module of the data storage layer.

[0080] Step 8: Calculate and output the residuals of each equation; specifically, calculate the parameters of the continuity equation, momentum equation, energy equation, composition equation, and each user-defined scalar equation; if the residuals meet the requirements, the equation converges; if the residuals do not meet the requirements, return to step 3 to continue iterating.

[0081] The hydrogen fuel cell water-gas thermoelectric performance simulation software architecture described in this invention addresses the problems of complex solver underlying architecture and computational fluid dynamics algorithms and high learning costs in existing technologies. It develops a user-defined layer for users, ensuring that users can directly customize new differential equations, inter-equation coupling relationships, initial conditions, and boundary conditions without needing to understand the solver underlying architecture and computational fluid dynamics algorithms. This greatly simplifies the portability of models based on commercial software to self-developed solvers and reduces user learning costs by orders of magnitude.

[0082] In this invention, the solution can be performed in the control region that truly corresponds to the equation, thereby overcoming the two problems mentioned above and making the calculation results more accurate. It effectively avoids giving very small values ​​to the diffusion coefficient in regions where certain physical quantities are meaningless, thus avoiding abnormal distribution of physical quantities and the phenomenon of non-conservation of physical quantities at the interface. Secondly, this invention sets dual reference pressures at the cathode and anode. Specifically, each component system defines its own reference pressure, and then considers the reference pressure when updating the fluid density. That is, it can directly use an incompressible solver without using a traditional compressible solver, improving the stability of the calculation. Furthermore, for the calculation of the cathode electrochemical reaction rate in the electron-proton conduction equation, an aggregation model is introduced, which can comprehensively consider various catalyst layer design parameters, such as catalyst platinum loading, IC ratio, and Pt / C ratio, improving the simulation accuracy.

[0083] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.

Claims

1. A software system for simulating the water-gas thermoelectric performance of a hydrogen fuel cell, characterized in that, Includes the following hierarchical structure: The general input layer is used to receive general simulation parameters of the flow heat transfer system input by the user; The battery input layer is used to receive user-input parameters specific to hydrogen fuel cells. The user-defined layer is used to define relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces based on user-input hydrogen fuel cell-specific parameters. The solution strategy interfaces include solution strategy interfaces before program execution, solution strategy interfaces before starting the solution, and solution strategy interfaces before and after iteration. The data storage layer is used to store operational or generated data during the simulation process. The solver layer is used to solve the physical field according to the preset solver; The battery logic layer is used to update physical properties, source terms, and boundaries based on custom profile functions, custom diffusion coefficient functions, and custom source term functions defined by the user-defined layer, and to calculate the residuals of preset equations through the solver layer. The solver layer includes a flow field solver, a temperature field solver, and a custom scalar / vector equation solver; The custom scalar / vector equation solver has built-in custom diffusion coefficient functions and custom source term functions. The built-in custom diffusion coefficient function modifies the diffusion coefficient field by calling data from the data storage layer, and the built-in custom source term function modifies the source term field by calling data from the data storage layer. The battery logic layer includes a flow heat transfer module, an anode / cathode composition module, an anode / cathode electronic potential module, a proton potential module, a membrane water content module, a liquid water pressure module, and a liquid water saturation module. The anode / cathode component modules construct independent anode and cathode component systems, respectively. The anode component system includes anode hydrogen and anode water vapor components, while the cathode component system includes cathode oxygen, cathode water vapor, and cathode nitrogen components. In each component system, the mass fraction of the last component is solved using a normalized equation, and the mass fraction of the remaining components is obtained by solving the component conservation equation using a custom scalar / vector equation solver.

2. The simulation software system for the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, The user-input common parameters for simulating the flow heat transfer system include the mesh file for the hydrogen fuel cell, the common solver parameter settings, the material property settings, the boundary condition settings, and the operating condition settings.

3. The simulation software system for the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, The unique parameters of a hydrogen fuel cell include its geometric parameters, physical properties, electrochemical parameters, and operating parameters.

4. The simulation software system for the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, The solution strategy interface before program execution is used to read the user-input hydrogen fuel cell-specific parameters and write them into the relevant physical quantities defined in the user-defined layer; the solution strategy interface before and after iteration is used to process the physical field coupling relationship and statistically analyze the preset key data after iteration.

5. The simulation software system for the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, The data storage layer includes a low-level data packet module, which is used to store flow and heat transfer data, component data, custom scalar / vector equation data and custom profile data during the simulation process. The underlying data package module includes flow heat transfer data packages, component data packages, custom scalar / vector equation data packages, and custom profile data packages; The flow heat transfer data package is used to store density, velocity, and temperature; the component data package is used to store the mass fraction of hydrogen / water vapor at the anode and oxygen / water vapor / nitrogen at the cathode, respectively; the custom scalar / vector equation data package is used to store the electron potential, proton potential, and film water content at the anode / cathode; and the custom profile data package is used to store the custom boundary condition profiles for each physical field.

6. The simulation software system for the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, A custom profile function is used to define boundary conditions such as velocity, temperature, electronic potential, and liquid water pressure, and is dynamically loaded into the solver layer through the custom profile registration module in the data storage layer.

7. The software system for simulating the water-gas thermoelectric performance of a hydrogen fuel cell according to claim 1, characterized in that, The battery logic layer includes a flow heat transfer module, an anode / cathode composition module, an anode / cathode electronic potential module, a proton potential module, a membrane water content module, a liquid water pressure module, and a liquid water saturation module; among them, the boundary conditions of the flow heat transfer module, the anode / cathode composition module, the anode / cathode electronic potential module, the liquid water pressure module, and the liquid water saturation module are implemented through explicit assignment.

8. A method for simulating the water-gas thermoelectric performance of a hydrogen fuel cell, characterized in that, The software system for simulating the water-gas thermoelectric performance of hydrogen fuel cells as described in any one of claims 1-7 is used. A simulation method for the water-gas thermoelectric performance of hydrogen fuel cells includes the following steps: The general input layer receives general simulation parameters of the flow heat transfer system from the user. The battery input layer receives user-input parameters specific to hydrogen fuel cells. Through the user-defined layer, based on the unique parameters of the hydrogen fuel cell input by the user, relevant physical quantities, custom profile functions, custom diffusion coefficient functions, custom source term functions, and solution strategy interfaces are defined; The battery logic layer calls the solver layer to perform physical field coupling solutions, and outputs the residuals of each equation and preset key statistical data.

Citation Information

Patent Citations

  • Proton exchange membrane hydrogen fuel cell transient condition numerical simulation method based on OpenFOAM platform

    CN114050294A

  • Software architecture suitable for combustion chamber simulation, simulation method, equipment and medium

    CN119294091A