How to correct set conditions and params of PDE?

Dear members of community! I have a important problem with PDE Toolbox initialization coeffs and conditions.
I try to solve heat equation and compare exact solution and PINN solution looks like Solve Poisson Equation on Unit Disk Using Physics-Informed Neural Networks - MATLAB & Simulink (mathworks.com) . But, first I should correct create mesh and for obtain solution (numerical solution).
Problem formulation:
Consider the next mathematical problem: heat equation with initial and boundary conditions - modes with exacerbation. Let we have specific auomdel heat equation
satisfies boundary an initial conditions:
Automodel general solution of this problem is:
where is solution of ODE problem:
The solutions of this problem for is
Matlab code:
Create the PDE model and include the geometry.
model = createpde;
R1 = [3,4,0,1,1,0,0,0,10,10]';
g = decsg(R1);
geometryFromEdges(model,g);
pdegplot(model,EdgeLabels="on")
axis equal
grid on
Define constants of PDE and initial and boundary equations:
k0 = 1; % Adjust as necessary
sigma = 2; % Adjust as necessary
A0 = 2; % Adjust as necessary
T = 0.5; % Adjust as necessary
n = 2; % Adjust as necessary
% Initial conditions
setInitialConditions(model,0);
% Boundary conditions
applyBoundaryCondition(model, 'dirichlet', 'Edge', 1, 'u', @(region,state) A0 * (T - state.time)^n);
% PDE coefficients
specifyCoefficients(model, 'm', 0, 'd', 1, 'c', @(region, state) k0 * state.u.^sigma, 'a', 0, 'f', 0);
% Generate mesh
generateMesh(model, 'Hmax', 0.1);
Try to obatin numerical solution:
% Solve the PDE
tlist = linspace(0, T, 50);
result = solvepde(model, tlist);
u = result.NodalSolution;
I understand, that obtainded numerical solution is not correct, and training PINN using this meshes and PDE coeffs non coorrect step os obtain solution:
Is not correct solution.
My problem:
How to correct set intial and boundary conditions, and create geometric dash for solve this PDE?

6 Kommentare

Torsten
Torsten am 26 Mai 2024
You can't solve PDEs over infinite domains in x and t with the PDE toolbox.
If consider infinity, for example, 10e3, can I use this toolbox? I understand that an infinite region cannot be specified in this case
Torsten
Torsten am 26 Mai 2024
Bearbeitet: Torsten am 26 Mai 2024
In principle, you only have a boundary condition at x = 0. Further, the boundary conditions at t=-oo and the boundary condition at x = 0 are not compatible for n > 0 since A0*(t-T)^n should converge to 0 as t->-Inf.
The PDE toolbox expects a closed bounded region where you can define a boundary condition on each of its edges. Can you fulfill this requirement for your problem ? I don't see how.
1) I'm sorry, I just realized that n should be negative (for example n = -1.25)
2) The only thing in this case to which I can reduce this problem is to make the second boundary condition similar and consider a certain region, not at infinity, but with a fractional dimension of sigma -- then this will also be a self-similar regime, although in the analytical solution then in In this case, a minus sign will appear in front of the 'x'
Torsten
Torsten am 26 Mai 2024
1) So you have a pole at t = T ?
2) I don't understand it.
Why do you want to force the PDE Toolbox to solve a problem you already know the solution of ?
I want to compare PINN solution and numerical, it is posibble, if I correctly define mesh (domain) and obtain numnerical solution, close to exact...
This problem was not formulated by me, and in this automodel behaviour there is no condition at t = T!
Perhaps, PINN not be able to solve this problem and PDE toolbox not work in this case (

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Gefragt:

am 26 Mai 2024

Kommentiert:

am 26 Mai 2024

Community Treasure Hunt

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

Start Hunting!

Translated by