IsoVolume Subshells

Divides a sphere into sub-shells of equal volumes, for a given thickness of outermost subshell
38 Downloads
Updated 22 Jun 2016

Code that helps to divide a sphere of radius R, into sub-shells of equal volumes, for a given thickness of outermost sub-shell.
The mesh used in a FD/FV/FE discretisation for solid diffusion simulation is often constructed such that the inter-nodal distance ensure that the sub-shells all have equal volumes. This is non-trivial to derive by hand for anything more than 2 or 3 layers, and the complexities involved are described with adequate dose of comments inline.
For example, electrochem/chemical reactions usually occur at the surface of a spherical particle, and hence we need more mesh-points closer to the surface, and as matter moves towards the centre, we need progressively lesser points, i.e. in 1D domain, with the left representing the centre, and the right representing the surface, we need a non-uniformly spaced mesh, such that the corresponding spheres represented by the inter-nodal distance have equal volume.

As an end-user, you input the sphere radius, and the inter-nodal distance at the surface, (i.e. the smallest mesh-size) and the code generates all the mesh co-ordinates for you, as well as the inter-nodal distances (just in case you wish to use them in your calculations).

Cite As

Krishnakumar Gopalakrishnan (2024). IsoVolume Subshells (https://github.com/krishnakumarg1984/IsoVolume_subshell_meshing), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.0.0

fixes a small typo in description

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.