Programming, Science, Python, Mathematics, Towards Data Science.
of our defined classes #Set boundary conditions for horizontal velocity def SetUBoundary(space,left,right,top,bottom): if(left.type=="D"): space.u[:,0]=left.value elif(left.type=="N"): space.u[:,0]=-left.value*space.dx+space.u[:,1] if(right.type=="D"): space.u[:,-1]=right.value