Defining non constant coefficients for solvepde (thermal simulation)
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello,
for defining coefficients for solvepde the structs "region" and "state" are given as input to the functions. In both structs x- and y-Coords can be found. Both Coord-matrices have the length of the number of triangles of the mesh. Q1: What are the Coordinates in "region", and the Coordinates in "state" standing for? Do both represent the centers of the triangles of the mesh? Q2: Do I have to define the coefficients for the points in "region" or the points in "state", when the function is called by the solver?
Thank you in advance for help LF
댓글 수: 0
답변 (2개)
Vaidyanathan Thiagarajan
2017년 10월 4일
Hello LittlFren,
I believe you are talking about the 'region' and 'state' objects that are passed as input to the 'applyBoundaryCondition' function as illustrated in the script that is attached with this post. The 'x' and 'y' fields in the 'region' object correspond to the coordinates of the (mesh) nodes lying on the boundary (edge in 2D or Face in 3D) where the boundary condition is applied. 'state' has the field 'u' in it (in addition to 'time'). 'state.u' is useful in specifying non-constant boundary condition over an edge or face as illustrated in the following link :
Please note that there is a one-to-one correspondence between the elements of region.x, region.y, and region.u i.e. region.u(i) is the field value (such as temperature) corresponding to the boundary point [region.x(i), region.y(i)] for some integer i.
Also note that you only have to specify this when you have non-constant 'Dirichlet' or 'Neumann' boundary conditions. For constant boundary conditions you can follow the examples in this link :
https://www.mathworks.com/help/pde/ug/constant-boundary-condition-specifications.html Hope this helps,
Vaidyanathan
참고 항목
카테고리
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!