Physics informed Neural Network

37 次查看(过去 30 天)
Dear Matlab Community Members,
i would like to apply my equations in physics-informed neural networks, so i reffered solving Burger's equation L-BFGS method. For example i would like to apply 1D equation
d^u/dt=(d^2g/dx^2)-d^4u/dx^4; where g=2*u*(1-u)*(1-2*u) with
u(x=0,t)=0, u(x=1,t)=0 and
u(t=0,x)=sin(4*pi*x/L)
Model Loss Function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
U = model(parameters,X,T);
G=2.*U.*(1-U).*(1-2.*U);
gradientsG = dlgradient(sum(G,"all"),{X,T},EnableHigherDerivatives=true);
Gx = gradientsG{1};
Gxx = dlgradient(sum(Gx,"all"),X,EnableHigherDerivatives=true);
gradientsU = dlgradient(sum(U,"all"),{X,T},EnableHigherDerivatives=true);
Ux = gradientsU{1};
Ut = gradientsU{2};
Uxx = dlgradient(sum(Ux,"all"),X,EnableHigherDerivatives=true);
Uxxx = dlgradient(sum(Uxx,"all"),X,EnableHigherDerivatives=true);
Uxxxx = dlgradient(sum(Uxxx,"all"),X,EnableHigherDerivatives=true);
f=Ut-Gxx+2.*Uxxxx;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i have made the above changes in the code...but i didnt get any expected results....can u please help me with this...?
  4 个评论
Ben
Ben 2023-7-26
@Sankarganesh P I notice that your ODE is
but the model loss function uses 2.*Uxxxx. That seems like an issue at first glance.
Otherwise your model loss function looks as expected to me. Do you get good training losses?
Of course a small training loss only means the network is "nearly" solving the ODE at the training points - for complex ODEs/PDEs this may only give weak approximations to the true solution in general.
Sankarganesh P
Sankarganesh P 2023-7-27
@Ben Thankz for the correction. i will try now... is it possible to use this LBFGS for 2D problems like d^2T/dx^2+d^2T/dy^2=DT/dt..?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by