https://github.com/talhaahussain/advection-simulation
Continuous Assessment for ECM3446 - High Performance Computing, set by Prof. Luo Man (Year 3, Semester 2). Simulates the advection of material from a chimney by wind in the planetary boundary layer.
https://github.com/talhaahussain/advection-simulation
advection advection-diffusion simulation
Last synced: 8 months ago
JSON representation
Continuous Assessment for ECM3446 - High Performance Computing, set by Prof. Luo Man (Year 3, Semester 2). Simulates the advection of material from a chimney by wind in the planetary boundary layer.
- Host: GitHub
- URL: https://github.com/talhaahussain/advection-simulation
- Owner: talhaahussain
- License: mit
- Created: 2024-04-07T05:36:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-07T21:52:00.000Z (12 months ago)
- Last Synced: 2025-02-21T07:41:32.436Z (8 months ago)
- Topics: advection, advection-diffusion, simulation
- Language: C
- Homepage:
- Size: 727 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# advection-simulation
Continuous Assessment for ECM3446 - High Performance Computing, set by Prof. Luo Man (Year 3, Semester 2). Simulates the advection of material from a chimney by wind in the planetary boundary layer. The main program is optimised for high performance computers by parallelisation, using OpenMP. This repository includes this file, a single C program, three gnuplot scripts, and four PNG images (located in the results subdirectory).
This work received a final mark of 100/100.
Please see `specification.pdf` for specification.
### Prerequisites
The following instructions assume that you are trying to run the program and view the results with a Linux machine, with `gcc`, `openmp`, `gnuplot`.
### Usage
The compiled program has NOT been included - please compile the serial program with
```
gcc -o advection2D -std=c99 advection2D.c -lm
```or the parallelised program on an OpenMP-enabled machine with
```
gcc -fopenmp -o advection2D -std=c99 advection2D.c -lm
```Please run the compiled program with
```
./advection2D
```As aforementioned, gnuplot scripts have been provided. Please note that you must first compile and run the program, and generate initial.dat, final.dat and vertical\_averages.dat. To use these to view the output of the program, please use
```
gnuplot plot_initial
```
```
gnuplot plot_final
```
```
gnuplot plot_average
```or, alternatively (assuming the scripts are in the current directory)
```
gnuplot plot_*
```These will generate 3 images - initial.png, final.png and vertical\_averages.png. You can view these with an image viewer of your choice, such as feh. If you are unable to generate these images by executing the program, please refer to the results directory.
The solution plots to each section are provided in the results directory. You can view these with an image viewer of your choice.