How to solve Time-dependent PDE with a dynamic boundary conditions in 2D disk? #1016
Unanswered
chunyanlimath
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You need to use tensorflow, not numpy. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Prof.Lu and Communities,
I am trying to solve a time-dependent PDE equipped with a dynamic boundary condition in the 2D disk. Does anyone know how to implement such ad dynamic boundary condition?
The boundary condition is shown in the picture, which is a surface partial differential equation of
u(x, t), where x \in \Omega, t \in[0, T], Ms, \beta, \alpha, are constant parameters. n is the unit outer normal vector of the boundary \partial \Omega. \nabla_s=\nabla - n(n\dot \nabla) is surface gradient operator
.As we can see that, there are several terms
n dot nabla, and n dot nabla^3, n dot nabla_s and n dot nabla_s^3
, which can't not be written as a non-homogeneous Neumann BC. Hence, I tried to define this boundary condition using OperatorBC, but I always get errorRuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
The first error shows indef func_boundary(x, u, _): normal = geomtime.boundary_normal(x[:, 0:2])
.Here are the several ideas I tried but all failed.
normal=geom.boundary_normal(x[:, 0:2])
resulted in the same error.n dot nabla, n dot nanla^3
, so it can't be written into that form.Why this error comes out? Is it because I didn't correctly compute the normal vector of the boundary of a GeometryXTime Domain?
Any suggestions or hints will be appreciated!
Here is the code I wrote
Beta Was this translation helpful? Give feedback.
All reactions