Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

基于fealpy,怎么将一个矩形的计算区域挖去一个圆域,然后使用三角网格剖分呢 #611

Open
jibingquanm opened this issue Mar 1, 2024 · 3 comments

Comments

@jibingquanm
Copy link

魏老师:
您好!我是您fealpy的初学者纪兵权。我有以下两个问题想请教魏老师,
1. 基于目前的fealpy2.0,在您fealpy官方文档(https://www.weihuayi.cn/fealpy/docs/zh/mesh/tri-mesh)中的很多命令都已经不再使用。例如在求解NS方程的圆柱绕流问题时,学习您给出的算例之后(https://www.weihuayi.cn/fealpy/docs/zh/example/num-navier-stokes-equation),基于fealpy,怎么将一个矩形的计算区域挖去一个圆域,然后使用三角网格剖分呢?
2. 您在b站的课程的很多内容是基于之前fealpy版本进行授课的,我们跟着您的b站课程进行复现代码时,可能会出现版本问题的报错。魏老师,我们从哪里文档中可惜系统地学习最先版本fealpy中的各种命令介绍呢?
期待魏老师您的答疑解惑^^

@weihuayi
Copy link
Owner

weihuayi commented Mar 1, 2024

@weihuayi
Copy link
Owner

weihuayi commented Mar 1, 2024

这是一个 FEALPy 网格入门的文档(还需要完善):
https://github.com/weihuayi/fealpy/blob/master/notebook/mesh_beginner.ipynb

这个文档中有很多网格模块示例:
https://github.com/weihuayi/fealpy/blob/master/notebook/mesh.ipynb

@weihuayi
Copy link
Owner

weihuayi commented Mar 2, 2024

下面是一个带圆孔的长方形区域网格生成的示例
"""
import matplotlib.pyplot as plt
from fealpy.mesh import TriangleMesh
from fealpy.geometry import BoxWithCircleHolesDomain
box = [0.0, 2.2, 0.0, 0.41]
circles = [(0.2, 0.2, 0.05)]
hmin = 0.01
hmax = 0.05
domain = BoxWithCircleHolesDomain(box, circles, hmin=hmin, hmax=hmax)
mesh = TriangleMesh.from_domain_distmesh(domain, maxit=1000)
fig = plt.figure()
axes = fig.add_subplot(1, 1, 1)
mesh.add_plot(axes)
plt.show()
"""
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants