How do I refine a subdomain mesh?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Fergus McIlwaine
el 28 de Ag. de 2017
Respondida: Ian Jentz
el 2 de Oct. de 2020
I'm having issues with refining the Mesh of a Subdomain using R2016a. I'm aware of this question but it does not help with my situation.
I have two subdomains, R1 and E1. I need the R1 mesh to be more refined that E1.
Relevant Model Information:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166910/image.png)
With 2D geometry (x,y).
The previous answers given to solve this say to return to legacy flow. I'm unable to do this with a parabolic PDE because the legacy solver 'parabolic' does not allow solving on multiple domains.
I can see two possible ways from here:
1) If there was anyway to directly attach [p,e,t] data to a PDEmodel it would make it easy.
2) If there was some way to convert [p,e,t] data to FEMesh object data then the problem would become much simpler. I would take the following steps:
- Create mesh with initMesh to obtain [p,e,t]
- Use the legacy function refinemesh to obtain [p1,e1,t1]
- Convert the newly refined mesh to FEMesh object
- Solve using pdesolve
A function exists that converts FEMesh object to [p,e,t]: meshToPet. I can't access this function to see how it works; it's just comments.
I've attached a screenshot of the meshToPet function file, can anyone find any other info on how this works? I can't even 'step in' to the file during running.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166911/image.png)
Thank you for reading!
0 comentarios
Respuesta aceptada
Svetlana Pease
el 30 de Ag. de 2017
Editada: Svetlana Pease
el 30 de Ag. de 2017
Both attaching [p,e,t] data to PDEModel and converting a [p,e,t] mesh to FEMesh are not supported. I recommend creating a finer mesh for both R1 and E1 by using the appropriate value of Hmax, if possible.
Also, parabolic works with subdomains:
Regards,
Svetlana Pease
Technical Writer, MathWorks Documentation Group
0 comentarios
Más respuestas (1)
Ian Jentz
el 2 de Oct. de 2020
There is now a port of refinemesh() available for PDEModel. Like refinemesh(), it works for 2D linear triangular geometries only.
This is how you would run your problem:
model=createpde;
msh=generateMesh(model);
model = refinePDEMmesh(model);
0 comentarios
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!