IsoVolume Subshells
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).
引用格式
Krishnakumar Gopalakrishnan (2024). IsoVolume Subshells (https://github.com/krishnakumarg1984/IsoVolume_subshell_meshing), GitHub. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- MATLAB > Graphics > 2-D and 3-D Plots > Surfaces, Volumes, and Polygons > Volume Visualization > Scalar Volume Data >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!无法下载基于 GitHub 默认分支的版本
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 | fixes a small typo in description |
|