How to correct set conditions and params of PDE?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704256/image.png)
satisfies boundary an initial conditions:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704261/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704266/image.png)
Automodel general solution of this problem is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704271/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704276/image.png)
where
is solution of ODE problem:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704281/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704286/image.png)
The solutions of this problem for
is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704281/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704296/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1704301/image.png)
Is not correct solution.
My problem:
How to correct set intial and boundary conditions, and create geometric dash for solve this PDE?
6 Commenti
Torsten
il 26 Mag 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 ?
Risposte (0)
Vedere anche
Categorie
Scopri di più su Geometry and Mesh in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!