Thursday, July 27, 2017

Demo Reel (1997-2017)


If you like simulations in physics you may like the video below. It was done using animations from my YouTube channel. Enjoy!



Wednesday, May 24, 2017

Zebra Mandelbrot

Zebra Mandelbrot

This is made just for fun. It is a linear interpolation between Julia and Mandelbrot 
Sets using iteration number (0=Julia, ITERMAX=Mandelbrot). Code:

              x0 = -1  + 2*(i / double(W));
              y0 = -1  + 2*(j / double(H));
              c0x = -0.93;//19;//2.5  + 3.5*(i / double(W));
              c0y = 0.19;//1.25 + 2.5*(j / double(H));
              x = x0;
              y = y0;
              s = 0;
        
            while (s < ITERMAX && x*x+y*y < 5)
            {  
                t = s/(float)ITERMAX;

                addx = t*x0 + (1-t)*c0x;
                addy = t*y0 + (1-t)*c0y;
 

                xt = x*x-y*y+addx;
                yt = 2*x*y  +addy;   
                x=xt;
                y=yt;                
                s++;
            }
     
            float c = 255*float(s)/ITERMAX;
            if(c > 255) c = 255;
            img[(i+j*W)*3+0] = c;
            img[(i+j*W)*3+1] = c;
            img[(i+j*W)*3+2] = c;

Thursday, April 27, 2017

Ising Model (C++/GLUT)


This is the C++/GLUT implementation of simple Ising model.

Please feel free to download and study, it is public domain code.

Below short animation done for prof. Andrzej Pękalski from our group for his 80th year anniversary.



If you feel like it, please drop me a comment on it: maciej.matyka@gmail.com


 T=1

T=3

Waves Equation



Waves (click to play) is the HTML5 Web3D version of my older Waves  program for Windows made when I was a student at Physics Departament of University of Wrocław. 

Feel free to drop me a comment on it ( maciej.matyka@gmail.com )









If you want to write your own Wave Equation solver you may be interested in getting an example code  (C++, OpenGL) here. Happy coding!





Fluid in Sierpinski Carpet

Enjoy the low-velocity fluid flow visualization in fractals. The fluid is transported through the Sierpiński carpet geometry. It has been originally published in Polish monography about porous media (figure 9.3 at page 159 in the book). If there is any interest in that I will post more results here (I made some variations, i.e. flow at different levels of the fractal etc.)

Interested? Email me here: maciej.matyka@gmail.com

Fig: The fluid flows from left to right and it is accelerated by external force (like gravity but it is horizontal here). I applied periodic boundaries at horizontal and vertical walls. The solver used is the Lattice Boltzmann Method (my own code used here).














Friday, March 10, 2017

Inertial Flow in Porous Media


This is an exemplary fluid flow through 64x64 random blocks porous media made in order to reproduce J.S. Andrade results on intertial flows in porous media (PRL, 2009). Unfortunately, after I spend half a year on it (doing in the meanwhile of other projects) I didn't succeed yet to reproduce their results. One possible explanation is that I use the Lattice Boltzmann Method - which is different from the SIMPLE- like algorithm used by Fluent that was used in the original paper.
Anyway, the fight is not finished yet.
Interested? Drop me an email: maciej.matyka@gmail.com


Fig: 64x64 blocks (numerical mesh is way larger)

 



Fig: The plot of Pi number versus Reynolds number in the system like below. Compared to Andrade 1999 (PRL).







Soda Constructor (Revisited)