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

Boundary condition #2

Open
renjiahaozju opened this issue Aug 29, 2024 · 8 comments
Open

Boundary condition #2

renjiahaozju opened this issue Aug 29, 2024 · 8 comments

Comments

@renjiahaozju
Copy link

I have some trouble about how is u(x=0)=0 implemented? If I want u(x=1)=0, or if I want u(x=0) is freedom, how to achieve?

@JinshuaiBai
Copy link
Owner

For your question:

  1. We apply the hard boundary condition technique in PINN; that is, we let the output of FNN as intermediate output and multiply it with x ( u=FNN(x, y)*x ). By doing so, the boundary condition u(x=0)=0 can be naturally satisfied without introducing additional loss terms to impose this condition.
  2. If you want to impost u(x=1)=0, you can let ( u = FNN(x, y)*(x-1) ).
    Hope these can answer your questions.

@renjiahaozju
Copy link
Author

Thanks for your patient answer!

@A474852023
Copy link

For your question:

  1. We apply the hard boundary condition technique in PINN; that is, we let the output of FNN as intermediate output and multiply it with x ( u=FNN(x, y)*x ). By doing so, the boundary condition u(x=0)=0 can be naturally satisfied without introducing additional loss terms to impose this condition.
  2. If you want to impost u(x=1)=0, you can let ( u = FNN(x, y)*(x-1) ).
    Hope these can answer your questions.

Hi, for the boundary condition, if I want to set both u(x=0)=0 and u(x=1)=0, can I just make u=FNN(x, y)*x *(x-1)?
Also I would like to ask how the FEA.mat file is organized?

@JinshuaiBai
Copy link
Owner

For your question:

  1. We apply the hard boundary condition technique in PINN; that is, we let the output of FNN as intermediate output and multiply it with x ( u=FNN(x, y)*x ). By doing so, the boundary condition u(x=0)=0 can be naturally satisfied without introducing additional loss terms to impose this condition.
  2. If you want to impost u(x=1)=0, you can let ( u = FNN(x, y)*(x-1) ).
    Hope these can answer your questions.

Hi, for the boundary condition, if I want to set both u(x=0)=0 and u(x=1)=0, can I just make u=FNN(x, y)*x *(x-1)? Also I would like to ask how the FEA.mat file is organized?

For your questions:

  1. Yes, you can use u=FNN(x, y)*x *(x-1) to fix the u prediction at x=0 and x=1.
  2. The FEA.mat is used to store the reference results from the FEA. In the visualisation, the FEA node coordinate is faded into the well-trained neural networks so that you can easily compare the results of PINN with respect to the reference results.

Hope these can answer your questions.

@A474852023
Copy link

Thank you very much for your reply! I would like to know in what format should I generate the FEA.mat file for my model? I would like to know what columns 'E' and 'X' in your FEA.mat represent respectively? Taking the 3D data as an example, why the shape of 'E' is (125000,3) and 'X' is (522801,3)?

@JinshuaiBai
Copy link
Owner

Thank you very much for your reply! I would like to know in what format should I generate the FEA.mat file for my model? I would like to know what columns 'E' and 'X' in your FEA.mat represent respectively? Taking the 3D data as an example, why the shape of 'E' is (125000,3) and 'X' is (522801,3)?

Here are the answers:

  1. Normally, I do visualisation in MATLAB (cause I am good at using MATLAB). In this case, I output the coordinates information from ABAQUS and load them into my MATLAB. The .mat file format is directly saved from MATLAB, you may use the "save" commend to save all the variables in your MATLAB.
  2. 'E' and 'X' are coordinates information, where 'X' is the coordinates of my FEA nodes and 'E' is the coordinates of my FEA element centres. In this case, you can see why the size of 'X' is larger then 'E'.
    Hope these can help.

@JinshuaiBai
Copy link
Owner

JinshuaiBai commented Oct 18, 2024

Thank you very much for your reply! I would like to know in what format should I generate the FEA.mat file for my model? I would like to know what columns 'E' and 'X' in your FEA.mat represent respectively? Taking the 3D data as an example, why the shape of 'E' is (125000,3) and 'X' is (522801,3)?

But I have to say, it is not necessary to use my way to do the visualisation. If you are more familiar with another coding language, for example, python or cpp, you can use your way. All you need to know is that the output of your neural network is already stored in .mat file and you can use it in anywhere.

@A474852023
Copy link

Thank you very much for your patience!

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

3 participants