|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Bryce
Join Date: Dec 2019
Posts: 1
Rep Power: 0 ![]() |
I have a 3d python fluid simulation that is giving some unexpected behavior. I've been following this tutorial: https://lorenabarba.com/blog/cfd-pyt...navier-stokes/, and have been trying to extend it to 3d.
relevant code is in here: https://github.com/fyzx92/Animate_Navier_Stokes, the NS_Lorena_Barba file, at the bottom where it says 3D. The ICs in all cases so far are that a small region of the fluid has a velocity in the +x direction. Even starting with linear convection, something is weird: the region shifts in the +z direction, though the flow vectors are still exclusively in the +x direction. Nonlinear convection seems to be fine, though the only thing that I changed was that what was a constant velocity is now the local velocity. Lastly, Diffusion is proving problematic, the velocity vectors get enormous, and are pointing in both the +x and -x directions (I'd expect the flowing region to get larger and slower, not reverse direction). Does anyone have any ideas of where the bugs are, or where the code is wrong? Thanks! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Sujan
Join Date: Jan 2015
Posts: 6
Rep Power: 11 ![]() |
I can help you get rid of your problem, please message me to my email id 'yellowlemontree0821@gmail.co'
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Sen Wang
Join Date: Jul 2018
Location: Singapore / Notre Dame, U.S.
Posts: 19
Blog Entries: 1
Rep Power: 8 ![]() |
Hi I just saw your post and i'm wondering if your problem is already solved? Normally the errors you've mentioned could be due to several common reasons:
1. A bug in the code, commonly a wrong sign somewhere. 2. Pressure correction iteration is not sufficiently done to ensure the continuity constraints on velocity field, which usually leads to errors blow up and velocity field gotten all whacky. 3. Have you check your Courant number to ensure the time step and grid size are chosen appropriately? You should take into consideration of the mean velocity imposed. Well, hope those are helpful and will be glad to help you if needed. |
|
![]() |
![]() |
![]() |
Tags |
bug, navier-stokes solver, python |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Working with Python: Query of through-plane flow of multiple clips in one plot | PedroInvierno | EnSight | 8 | April 10, 2017 09:23 |
[foam-extend.org] compile error with python characteristic activated | shuoxue | OpenFOAM Installation | 1 | February 6, 2016 17:05 |
[OpenFOAM] using the python shell in paraFoam | colinB | ParaView | 14 | September 14, 2015 09:04 |
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 | aylalisa | ParaView | 4 | June 13, 2014 08:52 |
Help with large sim | stu | CFX | 7 | June 4, 2007 17:13 |