From aca42065b83c777993935a4d2987733c2d9f9138 Mon Sep 17 00:00:00 2001
From: Mohib <mohib.mustafa@gmail.com>
Date: Tue, 23 Jan 2024 17:27:14 +0100
Subject: [PATCH] [Feature] - USF Cell added in Lattice_Cell_script

USF cell generation is made public.
---
 .../Auto_geometry_parametric.py               | 28 ++++++++++++++++++-
 Lattice_Cell_script/MicroSample.py            |  6 ++--
 Lattice_Cell_script/geometry_parametric.py    |  1 +
 3 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/Lattice_Cell_script/Auto_geometry_parametric.py b/Lattice_Cell_script/Auto_geometry_parametric.py
index f0fe004..34a142b 100755
--- a/Lattice_Cell_script/Auto_geometry_parametric.py
+++ b/Lattice_Cell_script/Auto_geometry_parametric.py
@@ -525,7 +525,33 @@ def Geo_generator(name, rho, vfr, length, width, height, sb, Radius, vfraction,
         [[sb/2,sb/2,0],[sb/4,3*sb/4,sb/2],[r,0,0],[ri,0,0]],		#9
         [[sb/2,sb/2,sb],[3*sb/4,sb/4,sb/2],[r,0,0],[ri,0,0]],	#14
         [[sb/2,sb/2,sb],[3*sb/4,3*sb/4,sb/2],[r,0,0],[ri,0,0]]]	#15
-      
+
+
+    elif name== "10":
+    
+        x_cell=x_cell+sb
+        y_cell=y_cell+sb
+    #z=0.5x and x=y
+        l=sb/2
+        z_cell=l
+    
+        if  vfr=="b":
+            r=Radius
+        
+        A=[[[0,0,0],[0,sb,0],[r,0,0]],  #2			
+        [[sb,0,0],[sb,sb,0 ],[r,0,0]],	#3		
+        [[sb,sb,l],[0,0,0],[r,0,0]],	#4
+        [[0,sb,0],[sb,0,l],[r,0,0]],    #5	
+        [[sb,sb/2,0],[sb/2,0,l/2],[r,0,0]], #6		
+        [[sb/2,sb,l/2],[sb,sb/2,0],[r,0,0]],  #7	
+         
+        [[sb/2,0,l/2],[sb/2,sb,l/2],[r,0,0]],	#8	       
+        [[sb/2,0,l/2],[0,sb/2,l],[r,0,0]],		#9
+        [[0,sb/2,l],[sb/2,sb,l/2],[r,0,0]], #10
+
+        [[0,0,l],[0,sb,l],[r,0,0]],	       #11         
+        [[sb,0,l],[sb,sb,l],[r,0,0]]]   #12
+  
     r0=r
 
 
diff --git a/Lattice_Cell_script/MicroSample.py b/Lattice_Cell_script/MicroSample.py
index 52ef678..f8bcaec 100755
--- a/Lattice_Cell_script/MicroSample.py
+++ b/Lattice_Cell_script/MicroSample.py
@@ -24,7 +24,7 @@ import matplotlib.pyplot as plt
 from Auto_geometry_parametric import *
 
 #############Can be changed##########################
-cellType = "3" # from "2", "3", "4", "5", "6", "7", "8", "9", "91" (or "92" if typeRand ="b")
+cellType = "3" # from "2", "3", "4", "5", "6", "7", "8", "9", "10", "91" (or "92" if typeRand ="b")
 typeRand   = "a" # "a" for random volume fraction and "b" for random radius
 nx =2 #number of cell along x
 ny =2 #number of cell along y
@@ -47,8 +47,8 @@ bow_angle_max=85 #maximum bow angle of cell 8, should be lower than 90
 #############Cannot be changed##############################
 vf_tpye=["a", "b"]
 GeoID = []
-GeoID.append(["2", "3", "4", "5", "6", "7", "8", "9", "91"])
-GeoID.append(["2", "3", "4", "5", "6", "7", "8", "9", "91", "92"])
+GeoID.append(["2", "3", "4", "5", "6", "7", "8", "9", "91", "10"])
+GeoID.append(["2", "3", "4", "5", "6", "7", "8", "9", "91", "92", "10"])
 cell_num = np.array([nx,ny,nz])
 
 ####################################################
diff --git a/Lattice_Cell_script/geometry_parametric.py b/Lattice_Cell_script/geometry_parametric.py
index 5111750..f556df7 100644
--- a/Lattice_Cell_script/geometry_parametric.py
+++ b/Lattice_Cell_script/geometry_parametric.py
@@ -50,6 +50,7 @@ Auxetic                   8
 Octahedron v1             9
 Octahedron v2            91
 Octahedron v3 (hollow)   92
+Cirp USF                 10
 
 """
 print (initial_data)
-- 
GitLab