Evaluate function and gradient along edge with pde toolbox

조회 수: 7 (최근 30일)
nicolas bachelard
nicolas bachelard 2017년 1월 12일
답변: nicolas bachelard 2017년 1월 12일
Dear Matlab community,
I do solve a heat diffusion equation in a 2D problem. My geometry is composed of a circular source region inserted into a bigger square domain. When the computation is done I wish to evaluate the value of my field (u(x,y,t)), as well as its gradient, along the edge between the two previous regions. I know that we can evaluate the gradient with specific coordinates, but I wish to evaluate it at the boundary of the circular region.
Is there a direct way to do it by simply specifying the label of the edge boundary? Or should I create a trajectory which matches as close as possible?
Best

답변 (2개)

Alan Weiss
Alan Weiss 2017년 1월 12일
Depending on your toolbox version, there are several ways of doing this. In R2016a and later, the evaluateGradient function enables you to evaluate (interpolate) the gradient at arbitrary points, including along the boundary. In earlier toolbox versions, you can use the pdegrad function to give the gradient in each mesh triangle (the gradient is constant in each triangle because the basis functions are linear).
Alan Weiss
MATLAB mathematical toolbox documentation

nicolas bachelard
nicolas bachelard 2017년 1월 12일
Dear Alan,
I used evauateGradient along a querypoints trajectory that I defined myself already. Do you have any idea how I could specify to evaluateGradient to operate along a specific boundary?
Best

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by