Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 75 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,54 @@
4. Test Cases

# 1. Introduction
DSMC implementation using an octree as a variable mesh.
DSMC implementation using an octree as a variable mesh based on https://doi.org/10.1016/j.jcp.2008.04.038.
Implementation in done in python 3.10.

# 2. Requirements
- python 3.10.
- pip
- pip3
- numpy
- llvmlite
- scipy
- numba

# 3. Installation
ToDo
The module can be installed using pip3 from the repository root as

``
pip3 install .
``

# 4. Test Cases
All test cases were performed using Argon.
The gas properties are as follows:

| gas | $\sigma_T / m^2$ | $m / kg$ |
|:---:|:----------------:|:----------:|
| Ar | 3.631681e-19 | 6.6422e-26 |

## 4.1 Heat Bath
ToDo
Simulation of temperature relaxation of Argon in closed domain.
The simulation domain is cube with a side length of $2 \cdot 10^{-3} m$.
The simulation properties are as follows


| $\Delta t / s$ | $w$ | $T / K$ | $n / m^{-3}$ | $u / (m/s)$ |
|:--------------:|:------:|:-------:|:------------:|:-----------:|
| 1e-5 | 0.5e-8 | 300 | 1e+20 | 1000.0 |

where $\Delta t$ is the time step, $w$ is the particle weight, $T$ the temperature, $n$ the number density and $u$ the velocity in x direction.
The simulation results can be seen below.

![Heat Bath](./examples/heat_bath/heat_bath.png)

## 4.2 Hypersonic flow around cube
ToDo
Hypersonic flow around a cuboid.
The parameters are as follows

| $\Delta t / s$ | $w$ | $T / K$ | $n / m^{-3}$ | $v_{x, z} / (m s^{-1})$ | $v_y / (m s^{-1})$ |
|:--------------:|:--------:|:-------:|:------------:|:-----------------------:|:------------------:|
| 1e-6 | 0.25e+15 | 273.0 | 2.6e+19 | 0 | -3043.0 |

![hypersonic_flow](./examples/hypersonic_flow/hypersonic_flow.png)

Expand All @@ -36,5 +65,44 @@ ToDo

## 4.3 Shock Tube

ToDo
![shock Tube](./examples/shock_tube/shock_tube.png)
This test case is Sod's shock tube problem.
Initial conditions for the left hand side $C_L$ and the right hand side $C_R$ are found below

$$
C_L =
\begin{pmatrix}
n_L \\
u_L \\
T_L \\
\end{pmatrix} =
\begin{pmatrix}
2.41432e22 \\
0 \\
300 \\
\end{pmatrix}
$$

$$
C_R =
\begin{pmatrix}
n_R \\
u_R \\
p_L \\
\end{pmatrix}=
\begin{pmatrix}
2.41432e21 \\
0 \\
300 \\
\end{pmatrix}
$$

The simulation parameters

| $\Delta t / s$ | $w$ |
|:--------------:|:----:|
| 1e-7 | 1e-8 |

The simulation domain is a rectangular tube with a square cross section with the side length $2 \cdot 10^{-4} m$ and a length of $0.1 m$.
Results can be seen below.

![shock Tube](./examples/shock_tube/shock_tube.png)
Binary file modified examples/heat_bath/heat_bath.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/heat_bath/heat_bath.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def calc_x(velocities, mass):
ax1.set_xlim([0, xmax])
ax1.set_ylim([0, 0.00040])

fig.suptitle("T = {:.3f}K".format(Tnew))
fig.suptitle("Argon Heat Bath")
plt.show()

print('done')