CN113642258B - CFD model type selection method based on neural network - Google Patents

CFD model type selection method based on neural network Download PDF

Info

Publication number
CN113642258B
CN113642258B CN202111198669.2A CN202111198669A CN113642258B CN 113642258 B CN113642258 B CN 113642258B CN 202111198669 A CN202111198669 A CN 202111198669A CN 113642258 B CN113642258 B CN 113642258B
Authority
CN
China
Prior art keywords
neural network
maximum flow
water surface
layer
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111198669.2A
Other languages
Chinese (zh)
Other versions
CN113642258A (en
Inventor
罗强
朱蕾
单无牵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Wanjiang Gangli Technology Co ltd
Original Assignee
Chengdu Wanjiang Gangli Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Wanjiang Gangli Technology Co ltd filed Critical Chengdu Wanjiang Gangli Technology Co ltd
Priority to CN202111198669.2A priority Critical patent/CN113642258B/en
Publication of CN113642258A publication Critical patent/CN113642258A/en
Application granted granted Critical
Publication of CN113642258B publication Critical patent/CN113642258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a CFD model type selection method based on a neural network, which specifically comprises the following steps: modeling and simulating channels to obtain a data set, and dividing the data set into a training set and a testing set; adding the weight value and the bias of the first layer, outputting a result through the activation function, taking the result as the input of the second layer, continuing to carry out weighted summation, and outputting the result through the activation function; the weight and the bias of the network model are adjusted through back propagation, the cost function is reduced, the weight and the bias are continuously updated, and finally the error is minimized; inputting actual collected data in a neural network model to obtain the maximum flow rate, and selecting a processing method of the free water surface by analyzing and judging the maximum flow rate; and (4) whether the maximum flow velocity appears on the free water surface, if so, selecting a rigid cover hypothesis method, and otherwise, using a VOF method. The invention can judge the VOF method and the rigid cover hypothesis method by utilizing the neural network, and can use the most suitable method in the judgment channel, thereby saving the time cost.

Description

CFD model type selection method based on neural network
Technical Field
The invention relates to the technical field of water resource management, in particular to a CFD model type selection method based on a neural network.
Background
The flow velocity field of the channel, and therefore also whether the maximum flow velocity occurs at the free surface, is not known to the researcher prior to the simulation. After the simulation is completed, the flow velocity field can be obtained, and the position of the maximum flow velocity is known at this time. In the simulation process, two methods are used for treating the free water surface, one is a VOF method, and the other is a rigid cover hypothesis method.
In a document named 'open channel water flow three-dimensional numerical model verification based on FLuent' (Lujing, Wangdong, Guanzhu, Wangzhao, open channel water flow three-dimensional numerical model verification [ J ] based on FLuent, scientific technology and engineering, 2012,12(32):8579 plus 8582.), a rigid cover assumption method and a VOF method are respectively adopted to process free water surface, rectangular open channel test model data based on Tominaga, Nezu and the like are utilized, and the rigid cover assumption method and the VOF method are respectively adopted by FLuent software to simulate the open channel free water surface and compare and research the open channel water flow characteristics under different width-depth ratio conditions. The results of the analytical studies gave: compared with the analog value obtained by a rigid cover hypothesis method, the VOF analog value is closer to the test value, and the data obtained by the VOF method simulation is displayed when the width-depth ratio is less than 5, and the maximum flow velocity of the vertical line is in the range of 0.6-0.8 of the relative water depth.
The rigid cover hypothesis assumes the water surface as a regular rigid plane, whether the true maximum flow position is on the water surface or not, and if this method is used, only one result is obtained with the maximum flow at the free water surface. So the use of this method is not in line with the fact that the channel is simulated with the actual result that the maximum flow rate location is not at free surface.
The VOF method can simulate the real situation and only takes a long time.
Both methods have their own advantages and disadvantages, and overall, the VOF method is a general method, but the simulation time is too long to be several times that of the rigid cover hypothesis. The rigid cover hypothesis is a special method, but only for a specific type, it can be used only in channels where the maximum flow rate occurs at the free surface. Because the VOF method is a general method, only the VOF method is used in the simulation process, and the time cost is greatly increased.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a CFD model type selection method based on a neural network.
The purpose of the invention is realized by the following technical scheme:
a CFD model type selection method based on a neural network specifically comprises the following steps:
s1: modeling and simulating channels to obtain a data set, and dividing the data set into a training set and a testing set;
s2: building a BP neural network preliminary structure model, inputting a training set into the BP neural network, and training and adjusting the model;
s201: forward propagation: adding the first layer weight and the bias matrix, outputting a result through the activation function, taking the result as the input of the second layer, continuing to carry out weighted summation, and outputting the result through the activation function; the first layer of activation function is a tanh function, and the second layer of activation function is a sigmoid function;
s202: and (3) back propagation: adjusting the weight and the bias matrix of the network model through back propagation to reduce a cost function, continuously updating the weight and the bias matrix, and finally minimizing errors to obtain a complete BP neural network;
s3: and inputting actual collected data in the neural network model to obtain the maximum flow rate, and selecting a processing method of the free water surface by analyzing and judging the maximum flow rate.
The modeling simulation tool is CFD simulation software.
The data set parameters include bottom width, water depth, angle and inlet velocity.
The treatment method of the free water surface comprises a rigid cover presumption method and a VOF method.
The specific method for selecting the free water surface comprises the following steps: and (4) whether the maximum flow velocity appears on the free water surface, if so, selecting a rigid cover hypothesis method, and otherwise, using a VOF method.
In step S202, cross entropy is used as a cost function.
The invention has the beneficial effects that:
the invention can judge the VOF method and the rigid cover hypothesis method by utilizing the neural network, and the rigid cover hypothesis method is used instead of the VOF method when the rigid cover hypothesis method can be used in the judgment channel, thereby saving the time cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a block flow diagram of the present invention;
FIG. 2 is a graph of the output results of example 2 of the present invention;
FIG. 3 is a graph of the output results of example 3 of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention solves the problem of how to choose the rigid cover hypothesis method and the VOF method in the CFD simulation process.
Rigid cover presumption method: the application range is small, only aiming at the channel with the maximum flow rate on the free water surface, the simulation time is short;
VOF method: the method has wide application range, is suitable for all types of channels, and has longer simulation time which is several times of that of a rigid cover hypothesis method.
A CFD model type selection method based on a neural network specifically comprises the following steps:
modeling and simulating a channel to obtain a data set; take trapezoidal channels as an example.
The base width b is selected in the range of 0.5-1m with a spacing of 0.1 m.
The water depth h is 0.1-0.7m and the interval is 0.1 m.
The angle is chosen to be 110-130 deg., spaced 5 deg..
The inlet velocity ranges from 0.1 to 0.5m/s with an interval of 0.1 m/s.
According to the difference of the four parameters, the four parameters can be simulated to obtain a plurality of groups of data, and the creation of the data set is completed.
S1: modeling and simulating channels to obtain a data set, and dividing the data set into a training set and a testing set;
s2: building a BP neural network preliminary structure model, inputting a training set into the BP neural network, and training and adjusting the model;
s201: forward propagation: adding the first layer weight and the bias matrix, outputting a result through the activation function, taking the result as the input of the second layer, continuing to carry out weighted summation, and outputting the result through the activation function; the first layer of activation function is a tanh function, and the second layer of activation function is a sigmoid function;
s202: and (3) back propagation: adjusting the weight and the bias matrix of the network model through back propagation to reduce a cost function, continuously updating the weight and the bias matrix, and finally minimizing errors to obtain a complete BP neural network;
s3: and inputting actual collected data in the neural network model to obtain the maximum flow rate, and selecting a processing method of the free water surface by analyzing and judging the maximum flow rate.
The modeling simulation tool is CFD simulation software.
The data set parameters include bottom width, water depth, angle and inlet velocity.
The treatment method of the free water surface comprises a rigid cover presumption method and a VOF method.
The specific method for selecting the free water surface comprises the following steps: and (4) whether the maximum flow velocity appears on the free water surface, if so, selecting a rigid cover hypothesis method, and otherwise, using a VOF method.
In step S202, cross entropy is used as a cost function.
Example 1, as shown in FIG. 1
A data set is obtained through CFD simulation, and the widths b of the base in the embodiment are 0.5m, 0.6m, 0.8m and 1 m;
the water depth h is 0.1m, 0.2m, 0.3m, 0.4m, 0.5m, 0.6m and 0.7 m;
the values of the angles are 110 degrees, 115 degrees, 120 degrees, 125 degrees and 130 degrees;
the inlet velocities were 0.1m/s, 0.2 m/s, 0.3 m/s, 0.4 m/s and 0.5 m/s.
The data are used as input conditions of CFD simulation, and information of a flow velocity field and the position where the maximum flow velocity occurs can be obtained.
It should be noted that, when the maximum flow rate appears on the water surface, the output result is 1; and when the maximum flow velocity does not appear on the impurity water surface, outputting the result to be 0.
Combining the above parameters to obtain a plurality of sets of data, the data format is as follows:
TABLE 1
Figure DEST_PATH_IMAGE002
Through the steps, a plurality of groups of data can be obtained in total, some data are randomly selected to be used as a training set, and other data are used as a testing set.
And finally, prejudging the maximum flow velocity position through a neural network, wherein the BP neural network is adopted in the invention.
As shown in fig. 2, the BP neural network has three layers, namely an input layer, a hidden layer and an output layer; the input layer has four input characteristics which respectively correspond to an angle, a water depth, a bottom width and an inlet speed; the hidden layer is only one layer, and the size of the hidden layer is 10; the output layer is in two categories 0 and 1, corresponding to maximum flow rates off and on the water surface, respectively.
And judging to adopt a rigid cover hypothesis method or a VOF method by outputting the result 1 or 0. When the output result is 1, the free water surface treatment method is a rigid cover presumption method; when the output result is 0, the free water surface processing method is a VOF method.
Example 2, as shown in FIG. 1
A data set is obtained through CFD simulation, and the widths b of the base in the embodiment are 0.5m, 0.605m, 0.745m and 0.85 m;
the water depth h is 0.1m, 0.2m, 0.3m, 0.4m and 0.5 m;
the angles take the values of 130 degrees, 135 degrees and 140 degrees;
the inlet velocities were 0.4 m/s, 0.8 m/s, 1.2 m/s, 1.6 m/s, 2.0 m/s, 2.4 m/s and 2.8 m/s.
The data are used as input conditions of CFD simulation, and information of a flow velocity field and the position where the maximum flow velocity occurs can be obtained.
It should be noted that, when the maximum flow rate appears on the water surface, the output result is 1; and when the maximum flow velocity does not appear on the impurity water surface, outputting the result to be 0.
Combining the above parameters to obtain a plurality of sets of data, the data format is as follows:
TABLE 2
Figure DEST_PATH_IMAGE004
Through the steps, a plurality of groups of data can be obtained in total, some data are randomly selected to be used as a training set, and other data are used as a testing set.
And finally, prejudging the maximum flow velocity position through a neural network, wherein the BP neural network is adopted in the invention.
As shown in fig. 3, the BP neural network has three layers, namely an input layer, a hidden layer and an output layer; the input layer has four input characteristics which respectively correspond to an angle, a water depth, a bottom width and an inlet speed; the hidden layer is only one layer, and the size of the hidden layer is 10; the output layer is in two categories 0 and 1, corresponding to maximum flow rates off and on the water surface, respectively.
And judging to adopt a rigid cover hypothesis method or a VOF method by outputting the result 1 or 0. When the output result is 1, the free water surface treatment method is a rigid cover presumption method; when the output result is 0, the free water surface processing method is a VOF method.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (3)

1. A CFD model type selection method based on a neural network is characterized by specifically comprising the following steps:
s1: modeling and simulating a channel to obtain a data set, dividing the data set into a training set and a testing set, wherein parameters of the data set comprise bottom width, water depth, angle and entrance speed;
s2: building a BP neural network preliminary structure model, inputting a training set into the BP neural network, and training and adjusting the model;
s201: forward propagation: adding the first layer weight and the bias matrix, outputting a result through the activation function, taking the result as the input of the second layer, continuing to carry out weighted summation, and outputting the result through the activation function; the first layer of activation function is a tanh function, and the second layer of activation function is a sigmoid function;
s202: and (3) back propagation: adjusting the weight and the bias matrix of the network model through back propagation to reduce a cost function, continuously updating the weight and the bias matrix, and finally minimizing errors to obtain a complete BP neural network;
s3: inputting actual collected data in a neural network model to obtain the maximum flow rate, and selecting a free water surface processing method through analyzing and judging the maximum flow rate, wherein the free water surface processing method comprises a rigid cover hypothesis method and a VOF method, if the maximum flow rate appears on the free water surface, the rigid cover hypothesis method is selected for processing, and if not, the VOF method is used.
2. The method of claim 1, wherein the modeling simulation uses CFD simulation tool software.
3. The method of claim 1, wherein cross entropy is used as a cost function in step S202.
CN202111198669.2A 2021-10-14 2021-10-14 CFD model type selection method based on neural network Active CN113642258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111198669.2A CN113642258B (en) 2021-10-14 2021-10-14 CFD model type selection method based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111198669.2A CN113642258B (en) 2021-10-14 2021-10-14 CFD model type selection method based on neural network

Publications (2)

Publication Number Publication Date
CN113642258A CN113642258A (en) 2021-11-12
CN113642258B true CN113642258B (en) 2022-01-14

Family

ID=78426881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111198669.2A Active CN113642258B (en) 2021-10-14 2021-10-14 CFD model type selection method based on neural network

Country Status (1)

Country Link
CN (1) CN113642258B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104633856A (en) * 2015-01-27 2015-05-20 天津大学 Method for controlling artificial environment by combining CFD numerical simulation and BP neural network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106404105A (en) * 2016-08-30 2017-02-15 成都万江港利科技股份有限公司 Monitoring device for simultaneous measurement of water level and flow velocity
EP3537317B1 (en) * 2018-03-09 2022-11-16 Tata Consultancy Services Limited System and method for determination of air entrapment in ladles
US11373026B2 (en) * 2019-06-10 2022-06-28 General Electric Company Deep learning surrogate for turbulent flow

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104633856A (en) * 2015-01-27 2015-05-20 天津大学 Method for controlling artificial environment by combining CFD numerical simulation and BP neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COMPARISON AMONG NUMEROUS NUMERICAL ALTERNATIVES USING ANSYS ON OPEN CHANNEL CONFLUENCE;MA El-Mooty等;《ICCEEE "2nd International Conference of Chemical, Energy and Environmental Engineering ICCEEE 2019》;20190717;1-15 *
贾嘉等.基于神经网络液体晃动对罐体作用力的预测.《 2009中国汽车工程学会年会论文集》.2009,792-796. *

Also Published As

Publication number Publication date
CN113642258A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN109635511B (en) High-rise residential district compulsory emission scheme generation design method for generating countermeasure network based on conditions
CN111191316B (en) Response surface-based building natural ventilation performance optimization model and optimization method
CN103353923B (en) Adaptive space interpolation method and system thereof based on space characteristics analysis
CN109614638B (en) Indirect modeling urban wind environment CFD simulation method
CN109948214B (en) Urban multi-scale wind environment numerical simulation method
CN110348059A (en) A kind of channel flow field reconstructing method based on structured grid
CN112700326A (en) Credit default prediction method for optimizing BP neural network based on Grey wolf algorithm
CN106503365B (en) A kind of sector search method for SPH algorithm
CN116958188A (en) Smoke field multi-parameter prediction method based on physical information constraint neural network
CN111144027A (en) Approximation method based on BP neural network full characteristic curve function
CN113420289B (en) Hidden poisoning attack defense method and device for deep learning model
CN113642258B (en) CFD model type selection method based on neural network
CN110222368A (en) A method of core three-dimensional porosity and permeability is calculated using two dimension slicing
Waibel et al. Physics meets machine learning: Coupling FFD with regression models for wind pressure prediction on high-rise facades
CN113849910A (en) Dropout-based BiLSTM network wing resistance coefficient prediction method
CN113722894A (en) Model simplification-based fire spread simulation acceleration method and system
CN116186864B (en) Deep foundation pit model rapid modeling method and system based on BIM technology
CN103886636B (en) Real-time smoke rendering algorithm based on ray cast stepping compensation
CN113537354B (en) Aquifer structure staged stochastic inversion identification method based on deep learning
CN114942480A (en) Ocean station wind speed forecasting method based on information perception attention dynamic cooperative network
Bai et al. The improvement of interactive learning efficiency based on virtual simulation technology
CN109063268B (en) Iterative simulation method of crowd evacuation macro model
CN112560326A (en) Method and device for determining pressure field
CN118094163B (en) Digital physical model management system and method based on multi-feature association
CN117542104B (en) Face three-dimensional key point detection method based on self-supervision auxiliary learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Kind Selection Method for CFD Models Based on Neural Networks

Effective date of registration: 20230728

Granted publication date: 20220114

Pledgee: Bank of Guiyang Limited by Share Ltd. Chengdu Qingyang branch

Pledgor: CHENGDU WANJIANG GANGLI TECHNOLOGY Co.,Ltd.

Registration number: Y2023510000185

PE01 Entry into force of the registration of the contract for pledge of patent right