{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/semi-automatic-construction-of-lattice","title":"Semi-automatic construction of Lattice Boltzmann models","arxiv_id":"2004.03509","date":"2020-04-07","proceeding":null,"authors":["Dominic Spiller","Burkhard Duenweg"],"abstract":"A crucial step in constructing a Lattice Boltzmann model is the definition of a suitable set of lattice velocities, and the correct assignment of the associated weights. For high-order models, the solution of this problem requires a non-trivial effort. The paper outlines the functioning of a publicly available Python script which has been written to assist researchers in that task. The speed of sound $c_s$ is considered as a parameter, which can, within limits, be chosen at will. Under this premise, the Maxwell-Boltzmann constraint equations are a system of linear equations to determine the weights, and hence amenable to numerical solution by standard linear algebra library routines. By suitable contractions, the tensor equations are mapped to a set of equivalent scalar equations, which simplifies the treatment significantly. For a user-supplied set of velocity shells, the software first checks if a solution for the weights exists, and returns it if it also happens to be unique. In such a case, the software also calculates the range of $c_s$ values that yield positive weights. Standard models like D3Q19 with a well-defined special $c_s$ value then result as limiting cases where one of the weights vanishes. In case of an infinite set of solutions, the user may find one particular solution by supplying a $c_s$ value, and then minimizing one or several weights within the framework of standard linear programming. Some examples illustrate the feasibility and usefulness of the approach. A number of models that have been discussed in the literature are nicely reproduced, while the software has also been able to find some new models of even higher order.","url_abs":"https://arxiv.org/abs/2004.03509v1","url_pdf":"https://arxiv.org/pdf/2004.03509v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"semi-automatic-construction-of-lattice","repo_url":"https://github.com/BDuenweg/Lattice-Boltzmann-weights","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}