Hi everybody, I see within PaLabos, and I find that you have the option of fourth - order Hermite expansion.

For some fluids (isothermal MEMS fluids) I need a higher-order Hermite expansion. How can the equilibrium distribution function be expanded in a third order Hermite expansion?

Thanks for any suggestion and your collaboration.

Hello,

I don’t understand your question… Could you be more precise? Do you mean in palabos how to use higher order hermite expansions?

Hi orestis,

Thanks for your time

I want to have more accurate simulations at the Burnett level.

In the article by Shan, et al. J. Fluid Mech. 550, 413 (2006), it is shown that a third-order Hermite expansion is necessary, as

.

I modified the file **src/latticeBoltzmann/dynamicsTemplates.h**

```
return Descriptor::t[iPop] * (
rhoBar + Descriptor::invCs2 * c_j +
Descriptor::invCs2/(T)2 * invRho *(Descriptor::invCs2 * c_j*c_j - jSqr );
}
```

to

```
return Descriptor::t[iPop] * (
rhoBar + Descriptor::invCs2 * c_j +
Descriptor::invCs2/(T)2 * invRho * (Descriptor::invCs2 * c_j*c_j - jSqr )
+ (Descriptor::invCs2 * Descriptor::invCs2 * invRho * c_j/(T)6.0) * (Descriptor::invCs2 * c_j * c_j - ((T)3.0 * jSqr) );
}
```

After, my amplification on this topic. Yes, My question is How to use higher order hermite expansions?

Is this idea the correct way for higher order hermit expansions??

Now that you added the higher order equilibrium you should do several other things.

- Insrpired by, for example, the BGKdynamics class, you should use the newly created collision from
**dynamicsTemplates.h** (make sure it’s a new one otherwise you may have problems with template specialization and such things so don’t smplfy modify one existing template create your own). The same reasoning should also be applied to BGKdynamics. By the way there are some higher order dynamics (in compressible dynamics).
- Add the correct lattice in the descriptors.
- Instatiate the dynamics with the correct descriptor in your code.

Hi Orestis,

Thanks for your time and your reply.

Now,

`1. Insrpired by, for example, the BGKdynamics class, you should use the newly created collision from **dynamicsTemplates.h** (make sure it’s a new one otherwise you may have problems with template specialization and such things so don’t smplfy modify one existing template create your own). The same reasoning should also be applied to BGKdynamics. By the way there are some higher order dynamics (in compressible dynamics).`

I only added the higher order equilibrium at the own file version **src/latticeBoltzmann/dynamicsTemplates.h**

```
2. Add the correct lattice in the descriptors.
3. Instatiate the dynamics with the correct descriptor in your code.
```

I have two versions of PaLaBos.

One version is the original, while the other version is with the modifications that I made.

Are Indications 2 and 3 when I make all the changes in the same version of PaLaBos?.

Please, Do you tell me if I understood correctly?.

Best wishes and good health

Mauricio

Yes. The idea is that doing so you can reuse any other model, and also if you want at some point share your model with the community you can do a “merge request” and publish your contrinution in Palabos source code.

Hi Orestis,

Thanks for your answer. Orestis, of course, I will like to share my model with the community, but in this moment I am doing any probes.

Kind regards,

Mauricio

Great. Looking forward for your merge request when you are ready then.