PDEPE solver with x-dependent diffusion constant

조회 수: 2 (최근 30일)
Thomas
Thomas 2015년 3월 17일
편집: Ronald 2016년 5월 4일
Hello,
according to the documentation of the PDEPE solver one can use diffusion constant values that are dependent on x. However, if I calculate a simple 1 D model and set the c value with an if statement in the solver, I find that the system converges to entirely different values than it did before. This should not be the case, the diffusion should go slower in the more rigid parts, but the endvalues should be exactly the same.
This also happens if I do not use an if statement buf for example c=sin(x). Is this a major bug? How can i cirumvent this?
Greetings, Thomas

채택된 답변

Torsten
Torsten 2015년 3월 18일
The diffusion coefficient is under the d/dx-operator - so how can you put it in the c-array ?
You must define f=Diff*DuDx where Diff is the diffusion coefficient (which may depend on x).
If this does not answer your question, we will have to see the MATLAB code to give further advice.
Best wishes
Torsten.
  댓글 수: 2
Thomas
Thomas 2015년 3월 18일
Thank you, that was exactly what was going wrong. Splendid!
Ronald
Ronald 2016년 5월 4일
편집: Ronald 2016년 5월 4일
Torsten: If I understand it corrctly, the constant Diff under the d/dx-operator refers to diffusivity (physically)? Since in d^2/dx^2 T - c d/dt T=0, the constant 1/c refers to diffusivity.
Nevertheless it should be possible to make the parameter c in the pdepe framework time-dependent, right? Do you maybe know how to realize this? Because the solver supposes c has the diagonal elements for each c_i of the pde-system, it is quite confusing.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by