-
Notifications
You must be signed in to change notification settings - Fork 753
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 implement different boundary condition on different geometry part #22
Comments
You can define a seperate a BC for each part. Here is an example to define left and right BC in 1D: https://github.com/lululxvi/deepxde/blob/master/examples/Poisson_Neumann_1d.py. You can do similar thing in 2D. |
Thanks Lu, kindly help me lu.geom = dde.geometry.Polygon([[0, 0], [1, 0], [1, 1], [0, 1]])
|
|
Hello Lu, my code=====================================================from future import absolute_import import numpy as np import deepxde as dde def main():
if name == "main":
|
The network input is 2D, i.e., the first layer should have two neurons:
|
Lu, you are really cooperative, finally, It runs. Kindly comment, so that I can improve my programming skills. Thanks Lu |
If you use DeepXDE, actually you don't need to learn tensorflow, unless you want to modify the source code. You only need to learn some basic knowledge of deep learning. |
Thanks, Lu
Kindly help me with different result plotting code.
Like, how to plot a heatmap of the solution in DEEPXDE.
…On Sun, Mar 29, 2020 at 10:14 PM Lu Lu ***@***.***> wrote:
If you use DeepXDE, actually you don't need to learn tensorflow, unless
you want to modify the source code. You only need to learn some basic
knowledge of deep learning.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXU3766A5V525KWF4GPBOLRJ53GHANCNFSM4LVFPDZQ>
.
|
After the training, the data is saved in |
Thanks Lu,
Now I can able deal with the problem.
Thanks for your support and suggestions.
Sumant
…On Mon, 30 Mar, 2020, 1:11 AM Lu Lu, ***@***.***> wrote:
After the training, the data is saved in loss.dat, train.dat, and test.dat
in plain text mode. You can use whatever tool you like for plotting, like
Matlab, Python, Gnuplot, etc. DeepXDE is not a tool designed for
visualization.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXU37Z2UXXD6MKAUO7XBRDRJ6P5BANCNFSM4LVFPDZQ>
.
|
Hii Lu, code is as ================== %tensorflow_version 1.x from future import absolute_import import numpy as np import deepxde as dde def main():
if name == "main": ==========================error is============== /usr/local/lib/python3.6/dist-packages/deepxde/geometry/geometry.py in boundary_normal(self, x) NotImplementedError: Polygon.boundary_normal to be implemented |
Instead of |
after replacing Polygon to Rectangle.
|
|
Hii Lu,
|
|
Thanks, Lu, after removing num_test = 1000 the above code has run. will it affects the result after removing this num_test value? what is the significant role of this value? Few things I would like clarify. Also, in data line of code ....commented after data = dde.data.TimePDE(
I am don't know about "num_test" and "func" appears in data, what is the role of these terms. also, if I am not wrong the predicted value of the governing equation i.e. variable value (y) has been saved in Test.txt file. that can be further plotted with various plotting tools. kindly clarify it. |
|
The issue of |
Hello Lu, I am trying to solve the governing equation for the porous medium given in the paper. "A deep collocation method for heat transfer in porous media: Verification I have written my coding for transient heat transfer problem in porous media as: ( Already given in the previous comment). There are a few things I am not getting: b) the predicted output is not matching from the result value (y_exact= 458.0535817 ) c) why with the time increment the predicted value(y) is not changing. kindly suggest something. ================================================ %tensorflow_version 1.x from future import absolute_import import numpy as np import deepxde as dde def main():
if name == "main": ========================================= |
BTW, the code you posted has wired format... |
Governing equation is :------------ subject to the domain and boundary conditions are :----------------- where, kt and rho*cv value is:------------------- Parameter value is:------------------------- since qf and qs value is 0 that's why I have excluded that term from coding part. ` %tensorflow_version 1.x from future import absolute_import import numpy as np import deepxde as dde def main():
if name == "main": `
-the Actual value obtained from FEM is 458.0535817 but after running my code I am getting the value near 9~10 only. Kindly help me, |
The scale of the solution is 100, which is hard to train the network. Try one of the following
Your domain is large, and then try more training points, e.g.,
|
like , net.outputs_modify(.....) I have been using only the terms and methods used during tutorial examples.
I would ask further if I'll get any confusion in DeepXde. :) |
Document is on the plan, but it will take some time. Currently the best way to understand a method is reading the API https://deepxde.readthedocs.io/en/latest/modules/modules.html |
|
It is a diffusion equation. You can know it from physics. |
|
|
Thanks Lu,
…On Mon, 13 Apr, 2020, 12:45 AM Lu Lu, ***@***.***> wrote:
- Prediction: Check #18 <https://github.com/lululxvi/deepxde/issues/18>
- No, you should estimate the training iterations. But there is
another early stopping:
https://deepxde.readthedocs.io/en/latest/modules/deepxde.html#deepxde.callbacks.EarlyStopping
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXU37YA6LBPU5VJDTQAZJLRMIHLNANCNFSM4LVFPDZQ>
.
|
================================================== ================================================== |
Since the version 0.6.0, the API of |
Yes, I got it, Thanks |
I cannot find net.outputs_modify(...). Could you inform where this function is, please? |
@lacrymose Note: According to the scale of the model you may change the numeric value (100).
Hope it may help you. |
Thanks for you reply, but I still cannot find the function outputs_modify. I ran the code involving net.outputs_modify(lambda x, y: y * 100). It turns out that there is no outputs_modify in DeepXDE. Could you help me find this function? |
BTW,I am using DeepXDE-0.8.3. I searched the upzipped folder in and out, but sadly no function named outputs_modify popped out. |
DeepXDE-0.8.3 has modified its module slightly. your answer to the question is on the link below: Hope, it may help you. |
Thanks for you replay!! It works!!! |
Is net.apply_output_transform(lambda x, y: y * 100) correct, to call the function apply_output_transform? |
@lacrymose further, @lululxvi may clarify it correctly. If you need anything further then I can help you. |
@sanjusoni Many thanks!!! |
@lululxvi |
@lacrymose Is your train loss small enough? If not, there are many possible reason. One possible thing is that one loss is dominant. Make sure the initial loss are balanced, i.e., different loss terms have similar magnitude. This can be done by setting different weights for different losses. Search |
@lululxvi Many thanks! |
kindly help me in implementing the different boundary condition in the different geometry of the problem,
Like. in unit square two sides have Dirichlet BC and Two sides have Neumann BC.
The text was updated successfully, but these errors were encountered: