Skip to content

Files

Latest commit

b050c24 · Oct 18, 2022

History

History
109 lines (83 loc) · 2.77 KB

README.md

File metadata and controls

109 lines (83 loc) · 2.77 KB

Octree based DSMC - Python implementation

LeoBasov

Table of Contents

  1. Introduction
  2. Requirements
  3. Installation
  4. Test Cases

1. Introduction

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.
  • pip3
  • numpy
  • llvmlite
  • scipy
  • numba

3. Installation

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 σ T / m 2 m / k g
Ar 3.631681e-19 6.6422e-26

4.1 Heat Bath

Simulation of temperature relaxation of Argon in closed domain. The simulation domain is cube with a side length of 2 10 3 m . The simulation properties are as follows

Δ t / s w T / K n / m 3 u / ( m / s )
1e-5 0.5e-8 300 1e+20 1000.0

where Δ 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

4.2 Hypersonic flow around cube

Hypersonic flow around a cuboid. The parameters are as follows

Δ 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

hypersonic_flow_grid

hypersonic_flow_grid_nrho

4.3 Shock Tube

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 = ( n L u L T L ) = ( 2.41432 e 22 0 300 )

C R = ( n R u R p L ) = ( 2.41432 e 21 0 300 )

The simulation parameters

Δ t / s w
1e-7 1e-8

The simulation domain is a rectangular tube with a square cross section with the side length 2 10 4 m and a length of 0.1 m . Results can be seen below.

shock Tube