Defining non constant coefficients for solvepde (thermal simulation)
1 次查看(过去 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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!