CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > CFD Freelancers

3d python sim blowing up

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By bburgess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2019, 18:07
Default 3d python sim blowing up
  #1
New Member
 
Bryce
Join Date: Dec 2019
Posts: 1
Rep Power: 0
bburgess is on a distinguished road
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!
rmaries likes this.
bburgess is offline   Reply With Quote

Old   January 18, 2020, 00:16
Default
  #2
New Member
 
Sujan
Join Date: Jan 2015
Posts: 4
Rep Power: 7
appollosputnik is on a distinguished road
I can help you get rid of your problem, please message me to my email id 'yellowlemontree0821@gmail.co'
appollosputnik is offline   Reply With Quote

Old   February 21, 2020, 03:52
Default
  #3
New Member
 
Sen Wang
Join Date: Jul 2018
Location: Singapore / Notre Dame, U.S.
Posts: 15
Rep Power: 4
wangsen992 is on a distinguished road
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.
wangsen992 is offline   Reply With Quote

Reply

Tags
bug, navier-stokes solver, python
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 03:48.