You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Homogenization code for 3D cellular materials.
"homo3d.m" is to calculate the homogenized material property of 3d lattice structures.
"GenerateVoxel.m" is to generate the voxel model for homo3d.m.
"visual.m" is to plot the 3D Young's modulus surface indicating E along all directions.
Please cite the following article if you use this code in your publications:
Dong G, Tang Y, Zhao Y. A 149 Line Homogenization Code for 3D Cellular Materials Written in Matlab. ASME. J. Eng. Mater. Technol. 2018;141(1):011005-011005-11. doi:10.1115/1.4040555.
For more information, you can visit http://www.intralatticepro.com/
Github: https://github.com/GuoyingDong/homogenization/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To use homo3d.m :
CH = homo3D(lx,ly,lz,lambda,mu,voxel);
% lx = Unit cell length in x-direction.
% ly = Unit cell length in y-direction.
% lz = Unit cell length in z-direction.
% lambda = Lame's first parameter for solid materials.
% mu = Lame's second parameter for solid materials.
% voxel = Material indicator matrix.
% lambda = vE/(1+v)(1-2v), mu = E/2(1+v), E is Young's modulus, v is Poisson's ratio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To use GenerateVoxel.m :
[voxel,Density] = GenerateVoxel(n,address,radius);
% n = the number of voxel along each axis.
% address = the file location of wireframe.
% radius = the radius of the lattice structure.
% Density = the relative density of the lattices.
The predifined wireframe file can be found in the topology folder.
The length of the unit cell is 1.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To use visual.m :
visual(CH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[voxel,Density] = GenerateVoxel(40,'topology/grid.txt',0.1);
CH = homo3D(1,1,1,115.4,79.6,voxel);
visual(CH)
% the topology is 'grid', the model has 40 voxels along each axis.
% the radius is 0.1, the length of the unit cell is 1 as defined.
% lambda = 115.4, mu = 79.6, whcih is equivalent to E = 200, v= 0.3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The result is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Density = 8.5%
CH =
7.1876 0.3875 0.3875 0.0000 -0.0000 0.0000
0.3875 7.1876 0.3875 -0.0000 0.0000 0.0000
0.3875 0.3875 7.1876 -0.0000 -0.0000 -0.0000
0.0000 -0.0000 -0.0000 0.1489 0.0000 0.0000
0.0000 0.0000 -0.0000 0.0000 0.1489 -0.0000
0.0000 0.0000 -0.0000 0.0000 -0.0000 0.1489
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cite As
Guoying Dong (2026). 3D Homogenization of cellular materials (https://www.mathworks.com/matlabcentral/fileexchange/67457-3d-homogenization-of-cellular-materials), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.13.0.0 (6.21 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.13.0.0 | The B matrix in homo3d.m lines 132-134 is updated. The previous code works fine for symmetric in x,y,z. But if the material is asymmetric, the CH shear component yz, xz, and xy at 44, 55, 66 was misplaced. This update solve the issue. |
||
| 1.12.1.0 | Update citation |
||
| 1.12.0.0 | Update information |
||
| 1.11.0.0 | Update information |
||
| 1.10.0.0 | Update publication information |
||
| 1.6.0.0 | Update files |
||
| 1.5.0.0 | Add Github link |
||
| 1.4.0.0 | Update website |
||
| 1.3.0.0 | Update logo |
||
| 1.2.0.0 | Update description |
||
| 1.1.0.0 | Update description |
||
| 1.0.0.0 |