In the Boussinesq approximation, a fluid is modeled as incompressible, and the influence of the temperature is visible only through a body-force term, representing buoyancy effects. The temperature field obeys an advection-diffusion equation.
The coupling between the temperature field and the fluid solver is implemented by means of a data processor. For the fluid, you can use any of the non-thermal Navier-Stokes models with external force term.
The widely used Shan/Chen models for immiscible multi-component fluids and for single-component multi-phase fluids are implemented in Palabos, in 2D and in 3D. Note that a lot of information about the theory and practical aspects of these models can be found in the book [Sukop-and-Thorne].
In both models, an inter-particle force term needs to be computed which is not entirely local. This force term is therefore computed by a data processor. This data processor needs to know the density and the velocity on a given lattice node (in the multi-component model, these macroscopic variables must be known for all components). To avoid computing these variables twice, as they need also to be known for the subsequent, normal collision step, they are written by the data processor to an external scalar of the cell, and then re-used by the dynamics object for the collision. It is therefore necessary to use a lattice descriptor which provides space for these external scalars, such as ShanChenD2Q9Descriptor, or ForcedShanChenD2Q9Descriptor if additionally to the inter-particle potential there is an external body force. In 3D, the same descriptors are available for the D3Q19 lattice (and other descriptors are easy to formulate). To be sure to read the macroscopic variables from external scalars during the collision step, use the classes ExternalMomentBGKdynamics or ExternalMomentRegularizedBGKdynamics for the fluid model.
Note that in both models, the effect of the external body force term is automatically accounted for if an external force is defined in the lattice descriptor. The force term is then added by the Shan/Chen data processor by means of a momentum correction to the flow velocity. Therefore, you don’t need to use a specific collision model with force term like GuoExternalForceBGKdynamics. A plain BGK dynamics, or regularized BGK dynamics, is fine.
Palabos also implements the 3D He/Lee multi-phase fluid model, based on a two populations. This model enforces incompressibility by solving a pressure evolution equation. While it is more complicated than the Shan/Chen model from an algorithmic standpoint, it has the ability to simulate larger density and viscosity differences between the two phases, and eliminates spurious velocities to a certain extent.
In this model, each component is simulated on a separate block-lattice, and the components are coupled through a Shan/Chen data processor. You can couple as many components as you wish.
|Examples:||showCases/multiComponent2d and showCases/multiComponent3d|
In this model, the Shan/Chen data processor takes an additional argument which defines the shape of the inter-particle potential. The following potentials are defined (see the file src/multiPhysics/interparticlePotential.h for details):
Please remark that in this model, the fluid density must be carefully adapted to the amplitude of the interaction force in order to enter the critical regime in which phase separation occurs.
In a free-surface flow, the viscosity of one of the two phases is virtually infinite. This phase is therefore neglected, and a surface-tracking approach is applied to the remaining phase. Palabos uses a volume-of-fluid like approach to trace the free surface.
As an example, a dam break application is provided in examples/showCases/breakingDam3d.
In the Smagorinsky model, it is assumed that the subgrid scales have the effect of a viscosity correction which is proportional to the norm of the strain-rte tensor at the level of the filtered scales, :math: nu = nu_0 + nu_T. The formula for the turbulent viscosity correction nuT is
where is the Smagorinsky constant, and the tensor-norm of the strain rate is defined as (attention: there is no factor 1/2 inside the square-root, as it can be found in other definitions). The value of the Smagorinsky constant depends on the physics of the problem, and usually varies between 0.1 and 0.2 far from boundaries. This model is called static because the value of the Smagorinsky constant is imposed and does not change in time.
In the Palabos implementation, the strain-rate is computed from the stress tensor . It is remarked that the relationship between and contains depends on the relaxation time , and therefore on the viscosity nu. The formula for the turbulent viscosity nuT is therefore implicit, but is of second-order only and can therefore be solved explicitly.
Given that the stress tensor can be computed from local variables on a cell, the Smagorinsky model is entirely local and is implemented in Palabos through a dynamics class. As so often, there are several implementations for this model. The generic one, based on composite-dynamics objects, adds a Smagorinsky viscosity correction to any existing dynamics during runtime. The specific ones are written explicitly for the BGK and for the regularized BGK models, and are therefore somewhat more efficient. In each case, the value of the viscosity is modified before the execution of the usual collision step. Therefore, if during a simulation you access the relaxation parameter at a cell, for example through a function call lattice.get(x,y).getOmega(), you get the relaxation parameter related to the effective viscosity , and not the “molecular-scale viscosity” .
The value of the Smagorinsky constant must be provided to these dynamics classes as a constructor argument. It is important to note that the dynamics object of each cell can have a different value of the Smagorinsky constant: this “constant” can be space dependent. This is useful for example to model boundary layers, where the Smagorinsky constant drops to zero. The most convenient way to create a simulation with space-dependent Smagorinsky constant is to assign the Smagorinsky dynamics to each cell of the lattice from within a data processor which is aware of the desired value of the as a function of space.
|Dynamics for BGK:||SmagorinskyBGKdynamics|
|Dynamics for Regularized BGK:||SmagorinskyRegularizedDynamics|
In the Carreau model, the value of the viscosity is adjusted, just like in the Smagorinsky model, depending on the value of the local strain-rate. The constitutive equation is given by
where and are given real parameters. As for the Smagorinsky model, the strain rate is computed from the stress tensor , and the resulting equation is implicit because the vs. relation is dependent on the relaxation time . In the present case however, there is no explicit solution, and the equation is solved at each time step through a fixed-point iteration (which in this case converges very quickly and is therefore more efficient than a gradient-based solution method).
In this implementation, the parameters , and cannot be space-dependent, and they are set through a function call to the global singleton CarreauParameters. for example:
global::CarreauParameters().setNu0(nu0); global::CarreauParameters().setLambda(1.); global::CarreauParameters().setExponent(0.3);
|[Sukop-and-Thorne]||Michael C. Sukop and Daniel T. Thorne (2006), Lattice Boltzmann Modeling; an Introduction for Geoscientists and Engineers. Springer-Verlag Berlin/Heidelberg.|