Skip to content
/ flow Public

Computational fluid dynamics with phase field crystal etc.

License

Notifications You must be signed in to change notification settings

petenez/flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

flow

Computational fluid dynamics with phase field crystal etc.

float

This project combines phase field crystal (PFC) with computational fluid dynamics (CFD) to model something like ice crystals growing and floating in water. See an animated simulation (https://www.youtube.com/watch?v=QUsN1aDdjC4) or try it yourself by running the scripts simulate.sh and visualize.sh in flow/float/demo. See my thesis (http://urn.fi/URN:ISBN:978-952-60-8608-8) and my GitHub repository for PFC tools (https://github.com/petenez/pfc) for further details on PFC. The CFD solver is based on the paper Real-Time Fluid Dynamics for Games by Jos Stam (available: https://pdfs.semanticscholar.org/847f/819a4ea14bd789aca8bc88e85e906cfc657c.pdf).

A partially crystalline system is modeled using a basic PFC model. The PFC density field describing the crystals is advected along the CFD flow field. The flow is also coupled to the smoothed density, where the lattice structure has been smeared out, in two ways. First, an upward force proportional to the smoothed density is applied to the flow, causing the crystals to float, the faster the larger they are. Second, the viscosity of the underlying fluid is also proportional to the smoothed density to make the flow interact with the crystals more like rigid bodies. The net flow rate is fixed to zero, resulting in equal flow up and down, and left and right.

The actual simulation code is written in C and is parallelized with OpenMP. The PFC dynamics are solved exploiting fast Fourier transforms that are computed with FFTW. The visualization tools require Java and MPI.

About

Computational fluid dynamics with phase field crystal etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published