Disclosure of Invention
In order to solve the technical problem of low simulation efficiency of the existing method, the embodiment of the invention provides a soil moisture random simulation method, a device and computer equipment, so that the efficiency of soil moisture random simulation is improved.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a random simulation method of soil moisture, which comprises the following steps:
acquiring initialization data, wherein the initialization data comprise a soil moisture initial value, a soil boundary condition, an expectation of a soil hydrodynamic parameter, a variance of the soil hydrodynamic parameter, a correlation length of the soil hydrodynamic parameter, space discrete node information and simulation time layer information;
carrying out space dispersion on each point of the vertical simulation profile, dividing the total length of the simulation profile into a plurality of nodes according to the simulation time layer information, and determining the space coordinate and the control volume of each node on each simulation time layer;
estimating theoretical parameters of each node on each simulation time layer according to a classic soil water motion equation parameter calculation strategy and a theoretical parameter calculation strategy, wherein the theoretical parameters are the expected diffusivity and conductivity of soil water;
sequentially converting a theoretical formula into an iterative solution matrix on each node on each simulation time layer according to the sequence of the simulation time layers according to the determined space coordinates and control volume of each node on each simulation time layer and the estimated theoretical parameters, and repeatedly iterating until the convergence precision requirement is met;
in response to reaching the ending simulated time horizon, a soil moisture expectation is output.
Preferably, the spatially dispersing each point of the vertical simulation profile includes:
and (3) performing space dispersion on each point of the vertical simulation profile by adopting a finite volume method.
Preferably, the theoretical formula is sequentially converted into an iterative solution matrix on each node on each simulation time layer according to the sequence of the simulation time layers, wherein the solution matrix is a general triangular matrix.
Preferably, the acquiring initialization data includes:
and receiving initialization data input by a user, wherein the initialization data further comprises preset convergence precision.
The embodiment of the invention also provides a soil moisture random simulation device, which comprises:
the acquisition module is used for acquiring initialization data;
the determining module is used for carrying out space dispersion on each point of the vertical simulation profile, dividing the total length of the simulation profile into a plurality of nodes according to the information of the simulation time layer, and determining the space coordinate and the control volume of each node on each simulation time layer;
the estimation module is used for estimating the theoretical parameters of each node on each simulation time layer according to the classic soil water motion equation parameter calculation strategy and the theoretical parameter calculation strategy;
the solving module is used for sequentially converting a theoretical formula into an iterative solving matrix on each node on each simulation time layer according to the sequence of the simulation time layers according to the determined space coordinates and control volume of each node on each simulation time layer and the estimated theoretical parameters, and repeatedly iterating until the convergence precision requirement is met;
an output module to output a soil moisture expectation in response to reaching the ending simulated time horizon.
An embodiment of the present invention further provides a computer device, including: a processor and a memory for storing a computer program capable of being executed on the processor, wherein the processor is configured to implement the soil moisture stochastic simulation method when the computer program is executed.
The embodiment of the invention also provides a computer storage medium which stores an executable program, and the executable program is executed by a processor to realize the soil moisture random simulation method.
The random simulation method for soil moisture provided by the embodiment converts the problem of solving the classic soil water motion equation for hundreds of times into the problem of solving the one-time theoretical formula, thereby greatly improving the simulation efficiency.
Detailed Description
The present invention will be described in further detail with reference to examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The embodiment of the invention provides a random soil moisture simulation method, which belongs to the technical field and can be applied in the following scenes: the expectation of soil moisture of each point of the vertical section at different time periods is quickly and accurately simulated. It can be understood that, in the existing soil moisture random simulation technology, referring to fig. 4, the simulation process is mainly as follows:
firstly, generating a plurality of saturated hydraulic conductivity parameter random realization samples according to the characteristics of a saturated hydraulic conductivity parameter random field (theoretically, when the number of samples is infinite, all random realization sample sets are equivalent to an input random field; in actual operation, the number of samples is more than 100, and the requirement of random simulation precision can be met);
secondly, sequentially carrying out soil water motion equation simulation (namely solving a primary formula) on a single random realization sample by adopting a classic soil water motion equation so as to ensure that each random realization corresponds to a set of time-space simulation results of soil moisture;
thirdly, counting the simulation results of all samples to obtain the expectation of the soil moisture time-space simulation;
wherein, the classic soil water motion equation is expressed as follows:
wherein θ is soil moisture and is a variable with respect to time t and spatial position z; d and K are respectively the diffusivity and the conductivity of soil moisture theta, and the specific expression is as follows:
wherein, K s,one Is a deterministic value for saturation hydraulic conductivity, and can also be a single random sample; alpha and lambda are soil moisture characteristic curve parameters, theta r Is the lower limit of the soil moisture, θ s The upper limit value of the soil moisture is set.
It can be known from the above-mentioned prior art that the conventional method needs to solve the classic soil water motion equation hundreds of times, and the soil water motion equation (formula) itself is a highly nonlinear partial differential equation, so that it takes a lot of calculation time to perform the soil moisture random simulation. In addition, the existing method cannot provide a direct theoretical formula, the calculation result has no universality, and once the simulation condition is changed or a certain sample has a convergence problem, the calculation needs to be carried out again.
Therefore, how to provide a method for quickly performing random simulation of soil moisture on the basis of meeting the simulation accuracy becomes a technical problem which needs to be solved urgently.
It is noted that the method is performed by a computer device. It should be noted that, the computer device herein refers to any device having a computing processing function, including but not limited to a fixed terminal device or a mobile terminal device. The fixed terminal device may include, but is not limited to, a desktop computer or a computer device, and the mobile terminal device may include, but is not limited to, a mobile phone, a tablet computer, a wearable device or a notebook computer.
The technical solution of the present invention is further described in detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 5, an embodiment of the present invention provides a soil moisture random simulation method, including:
step S11: acquiring initialization data, wherein the initialization data comprise a soil moisture initial value, a soil boundary condition, an expectation of a soil hydrodynamic parameter, a variance of the soil hydrodynamic parameter, a correlation length of the soil hydrodynamic parameter, space discrete node information and simulation time layer information;
step S12: carrying out space dispersion on each point of the vertical simulation profile, dividing the total length of the simulation profile into a plurality of nodes according to the simulation time layer information, and determining the space coordinate and the control volume of each node on each simulation time layer;
step S13: estimating theoretical parameters of each node on each simulation time layer according to a classic soil water motion equation parameter calculation strategy and a theoretical parameter calculation strategy, wherein the theoretical parameters are the expected diffusivity and conductivity of soil water;
step S14: sequentially converting a theoretical formula into an iteration solving matrix on each node on each simulation time layer according to the sequence of the simulation time layers according to the determined space coordinates and control volume of each node on each simulation time layer and the estimated theoretical parameters, and repeatedly iterating until the convergence precision requirement is met;
step S15: in response to reaching the ending simulated time horizon, a soil moisture expectation is output.
In step S11, the simulation time layer information is determined by being divided in advance, specifically: dividing the simulation total time period T into N time layers, and counting the time period of the jth time layer as delta T j Namely:
in step S14, the expression of the theoretical formula is:
wherein,
is a variable with respect to time t and spatial position z for the soil moisture expectation; d
new And K
new Are all theoretical parameters, and the corresponding physical concepts are respectively expected soil moisture
Diffusivity and conductivity. Specifically, the theoretical parameter specific expression is as follows:
wherein,
Δd=Δk+0.5f 2 (0.26+1.16λ 2 -0.95λ-0.0026α)
wherein, K
s For saturation of the hydraulic conductivity parametric random fields, GMEAN (K)
s ) Representing the geometric expectation of the parametric random field, eta representing the correlation length of the parametric random field, f
2 Representing the variance of the parametric random field; alpha and lambda are soil moisture characteristic curve parameters, theta
r Is the lower limit of the soil moisture, θ
s The upper limit value of the soil moisture is set;
and
is a parametric structure of the classic soil water motion equation, but requires the expectation of replacing variables with soil moisture
And a geometric expectation that the saturated hydraulic conductivity parameter needs to be replaced with a random field of that parameter; delta k and delta d are correction coefficients for the parameter structure of the classical soil water motion equation and comprise the variance f of the saturated hydraulic conductivity parameter random field
2 And correlation length η information.
It should be noted that when the saturated hydraulic conductivity parameter does not have spatial variability, the variance f 2 Taking 0, correspondingly, both Δ k and Δ d are 0, the equation becomes the classical soil water motion equation,this conforms to the actual physical concept.
In the embodiment, the method converts the problem of solving the classic soil water motion equation for hundreds of times into the problem of solving the one-time theoretical formula, so that the simulation efficiency is greatly improved, meanwhile, the theoretical formula in the method can directly express the soil water expectation and standard deviation by the mathematical formula, and the universality of the calculation result is improved.
In some embodiments, spatially discretizing the points of the vertical simulation profile includes:
performing space dispersion on each point of the vertical simulation profile by adopting a finite volume method;
specifically, a finite volume method is adopted to carry out spatial dispersion on each point of the vertical section, the total length Z of the simulation section is divided into M nodes, the spatial coordinate of the ith node is measured to be zi, the control volume is measured to be delta zi, and the relation between the control volume and the spatial coordinate is shown in FIG. 6. The total length of the simulated section and each node satisfy the following relations:
wherein, Δ z i-1/2 Denotes z i And z i-1 Distance between, Δ z i+1/2 Denotes z i+1 And z i The distance therebetween, and Δ zi satisfy the following relationship:
in some embodiments, the theoretical formula is sequentially converted into an iterative solution matrix on each node on each simulation time layer according to the sequence of the simulation time layers, wherein the solution matrix is a general triangular matrix;
specifically, the method sequentially converts the theoretical formula into an iterative solution matrix on each node on each simulation time layer according to the sequence of the simulation time layers, and the main process is as follows:
for the jth time layer, the discretization meter tri-diagonal coefficient matrix is
And
right-hand side vector of
The variable matrix is solved by the equation
The iterative solution matrix of the theoretical formula can be expressed as:
wherein,
wherein,
indicating the expectation of soil moisture at node i at the jth time layer in the kth iteration,
respectively representing the arithmetic mean value of the theoretical parameters Dnew and Knew of the node i and the node i-1 at the j +1 time level in the k iteration step,
respectively representing the arithmetic mean values of the theoretical parameters Dnew and Knew of the node i and the node i +1 on the j +1 time layer in the k iteration step. When the current time layer is solved, entering the next time layer, and judging whether the current time layer is an ending time layer by using a time layer judgment module; if the time reaches the end time layer, stopping the operation and outputting the expected soil moisture; otherwise, entering the next time interval operation process.
In some embodiments, the obtaining initialization data comprises:
receiving initialization data input by a user, wherein the initialization data further comprises preset convergence precision;
as shown in fig. 2, an embodiment of the present invention further provides an area measurement device for agricultural land, including:
an obtaining module 21, configured to obtain initialization data;
the determining module 22 is configured to perform spatial dispersion on each point of the vertical simulation profile, divide the total length of the simulation profile into a plurality of nodes according to the simulation time layer information, and determine a spatial coordinate and a control volume of each node on each simulation time layer;
the estimation module 23 is configured to estimate a theoretical parameter of each node on each simulation time layer according to a classical soil water motion equation parameter calculation strategy and a theoretical parameter calculation strategy;
the solving module 24 is configured to sequentially convert the theoretical formula into an iterative solving matrix on each node on each simulation time layer according to the determined spatial coordinate and control volume of each node on each simulation time layer and the estimated theoretical parameters, and iterate repeatedly until the convergence accuracy requirement is met;
and an output module 25 for outputting the soil moisture expectation in response to reaching the ending simulated time horizon.
In some embodiments, the obtaining module 21 is specifically configured to:
acquiring an initial value of soil moisture, a soil boundary condition, an expectation of soil hydrodynamic parameters, a variance of soil hydrodynamic parameters, a correlation length of the soil hydrodynamic parameters, space discrete node information and simulation time layer information.
In some embodiments, the obtaining module 21 is further configured to:
receiving and acquiring preset convergence precision input by a user;
in some embodiments, the determining module 22 is further configured to:
performing space dispersion on each point of the vertical simulation profile by adopting a finite volume method;
in some embodiments, the output module 25 specifically:
and sequentially converting the theoretical formula into an iterative solving matrix on each node on each simulation time layer according to the sequence of the simulation time layers, wherein the solving matrix is a general triangular matrix.
Here, it should be noted that: the description of the above apparatus items is similar to the description of the above method items, and the description of the beneficial effects of the same method is not repeated. For technical details not disclosed in the embodiments of the apparatus of the present invention, reference is made to the description of the embodiments of the method of the present invention.
The invention also provides a specific embodiment to further understand the soil moisture random simulation method of the embodiment, which comprises the following specific steps:
the method realizes the soil moisture random simulation fast calculation process as shown in figure 5, and the steps of firstly carrying out simulation initialization comprise reading in the following information: initial value of soil moisture, boundary condition, expectation, variance and correlation length of soil hydrodynamic parameters, space discrete node information and simulation time layer information. Dividing the total simulation time interval T into N time layers, and counting the time interval of the jth time layer as delta T j Namely:
and secondly, before entering a theoretical formula solving module, estimating theoretical parameters through a classic soil water motion equation parameter estimation module and a theoretical parameter estimation module. The calculation formula of the classic soil water motion equation parameter estimation module is formed by a formula and a formula, and the theoretical parameter estimation module is formed by a formula and a formula.
And step three, entering a theoretical formula solving module. The specific method comprises the following steps:
1) the method is characterized in that each point of the vertical section is subjected to space dispersion by adopting a finite volume method, the total length Z of the simulation section is divided into M nodes, the spatial coordinate of the ith node is calculated to be zi, the control volume is controlled to be delta zi, and the relation between the control volume and the spatial coordinate is shown in figure 6. The total length of the simulated section and each node satisfy the following relations:
wherein, Δ z i-1/2 Denotes z i And z i-1 Distance between, Δ z i+1/2 Denotes z i+1 And z i The distance therebetween, and Δ zi satisfy the following relationship:
2) and converting the theoretical formula into an iterative solution matrix on each node. For the jth time layer, the discretization meter tri-diagonal coefficient matrix is
And
right-hand side vector of
The variable matrix is solved by the equation
The iterative solution matrix of the theoretical formula can be expressed as:
wherein,
wherein,
representing the expectation of soil moisture at node i at time level j in the kth iteration,
respectively representing the arithmetic mean values of the theoretical parameters Dnew and Knew of the node i and the node i-1 on the j +1 th time layer in the kth iteration step,
respectively representing the arithmetic mean values of the theoretical parameters Dnew and Knew of the node i and the node i +1 on the j +1 time layer in the k iteration step.
3) And solving the formula by adopting a general triangular matrix solver, and repeatedly iterating until the convergence precision requirement is met.
And fourthly, immediately entering the next time layer after the current time layer is solved, and judging whether the current time layer is the ending time layer by using a time layer judgment module. If the time reaches the end time layer, stopping the operation and outputting the expected soil moisture; otherwise, entering the next time layer operation process, namely the step II.
The method has the beneficial effects that:
1. the convergence is better. In the prior art, the classical soil water motion equation (parabolic partial differential equation) needs to be solved by calling different saturation hydraulic conductivity randomly for multiple times, and the equation solving non-convergence easily occurs for certain random realization; the method only needs to solve a theoretical formula (also a parabolic partial differential equation) once, and greatly reduces the probability of simulation non-convergence.
2. The simulation efficiency is high. The process of solving the classic soil water motion equation for hundreds of times is converted into the process of estimating theoretical parameters and solving a theoretical formula once, and simulation tests show that the simulation efficiency is greatly improved while the simulation precision is met.
As shown in fig. 3, the embodiment of the present invention further provides a computer device, which includes a processor 31 and a memory 32 for storing a computer program capable of running on the processor, wherein the processor is configured to implement the method applied to the computer program when running the computer program.
In some embodiments, memory 32 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 32 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And the processor 31 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 31. The Processor 31 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may reside in ram, flash, rom, prom, eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 32, and the processor 31 reads the information in the memory 32 and completes the steps of the method in combination with the hardware.
In some embodiments, the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Still another embodiment of the present invention provides a computer storage medium storing an executable program which, when executed by a processor 31, can implement the steps of the area measuring method applied to the agricultural land. For example, as one or more of the methods shown in fig. 1.
In some embodiments, the computer storage medium may include: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: the technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.