Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCC lattice #8

Open
ArminM99 opened this issue Dec 27, 2024 · 1 comment
Open

FCC lattice #8

ArminM99 opened this issue Dec 27, 2024 · 1 comment
Assignees

Comments

@ArminM99
Copy link

How do I create by mod3d a face-centered cubic lattice with a fill factor of 74٪ such that the diameter of the cube is four times the radius of the spheres?

@Mote3D
Copy link
Owner

Mote3D commented Jan 4, 2025

@ArminM99, Mote3D is more geared towards creating random particle packings, however, generation of a face-centered cubic close packed unit cell can easily be implemented, e. g.:

## Generation of close packed FCC unit cell

## Enter sphere radius:
R = 1.5;

## Compute unit cell edge length:
box_length = 2*sqrt(2)*R;

## Allocate memory:
P_mat = zeros ([14, 4]);
R_vec = zeros ([14, 2]);

## Assign coordinates of sphere centres:
P_mat(1:4,:) = eye(4)*box_length;
P_mat(5:8,:) = (ones(4, 4)-eye(4))*box_length;
P_mat(9:11,:) = (ones(4, 4)-eye(4))(2:4,:)*0.5*box_length;
P_mat(12:14,:) = (ones(4, 4)+eye(4))(2:4,:)*0.5*box_length;
P_mat(1:14,1) = (1:14);

R_vec(1:14,1) = (1:14);
R_vec(1:14,2) = R;

FCC

@Mote3D Mote3D self-assigned this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants