Skip to content

Commit

Permalink
Support python 3.7
Browse files Browse the repository at this point in the history
1. post-processing module now support plot exact solution
  • Loading branch information
BinWang0213 committed Jun 25, 2019
1 parent 6995950 commit 92a203e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Lib/BEM_Solver/BEM_2D_Postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def get_BDSolution(self,bd_markerID):
return p,q,u,v

###########Visulation Module################
def plot_Solution(self,v_range=None,p_range=None,resolution=20):
def plot_Solution(self,v_range=None,p_range=None,resolution=20,exact_sol=None):
"""Plot pressure&velocity field and Preview the streamline
v_range=(0,300),p_range=(50,100),resolution=20
Expand All @@ -194,6 +194,8 @@ def plot_Solution(self,v_range=None,p_range=None,resolution=20):
v = np.empty(N, dtype=float)
for i in range(N):
puv=self.BEMobj.get_Solution(Pts[i])
if(exact_sol is not None): #if we plot exact solution
puv=exact_sol(Pts[i])
p[i],u[i],v[i]=puv[0],puv[1],puv[2]
Vtotal = np.sqrt(u**2 + v**2)
#Resampling data to regular grid
Expand Down
Binary file not shown.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Currently available features include:
Special feature:
* Multi-domain problem is solved by parallel domain decomposition method [Wang et al, 2018]

`PyBEM2D` is currently support for `64-bit` `Windows` and `Linux` platforms, several `Jupyter-Notebook` examples are provided
`PyBEM2D` is currently support for `64-bit` `Windows` and `Linux` platforms, several `Jupyter-Notebook` examples are provided.

`Anaconda 5.3` (https://www.anaconda.com/download/) is required. If code is not working, please run `python setup.py build_ext -i clean` @ "PyBEM2D\Lib\BEM_Solver\Elements\Cython" in terminal to compile the cython library for exact integration. The library works on both Windows and Linux.


# Solving A potential porblem in PyBEM2D
Expand Down

0 comments on commit 92a203e

Please sign in to comment.