Replies: 2 comments
-
|
For the Newton-method to converge (to enable the "force"-balance check) it is necessary to include a linear form of the Poisson equation. This is also true for linear elasticity. Added in dfd18c7. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This one uses an alternative approach. import felupe as fem
import numpy as np
mesh = fem.Rectangle(n=21)
region = fem.RegionQuad(mesh, uniform=True)
field = fem.FieldContainer([fem.Field(region, dim=1)])
boundaries = dict(
bottom=fem.Boundary(field[0], fy=0),
top=fem.Boundary(field[0], fy=1),
left=fem.Boundary(field[0], fx=0),
right=fem.Boundary(field[0], fx=1),
)
# K = ∫ ∇_j(δu_i) ∇_j(u_k) dΩ
# K = ∫ ∇_j(δu_i) : (δ_ik δ_jl) : ∇_l(u_k) dΩ
lhs = fem.IntegralForm(
fun=[fem.math.cdya_ik(np.eye(1), np.eye(2)).reshape(1, 2, 1, 2, 1, 1)],
v=field,
u=field,
dV=region.dV,
grad_v=[True],
grad_u=[True],
)
# f = ∫ δu_i dΩ
rhs = fem.IntegralForm(fun=[np.ones((1, 1, 1))], v=field, dV=region.dV, grad_v=[False])
dof0, dof1 = fem.dof.partition(field, boundaries)
system = fem.solve.partition(field, lhs.assemble(), dof1, dof0, r=-rhs.assemble())
u = fem.solve.solve(*system)
view = mesh.view(point_data={"T": u})
view.plot("T").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.
Uh oh!
There was an error while loading. Please reload this page.
-
Poisson's Equation in FElupe
this should be added to the docs as an example using https://felupe.readthedocs.io/en/latest/howto/forms.html.
Poisson's equation with fixed boundaries
is transformed into integral form representation by the divergence (Gauss's) theorem.
Beta Was this translation helpful? Give feedback.
All reactions