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

Specifying Dirichlet boundary condition using PointSetBC #1679

Open
DeepaMahm opened this issue Mar 19, 2024 · 0 comments
Open

Specifying Dirichlet boundary condition using PointSetBC #1679

DeepaMahm opened this issue Mar 19, 2024 · 0 comments

Comments

@DeepaMahm
Copy link

DeepaMahm commented Mar 19, 2024

Hi Prof. @lululxvi

I've a 2D geometry created using PointCloud.

geom = dde.geometry.PointCloud(
     points=np.asarray(domain_points),
     boundary_points=np.asarray(lbc_points),
 )

 timedomain = dde.geometry.TimeDomain(0, 60)
 geomtime = dde.geometry.GeometryXTime(geom, timedomain)
 
 # left boundary condition
 lbc_values = [[5] for _ in range(len(lbc_points))]
 lbc_points_time = np.hstack((np.asarray(lbc_points), np.ones((len(lbc_points), 1))))
 lbc = dde.icbc.PointSetBC(points=lbc_points_time, values=lbc_values)  # [0, 1]

When I try to specify the Dirichlet boundary condition using PointSetBC to solve a forward problem, I am unsure how the time needs to be specified.

I referred to this example:
https://deepxde.readthedocs.io/en/latest/demos/pinn_inverse/diffusion.1d.inverse.html

where time is specified to the PointSetBC by appending t=1 to observe_x .

observe_x = np.vstack((np.linspace(-1, 1, num=10), np.full((10), 1))).T
observe_y = dde.icbc.PointSetBC(observe_x, func(observe_x), component=0)

I'm trying something similar by appending np.ones((len(lbc_points). Here lbc_points is a 2d array with the coordinates of points at the left boundary of the geometry.

lbc_points_time = np.hstack((np.asarray(lbc_points), np.ones((len(lbc_points), 1))))

Since DirichletBC holds at all time points specified in TimeDomain(0, 60) ,
I am not sure if one has to choose a time step and specify the BC values explicitly at all the time instances .

Could you please advise on how to proceed?

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

1 participant