Wind resource calculation method, device and electronic equipment
Through OpenFOAM, the automatic calculation of multiple sectors of the wind farm is solved, and the problem of low CFD simulation efficiency of wind farms in the existing technology is achieved, the rapid and accurate wind resource evaluation is achieved, and the micro-site selection process of the wind farm is simplified.
Patent Information
- Application Number
- CN202111344542.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-11-12
AI Technical Summary
Parameters need to be manually set before the sector simulation calculation of CFD simulation in existing wind farms, resulting in low wind resource evaluation efficiency and cannot meet the rapid evaluation requirements of wind farms on complex terrain.
OpenFOAM is used to automatically calculate multiple sectors of the wind farm. By pre-setting basic study files and parameter sets, the automatic, fast and accurate calculation of multi-sectors is realized, and the calculation efficiency of wind resource distribution information is improved.
It improves the efficiency of wind resource assessment, simplifies the micro-site selection process of wind farms, and reduces time and cost.
Smart Images

Figure CN114169576B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy wind power generation, and in particular to a wind resource calculation method, device and electronic equipment. Background Art
[0002] With the continuous development of the wind power industry, the micro-site selection of wind farms has gradually evolved from simple flat terrain to complex terrain with hills and gullies. The success or failure of micro-site selection directly affects the economic efficiency of each wind farm. Therefore, the micro-site selection of wind farms is of great significance. Among them, wind resource assessment is an important support for the micro-site selection of wind farms. Wind resource assessment is a quantitative assessment of the wind energy distribution and turbulence intensity characteristics in the flow field of a wind farm. CFD (Computational Fluid Dynamics) simulation is an important and mature means of wind resource assessment. It can not only achieve high calculation accuracy, but also achieve faster calculation speed, which can save a lot of construction costs, and therefore has been widely used.
[0003] In practical applications, the scope of a wind farm is generally tens to hundreds of square kilometers. For such a large-scale CFD simulation, the existing method is mainly to divide the wind farm into multiple sectors and manually set the simulation parameters for each sector before simulating it, which consumes a lot of time and reduces the speed of wind resource assessment and cannot meet the needs of actual applications. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a wind resource calculation method, device and electronic device to alleviate the above-mentioned problem. By using OpenFOAM to automatically calculate multiple sectors of a wind farm, compared with the existing method in which parameters must be manually set before simulation calculation of each sector, the calculation efficiency of multiple sectors and the calculation efficiency of wind resource distribution information of the wind farm are improved, thereby improving the evaluation efficiency of wind resources, and further facilitating the micro-site selection of wind farms in the later stage, which has important practical value.
[0005] In a first aspect, an embodiment of the present invention provides a wind resource calculation method, which is applied to an electronic device configured with OpenFOAM, the method comprising: obtaining a basic example file and a parameter set of a wind farm; wherein the wind farm comprises multiple sectors, the basic example file is used to characterize basic description information of the wind farm, the parameter set comprises parameters corresponding to each sector, the parameters comprise at least one of the following: incoming flow direction, boundary parameters and turbulent kinetic energy dissipation rate; based on the basic example file and the parameters corresponding to each sector, the multiple sectors are automatically calculated through OpenFOAM to obtain calculation results for each sector; wherein the calculation results include wind speed results and turbulent kinetic energy results; according to the calculation results of the multiple sectors, the wind resource distribution information of the wind farm is obtained.
[0006] Preferably, an embodiment of the present invention provides a first possible implementation of the first aspect, wherein the above-mentioned parameters also include: the number of parallel computing threads; the above-mentioned step of automatically calculating multiple sectors through OpenFOAM based on the basic example file and the parameters corresponding to each sector, including: for each sector, copying the basic example file, and dividing the copied basic example file into multiple blocks; and, based on OpenFOAM, performing parallel computing on multiple blocks according to the number of parallel computing threads corresponding to the sector, and obtaining the calculation result of the sector according to the calculation sub-result of each block.
[0007] Preferably, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein, before the above-mentioned step of obtaining the basic example file of the wind farm, the method also includes: obtaining terrain data of the wind farm; determining the calculation domain corresponding to the wind farm based on the terrain data; gridding the calculation domain to generate a calculation domain grid corresponding to the wind farm; obtaining basic setting information of the wind farm; wherein the basic setting information includes boundary surface information, boundary conditions and monitoring positions of the wind farm; and generating the basic example file of the wind farm based on the calculation domain grid and the basic setting information.
[0008] Preferably, an embodiment of the present invention provides a third possible implementation manner of the first aspect, wherein the above-mentioned step of meshing the computational domain to generate a computational domain mesh corresponding to the wind farm comprises: meshing the computational domain based on the blockMesh module of OpenFOAM to generate a computational domain mesh corresponding to the wind farm; or, meshing the computational domain according to a preset method to generate an initial computational domain mesh, and converting the initial computational domain mesh into a mesh recognizable by OpenFOAM to obtain a computational domain mesh corresponding to the wind farm; wherein the preset method comprises one of the following: gridgen, pointwise, gambit, icemcfd, tetgen, gmesh and ansys.
[0009] Preferably, an embodiment of the present invention provides a fourth possible implementation method of the first aspect, wherein the above-mentioned step of obtaining the terrain data of the wind farm includes: obtaining the original terrain data of the wind farm; performing operational processing on the original terrain data to obtain terrain data; wherein the operational processing includes at least one of the following: a cleaning operation and a repair operation.
[0010] Preferably, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein each sector carries priority information, and the above-mentioned step of automatically calculating multiple sectors through OpenFOAM includes: automatically calculating the multiple sectors in turn through OpenFOAM according to the priority information of the multiple sectors.
[0011] Preferably, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the above-mentioned step of automatically calculating multiple sectors through OpenFOAM further includes: obtaining the calculation order of the multiple sectors set by the user; and automatically calculating the multiple sectors in turn through OpenFOAM according to the calculation order.
[0012] In a second aspect, an embodiment of the present invention further provides a wind resource calculation device, which is applied to an electronic device configured with OpenFOAM, and the device includes: an acquisition module, used to obtain a basic example file and a parameter set of a wind farm; wherein the wind farm includes multiple sectors, the basic example file is used to characterize the basic description information of the wind farm, and the parameter set includes parameters corresponding to each sector, and the parameters include at least one of the following: incoming flow direction, boundary parameters and turbulent kinetic energy dissipation rate; a first calculation module, used to automatically calculate multiple sectors through OpenFOAM based on the basic example file and the parameters corresponding to each sector, to obtain a calculation result for each sector; wherein the calculation results include wind speed results and turbulent kinetic energy results; a second calculation module, used to obtain wind resource distribution information of the wind farm based on the calculation results of multiple sectors.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of the first aspect are executed.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] The embodiments of the present invention provide a wind resource calculation method, device and electronic device. By presetting basic example files and parameters of each sector, and automatically calculating multiple sectors of a wind farm through OpenFOAM, compared with the existing method in which parameters need to be manually set before simulation calculation of each sector, automatic, fast and accurate calculation of multiple sectors can be achieved, thereby improving the calculation efficiency of multiple sectors and the calculation efficiency of wind resource distribution information of the wind farm, thereby improving the evaluation efficiency of wind resources. In addition, the wind speed and turbulent kinetic energy data of the machine site can be automatically extracted, thereby facilitating the microscopic site selection of the wind farm in the later stage, and having important practical value.
[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flow chart of a wind resource calculation method provided by an embodiment of the present invention;
[0021] Figure 2 A flow chart of another wind resource calculation method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a wind resource calculation device provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In order to address the problem that in existing methods, parameters need to be manually set before simulation calculation of each sector, resulting in low wind resource assessment efficiency, the embodiments of the present invention provide a wind resource calculation method, device and electronic equipment, which improve the calculation efficiency of multiple sectors, improve the calculation efficiency of multiple sectors, and the calculation efficiency of wind resource distribution information of wind farms, thereby improving the wind resource assessment efficiency, and further facilitating the micro-site selection of wind farms in the later stage, which has important practical value.
[0026] To facilitate understanding of this embodiment, a wind resource calculation method provided by an embodiment of the present invention is first introduced in detail below. The execution subject is an electronic device configured with OpenFOAM. In practical applications, OpenFOAM, as an open source CFD model, not only has good computing power, but also avoids expensive software costs, thereby reducing application costs and facilitating promotion and application in practical applications. In addition, the electronic device can be a PC (Personal Computer) or a mobile smart device, such as a smart phone and a PDA, etc., which can be specifically set according to actual conditions, and the embodiment of the present invention does not limit this.
[0027] Based on the above electronic device, an embodiment of the present invention provides a wind resource calculation method, such as Figure 1 As shown, the method comprises the following steps:
[0028] Step S102, obtaining a basic example file and a parameter set of a wind farm; wherein the wind farm includes multiple sectors, the basic example file is used to characterize basic description information of the wind farm, and the parameter set includes parameters corresponding to each sector; the parameters include at least one of the following: incoming flow direction, boundary parameters, and turbulent kinetic energy dissipation rate;
[0029] Specifically, before the simulation calculation, the basic example file and parameter set of the wind farm are first obtained. The basic example file is compiled according to the settings and operations of the user or operator, and is used to characterize the basic description information of the wind farm. In addition, the wind farm is divided into multiple sectors according to the wind direction. The operator sets the parameters of each sector in advance, so that the simpleFoam solver in the open source computational fluid dynamics software OpenFOAM can be used to perform automatic calculations on multiple sectors, with the wind farm flow field as the simulation object.
[0030] Before obtaining the basic calculation example file of the wind farm, the method needs to compile the basic calculation example file. The specific process includes the following steps:
[0031] (I) obtaining terrain data of the wind farm; specifically, first obtaining the original terrain data of the wind farm; for example, using GlobalMapper to output the wind farm file in stl format and extending it to the lowest point of the calculation domain to obtain the original terrain data of the wind farm; then operating and processing the original terrain data to obtain terrain data; wherein the operating and processing includes at least one of the following: cleaning operation and repairing operation, such as checking and repairing missing surfaces, broken surfaces and repeated surfaces of the original terrain data to obtain terrain data;
[0032] (II) Determine the calculation domain corresponding to the wind farm according to the terrain data; specifically, determine the initial calculation domain of the wind farm according to the terrain data of the wind farm, and expand the initial calculation domain according to the coordinate range of the wind farm machine position in the terrain data, and use the reasonably designed calculation domain range as the calculation domain corresponding to the wind farm, thereby enriching the calculation domain of the wind farm and ensuring the assessment accuracy of wind resources, thereby improving the accuracy of the micro-site selection of the wind farm in the later stage;
[0033] (III) Meshing the computational domain to generate the computational domain mesh corresponding to the wind farm; specifically, one possible meshing method is: meshing the computational domain based on the blockMesh module of OpenFOAM to generate the computational domain mesh corresponding to the wind farm; for example, using the blockMesh module to generate the initial mesh, and encrypting the area where the wind farm is located by adjusting the mesh scale factor; and using the snappyHexMesh module to generate a hybrid mesh (including terrain mesh and boundary mesh), and generating a boundary layer mesh near the ground, and the total height of the boundary layer mesh must cover the hub height. Another possible meshing method is: meshing the computational domain according to a preset method to generate an initial computational domain mesh, and converting the initial computational domain mesh into a mesh recognizable by OpenFOAM to obtain the computational domain mesh corresponding to the wind farm; wherein the preset method includes one of the following: gridgen, pointwise, gambit, icemcfd, tetgen, gmesh and ansys, which can be set according to actual conditions;
[0034] (IV) obtaining basic setting information of the wind farm; specifically, the basic setting information includes but is not limited to: boundary surface information, boundary conditions and monitoring locations;
[0035] Among them, the boundary surface information includes the boundary surface name and boundary surface type. For example, the boundary surface names are set according to the direction as east, west, south, north, top and terrain; in the boundary surface type setting, side1 and side2 are added as spare boundary surfaces, and the type is sliding boundary. In actual application, if the incoming flow direction is westerly wind, the attributes of the spare boundary surface need to be set, and if it is north-south wind, the attributes of the spare boundary surface do not need to be set. Boundary conditions include but are not limited to: reference height, reference wind speed, reference flow direction, reference height and turbulent kinetic energy dissipation rate; for example, the reference height is set to 100 meters, the reference wind speed is set to 10m / s, a reference flow direction (i.e., incoming flow direction) is set to southwest wind, i.e., the wind direction vector is (1 1 0), the reference height is set to the coordinates of the lowest point of the terrain, and the turbulent kinetic energy dissipation rate is set as a function of the reference wind speed, etc.; and the monitoring position can use the sample tool to monitor the speed and turbulent kinetic energy value at the machine position and the hub height of the wind tower.
[0036] In practical applications, the parameters of each sector can be set through the parameter dictionary; the parameter dictionary includes k, ε, p and U; here k represents the boundary surface information, ε represents the turbulent kinetic energy dissipation rate, p represents the wind pressure, and U represents the wind speed. For example, in the parameter dictionary, the boundary conditions corresponding to the east inlet, east outlet, west inlet, west outlet, south inlet, south outlet, north inlet, and north outlet can be set, and named eastinlet, eastoutlet, westinlet, westoutlet, southinlet, southoutlet, northinlet, northoutlet, etc., respectively, and the incoming wind direction and turbulent kinetic energy dissipation rate of each sector can also be set.
[0037] (V) Generate a basic calculation example file of the wind farm according to the calculation domain grid and basic setting information; further, compile a shell script file in combination with the above calculation domain grid and basic setting information to drive the basic calculation example file of the wind farm to copy, modify parameters and perform calculations, etc.
[0038] Furthermore, in the shell script file, the wind farm is divided into multiple sectors according to wind direction. For example, if 12 wind directions are set, the wind farm can be divided into 12 sectors. The specific number of sectors can be set according to actual conditions, and the embodiment of the present invention does not limit this.
[0039] Step S104, based on the basic example file and the parameters corresponding to each sector, OpenFOAM automatically calculates the multiple sectors to obtain the calculation results of each sector;
[0040] Specifically, when calculating each sector, OpenFOAM obtains the basic example file and the parameters corresponding to the sector, and modifies the basic example file based on the parameters of the sector, and then simulates the modified basic example file, such as inputting the modified basic example file corresponding to each sector into OpenFOAM, and simulating and calculating each sector based on the simpleFoam solver, combined with the wall function, turbulence model and wind profile calculation model, so as to obtain the calculation result of the sector, where the calculation result includes but is not limited to the wind speed result and turbulent kinetic energy result, such as displaying the calculated wind pressure p and wind speed U of the sector in the parameter dictionary, where the calculation result may be the corresponding results of multiple machine sites in the sector. Therefore, when OpenFOAM automatically calculates multiple sectors, since each sector modifies the basic example file according to the corresponding parameters, the accuracy and independence of the calculation of each sector are guaranteed, thereby ensuring the evaluation accuracy of wind resources and improving the accuracy of micro-site selection of wind farms in the later stage.
[0041] In one possible automatic calculation method, each sector carries priority information, and the process of automatically calculating multiple sectors through OpenFOAM is as follows: according to the priority information of multiple sectors, OpenFOAM automatically calculates multiple sectors in sequence. For example, the priority information of the sector is determined according to the numbering information of the sector, and OpenFOAM automatically calculates multiple sectors one by one according to the numbering information until all sectors are calculated. In another possible automatic calculation method, the process of automatically calculating multiple sectors through OpenFOAM is as follows: obtain the calculation order of multiple sectors set by the user; according to the calculation order, OpenFOAM automatically calculates multiple sectors in sequence. For example, before the calculation starts, the user pre-sets the calculation order of multiple sectors. During the calculation process, OpenFOAM automatically calculates multiple sectors in sequence according to the calculation order until all sectors are calculated. It should be noted that the user can also only set some of the multiple sectors for calculation, so that OpenFOAM automatically calculates some of the set sectors, which can be set according to actual conditions.
[0042] In addition, in the actual calculation process, since the scope of wind farms is generally tens of square kilometers to hundreds of square kilometers, for such a large-scale CFD simulation, in order to ensure its calculation accuracy, it is necessary to draw sufficiently fine grids, the number of which is generally in the tens of millions. Therefore, in order to improve the calculation efficiency, parallel calculation must be used. If serial calculation is used, the calculation time will increase exponentially, and wind farm simulation generally requires multi-sector calculations. If each sector is manually set, it will take a lot of time.
[0043] Furthermore, in order to improve the computing efficiency of each sector, the basic example file copied by each sector is also decomposed into multiple blocks, and the number of divided blocks can be set according to the actual situation. At this time, the parameters corresponding to the sector also include the number of parallel computing threads, and the number of parallel computing threads can be obtained in advance based on the basic example file test. If the basic example file is tested in parallel, the number of parallel computing with the highest computing efficiency is used as the number of parallel computing threads. It should be noted that the number of parallel computing threads in each sector may be the same or different.
[0044] Specifically, for each sector, the basic example file is copied and divided into multiple blocks; and, based on OpenFOAM, the multiple blocks are calculated in parallel according to the number of parallel computing threads corresponding to the sector, and the calculation result of the sector is obtained according to the calculation sub-result of each block. Therefore, by performing parallel calculation on multiple blocks divided by the basic example file corresponding to the same sector, the calculation efficiency of the sector can be improved, thereby improving the evaluation efficiency of wind resources.
[0045] Step S106: obtaining wind resource distribution information of the wind farm according to the calculation results of the multiple sectors.
[0046] Specifically, after the calculation results of each sector are obtained by the above calculation, analysis is performed based on the calculation results of multiple sectors to obtain the wind resource distribution information of the wind farm, wherein the wind resource distribution information includes but is not limited to the relevant data of the wind turbines in the wind farm, such as the average wind speed, wind direction and turbulent kinetic energy throughout the year, and the turbulence intensity can also be calculated based on the turbulent kinetic energy, for example, the turbulence intensity is calculated according to the following formula:
[0047]
[0048] Among them, I p represents the turbulence intensity, i.e. the directional ambient turbulence intensity calculated at the aircraft position, k represents the turbulent kinetic energy, i.e. the turbulent kinetic energy calculated at the aircraft position hub height, U x , U y and U z It should be noted that the specific calculation process of each parameter in the above wind resource distribution information can refer to the prior art, and the embodiment of the present invention will not be described in detail here.
[0049] In addition, during the above analysis process, the wind resource distribution information of the wind farm can be automatically generated based on the calculation results of multiple sectors, and can also be combined with the analysis operations of the operator, such as combining the experience information input by the operator, such as entering the experience information through the command line, etc., to generate the wind resource distribution information of the wind farm, so as to better perform the micro-site selection of the wind farm based on the wind resource distribution information of the wind farm.
[0050] The embodiment of the present invention provides a wind resource calculation method. By presetting a basic example file and the parameters of each sector, and automatically calculating multiple sectors of a wind farm through OpenFOAM, compared with the existing method in which parameters must be manually set before simulation calculation of each sector, automatic, fast and accurate calculation of multiple sectors can be achieved, thereby improving the calculation efficiency of multiple sectors and the calculation efficiency of wind resource distribution information of the wind farm, thereby improving the evaluation efficiency of wind resources, and further facilitating the micro-site selection of wind farms in the later stage, which has important practical value.
[0051] For ease of understanding, 12 sectors are used as an example. Figure 2 As shown, a wind resource calculation method provided by an embodiment of the present invention specifically includes the following process:
[0052] (1) Obtain the terrain data of the wind farm and process the terrain data; for example, use GlobalMapper to output it as an STL format file, extend it to the lowest point of the calculation domain, and check and repair missing surfaces, broken surfaces, and repeated surfaces to make it complete terrain data;
[0053] (2) Naming boundaries and generating computational domain grids; Specifically, expand the scope of the computational domain according to the coordinate range of the wind farm site, design a reasonable computational domain range, use blockMesh to generate the initial grid, and adjust the grid scale factor to encrypt the area where the wind farm is located; use snappyHexMesh to generate a hybrid grid, generate a boundary layer grid near the ground, and the total height of the boundary layer grid must cover the hub height; and set the boundary surface names according to the direction to east, west, south, north, top and terrain; It should be noted that the computational domain grid here is a set of grids used to characterize the scope of the computational domain, and the specific grid size is determined according to multiple factors such as the scope of the computational domain;
[0054] (3) Setting boundary conditions; specifically, setting corresponding boundary conditions according to the wind direction, including but not limited to: reference height, reference wind speed, reference flow direction, reference height and turbulent kinetic energy dissipation rate, etc. For details, please refer to the above embodiment, and the embodiment of the present invention will not be described in detail here.
[0055] (4) Setting up machine position parameter monitoring; that is, setting up monitoring positions, such as using the sample tool to monitor the velocity and turbulent kinetic energy values at the machine position and the hub height of the wind tower; therefore, by setting boundary conditions and machine position parameter monitoring, combined with the above-mentioned computational domain grid, the basic example file of the wind farm is generated;
[0056] (5) Setting parallel computing; for example, performing parallel computing tests on the basic example file, obtaining the number of parallel computing threads with the highest computing efficiency, and setting the parallel computing dictionary file according to the number of parallel computing threads; here, the number of parallel computing threads for each sector can be set through the parallel computing dictionary file; in addition, in actual applications, the number of parallel computing threads for each sector can also be consistent with the number of blocks divided by the basic example file corresponding to the sector, and can be set according to actual conditions;
[0057] (6) Setting sectors in the basic example; for example, setting 12 sectors: 0°, 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, 300°, and 330°;
[0058] (7) Prepare execution scripts; use Shell language to write script files, and write the parameters of 12 sectors (such as wind direction angle) into the script files;
[0059] (8) Automatically calculate multiple sectors through OpenFOAM; specifically, first name the sectors, and modify the flow directions and boundary names of different sectors; then copy the basic example file and perform dictionary file modification; finally, perform partition calculation; taking the 90° sector as an example, first name the 90° sector as Sector90, copy the basic example file and name it Sector90, and set side1 to south and side2 to north in Sector90. Since the flow direction is due west, change the flow direction of the sector from (1 1 0) in the basic example file to (-1 0 0); change eastinlet to east and westoutlet to west in the U, p, k, and ε parameter dictionaries. And, partitioning the basic example file corresponding to the 90° sector, such as re-partitioning the computational domain grid in the basic example file to obtain multiple blocks, and performing parallel calculation according to the corresponding number of parallel calculation threads until the convergence condition set in the basic example file is reached, merging the calculation sub-results of each block, and deleting the partition file, only retaining the calculation sub-results of each block, so as to obtain the calculation results of the 90° sector according to the calculation sub-results of each block; it should be noted that the parameters of each sector also include the number of iteration steps or the convergence condition, etc. During the calculation process, each block corresponding to the sector is iteratively calculated until the number of iteration steps or the convergence condition is reached, and the calculation is stopped;
[0060] (9) Repeat the above step (8), change the parameters of different sectors to the corresponding incoming flow direction vector, change the corresponding boundary name, and perform the calculation for all sectors in sequence;
[0061] (10) Extracting the parameters of the machine site; specifically, cyclically extracting the last line of data in the turbulent kinetic energy monitoring file and the wind speed vector monitoring file, that is, extracting the turbulent kinetic energy results and wind speed results in the calculation results of each sector, so as to obtain the parameters of the machine site (including wind speed and turbulent kinetic energy data) according to the turbulent kinetic energy results and wind speed results in the calculation results of each sector, so as to facilitate the microscopic site selection of the wind farm in the later stage. It should be noted that the machine site here includes each wind turbine, the wind tower and the boundary point of the wind farm, etc., which can be set according to the actual situation.
[0062] In summary, the wind resource calculation method provided by the embodiment of the present invention is based on the open source software OpenFOAM, uses the Shell language to write a script file, compiles the wind direction angles of multiple sectors into the script file, sets parallel calculation and result merging commands, improves the calculation efficiency of the sector, and thus improves the evaluation efficiency of wind resources; at the same time, in the sector calculation process, it also deletes redundant data, reduces data redundancy, and saves data processing time; and it can also extract the wind speed and turbulent kinetic energy data of the machine site of each sector, thereby facilitating the micro-site selection of the wind farm in the later stage, which has important practical value.
[0063] Corresponding to the above method embodiment, the embodiment of the present invention further provides a wind resource calculation device, which is applied to an electronic device configured with OpenFOAM, such as Figure 3 As shown, the device includes an acquisition module 31, a first calculation module 32 and a second calculation module 33 connected in sequence; wherein the functions of each module are as follows:
[0064] The acquisition module 31 is used to acquire a basic calculation example file and a parameter set of a wind farm; wherein the wind farm includes a plurality of sectors, the basic calculation example file is used to characterize the basic description information of the wind farm, and the parameter set includes parameters corresponding to each of the sectors, and the parameters include at least one of the following: incoming flow direction, boundary parameters, and turbulent kinetic energy dissipation rate;
[0065] The first calculation module 32 is used to automatically calculate the multiple sectors through OpenFOAM based on the basic example file and the parameters corresponding to each sector to obtain the calculation results of each sector; wherein the calculation results include wind speed results and turbulent kinetic energy results;
[0066] The second calculation module 33 is used to obtain wind resource distribution information of the wind farm according to the calculation results of multiple sectors.
[0067] The embodiment of the present invention provides a wind resource calculation device, which pre-sets basic example files and parameters of each sector, and automatically calculates multiple sectors of a wind farm through OpenFOAM. Compared with the existing method in which parameters need to be manually set before simulation calculation of each sector, the device can realize automatic, fast and accurate calculation of multiple sectors, improve the calculation efficiency of multiple sectors, and the calculation efficiency of wind resource distribution information of the wind farm, thereby improving the evaluation efficiency of wind resources, and further facilitating the micro-site selection of wind farms in the later stage, which has important practical value.
[0068] In one possible embodiment, the above parameters also include: the number of parallel computing threads; the above first computing module 32 is also used to: for each sector, copy the basic example file, and divide the copied basic example file into multiple blocks; and, based on OpenFOAM, according to the number of parallel computing threads corresponding to the sector, perform parallel computing on multiple blocks, and obtain the calculation result of the sector according to the calculation sub-result of each block.
[0069] In another possible embodiment, before obtaining the basic example file of the wind farm, the device also includes: obtaining terrain data of the wind farm; determining the calculation domain corresponding to the wind farm based on the terrain data; gridding the calculation domain to generate a calculation domain grid corresponding to the wind farm; obtaining basic setting information of the wind farm; wherein the basic setting information includes boundary surface information, boundary conditions and monitoring positions of the wind farm; and generating the basic example file of the wind farm based on the calculation domain grid and the basic setting information.
[0070] In another possible embodiment, the above-mentioned meshing of the computational domain to generate the computational domain mesh corresponding to the wind farm includes: meshing the computational domain based on the blockMesh module of OpenFOAM to generate the computational domain mesh corresponding to the wind farm; or, meshing the computational domain according to a preset method to generate an initial computational domain mesh, and converting the initial computational domain mesh into a mesh recognizable by OpenFOAM to obtain the computational domain mesh corresponding to the wind farm; wherein the preset method includes one of the following: gridgen, pointwise, gambit, icemcfd, tetgen, gmesh and ansys.
[0071] In another possible embodiment, the obtaining of the terrain data of the wind farm includes: obtaining original terrain data of the wind farm; performing operation processing on the original terrain data to obtain terrain data; wherein the operation processing includes at least one of the following: a cleaning operation and a repair operation.
[0072] In another possible embodiment, each sector carries priority information, and the automatic calculation of multiple sectors by OpenFOAM includes: automatically calculating the multiple sectors in sequence by OpenFOAM according to the priority information of the multiple sectors.
[0073] In another possible embodiment, the automatic calculation of the multiple sectors by OpenFOAM further includes: obtaining a calculation order of the multiple sectors set by a user; and automatically calculating the multiple sectors in sequence by OpenFOAM according to the calculation order.
[0074] The wind resource calculation device provided in the embodiment of the present invention has the same technical features as the wind resource calculation method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0075] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned wind resource calculation method.
[0076] See also Figure 4As shown, the electronic device includes a processor 40 and a memory 41 . The memory 41 stores machine executable instructions that can be executed by the processor 40 . The processor 40 executes the machine executable instructions to implement the above-mentioned wind resource calculation method.
[0077] Further, Figure 4 The electronic device shown further includes a bus 42 and a communication interface 43 , and the processor 40 , the communication interface 43 and the memory 41 are connected via the bus 42 .
[0078] Among them, the memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 42 can be an ISA (Industrial Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Enhanced Industry Standard Architecture) bus, etc. The above-mentioned bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0079] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41 , and the processor 40 reads the information in the memory 41 and completes the steps of the method of the above embodiment in combination with its hardware.
[0080] This embodiment further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned wind resource calculation method.
[0081] The computer program product of the wind resource calculation method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0082] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0083] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0084] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0085] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0086] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for calculating wind resources, characterized in that: Applied to an electronic device configured with OpenFOAM, the method comprises: Obtaining a basic example file and a parameter set of a wind farm; wherein the wind farm includes a plurality of sectors, the basic example file is used to characterize basic description information of the wind farm, and the parameter set includes parameters corresponding to each of the sectors, and the parameters include at least one of the following: incoming flow direction, boundary parameters, and turbulent kinetic energy dissipation rate; Based on the basic example file and the parameters corresponding to each of the sectors, the OpenFOAM automatically calculates the multiple sectors to obtain the calculation results of each of the sectors; wherein the calculation results include wind speed results and turbulent kinetic energy results; Obtaining wind resource distribution information of the wind farm according to calculation results of the multiple sectors; Among them, the parameters also include: the number of parallel computing threads; the step of automatically calculating the multiple sectors through the OpenFOAM based on the basic example file and the parameters corresponding to each of the sectors includes: for each of the sectors, copying the basic example file, and dividing the copied basic example file into multiple blocks; and, based on the OpenFOAM, according to the number of parallel computing threads corresponding to the sector, parallel computing is performed on the multiple blocks, and the calculation result of the sector is obtained according to the calculation sub-result of each block.
2. The wind resource calculation method according to claim 1, characterized in that: Before the step of obtaining the basic calculation example file of the wind farm, the method further includes: Acquiring terrain data of the wind farm; Determining a calculation domain corresponding to the wind farm according to the terrain data; Dividing the computational domain into grids to generate computational domain grids corresponding to the wind farm; Acquire basic setting information of the wind farm; wherein the basic setting information includes boundary surface information, boundary conditions and monitoring positions of the wind farm; A basic calculation example file of the wind farm is generated according to the calculation domain grid and the basic setting information.
3. The wind resource calculation method according to claim 2, characterized in that: The step of dividing the computational domain into grids to generate a computational domain grid corresponding to the wind farm comprises: Meshing the computational domain based on the blockMesh module of OpenFOAM to generate a computational domain mesh corresponding to the wind farm; or, The computational domain is meshed according to a preset method to generate an initial computational domain mesh, and the initial computational domain mesh is converted into a mesh recognizable by OpenFOAM to obtain a computational domain mesh corresponding to the wind farm; wherein the preset method includes one of the following: gridgen, pointwise, gambit, icemcfd, tetgen, gmesh and ansys.
4. The wind resource calculation method according to claim 2, characterized in that: The step of acquiring the terrain data of the wind farm comprises: Acquiring original terrain data of the wind farm; The original terrain data is processed by operation to obtain the terrain data; wherein the operation includes at least one of the following: a cleaning operation and a repair operation.
5. The wind resource calculation method according to claim 1, characterized in that: Each of the sectors carries priority information, and the step of automatically calculating the plurality of sectors by using OpenFOAM comprises: According to the priority information of the multiple sectors, the multiple sectors are automatically calculated in sequence by OpenFOAM.
6. The wind resource calculation method according to claim 1, characterized in that: The step of automatically calculating the plurality of sectors by using OpenFOAM further includes: Obtaining a calculation order of the plurality of sectors set by a user; According to the calculation order, the plurality of sectors are automatically calculated in sequence by OpenFOAM.
7. A wind resource calculation device, characterized in that: Applied to an electronic device equipped with OpenFOAM, the device comprises: An acquisition module, used for acquiring a basic calculation example file and a parameter set of a wind farm; wherein the wind farm includes a plurality of sectors, the basic calculation example file is used for characterizing basic description information of the wind farm, the parameter set includes parameters corresponding to each of the sectors, and the parameters include at least one of the following: incoming flow direction, boundary parameters and turbulent kinetic energy dissipation rate; A first calculation module, configured to automatically calculate the plurality of sectors through OpenFOAM based on the basic example file and the parameters corresponding to each sector, to obtain a calculation result of each sector; wherein the calculation result includes a wind speed result and a turbulent kinetic energy result; A second calculation module, configured to obtain wind resource distribution information of the wind farm according to calculation results of the plurality of sectors; Among them, the parameters also include: the number of parallel computing threads; the first computing module also includes: for each of the sectors, copying the basic example file, and dividing the copied basic example file into multiple blocks; and, based on the OpenFOAM, according to the number of parallel computing threads corresponding to the sector, performing parallel computing on the multiple blocks, and obtaining the calculation result of the sector according to the calculation sub-result of each block.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are executed.
