diff --git a/README.md b/README.md index a6f43e6..7b66834 100644 --- a/README.md +++ b/README.md @@ -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) @@ -36,5 +65,44 @@ ToDo ## 4.3 Shock Tube -ToDo -![shock Tube](./examples/shock_tube/shock_tube.png) \ No newline at end of file +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) diff --git a/examples/heat_bath/heat_bath.png b/examples/heat_bath/heat_bath.png index 8aa0551..912fdcb 100644 Binary files a/examples/heat_bath/heat_bath.png and b/examples/heat_bath/heat_bath.png differ diff --git a/examples/heat_bath/heat_bath.py b/examples/heat_bath/heat_bath.py index 3c4c52e..ed90493 100644 --- a/examples/heat_bath/heat_bath.py +++ b/examples/heat_bath/heat_bath.py @@ -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')