pmocz / latticeboltzmann-python

Lattice Boltzmann fluid simulation
https://medium.com/swlh/create-your-own-lattice-boltzmann-simulation-with-python-8759e8b53b1c
GNU General Public License v3.0
173 stars 48 forks source link

Simulate heat diffusion #1

Closed laurentperrinet closed 3 years ago

laurentperrinet commented 3 years ago

Is it possible to add a way to simulate the diffusion of a hot flow of air in a colder one?

pmocz commented 3 years ago

Yes. Here, the isothermal Navier-Stokes are simulated. But it is possible to add heat transfer by introducing a second distribution function, g, for the internal energy density. Conceptually, evolving g is the same as evolving the density distribution function f. See Section 2.3 of the review paper linked here for how to do this: https://www.sciencedirect.com/science/article/pii/S1110016815001362 for details

I encourage others to fork and augment the code.