interpolateSolution for a system of time dependent PDEs

조회 수: 3 (최근 30일)
Jorge Garcia Garcia
Jorge Garcia Garcia 2023년 5월 17일
댓글: Jorge Garcia Garcia 2023년 5월 17일
Hello and sorry again if the question is silly.
I have a system of 2 PDEs. I solved them using the command:
res=solvepde(modelTwoDomain,tlist);
Solution in the nodes is:
sol=res.NodalSolution;
So far so good. Now is when I think I am being silly.
I want to interpolate the solution for a given point x=1.24 and y=1.22. They belong to the geometry of the model and I try to use interpolate solution.
I use: uxy = interpolateSolution(res,1.24,1.22);
and the following error comes up:
Error using pde.PDEResults.interpolateSolutionInternal
Incorrect number of input arguments.
Error in pde.TimeDependentResults/interpolateSolution (line 82)
uintrp = pde.PDEResults.interpolateSolutionInternal(obj,varargin{:});
What am I doing wrong?
Thanks

채택된 답변

Torsten
Torsten 2023년 5월 17일
For a time-dependent solution, you must additionally specify the index of the output time for which you want to interpolate:
uintrp = interpolateSolution(___,iT) returns the interpolated values of the solution to the time-dependent or eigenvalue equation or system of such equations at times or modal indices iT. For a system of time-dependent or eigenvalue equations, specify both time/modal indices iT and equation indices iU
  댓글 수: 5
Torsten
Torsten 2023년 5월 17일
편집: Torsten 2023년 5월 17일
The fourth is the index of the PDE, the fifth is the time index.
Look at the example
Interpolate Time-Dependent System
under
Jorge Garcia Garcia
Jorge Garcia Garcia 2023년 5월 17일
Thanks! you really saved my sanity!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by