Define non-constant BCs with 'parabolic' solver
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I am trying to setup time-dependent BC conditions in a PDE system (N = 4), solved with the command 'parabolic'.
The documentation encourages to use 'solvepde' instead of 'parabolic'. I prepared another script solved with 'solvepde' but I had some convergence problems that I am not able to manage in a 4-equation PDE system. Thus I decided to use 'parabolic', which seems to work better in my case.
I have prepared an external function for BC definition, which is the following:
function uBC = uBCf4(p,t,u,time)
% Fitting coefficients for bc4
a1 = 1.75e-16;
b1 = 6.283;
c1 = 1.7e-16;
% BC matrix
bc1 = solution of unknown 1;
bc2 = 2.2;
bc3 = solution of unknown 3;
bc4 = a1*sin(b1*time) + c1;
uBC = [bc1;bc2;bc3;bc4];
end
At this point, I have the following issues to fix, on bc1, bc2 and bc4:
- For bc1 and bc3, I would use the calculated values of the first and the third unknowns but the u matrix (containing the solution) differs from that obtained with solvepde, being in the form u = [u1,u2,u3,u4]; . Is it possible to add values of variables here?
- For bc4, the sinusoidal function in this form doesn't work. I have tried, apart, to run another script solving only one PDE with this time-dependent BC but without success.
Please, could you help me?
Thank you in advance.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で General PDEs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!