This repository will save notes from the 1st course on Lattice-Boltzmann methods at National University of Colombia.
To use this you just have to clone it using the following command
git clone https://github.com/ijpulidos/1stLBMunal.git
and then change to the new created directory
cd 1stLBMunal
where you can find the material distributed in different topics and dates.
This first session was about creating a Lattice-Boltzmann method implementation for simple
scalar waves. Go to directory LBwaves-2017-12-11
and just compile the code with
g++ LB_waves.cpp
which creates an executable file a.out
and then run it using
./a.out
This will create a file called ondas.dat
(sorry for the spanglish ;) with the data to be
plotted using gnuplot, by running the gnuplot
command and inside the gnuplot terminal, the
following
set pm3d
unset surface
splot "ondas.dat"
The idea in this session was completing the code for the LBM for the Poisson equation.
Completing/implementing density charges and initial conditions and finding a power law for the error coefficient epsilon respect to the size of the system.
Solution
The solution to the exercise is in both LBPoisson_solution.ccp
and my solution in
LBPoisson_exercise.cpp
. A plotting routine to plot the RMS error in terms of the size of
the lattice is in the python script plotting.py