On Newman's Adiabatic Boundary Problem #1581
Unanswered
yuluoxiansen
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello Lulu,
I am using deepxde, a powerful tool, to solve a heat transfer problem. I have encountered difficulties in defining the adiabatic boundary. To be precise, I don’t know if I can define the adiabatic boundary in this way. Can you help me take a look?
My geometry :
r = 1
rc = 0.1
vertices=[
(0,0),(0,2r),(r,2r),(r,r+rc/2),(r+2rc,r+rc/2),(r+2rc,2r),
(2r+2rc,2r),(2r+2rc,0),(r+2rc,0),(r+2rc,r-rc/2),(r,r-rc/2),(r,0)
geoms=dde.geometry.Polygon(vertices=vertices)
This is a schematic diagram:

Both sides of the region are Dirichlet conditions, and the remaining boundaries are adiabatic boundaries.but I cannot define the middle boundary as an adiabatic boundary,I looked up some information, but they are all rectangular areas, I don't know what to do.In addition, the adiabatic boundary cannot converge, and the loss value is approximately 1e-2,HELP ME!
pde and func_boundary as follows:
def pde(x, y):
dy_xx = dde.grad.hessian(y, x, i=0, j=0)
dy_yy = dde.grad.hessian(y, x, i=1, j=1)
return dy_xx + dy_yy
def boundary_l(x, on_boundary):
return on_boundary and dde.utils.isclose(x[0], 0)
def boundary_r(x, on_boundary):
return on_boundary and dde.utils.isclose(x[0], 2r+2rc)
def boundary1(x, on_boundary):
return on_boundary and 0 < x[0] <= r
def boundary2(x, on_boundary):
return on_boundary and r+2rc <= x[0] < 2r+2rc
def boundary3(x, on_boundary):
return on_boundary and r <= x[0] < r+2rc
def boundary4(x, on_boundary):
return on_boundary and 0 <= x[1] < r-rc/2 or x[0] == r
def boundary5(x, on_boundary):
return on_boundary and r+rc/2 <= x[1] < 2r or x[0] == r+2rc
bc_left = dde.icbc.DirichletBC(geoms, lambda x: 1, boundary_l)
bc_right = dde.icbc.DirichletBC(geoms, lambda x: 0, boundary_r)
bc_neumann = dde.icbc.NeumannBC(geoms, lambda x: 0, boundary1)
bc_neumann2 = dde.icbc.NeumannBC(geoms, lambda x: 0, boundary2)
bc_neumann3 = dde.icbc.NeumannBC(geoms, lambda x: 0, boundary3)
bc_neumann4 = dde.icbc.NeumannBC(geoms, lambda x: 0, boundary4)
bc_neumann5 = dde.icbc.NeumannBC(geoms, lambda x: 0, boundary5)
data = dde.data.PDE(
geoms,
num_domain=10000,
num_boundary=500,
pde=pde,
bcs=[bc_left, bc_right, bc_neumann,bc_neumann2,bc_neumann3,bc_neumann4,bc_neumann5])
net = dde.nn.FNN([2] + [30] * 5 + [1], "tanh", "Glorot normal")
model = dde.Model(data, net)
model.compile("adam", lr=1e-3, )
losshistory, train_state = model.train(iterations=50000,)
dde.saveplot(losshistory, train_state, issave=True, isplot=True)
Beta Was this translation helpful? Give feedback.
All reactions