How can I use Createpde to solve a fourth degree partial differential equation?

4 ビュー (過去 30 日間)
Poupak Kermani
Poupak Kermani 2025 年 1 月 16 日
コメント済み: Poupak Kermani 2025 年 1 月 20 日
Hello,
How can I use Createpde to solve the a fourth degree partial differential equation?
∇4(u)=q/D?
  2 件のコメント
Torsten
Torsten 2025 年 1 月 16 日
∇2(u)=v
∇2(v)=q/D?
Poupak Kermani
Poupak Kermani 2025 年 1 月 16 日
編集済み: Torsten 2025 年 1 月 16 日
Thank you for your feedback.
I have created the first part of the solution (i.e.: ∇2(v)=q/D ):
% Rectangle is code 3, 4 sides,
% followed by x-coordinates and then y-coordinates
R1 = [3,4,-1,1,1,-1,-1,-1,1,1]';
% Circle is code 1, center (.5,0), radius .2
C1 = [1,0.,0,.2]';
% Pad C1 with zeros to enable concatenation with R1
C1 = [C1;zeros(length(R1)-length(C1),1)];
geom = [R1,C1];
% Names for the two geometric objects
ns = (char('R1','C1'))';
% Set formula
sf = 'R1 - C1';
% Create geometry
g = decsg(geom,sf,ns);
model = createpde(2);
geometryFromEdges(model,g);
pdegplot(model,EdgeLabels="on")
xlim([-1.1 1.1])
axis equal;
%
applyBoundaryCondition(model,"dirichlet", ...
Edge=3,u=[1,1]);
applyBoundaryCondition(model,"dirichlet", ...
Edge=1,u=[1,1]);
applyBoundaryCondition(model,"dirichlet", ...
Edge=4,u=[1,1]);
applyBoundaryCondition(model,"dirichlet", ...
Edge=2,u=[1,1]);
% The next step is optional,
% because it sets "g" to its default value
applyBoundaryCondition(model,"neumann", ...
Edge=5:8,g=[0,0]);
%
%
figure;
specifyCoefficients(model,m=0,d=0,c=1,a=0,f=[1;1]);
generateMesh(model,Hmax=0.1);
results = solvepde(model);
v = results.NodalSolution;
pdeplot(model,"XYData",v)
Could you guide me on how I could create the second part of the solution (i.e.: ∇2(u)=v )?

サインインしてコメントする。

回答 (1 件)

Torsten
Torsten 2025 年 1 月 16 日
移動済み: Torsten 2025 年 1 月 17 日
You have a system of two second-order differential equations. Thus instead of defining one equation, you have to define two and solve them simultaneously.
I don't have experience with the PDE toolbox - thus I can only tell you what you should do, not how you can do it.
But I think this is almost what you need:
  1 件のコメント
Poupak Kermani
Poupak Kermani 2025 年 1 月 20 日
Hello,
Thank you very much for your feedback.
You have helped me greatly to solve my problem. Your last comment unblocked this issue.
Best regards,
Poupak

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeneral PDEs についてさらに検索

タグ

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by