How to correct set conditions and params of PDE?

2 views (last 30 days)
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 Comments
Torsten
Torsten on 26 May 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 ?
Alex Milns
Alex Milns on 26 May 2024
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 (

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!