Skip to main content

Generation of TPMS lattice

 


Below is the MATLAB program for the generation of TPMS lattices.

clc;

clear all;

a=pi;      %d     No of unit cells

s=pi/10; 

[x,y,z]=meshgrid(-a:s:a,-a:s:a,-a:s:a);  

u = (cos(x).*cos(y).*cos(z))- (sin(x).*sin(y).*sin(z)); ; % d TPMS formula

isosurface (x, y, z, u,0);

Comments

Popular posts from this blog

Classification of Additive Manufacturing (3D printing)

Gyroid Structure

The below code written in the MATLAB® can be used for generating the Gyroid structure.  %% Program clc; clear all; n1 = 2;  % Number of cells in x Direction n2 = 2;  % Number of cells in y Direction n3 = 2; % Number of cells in z Direction   a=2*n1*pi; % x direction parameters b=2*n2*pi; % y direction parameters g=2*n3*pi;  % z direction parameters   s=0.01;   [x,y,z]=meshgrid(-0.5:s:0.5,-0.5:s:0.5,-0.5:s:0.5);   % Gyroid Formula u = (sin(a.*x).* cos(b.*y) + sin(b.*y).* cos(g.*z) + sin(g.*z).* cos(a.*x));   % Level Set equation c =0.7; Ts= -(u+c).*(u-c);    % Sheet based Gyroid Tsk= u + c;        % Skeletal based Gyroid Isosurface(x,y,z,Ts,0); Isocaps(x,y,z,Ts,0); %% Program Ends If very less knowledge about coding, then the below software can be used for generating Gyroid and other lattice structures. Using Lattice_Karak  helps in designing v...

Generating Lattice Structures

Lattice structures are getting lots of momentum in various fields due to their eccentric properties [1] . It is very important to have easy method to design these lattice structures. Lattice_Karak [2] helps in getting the work done. It is free software with UI made for students and researchers. Using Lattice_Karak  helps in designing various TPMS structures, export them into stl file for further processing like 3D printing and Finite Element analysis.   Lattice_Karak can be downloaded using the below link. https://drive.google.com/file/d/1WWL-UbPzErFCFVFJqw1as9w0M61aMxB4/view?usp=sharing   Videos on how to further use lattice_karak. https://youtu.be/CuHQwsxPa3I   https://sites.google.com/iith.ac.in/lattice-karak/home   Suggested materials for understanding more about TPMS: 1)      https://doi.org/10.1016/j.addma.2017.12.006 2)      https://doi.org/10.1016/j.matdes.2017.03.018 3)      https://doi.org/10...