Can coefficients a,c,f in PDEs resolution using the PDEtoolbox depend on the gradient of the solution u?
1 次查看(过去 30 天)
显示 更早的评论
I am facing a quite complicated PDE for in the form
over a 2D disk. I am using the PDEtoolbox and, because of the next step is an even more complicated equation, to obtain the corefficients d,a,c,f I wrote the symbolic expression of my system and then I used the pdeCoefficients
%physical coefficients
a = 1.0;
b = 1.0;
kappa = 1.0;
L2 = 1.0;
%generating the symbolic expression of my equation to identify coefficients
syms u1(t,x,y) u2(t,x,y)
symEq1 = -diff(u1,t) + a*u1 - 2*b*((u1)^2+(u2)^2)*u1 + kappa*(diff(u1,x,x)+diff(u1,y,y))+...
((diff(u1,x)^2) - (diff(u1,y)^2) + diff(u2,x)*diff(u1,y) + diff(u1,x)*diff(u2,y));
symEq2 = -diff(u2,t) + a*u2 - 2*b*((u1)^2+(u2)^2)*u2 + kappa*(diff(u2,x,x)+diff(u2,y,y))+...
(diff(u1,x)*diff(u2,x) - diff(u1,y)*diff(u2,y) + 2*diff(u2,x)*diff(u2,y));
pdeeq = [symEq1;symEq2]
symCoeffs = pdeCoefficients(pdeeq,[u1 u2],'Symbolic',true)
structfun(@disp,symCoeffs);
coeffs = pdeCoefficientsToDouble(symCoeffs,[u1 u2])
%specifing coefficient from symbolic equation
specifyCoefficients(model,'m',0,'d',coeffs.d,'c',coeffs.c,'a',coeffs.a,'f',coeffs.f)
When i run the code I receive the warning:
Warning: After extracting m, d, and c, some gradients remain. Writing all remaining terms to f.
> In sym/pdeCoefficients>extractAF (line 122)
In sym/pdeCoefficients (line 96)
In eqL2 (line 79)
Reading the documentation I found that this warning make the toolbox inable to solve the equation so I have some questions:
- Are the finite element matrixes reliable even if I receive this warning? Could I extract and use them to solve the PDE in a different way?
- In the first page of documentation I found that "The coefficients m, d, c, a, and f can be functions of location (x, y, and, in 3-D, z), and, except for eigenvalue problems, they also can be functions of the solution u or its gradient." so I thought that my case was fine given I only have gradients of u. But in another page I read "The coefficients a, c, and f are functions of position (x, y, z) and possibly of the solution u." where nothing is said about the gradient. Which one is correct? Is there a way to solve this problem with the toolbox?
Here the links of the two doc pages I referred:
https://it.mathworks.com/help/symbolic/sym.pdecoefficients.html
https://it.mathworks.com/help/pde/ug/equations-you-can-solve.html
https://it.mathworks.com/help/pde/ug/put-equations-in-divergence-form.html
2 个评论
Torsten
2024-1-26
编辑:Torsten
2024-1-26
You should contact Technical Support and report about your doubts regarding the documentation.
The forum doesn't have much experience with the PDE Toolbox.
Writing that the coefficients can depend on the solution u does not necessarily mean that they cannot depend on the gradient of u, too.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!