2D_Panel CFD solver
Project description
Background and Validation
This wiki is built in Notion. Here are all the tips you need to contribute.
General Background
Flow over a cylinder
The project has been started as a Open Source repository for CFD solvers. The motive is to provide handy easy to understand code with multitude of CFD schemes for cfd developers. Also, needs to remain functional as an easy to setup open source solver for users. This release only comprises of a terminal sequential prompt, simple and effective. We have immediate plans of implementing a PyQT GUI to it.
Head to the notion page for more information on how to add to this project:
https://florentine-hero-1e6.notion.site/2D_Panel-CFD-ad63baa924ee4a32af8a52b8134c0360
This version comprises of a 2D Staggered Grid with Inlet, Outlet & Wall Boundary conditions. Obstacles can be imported & transformed with a list of points or with the inbuilt elliptical geometries.
First order Upwind Scheme is used for Velocity with very good results for the benchmark Lid Driven Cavity problem when compared to results in Ghia etal.
The SIM runs stable with terminal-python for <10000 Cells after which Residual plotting becomes laggy. spyder (Anaconda IDE) provides great speed-ups with multi-core utilisation & also improves the post-processing experience. The Sequential prompts based model is based on a GUI approach and will be ported to it in the next update.
The lack of multi-threading support in python trumps the ease of accessibility of matplotlib library. We will be looking to port into C++ immediately utilizing vtk libraries with paraview & blender for visualization.
The framework is designed to test new FVM schemes, & Coupling solvers. All popular convection schemes will be added soon. Multiple solvers will be available in the next updates, the likes of SIMPLER, PISO, Pimple etc. Future plans also include Unsteady & VOF solvers.
The program works as a sequential prompt, for SIM Parameters. The prompts are designed keeping in mind a GUI approach, which will be available in the next update. There are frequent Check Cycles to render the result & modify any inputs. We'll go through an exemplary First Run in the next Section.
Installation
Method: 1
To install using pip Run:
python3 -m pip install 2D_Panel-CFD
Or:
Method: 2
https://github.com/Fluidentity/2D_Panel-CFD
- Clone github
[RUN_package](https://github.com/Fluidentity/2D_Panel-CFD.git)
to anywhere in your machine from:
cd /insert/folder/address/cfd
git clone https://github.com/Fluidentity/2D_Panel-CFD.git
- Set it to PYTHONPATH with:
export PYTHONPATH="${PYTHONPATH}:/insert/folder/address/cfd/RUN_package"
It's advisable to run this package from RUN-spyder.py through an IDE like spyder for ease of use, and prolonged variable storage. Also, spyder has some great plotting interface.
Executable
Method: 1
Open python environment with: (in terminal)
python3
or (if python —version is >3)
python
then insert:
from RUN_package import RUN
- RUN.py is meant to be run from terminal.
Method: 2
Run on IDE by cloning RUN_package from Github.
Open python IDE like spyder from RUN_package directory:
Run RUN-spyder.py
The cells for pre-processor, solver & post processors are different. Need to run all.
- RUN_spyder.py can be run with an IDE, such as spyder to improve multi-Core Utilisation & post-processing experience. ****
Validation of Solver
Vortex Shedding flow over a cylinder
For validation of the solver laid out, following strategies are used:
- Comparison with Benchmark Problem Lid Driven Cavity
- Reference study Ghia etal. Re = 100, 1000, 5000
Lid Driven Cavity Benchmark Ghia etal.
Residuals
Benchmark Test at Re=100
- First Order Upwind scheme
Benchmark Test at Re=1000
- First Order Upwind scheme
Benchmark Test at Re=5000
- First Order Upwind scheme
Conclusion
First order UPWIND Scheme is good for low Reynolds no. but is only first order accurate to capture higher gradient.
Fully developed flow between Parallel Plates
Velocity Profile [at X=0.8Lx and Y=0.5Ly]
Conclusion
The Umax Velocity comes close to 1.5 feactor for steady flow between parallel plates. First order UPWIND Scheme with high y-gradient.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file 2D_Panel-CFD-0.0.1.tar.gz
.
File metadata
- Download URL: 2D_Panel-CFD-0.0.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b996a8c0ea0f22d3304687c44c9750a91bc5d6ae02b4b072c718b405e380ec2 |
|
MD5 | 810f1a69c6356b750e3a404de2a47464 |
|
BLAKE2b-256 | e0382f9b164f1e592f58b705f4096dc3848cba5dcbc32c9d726c4125da929f5e |
File details
Details for the file 2D_Panel_CFD-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: 2D_Panel_CFD-0.0.1-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fcfaac3a5aa0b3fe87519a88822d8273ea43683fac09cc643a1fd934e7d3ce1 |
|
MD5 | 02291966b16f5dbd078462dcc363b88c |
|
BLAKE2b-256 | 18c8ee5beabe697e95fbe7ba37674fb2536126fb569eadd9792b233b8f397ba5 |