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

Having inputs to the model that are not location coordinates #193

Closed
Clement465 opened this issue Dec 31, 2020 · 6 comments
Closed

Having inputs to the model that are not location coordinates #193

Clement465 opened this issue Dec 31, 2020 · 6 comments

Comments

@Clement465
Copy link

Hi @lululxvi ,

For a 2D problem, is it possible to add inputs to the model that are not x or y coordinates?

For example, for potential flow over a rotating cylinder with varying circulation, the inputs would be x, y and Gamma (circulation) and the output would be phi. Is it possible to use a 2D domain with the user specifying the values of Gamma to be used for training?

Thank you.

@lululxvi
Copy link
Owner

lululxvi commented Jan 4, 2021

You can, but Gamma is just a parameter in the PDE, is it right?

@Clement465
Copy link
Author

No, in this case the PDE is just Laplace's equation. However, Gamma affects the Neumann boundary conditions.

May I ask how I can have 3 inputs without having a 3d domain?

Thank you.

@lululxvi
Copy link
Owner

lululxvi commented Jan 8, 2021

Do you want to get a parametric solution u(x,y,gamma) on gamma? If so, you can just assume gamma is the 3rd dimension. (In PINN, we do not care whether the input is in physical space or the parametric space. The network is just a surrogate of the solution).

Back to your question, just use net = dde.maps.FNN([3] + ... + [1], ...), then the network has 3 input neurons.

@Clement465
Copy link
Author

The problem I'm facing in this case is that there is no cylinder geometry for 3D in DeepXDE.

Is it possible to use net = dde.maps.FNN([3] + ... + [1], ...) but with 2D geometry?

@lululxvi
Copy link
Owner

No, you cannot. Because 2D geometry only samples points in 2D. You might implement a 3D cylinder, which is not hard to do. Otherwise, just use any geometry, and when you define the PDE, set num_domain=0, num_boundary=0 etc, so that we won't use the geometry at all. You sample all the points by yourself, and pass them using the anchors=....

@Clement465
Copy link
Author

Okay, thank you!

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

2 participants