Defining non constant coefficients for solvepde (thermal simulation)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Vaidyanathan Thiagarajan
el 4 de Oct. de 2017
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
1 comentario
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!