Skip to content

Reply To: Cnojugated Heat Transfer

#8021
Adrian
Keymaster

Yes, the dynamics system was completely overhauled with release 1.5 to enable transparent support for GPUs and vectorizations on CPUs. Even when you do not use this, the CPU performance was significantly improved due to data structure changes in 1.4 and 1.5. You can read more in the release notes of 1.4-1.6 and the associated user guides.

For your particular question: The way such local parameterizations are realized now is via fields. i.e. you can define a cell-specific relaxation frequency if you restate the AdvectionDiffusionBGKdynamics
as


template<typename T, typename DESCRIPTOR, typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
using LocalOmegaAdvectionDiffusionBGK = dynamics::Tuple<
  T,DESCRIPTOR,
  MOMENTA,
  equilibria::FirstOrder,
  collision::OmegaFromCell<collision::BGK>, // instead of just collision BGK in AdvectionDiffusionBGKdynamics
  AdvectionDiffusionExternalVelocityCollision
>;

To aid the understanding, the OmegaFromCell collision modifier is defined as:


/// Override COLLISION parameter OMEGA with cell field OMEGA
template <typename COLLISION>
using OmegaFromCell = ParameterFromCell<descriptors::OMEGA, COLLISION>;

i.e. you can apply the same pattern to enable cell-specific definition of any dynamics parameter.

In the present case you set the per-cell omega using a call to


sLattice.defineField<descriptors::OMEGA>(...);

using OpenLB’s established indicator and functor concept.

In general the dynamics tuple system introduced in 1.5 allows the flexible construction of local cell models by (re)combining moments, equilibria and collision operators.