Skip to content

Instantly share code, notes, and snippets.

View gauravsdeshmukh's full-sized avatar

Gaurav Deshmukh gauravsdeshmukh

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gauravsdeshmukh
gauravsdeshmukh / FlowPy_FD_functions.py
Last active December 24, 2023 10:25
This gist contains three functions for the implementation of the predictor-corrector finite difference scheme for the solution of the incompressible Navier-Stokes equations.
#The first function is used to get starred velocities from u and v at timestep t
def GetStarredVelocities(space,fluid):
#Save object attributes as local variable with explicity typing for improved readability
rows=int(space.rowpts)
cols=int(space.colpts)
u=space.u.astype(float,copy=False)
v=space.v.astype(float,copy=False)
dx=float(space.dx)
dy=float(space.dy)
dt=float(space.dt)