{"id":3822,"date":"2024-09-12T13:31:40","date_gmt":"2024-09-12T10:31:40","guid":{"rendered":"https:\/\/engage.cyi.ac.cy\/?post_type=news&#038;p=3822"},"modified":"2024-09-12T13:31:54","modified_gmt":"2024-09-12T10:31:54","slug":"engage-article-compressibility-of-data-in-computational-fluid-dynamics","status":"publish","type":"news","link":"https:\/\/engage.cyi.ac.cy\/?news=engage-article-compressibility-of-data-in-computational-fluid-dynamics","title":{"rendered":"ENGAGE Article: Compressibility of data in computational fluid dynamics"},"content":{"rendered":"\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"576\" height=\"1024\" src=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/takis_photo-576x1024.jpg\" alt=\"\" class=\"wp-image-3829 size-full\" srcset=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/takis_photo-576x1024.jpg 576w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/takis_photo-169x300.jpg 169w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/takis_photo.jpg 750w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p><strong>by Takis Angelides<\/strong><\/p>\n<\/div><\/div>\n\n\n\n<p>In this article we will explore the capability of a popular form of tensor networks called matrix product states (MPS) [1] in compressing the amount of data we keep in memory during simulations of computational fluid dynamics (CFD).<\/p>\n\n\n\n<p>High dimensional tensors are ubiquitous in the sciences having applications in quantum physics, general relativity, machine learning, fluid dynamics and many more. An MPS is a way to express a high dimensional tensor as a product of lower dimensional tensors. This gives us the ability to compress the amount of information we keep from the original tensor in a controlled manner such that only irrelevant information are discarded. The parameter that controls this is the so called bond dimension <em>D<\/em> which determines the size of the lower dimensional tensors.<\/p>\n\n\n\n<p>The model we will use to exemplify the power of MPS is the Burger&#8217;s equation which has applications in turbulence modelling, shock wave formation, acoustics, traffic flow, heat conduction and diffusion processes. The Burger&#8217;s equation is given by<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\[\\frac{\\partial u}{\\partial t} + u\\frac{\\partial u}{\\partial x}= \\nu\\frac{\\partial^2 u}{\\partial x^2}.   (1) \\]<script src=\"https:\/\/engage.cyi.ac.cy\/wp-includes\/js\/dist\/hooks.min.js?ver=dd5603f07f9220ed27f1\" id=\"wp-hooks-js\"><\/script>\n<script src=\"https:\/\/engage.cyi.ac.cy\/wp-includes\/js\/dist\/i18n.min.js?ver=c26c3dc7bed366793375\" id=\"wp-i18n-js\"><\/script>\n<script id=\"wp-i18n-js-after\">\nwp.i18n.setLocaleData( { 'text direction\\u0004ltr': [ 'ltr' ] } );\n\/\/# sourceURL=wp-i18n-js-after\n<\/script>\n<script  async src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.7\/MathJax.js?config=TeX-MML-AM_CHTML\" id=\"mathjax-js\"><\/script>\n<\/div>\n\n\n\n<p>The u = u(t, x) here is the velocity field of the fluid, which is a function of time and of the one dimensional space axis. The first term on the left gives the rate of change of the velocity while the second term is a non-linear convective term giving the property that a wave moves faster where it develops higher velocities leading to the formation of shocks over time. The term on the right is a viscous term which causes resistance to flow and has the effect of smoothing out rapid changes or fluctuations in the velocity field.<\/p>\n\n\n\n<p>Now our methodology is that first we will discretize x and the differential operators in Eq. (1). We express u(t, x) as an MPS and the differential operators as matrix product operators (MPO) which act on MPS [2]. Using periodic boundary conditions such that the lattice of points discretizing x is a circle, the goal is to evolve u(t, x) in time according to Eq. (1) given an initial condition<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\[u(t=0,x) = e^{-(x-1)^2\/2} &#8211; e^{-(x+1)^2\/2}.   (2) \\]<\/div>\n\n\n\n<p>The bond dimension <em>D<\/em> which controls the compression we apply will be set such that the maximum error incurred from discarding some data is approximately of the order 10<sup>\u221215<\/sup>.<\/p>\n\n\n\n<p>In Figure 1 we see the evolution of the velocity field where lighter colour indicates later times. The field moves as expected showing consistent behaviour with other general methods for CFD dynamics and demonstrates the formation of shocks at later times. Figure 2 shows the fraction of parameters kept in memory as compared to the case when no compression is applied. It suggests that only 3% of the data a direct numerical simulation would use was necessary to reproduce the well known dynamics of the Burger\u2019s equation to high precision. Note we have 2<sup>14<\/sup> spatial lattice points hence the number of parameters to keep track of without compression is 2<sup>14<\/sup> real numbers at any given time.<\/p>\n\n\n\n<p>In conclusion, we have demonstrated that tensor networks can achieve significant compression for CFD simulations. This implies they form a promising tool for the quest of probing turbulence, a notoriously difficult task for standard CFD methods due to the numerical demands of such an endeavor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/velocity_page-0001-1024x683.jpg\" alt=\"\" class=\"wp-image-3827\" srcset=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/velocity_page-0001-1024x683.jpg 1024w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/velocity_page-0001-300x200.jpg 300w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/velocity_page-0001-768x512.jpg 768w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/velocity_page-0001.jpg 1250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 1: Velocity field as a function of space for times t \u2208 [1, 10]. Lighter colour implies later times. For the simulation we have used \u03bd = 0.01, dt = dx = 0.001 and 10000 time steps of evolution.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-1024x683.jpg\" alt=\"\" class=\"wp-image-3828\" srcset=\"https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-1024x683.jpg 1024w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-300x200.jpg 300w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-768x512.jpg 768w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-1536x1024.jpg 1536w, https:\/\/engage.cyi.ac.cy\/wp-content\/uploads\/2024\/09\/fraction_of_parameters_page-0001-2048x1366.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 2: Number of parameters retained in the MPS divided by the original total number of parameters as a function of time.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Orus, R. A practical introduction to tensor networks: Matrix product states and projected entangled pair states. Annals of Physics 349, 117\u2013158. issn: 0003-4916. <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S0003491614001596\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/www.sciencedirect.com\/science\/article\/pii\/S0003491614001596<\/a> (2014).<\/li>\n\n\n\n<li>Gourianov, N. et al. A quantum-inspired approach to exploit turbulence structures. Nature Computational Science 2, 30\u201337. <a href=\"https:\/\/doi.org\/10.1038\/s43588-021-00181-1\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/doi.org\/10.1038\/s43588-021-00181-1<\/a> (2022).<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>by Takis Angelides In this article we will explore the capability of a popular form of tensor networks called matrix product states (MPS) [1] in compressing the amount of data we keep in memory during simulations of computational fluid dynamics (CFD). High dimensional tensors are ubiquitous in the sciences having applications in quantum physics, general [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","tags":[],"news-category":[],"class_list":["post-3822","news","type-news","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/news\/3822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/news"}],"about":[{"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/types\/news"}],"author":[{"embeddable":true,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3822"}],"version-history":[{"count":6,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/news\/3822\/revisions"}],"predecessor-version":[{"id":3831,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=\/wp\/v2\/news\/3822\/revisions\/3831"}],"wp:attachment":[{"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3822"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3822"},{"taxonomy":"news-category","embeddable":true,"href":"https:\/\/engage.cyi.ac.cy\/index.php?rest_route=%2Fwp%2Fv2%2Fnews-category&post=3822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}