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

How to include physics constraints for a 2D Darcy problem #15

Open
ach14012022 opened this issue Jan 9, 2023 · 1 comment
Open

How to include physics constraints for a 2D Darcy problem #15

ach14012022 opened this issue Jan 9, 2023 · 1 comment

Comments

@ach14012022
Copy link

@zongyi-li
Hello. Hopefully, everyone is doing well.
I have already developed an FNO-based model for a 2D (xy) Darcy flow problem using generated samples. There is potential to further improve the FNO’s performance by including physics constraints in its network configuration. That is why I am going to apply PINO for my case study.
It seems that the train_2d (line 78) part of the below is beneficial:
https://github.com/neural-operator/PINO/blob/master/train_operator.py
I will be highly appreciative if one can help me to clear the points below:
As I have my data, there is no need for lines 86-91 anymore. Am I right? Meantime, I do not understand what ‘sub’ and ‘pde_sub’ are.
There is nothing about ‘pad_ratio’ in ‘config’.
In line 99, what does ‘checkpoint’ refer to?
More importantly, there is nothing about including PDE and initial/boundary conditions. I need a comprehensive explanation of how to do so.

@devzhk
Copy link
Member

devzhk commented Jan 12, 2023

Hey,

  1. If you have your own dataset, 86-91 is not needed. 'sub', 'pde_sub' is the subsampling ratio. If you work with your data, no need to worry about that.
  2. 'pad_ratio' ;check out this yaml to see how to set pad_ratio. https://github.com/neural-operator/PINO/blob/master/configs/operator/Darcy-pretrain.yaml#L17
  3. 'checkpoint' refers to Pytorch checkpoint. Check out this tutorial for more detail https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_a_general_checkpoint.html
  4. PDE loss is defined in https://github.com/neural-operator/PINO/blob/master/train_utils/losses.py#L39

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