Poisson equation on L-shaped / spherical geometry #968
adtzlr
started this conversation in
Show and tell
Replies: 1 comment
-
For spherical geometries: import felupe as fem
import numpy as np
circle = fem.Circle(sections=[0, 90], n=7)
mesh = circle.revolve(axis=0, phi=360, n=37).sweep(decimals=4)
region = fem.RegionHexahedron(mesh)
u = fem.Field(region, dim=1)
field = fem.FieldContainer([u])
region_surface = fem.RegionHexahedronBoundary(mesh, only_surface=True)
surface = np.unique(region_surface.mesh_faces().cells)
boundaries = fem.BoundaryDict(
fixed=fem.Boundary(u, mask=np.isin(np.arange(mesh.npoints), surface)),
)
boundaries.plot(show_lines=False).show()
solid = fem.SolidBody(umat=fem.Laplace(), field=field)
load = fem.SolidBodyForce(field=field, values=1.0)
step = fem.Step([solid, load], boundaries=boundaries)
job = fem.Job([step]).evaluate()
view = mesh.view(point_data={"Field": u.values})
plotter = view.plot("Field")
plotter.mesh.clip("z", invert=True, value=0.0, inplace=True)
plotter.show() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This simple example shows the application of the Poisson equation on a L-shaped geometry, as an add-on for this example.
Beta Was this translation helpful? Give feedback.
All reactions