This description relates to simulating physical processes, e.g., fluid flow.
Lattice Boltzmann Method (LBM) is used to simulate a wide range of complex fluid flows around various geometric shapes, such as cars and airplanes. One of the critical parts of the overall solver is its algorithm in dealing with boundary conditions, namely an algorithm that handles the dynamics of LBM particle distributions at the edge of a fluid computational domain, such as near the surface of a solid wall. How well such an algorithm is formulated has direct consequences on the resulting accuracy of a simulation.
U.S. Pat. No. 5,848,260 described a novel technique ('260 slip algorithm) for a volumetric based formulation that ensured an exact conservation of mass as well as a precise enforcement of momentum fluxes across a boundary surface.
Although the patented approach has enjoyed great successes, there are some limitations. For example, resulting fluid quantities near the wall exhibit higher than desired artificial noisiness. Such an artifact manifests as effective surface roughness resulting in an increased numerical dissipation and thicker than desired boundary layer. This may adversely impact a next level accuracy of simulations, especially for very smooth and streamlined bodies. Secondly, the stability range of the patented process is not sufficiently high, hence it has limited its ability for simulation of higher speed fluid flows.
The process, or slip algorithm, described in the '260 patent is based on a volumetric representation of the lattice Boltzmann fluid domain together with a surface representation. In the '260 patent, the surface is described as a set of surface elements each of which has a specific surface area and surface normal. In the '260 patent, the boundary condition is realized by interactions of neighboring surface elements with the particles in the fluid domain.
However, in a novel slip algorithm discussed herein, the boundary condition is provided by interactions of all surface elements with the particles in the fluid domain, as defined by three fundamental processes of:
Gather incoming distribution functions (corresponding to those particles moving toward the boundary surface) from the fluid domain near a boundary surface according to the so-called parallelograms/parallelepipeds. Surface dynamics involves converting the set of incoming distribution functions to the set of outgoing distribution functions (corresponding to those particles reflected from the boundary surface) satisfying specific boundary conditions on mass and momentum fluxes through the boundary. Distribute the outgoing distribution functions back into the fluid domain near the boundary according to the parallelograms/parallelepipeds.
This approach significantly addresses the aforementioned limitations. Although the new approach has an overall framework similar to that in the '260 patent, there is a significant change in the surface dynamics of converting the set of incoming distribution functions to the set of outgoing distributions. More specifically, the process used in the surface dynamics is substantially changed in order to realize a zero momentum flux through the surface. Achieving an exactly zero tangential momentum flux is at the foundation of an accurate boundary condition algorithm, so that any specific amount of momentum flux could be subsequently added precisely. This change assists in overcoming the aforementioned long standing limitations.
According to an aspect, a computer implemented method for simulating elements of a fluid flow includes storing in a memory state vectors for a plurality of voxels, the state vectors comprising a plurality of entries that correspond to particular momentum states of a plurality of possible momentum states at a voxel, storing in a memory a representation of at least one surface that is sized and oriented independently of the size and orientation of the voxels, performing interaction operations on the state vectors, the interaction operations modelling interactions between elements of different momentum states, performing surface interaction operations on the representation of the surface, the surface interaction operations modelling interactions between the surface and substantially all elements of voxels, and performing move operations on the state vectors to reflect movement of elements to new voxels.
According to an additional aspect, a data processing system for simulating elements of a fluid flow, the data processing system includes instructions for causing the data processing system to store in a memory state vectors for a plurality of voxels, the state vectors comprising a plurality of entries that correspond to particular momentum states of a plurality of possible momentum states at a voxel, store in a memory a representation of at least one surface that is sized and oriented independently of the size and orientation of the voxels, perform interaction operations on the state vectors, the interaction operations modelling interactions between elements of different momentum states, perform surface interaction operations on the representation of the surface, the surface interaction operations modelling interactions between the surface and substantially all elements of voxels, and perform move operations on the state vectors to reflect movement of elements to new voxels.
According to an additional aspect, a non-transitory computer readable medium stores a computer program product for simulating elements of a fluid flow, the computer program product includes instructions for causing a data processing system to store in a memory state vectors for a plurality of voxels, the state vectors comprising a plurality of entries that correspond to particular momentum states of a plurality of possible momentum states at a voxel, store in a memory a representation of at least one surface that is sized and oriented independently of the size and orientation of the voxels, perform interaction operations on the state vectors, the interaction operations modelling interactions between elements of different momentum states, perform surface interaction operations on the representation of the surface, the surface interaction operations modelling interactions between the surface and substantially all elements of voxels, and perform move operations on the state vectors to reflect movement of elements to new voxels.
One or more of the above aspects may include amongst features described herein one or more of the following features.
The instructions to perform the surface interaction operations includes instructions to gather elements from a first set of at least one voxel that interacts with a facet, model interactions between the gathered elements and all of facets to produce a set of surface interacted elements, and scatter the surface interacted elements to a second set of at least one voxel that interacts with the facet. An entry of a state vector represents a density of elements per unit volume in a particular momentum state of a voxel. A state vector includes one or more of a plurality of integers and/or floating point values that represent a density of elements per unit volume in a particular momentum state and have more plural possible values.
The surface interaction operations are performed using one or more of integer values and/or floating point values, and wherein the surface interaction operations are performed using values representative of real numbers. The surface interaction operations are performed using integer and/or floating point numbers. The surface interaction operations include represent a voxel that is intersected by a surface as a partial voxel. The representation of at least one surface includes a plurality of facets that are sized and oriented independently of the size and orientation of the voxels, and represent at least one surface; and further includes model interactions between a facet and the elements of at least one voxel near the facet.
The elements represent particles of a fluid and the facets represent at least one surface over which the fluid flows.
Perform the surface interaction operations includes compute differences between incoming distribution and a Boltzmann distribution, determine combined momentum from all state vector differences, and generate outgoing distribution based on the determined differences.
One or more of the above aspects may provide one or more of the advantages disclosed herein.
Besides dealing with boundary conditions on a solid wall surface, the slip algorithm can also be applied to handle fluid boundaries between domains of two different lattice Boltzmann solvers as well as two different reference frames. Different from a solid wall, the mass flux across the boundary is in general not zero. Furthermore, the momentum flux contains an extra term that represents the flow convection across from one domain to another. All these involve a straightforward albeit non-trivial extension of the previous slip algorithm ('260) for a solid surface.
Other features and advantages of the invention will be apparent from the following detailed description of the preferred embodiments, and from the claims.
The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention are apparent from the description and drawings, and from the claims.
One method for simulating fluid flows is the so-called the Lattice Boltzmann Model (LBM). In a LBM-based physical process simulation system, fluid flow is represented by distribution function values, evaluated at a set of discrete velocities using the well-known lattice Boltzmann equation (see Eq. 1 below) that describes the time-evolution of the distribution function. The distribution function involves two processes, a streaming process and a collision process.
The surface dynamics maps/converts a set of “incoming” particle distributions to a set of “outgoing” particle distributions so that an exactly zero tangential momentum flux boundary condition is achieved. As mentioned above, it is this particular portion that is significantly different from the '260 patent. Before we describe the specific algorithmic difference below in the surface dynamics step, let us first outline of the concept of the surface dynamics below.
On each surface element, let ƒiin represent an incoming particle distribution function obtained from the Gather Step. It corresponds to the number of particles per unit volume in space near the surface element having a velocity value ci pointing towards the surface (i.e., ci·{circumflex over (n)}<0), where {circumflex over (n)} denotes the unit normal vector to the surface element pointing towards the flow domain. The entire set of the incoming distributions includes all possible ci values that are pointing to the surface, i.e., {ƒiin; ∀ci·{circumflex over (n)}<0)}.
The surface dynamics determines the values of the “outgoing” distribution functions on the surface element based on the values of the known values of the “incoming” distribution functions. An “outgoing” distribution function ƒiout corresponds to the number of particles per unit volume in space near the surface having a velocity value ci pointing away from the surface (i.e., ci·{circumflex over (n)}>0).
Symbolically, the surface dynamics is defined as the following logical conversion,
{ƒiin;∀ci·{circumflex over (n)}<0}→{ƒiout;∀ci·{circumflex over (n)}>0} (Eq. 1)
where the left side of Eq. 1 in the above is the set of the incoming distribution functions obtained through the gather step, while the right side of Eq. 1 is the set of the outgoing distribution functions whose values are determined via the surface dynamics step. There are two fundamental fluxes through the surface of a boundary. These are the mass and momentum fluxes defined via the mathematical expressions below.
Mass flux,
and momentum flux,
where A is the area of the surface element.
The fluid boundary conditions are in general defined such that the mass and the momentum P obey some specified values on the boundary surface of the fluid solver. In particular, since particles cannot penetrate a solid wall, a zero mass flux condition, =0 is enforced. A zero tangential momentum flux through the surface amounts to having P·{circumflex over (τ)}=0.
On a solid wall, this is equivalent to having a frictionless boundary condition. Here {circumflex over (τ)} is any vector that is tangential to the surface element, so that {circumflex over (τ)}·{circumflex over (n)}=0.
The surface dynamics in a slip algorithm is a relationship that converts the values of the incoming distribution functions to the values of the outgoing distributions so that the two flux conditions with specified values are satisfied. Having achieved a zero mass flux condition and a zero tangential momentum flux condition, the rest of the process for satisfying the overall mass and momentum flux conditions with specified values are the same between the '260 patent and the novel approach, so it is not discussed here.
Since there are more distribution functions than the two flux conditions, the values of the outgoing distributions are not unique. Indeed, the '260 patent and current approach give different values due to their difference in the relationship linking the incoming distribution functions to the outgoing distribution functions.
The specific relationship in '260 patent satisfying the zero mass flux and the zero tangential momentum flux is given by the following formulation,
ƒiout=ƒieq+ƒi*eq−ƒi*in (Eq. 4)
where i* is the parity lattice velocity direction to i, i.e. ci=−ci*. Computation of the equilibrium distributions ƒieq and ƒi*eq are based on the sampled values of density and velocity. A complete description of the computation is specified in the '260 patent.
For example, for an isothermal LBM solver, the equilibrium distribution is given by Eq. 5
where wi and T0 are known constants in a lattice Boltzmann model. Here the density ρ and velocity u (with u·{circumflex over (n)}=0) are sampled from the fluid domain near the surface. Furthermore, ρ is rescaled so that the zero mass flux condition is satisfied via satisfying the following relationship:
Plugging the expression (Eq. 4) together with (Eq. 5) into the momentum flux definition (Eq. 3), we can prove that, P=p{circumflex over (n)}. Therefore momentum flux along tangential direction, P·{circumflex over (τ)} is zero.
Here the quantity p=ρT0 denotes the pressure value on the surface. More general boundary conditions can be achieved by adding appropriate mass and momentum fluxes on top of the zero mass and zero tangential momentum flux conditions, which are described here.
One distinct feature in the '260 patent formulation is its direct one-to-one dependence of the outgoing distribution ƒiout to the incoming distribution ƒiin as demonstrated in Eq. (4). This is now understood as being a major source of or for at least some of the deficiencies discussed previously.
Referring now to
While
The simulation engine 34 includes a collision interaction module 34a that includes the novel surface dynamics conversion 34b, boundary module 34c, and advection particle collision interaction module 34d. The system 10 accesses a data repository 38 that stores 2D and/or 3D meshes (Cartesian and/or curvilinear), coordinate systems, and libraries.
Referring now to
Referring to
Referring now to
Instead of Eq. 4, the new relationship given in the novel approach is defined via the mathematical formulation below
ƒiout=ƒieq−δƒi (Eq. 7)
where δƒi is defined by
The quantity h is defined by
ƒieq In (Eq. 9), the equilibrium distribution is defined in the same way as in (Eq. 5). In construction of besides applying the density rescaling in order to satisfy the same mass
ƒieq
flux constraint given by (Eq. 6), we need in the new formulation an additional constraint on the tangential part of the equilibrium momentum flux,
where the unit vector {circumflex over (τ)} is parallel to the sampled velocity direction u. Since the latter is projected onto the surface element, u·{circumflex over (n)}=0, thus {circumflex over (τ)}·{circumflex over (n)}=0. Constraint (Eq. 10) can be accomplished via rescaling the magnitude of u.
Like the '260 patent approach, it can be shown the novel approach as defined by (Eq.7)-(Eq. 9) also achieves the boundary condition of the zero mass and zero tangential momentum fluxes.
In spite of the seemingly more complex steps, the key difference in the new formulation is its avoidance of the one-to-one relationship between an outgoing distribution and an incoming distribution. Indeed, as shown in (Eq. 7)-(Eq. 9), an outgoing distribution ƒiout is dependent on all incoming distributions through their moment summation expressed in (Eq. 9).
The new formulation may significantly overcome the aforementioned deficiencies and give a less noisy surface and support higher fluid speed near the boundary.
In the procedure discussed in
However, the figures as they appear in the above Patent do not take into consideration any modifications that would be made to a flow simulation using the dynamic conversion process 46b, because that process described herein is not described in the above referenced Patent.
In a LBM-based physical process simulation system, fluid flow is represented by the distribution function values ƒi, evaluated at a set of discrete velocities ci. The dynamics of the distribution function is governed by Equation I.1
where ƒieq is known as the equilibrium distribution function, defined as:
Equation (I.1) is the well-known lattice Boltzmann equation that describes the time-evolution of the distribution function, ƒi. The left-hand side represents the change of the distribution due to the so-called “streaming process.” The streaming process is when a pocket of fluid starts out at a mesh location, and then moves along one of plural velocity vectors to the next mesh location. At that point, the “collision factor,” i.e., the effect of nearby pockets of fluid on the starting pocket of fluid, is calculated. The fluid can only move to another mesh location, so the proper choice of the velocity vectors is necessary so that all the components of all velocities are multiples of a common speed.
The right-hand side of the first equation is the aforementioned “collision operator” which represents the change of the distribution function due to the collisions among the pockets of fluids. The particular form of the collision operator is of the Bhatnagar, Gross and Krook (BGK) operator. The collision operator forces the distribution function to go to the prescribed values given by the second equation, which is the “equilibrium” form.
The BGK operator is constructed according to the physical argument that, no matter what the details of the collisions, the distribution function approaches a well-defined local equilibrium given by {ƒeq(x, v, t)} via collisions:
where the parameter τ represents a characteristic relaxation time to equilibrium via collisions. Dealing with particles (e.g., atoms or molecules) the relaxation time is typically taken as a constant.
From this simulation, conventional fluid variables, such as mass ρ and fluid velocity u, are obtained as simple summations in Equation (I.3).
where ρ, u, and T are, respectively, the fluid density, velocity and temperature, and D is the dimension of the discretized velocity space (not necessarily equal to the physical space dimension).
Due to symmetry considerations, the set of velocity values are selected in such a way that they form certain lattice structures when spanned in the configuration space. The dynamics of such discrete systems obeys the LBE having the form
ƒi(x+ci,t+1)−ƒi(x,t)=Ci(x,t)
where the collision operator usually takes the BGK form as described above. By proper choice of the equilibrium distribution forms, it can be theoretically shown that the lattice Boltzmann equation gives rise to correct hydrodynamics and thermo-hydrodynamics. That is, the hydrodynamic moments derived from ƒi(x, t) obey the Navier-Stokes equations in the macroscopic limit. These moments are defined by Equation (I.3) above.
The collective values of ci and wi define a LBM model. The LBM model can be implemented, efficiently on scalable computer platforms and run with great robustness for time unsteady flows and complex boundary conditions.
A standard technique of obtaining the macroscopic equation of motion for a fluid system from the Boltzmann equation is the Chapman-Enskog method in which successive approximations of the full Boltzmann equation are taken. In a fluid system, a small disturbance of the density travels at the speed of sound. In a gas system, the speed of sound is generally determined by the temperature. The importance of the effect of compressibility in a flow is measured by the ratio of the characteristic velocity and the sound speed, which is known as the Mach number.
A general discussion of a LBM-based simulation system is provided below that includes the dynamic conversion 46b to conduct fluid flow simulations. For a further explanation of LBM-based physical process simulation systems the reader is referred to the above incorporated by reference US Patent.
Referring to
Referring to
More complex models, such as a 3D-2 model includes 101 velocities and a 2D-2 model includes 37 velocities also may be used. For the three-dimensional model 3D-2, of the 101 velocities, one represents particles that are not moving (Group 1); three sets of six velocities represent particles that are moving at either a normalized speed (r), twice the normalized speed (2r), or three times the normalized speed (3r) in either the positive or negative direction along the x, y or z axis of the lattice (Groups 2, 4, and 7); three sets of eight represent particles that are moving at the normalized speed (r), twice the normalized speed (2r), or three times the normalized speed (3r) relative to all three of the x, y, z lattice axes (Groups 3, 8, and 10); twelve represent particles that are moving at twice the normalized speed (2r) relative to two of the x, y , z lattice axes (Group 6); twenty four represent particles that are moving at the normalized speed (r) and twice the normalized speed (2r) relative to two of the x, y, z lattice axes, and not moving relative to the remaining axis (Group 5); and twenty four represent particles that are moving at the normalized speed (r) relative to two of the x, y, z lattice axes and three times the normalized speed (3r) relative to the remaining axis (Group 9).
For the two-dimensional model 2D-2, of the 37 velocities, one represents particles that are not moving (Group 1); three sets of four velocities represent particles that are moving at either a normalized speed (r), twice the normalized speed (2r), or three times the normalized speed (3r) in either the positive or negative direction along either the x or y axis of the lattice (Groups 2, 4, and 7); two sets of four velocities represent particles that are moving at the normalized speed (r) or twice the normalized speed (2r) relative to both of the x and y lattice axes; eight velocities represent particles that are moving at the normalized speed (r) relative to one of the x and y lattice axes and twice the normalized speed (2r) relative to the other axis; and eight velocities represent particles that are moving at the normalized speed (r) relative to one of the x and y lattice axes and three times the normalized speed (3r) relative to the other axis.
The LBM models described above provide a specific class of efficient and robust discrete velocity kinetic models for numerical simulations of flows in both two-and three-dimensions. A model of this kind includes a particular set of discrete velocities and weights associated with those velocities. The velocities coincide with grid points of Cartesian coordinates in velocity space which facilitates accurate and efficient implementation of discrete velocity models, particularly the kind known as the lattice Boltzmann models. Using such models, flows can be simulated with high fidelity.
Referring to
The resolution of the lattice may be selected based on the Reynolds number of the system being simulated. The Reynolds number is related to the viscosity (v) of the flow, the characteristic length (L) of an object in the flow, and the characteristic velocity (u) of the flow:
Re=uL/v (I.4)
The characteristic length of an object represents large scale features of the object. For example, if flow around a micro-device were being simulated, the height of the micro-device might be considered to be the characteristic length. When flow around small regions of an object (e.g., the side mirror of an automobile) is of interest, the resolution of the simulation may be increased, or areas of increased resolution may be employed around the regions of interest. The dimensions of the voxels decrease as the resolution of the lattice increases.
The state space is represented as ƒi(x, t), where ƒi represents the number of elements, or particles, per unit volume in state i (i.e., the density of particles in state i) at a lattice site denoted by the three-dimensional vector x at a time t. For a known time increment, the number of particles is referred to simply as ƒi(x). The combination of all states of a lattice site is denoted as ƒ(x).
The number of states is determined by the number of possible velocity vectors within each energy level. The velocity vectors are integer linear speeds in a space having three dimensions: x, y, and z. The number of states is increased for multiple-species simulations.
Each state i represents a different velocity vector at a specific energy level (i.e., energy level zero, one or two). The velocity ci of each state is indicated with its “speed” in each of the three dimensions as follows:
ci=(cix,civ,ciz). Eq. (I.5)
The energy level zero state represents stopped particles that are not moving in any dimension, i.e., cstopped=(0, 0, 0). Energy level one states represents particles having a ±1 speed in one of the three dimensions and a zero speed in the other two dimensions. Energy level two states represent particles having either a ±1 speed in all three dimensions, or a ±2 speed in one of the three dimensions and a zero speed in the other two dimensions.
Generating all of the possible permutations of the three energy levels gives a total of 39 possible states (one energy zero state, 6 energy one states, 8 energy three states, 6 energy four states, 12 energy eight states and 6 energy nine states.).
Each voxel (i.e., each lattice site) is represented by a state vector f(x). The state vector completely defines the status of the voxel and includes 39 entries. The 39 entries correspond to the one energy zero state, 6 energy one states, 8 energy three states, 6 energy four states, 12 energy eight states and 6 energy nine states. By using this velocity set, the system can produce Maxwell-Boltzmann statistics for an achieved equilibrium state vector.
For processing efficiency, the voxels are grouped in 2×2×2 volumes called microblocks. The microblocks are organized to permit parallel processing of the voxels and to minimize the overhead associated with the data structure. A short-hand notation for the voxels in the microblock is defined as Ni(n), where n represents the relative position of the lattice site within the microblock and nϵ{0, 1, 2, . . . , 7}.
A microblock is illustrated in
Referring to
S={Fα} Eq. (I.6)
where α is an index that enumerates a particular facet. A facet is not restricted to the voxel boundaries, but is typically sized on the order of or slightly smaller than the size of the voxels adjacent to the facet so that the facet affects a relatively small number of voxels. Properties are assigned to the facets for the purpose of implementing surface dynamics. In particular, each facet Fα has a unit normal (nα), a surface area (Aα), a center location (xα), and a facet distribution function (ƒi(α)) that describes the surface dynamic properties of the facet. The total energy distribution function qi(α) is treated in the same way as the flow distribution for facet and voxel interaction.
Referring to
Similarly, as illustrated in
Referring again to
Voxels that interact with one or more facets by transferring particles to the facet or receiving particles from the facet are also identified as voxels affected by the facets. All voxels that are intersected by a facet will include at least one state that receives particles from the facet and at least one state that transfers particles to the facet. In most cases, additional voxels also will include such states.
Referring to
V
iα
=|c
i
n
α
|A
α Eq. (I.7)
The facet Fα receives particles from the volume Viα when the velocity vector of the state is directed toward the facet (|cini|<0), and transfers particles to the region when the velocity vector of the state is directed away from the facet (|cini|>0). As will be discussed below, this expression is modified when another facet occupies a portion of the parallelepiped Giα, a condition that could occur in the vicinity of non-convex features such as interior corners.
The parallelepiped Giα of a facet Fα may overlap portions or all of multiple voxels. The number of voxels or portions thereof is dependent on the size of the facet relative to the size of the voxels, the energy of the state, and the orientation of the facet relative to the lattice structure. The number of affected voxels increases with the size of the facet. Accordingly, the size of the facet, as noted above, is typically selected to be on the order of or smaller than the size of the voxels located near the facet.
The portion of a voxel N(x) overlapped by a parallelepiped Giα is defined as Viα(x). Using this term, the flux Γiα(x) of state i particles that move between a voxel N(x) and a facet Fα equals the density of state i particles in the voxel (Ni(x)) multiplied by the volume of the region of overlap with the voxel (Viα(x)):
iα(x)=Ni(x)Viα(x). Eq. (I.8)
When the parallelepiped Giα is intersected by one or more facets, the following condition is true:
V
iα
→ΣV
iα(x)+ΣViα(β) Eq. (I.9)
where the first summation accounts for all voxels overlapped by Giα and the second term accounts for all facets that intersect Giα. When the parallelepiped Giα is not intersected by another facet, this expression reduces to:
V
iα
→ΣV
iα(x). Eq. (I.10)
Once the voxels that are affected by one or more facets are identified (274), a timer is initialized to begin the simulation (276). During each time increment of the simulation, movement of particles from voxel to voxel is simulated by an advection stage (278-286) that accounts for interactions of the particles with surface facets. Next, a collision stage (288) simulates the interaction of particles within each voxel. Thereafter, the timer is incremented (290). If the incremented timer does not indicate that the simulation is complete (294), the advection and collision stages (278-200) are repeated. If the incremented timer indicates that the simulation is complete (202), results of the simulation are stored and/or displayed (204).
To correctly simulate interactions with a surface, each facet meets four boundary conditions. First, the combined mass of particles received by a facet equal the combined mass of particles transferred by the facet (i.e., the net mass flux to the facet equals zero). Second, the combined energy of particles received by a facet equals the combined energy of particles transferred by the facet (i.e., the net energy flux to the facet equals zero). These two conditions may be satisfied by requiring the net mass flux at each energy level (i.e., energy levels one and two) to equal zero.
The other two boundary conditions are related to the net momentum of particles interacting with a facet. For a surface with no skin friction, referred to herein as a slip surface, the net tangential momentum flux equals zero and the net normal momentum flux equals the local pressure at the facet. Thus, the components of the combined received and transferred momentums that are perpendicular to the normal n a of the facet (i.e., the tangential components) equals, while the difference between the components of the combined received and transferred momentums that are parallel to the normal nα of the facet (i.e., the normal components) equals the local pressure at the facet. For non-slip surfaces, friction of the surface reduces the combined tangential momentum of particles transferred by the facet relative to the combined tangential momentum of particles received by the facet by a factor that is related to the amount of friction.
Simulating interaction between particles and a surface, particles are gathered from the voxels and provided to the facets (278). As noted above, the flux of state i particles between a voxel N(x) and a facet Fα is:
Γiα(x)=Ni(x)Viα(x). Eq. (I.11)
From this, for each state i directed toward a facet Fα(cinα<0), the number of particles provided to the facet Fα by the voxels is:
ΓiαV→F=ΣXΓiα(x)=ΣXNi(x)Viα(x) Eq. (I.12)
Only voxels for which Viα(x) has a non-zero value are summed. As noted above, the size of the facets is selected so that Viα(x) has a non-zero value for only a small number of voxels. Because Viα(x) and Pƒ(x) may have non-integer values, Γα(x) is stored and processed as a real number.
Next, particles are moved between facets (280). If the parallelepiped Giα for an incoming state (cinα<0) of a facet Fα is intersected by another facet Fβ, then a portion of the state i particles received by the facet Fα will come from the facet Fβ. In particular, facet Fα will receive a portion of the state i particles produced by facet Fβ during the previous time increment. This relationship is illustrated in
Γiα(β,t−1)=Γi(β)Viα(β)/Viα Eq. (I.13)
where Γi(β, t−1) is a measure of the state i particles produced by the facet Fβ during the previous time increment. From this, for each state i directed toward a facet Fα(cinα<0), the number of particles provided to the facet Fα by the other facets is:
ΓiαF→F=ΣβΓiα(β)=ΣβΓi(β,t−1)Viα(β)/Viα Eq. (I.14)
and the total flux of state i particles into the facet is:
ΓiIN(α)=ΓiαF→F+ΓiαF→F=ΣxNi(x)Viα+ΣβΓi(β,t−1)Viα(β)/Viα Eq. (I.15)
The state vector N(α) for the facet, also referred to as a facet distribution function, has M entries corresponding to the M entries of the voxel states vectors. M is the number of discrete lattice speeds. The input states of the facet distribution function N(α) are set equal to the flux of particles into those states divided by the volume Viα:
N
i(α)=ΓiIN(α)/Viα Eq. (I.16)
for cinα<0.
The facet distribution function is a simulation tool for generating the output flux from a facet, and is not necessarily representative of actual particles. To generate an accurate output flux, values are assigned to the other states of the distribution function. Outward states are populated using the technique described above for populating the inward states:
N
i(α)=ΓiOTHER(α)/Viα Eq. (I.17)
for cinα≥0, wherein ΓiOTHER(α) is determined using the technique described above for generating ΓiIN(α), but applying the technique to states (cinα≥0) other than incoming states (cinα<0)). In an alternative approach, ΓiOTHER(α) may be generated using values of ΓiOUT(α) from the previous time step so that:
ΓiOTHER(α,t)=ΓiOUT(α,t−1). Eq. (I.18)
For parallel states (cinα=0), both Viα and Viα(x) are zero. In the expression for Ni(α), Viα(x) appears in the numerator (from the expression for ΓiOTHER(α) and Viα appears in the denominator (from the expression for Ni(α)). Accordingly, Ni(α) for parallel states is determined as the limit of Ni(α) as Viα and Viα(x) approach zero. The values of states having zero velocity (i.e., rest states and states (0, 0, 0, 2) and (0, 0, 0, −2)) are initialized at the beginning of the simulation based on initial conditions for temperature and pressure. These values are then adjusted over time.
Next, surface dynamics are performed for each facet to satisfy the boundary conditions discussed above (282). A procedure 390 for performing surface dynamics for a facet is illustrated in
The velocity and densities are sampled from the voxel to the facet Fα, during 278. The velocity is then projected along the surface (i.e) u·{circumflex over (n)}=0. The Boltzmann Equilibrium distribution is computed 392 based on the sampled density and projected velocity, and the density and velocity are scaled to satisfy the constraints specified by Equation 6 and 10, respectively. The resulting density and velocity are then used to compute the new Boltzmann Equilibrium distribution (392). The difference between the incoming distribution and the new Boltzmann distribution (394) and the combined momentum of difference between all incoming states and its corresponding Boltzmann distribution (396) are computed as shown below.
The momentum difference is projected along the tangential direction of the facet (398).
h(α)=δP(α)−(δP(α)·{circumflex over (n)}){circumflex over (n)} Eq. (I.20)
From above momentum difference and Boltzmann distribution, outgoing flux is computed to satisfy the perfect slip boundary condition (399), by satisfying zero tangential flux P·{circumflex over (τ)}=0.
To account for skin friction and other factors, the outgoing flux distribution may be further refined to:
where Cƒ is skin friction coefficient. More detailed description of applying skin friction and correction to different energy levels of lattice required for perfect mass and energy conservations are presented in '260 patent.
Referring again to
Each of the separate states represents particles moving along the lattice with integer speeds in each of the three dimensions: x, y, and z. The integer speeds include: 0, ±1, and ±2. The sign of the speed indicates the direction in which a particle is moving along the corresponding axis.
For voxels that do not interact with a surface, the move operation is computationally quite simple. The entire population of a state is moved from its current voxel to its destination voxel during every time increment. At the same time, the particles of the destination voxel are moved from that voxel to their own destination voxels. For example, an energy level 1 particle that is moving in the +1x and +1y direction (1, 0, 0) is moved from its current voxel to one that is +1 over in the x direction and 0 for other direction. The particle ends up at its destination voxel with the same state it had before the move (1, 0, 0). Interactions within the voxel will likely change the particle count for that state based on local interactions with other particles and surfaces. If not, the particle will continue to move along the lattice at the same speed and direction.
The move operation becomes slightly more complicated for voxels that interact with one or more surfaces. This can result in one or more fractional particles being transferred to a facet. Transfer of such fractional particles to a facet results in fractional particles remaining in the voxels. These fractional particles are transferred to a voxel occupied by the facet.
Referring to
where N(x) is the source voxel.
Next, the outgoing particles from each facet are scattered to the voxels (286). Essentially, this scatter is the reverse of the gather by which particles were moved from the voxels to the facets. The number of state i particles that move from a facet Fα to a voxel N(x) is:
where Pf(x) accounts for the volume reduction of partial voxels. From this, for each state i, the total number of particles directed from the facets to a voxel N(x) is:
After scattering particles from the facets to the voxels, combining them with particles that have advected in from surrounding voxels, and integerizing the result, it is possible that certain directions in certain voxels may either underflow (become negative) or overflow (exceed 255 in an eight-bit implementation). This would result in either a gain or loss in mass, momentum and energy after these quantities are truncated to fit in the allowed range of values. To protect against such occurrences, the mass, momentum and energy that are out of bounds are accumulated prior to truncation of the offending state. For the energy to which the state belongs, an amount of mass equal to the value gained (due to underflow) or lost (due to overflow) is added back to randomly (or sequentially) selected states having the same energy and that are not themselves subject to overflow or underflow. The additional momentum resulting from this addition of mass and energy is accumulated and added to the momentum from the truncation. By only adding mass to the same energy states, both mass and energy are corrected when the mass counter reaches zero. Finally, the momentum is corrected using pushing/pulling techniques until the momentum accumulator is returned to zero.
Fluid dynamics are performed (288)
The fluid dynamics is ensured in the lattice Boltzmann equation models by a particular collision operator known as the BGK collision model. This collision model mimics the dynamics of the distribution in a real fluid system. The collision process can be well described by the right-hand side of Equation 1 and Equation 2. After the advection step, the conserved quantities of a fluid system, specifically the density, momentum and the energy are obtained from the distribution function using Equation 3. From these quantities, the equilibrium distribution function, noted by ƒeq in equation (2), is fully specified by Equation (4). The choice of the velocity vector set ci, the weights, both are listed in Table 1, together with Equation 2 ensures that the macroscopic behavior obeys the correct hydrodynamic equation.
Variable resolution (as discussed in US 2013/0151221 A1) can also be employed and would use voxels of different sizes, e.g., coarse voxels and fine voxels.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, tangibly-embodied computer software or firmware, computer hardware (including the structures disclosed in this specification and their structural equivalents), or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs (i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus). The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The term “data processing apparatus” refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example, a programmable processor, a computer, or multiple processors or computers. The apparatus can also be or further include special purpose logic circuitry (e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit)). In addition to hardware, the apparatus can optionally include code that produces an execution environment for computer programs (e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them).
A computer program, which can also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or another unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, subprograms, or portions of code)). A computer program can be deployed so that the program is executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network.
Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory on media and memory devices, including by way of example semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with an implementation of the subject matter described in this specification), or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN) and a wide area network (WAN) (e.g., the Internet).
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data (e.g., an HTML page) to a user device (e.g., for purposes of displaying data to and receiving user input from a user interacting with the user device), which acts as a client. Data generated at the user device (e.g., a result of the user interaction) can be received from the user device at the server.
Particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing can be advantageous.
Number | Date | Country | |
---|---|---|---|
Parent | 16914730 | Jun 2020 | US |
Child | 18503323 | US |