materials - uniwersytet wrocławskimaq/zajecia/cfd2015/cfd... · – fhp + fluid flow problem...
TRANSCRIPT
● Materials:– Droz, Chopard (book)
– FHP paper (print)
Computer simulations of fluid dynamics
Maciej Matyka
Lecture 2: HPP, FHP Models
Announcement
● Today's class:
12:15, 518 ***be there***
FHP model (cellular automata)
By Lucas Camposhttp://youtu.be/0xlRPnQGSXg
LatticeGasCUDA.mp4
Poll results● CFD 4/10● People know math well● Connection to fluid dynamics is loose● One person knows ~Navier-Stokes eqs.● Archimedes Law is more or less known● Visualization software is not known (Mathematica, Gnuplot,
Python ?)– 1 VisIt
● Motivations: various, from nothing, coupled fluid-DEM solvers to general „want to learn fluid solvers”
Lecture goal
● In: I don't know what CFD is, and I have no idea how to write simple fluid solver.
● Out: I know how to write fluid solver using CFD, techniques, I know a few methods, I know how they work and what they are capable of. I know how to use visualization tool(s), I have two codes ready to use (written by myself). I know there are more sophisticated methods and software around that I can use for more complicated problems.
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – Lecture cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 CFD in Wrocław, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 CFD in Wrocław, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
Lecture list● 1 Motivation (part 1): Fluid dynamics, Turbulence, 24.02● 2 Lattice Gas automata (our work, technical): FHP5 (Diffusion), HPP, FHP models, part 1, 3.03● 3 Lattice Gas automata (technical, review): FHP, review, part 2, 10.03
(17.03 – class cancelled)● 4 Motivation (part 2): Review fluid dynamics & effects (24.03)
5 „CFD in Wrocław”, Workshop, 31 – double lecture ( 9:30 – 14:00 )● 6 … Navier-Stokes equations (origin, math, analytics, millenium problem)● 7 … Motivation, Navier-Stokes solvers: review● 8 … Classification of PDE + solutions (Waves, Laplace, Poisson, Finite Differences) ● 9 … Motivation,The MAC Method (Finite Difference scheme + review)● 10 … The MAC Method (Free surfaces, markers, boundary conditions)● 11 … The MAC Method (Implementation) ● 12 … Finite Volume Methods (Overview, discretization, Algorithms, SIMPLE(R))● 14 … Motivation, Smoothed Particle Hydrodynamics (SPH), Review, Theory Implementation● 15 … Motivation, LBM , Review, Theory Implementation● 16 … Motivation, Software: Paraview, VisIT, OpenFOAM, Palabos, Sailfish etc. (Review)
CFD in Wrocław
● 31. March, Room: ?, M. Borna 9
● 5 speakers● 4 hours● What, who, where? (CFD in Wrocław)● 1st event of this kind here!● UWr, PIG, PWr, Vratis
Organization:– Maciej Matyka, Jarosław Gołembiewski (WfiA, UWr)
– Ziemowit Malecha (Pwr)
– Andrzej Kosior (Pwr, Vratis)
CFD Course details
● 6 ECTS● 165 hours (60 lecture + class)● That gives 105 hours of self study● 7 hours / week● 1 working day each week for CFD course (!)
Classes Projects
● 1st project: – FHP + fluid flow problem (solution + report)
Deadline 1: 23. March (working prototype)
Deadline 2: 13. April (hydrodynamics + report)
● 2nd project:– One of: MAC, SIMPLE, LBM, SPH
– fluid flow problem (solution + report)
Deadline: 8. June (report)
● Presentations (visits):
Date: 9. June ( 15 minutes: aim, solver, tech, results)
Exam
● Oral exam, 16th June, 9am, 521● With report @ hand (detailed questions)
Today
● Lattice Gas Methods
CFD Methods
• Navier–Stokes Equations (NSE)– Finite Difference Method (FDM)– Finite Volume Method (FVM)– Finite Element Method (FEM)
• Smoothed Particle Hydrodynamics (SPH)• Dissipative Particle Dynamics (DPD)• The Lattice Boltzmann Method (LBM)• Lattice Gas Automata (LGA)• Molecular Dynamics (MD)
Macroscale (continuum)
Microscale (atoms)
CFD Methods
• Navier–Stokes Equations (NSE)– Finite Difference Method (FDM)– Finite Volume Method (FVM)– Finite Element Method (FEM)
• Smoothed Particle Hydrodynamics (SPH)• Dissipative Particle Dynamics (DPD)• The Lattice Boltzmann Method (LBM)• Lattice Gas Automata (LGA)• Molecular Dynamics (MD)
Macroscale (continuum)
Microscale (atoms)
Navier-Stokes equations
Molecular dynamics (interactions)
Too many atoms required…
CFD Methods
• Navier–Stokes Equations (NSE)– Finite Difference Method (FDM)– Finite Volume Method (FVM)– Finite Element Method (FEM)
• Smoothed Particle Hydrodynamics (SPH)• Dissipative Particle Dynamics (DPD)• The Lattice Boltzmann Method (LBM)• Lattice Gas Automata, HPP, FHP (LGA)• Molecular Dynamics (MD)
Macroscale (continuum)
Microscale (atoms)
Metody CFD
• Navier–Stokes Equations (NSE)– Finite Difference Method (FDM)– Finite Volume Method (FVM)– Finite Element Method (FEM)
• Smoothed Particle Hydrodynamics (SPH)• Dissipative Particle Dynamics (DPD)• The Lattice Boltzmann Method (LBM)• Lattice Gas Automata, HPP, FHP (LGA)• Molecular Dynamics (MD)
Lecture 2
Lagrangian and Eulerian description ofFluids.
(movie MIT B&W)
turning point :)
Our work (2007 paper, J. Appl. Phys.)
● Use of FHP in research
● Applications in building materials
● Simple model yet complex analysis (anomalous diffusion)
● Our early work in CFD area
● Fired-clay brick saturation
http://www.nexus.globalquakemodel.org/gem-building-taxonomy/overview/glossary/fired-clay-solid-bricks--clbrs
(** fig Świerk **)
- Profiles do not collapse into one curve with ^ 0.5 scaling
- They represent process faster than diffusion
Problem
(ang. moisture → pol. wilgoć)
Our questions: is the process diffusive with changing C? Hydrodynamics?
- study concentration front dynamics
- scatterers
- time evolution (LGA)
- LGA (here FHP5) rules- Steps:
1. Propagation.2. Collisions.
Brief description of the model
Collision with scatterers
C front propagation
time
Concentration profiles
Matyka, M. and Koza, Z., Spreading of a density front in the Kuentz-Lavallee model of porous media, J. Phys. D: Appl. Phys. 40, 4078-4083 (2007)
Concentration profiles
Matyka, M. and Koza, Z., Spreading of a density front in the Kuentz-Lavallee model of porous media, J. Phys. D: Appl. Phys. 40, 4078-4083 (2007)
(shortcut)
Matyka, M. and Koza, Z., Spreading of a density front in the Kuentz-Lavallee model of porous media, J. Phys. D: Appl. Phys. 40, 4078-4083 (2007)
Metody CFD
• Navier–Stokes Equations (NSE)– Finite Difference Method (FDM)– Finite Volume Method (FVM)– Finite Element Method (FEM)
• Smoothed Particle Hydrodynamics (SPH)• Dissipative Particle Dynamics (DPD)• The Lattice Boltzmann Method (LBM)• Lattice Gas Automata, HPP, FHP (LGA)• Molecular Dynamics (MD)
HPP gas model
● Gas of interacting particles
● Momentum conservation (collisions)
● Mass conservation
● Ballistic motion inbetween collisions
Cellular Automata● Wolfram rules
● Game of Lifehttps://www.google.pl/search?q=cellular+automata+sand ----- +wikipedia, GameOfLife
Sandmodel
HPP in physics
(137 citations at pra.aps.org)
Review
● Chopard B., Droz. M. Cellular automata of physical systems, Cambridge University Press, 1998
(show printed)
Discrete lattice & velocities
1 particle traveling towards node from a given direction
Microscopic HPP rules
Ballistic motion
Collision 1
Collision 2
Basics HPP
● Two dimensional lattice (discrete)
● 1 particle from one direction gives 4 bit information at a node
s(r,t) = (1011) s(r,t) = (1000) s(r,t) = (0110)
● 4 bits is a number 0-16
Byte code
HPP Algorithm
● Collision step
● Translation stepballistic motion along discrete velocity vectors
1010 → 0101
0101 → 1010
Model HPP - zjawisko rozchodzenia się fali gęstości
( Animacja?)
HPP (simularion + u field)
HPP liquid simulation.mp4
http://youtu.be/0ZWIwehGmOg
Results HPP
( program WINDOWS)
Wyniki HPP
problemy
Model HPP – problem (symmetry)
Model HPP – problem (symmetry)
Model HPP - zjawisko rozchodzenia się fali gęstości
Model FHP
(1198 cytowań wg prl.aps.org)
(2748 wg google scholar)
Model FHP
● Wprowadzenie sieci trójkątnej
Model FHP
● Wprowadzenie sieci trójkątnej
FHP models vary
Different collision set:
● FHP I, II, III● FHP5 (+ rest particle)● Collision number affects model viscosity
James Maxwell Buick (1997), Lattice Boltzmann Methods in Interfacial Wave Modelling. PhD Thesis, University of Edinburgh.
Boundaries
James Maxwell Buick (1997), Lattice Boltzmann Methods in Interfacial Wave Modelling. PhD Thesis, University of Edinburgh.
HPP, a FHP
● Sebastian Szczecina, Własności hydrodynamiczne modelu gazu sieciowego FHP-III, Praca Magisterska 2008
FHP cellular automata.mp4
http://youtu.be/MuJr69IVvggSamo Kralj
FHP (CUDA)
By Lucas Camposhttp://youtu.be/0xlRPnQGSXg
LatticeGasCUDA.mp4
next week 10.03.2015:
- FHP implementation details- applications of FHP (review)
End of part 1