I want to scale my mesh domain so that a single extra layer of cells is created around my mesh whilst maintaining the original mesh boundary

7 views (last 30 days)
Hi
Firstly I realise this is not strictly a matlab question but im using matlab to solve this and this community always seems better at answering my questions.
So Im implementing a Finite volume method (FVM) which requires a set of 'ghost' cells along boundary edges of my meshes in order to build my system of equations and apply boundary conditions. So for example if I have a unit domain [0,1] axes with a specified cell size, I want a single layer of cells to wrap around my mesh.
I have the mesh domain nodes as input. So I was trying to figure out some kind of scale factor using the geometric centre and the domain nodes to obtain a set of 'halo' nodes that sit a certain distance outside the original domain nodes to allow a single layer of cells to be meshed inside. So an easy example would be a square domain as mentioned above. The halo nodes would join to form a concentric square slightly bigger than the original square plotted by the domain nodes.
I need this to work for any domain shape, whatever it may be square, triangular, parralellogram, whatever. The final variable this is dependent on is the element size. The scaling factor needs to allow for one layer of cells to fit in the 'halo' region so the element size (variable) must be taken into account for.
Any ideas on a general method for this and if matlab has any shortcuts that are useful?
thanks

Answers (0)

Community Treasure Hunt

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

Start Hunting!