Skip to content

Commit

Permalink
Spinodoid generation in non-cubic domains
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantk committed Sep 21, 2022
1 parent ebd9ed4 commit 0901adb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/HELP_spinodoid.m
Expand Up @@ -222,7 +222,7 @@
gdrawnow;


%% %% Example 6: Non-cubic specimens
%% Example 5: Non-cubic specimens

% In this example, we create a spinodoid in the shape of 1/8th of a sphere
% with radius=1 and centered at (0,0,0). % For this purpose, we first
Expand Down
6 changes: 3 additions & 3 deletions docs/html/HELP_spinodoid.html
Expand Up @@ -67,7 +67,7 @@



</style></head><body><div class="content"><h1>spinodoid</h1><!--introduction--><p>Below is a demonstration of the features of the <tt>spinodoid</tt> function</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">Syntax</a></li><li><a href="#3">Description</a></li><li><a href="#4">Examples</a></li><li><a href="#5">Basic settings</a></li><li><a href="#6">Example 1: Isotropic spinodoid</a></li><li><a href="#7">Example 2: Lamellar spinodoid</a></li><li><a href="#8">Example 3: Columnar spinodoid</a></li><li><a href="#9">Example 4: Cubic spinodoid</a></li><li><a href="#10">%% Example 6: Non-cubic specimens</a></li><li><a href="#11">Example 6: Spatially-graded spinodoids</a></li></ul></div><pre class="codeinput">clear; close <span class="string">all</span>; clc;
</style></head><body><div class="content"><h1>spinodoid</h1><!--introduction--><p>Below is a demonstration of the features of the <tt>spinodoid</tt> function</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">Syntax</a></li><li><a href="#3">Description</a></li><li><a href="#4">Examples</a></li><li><a href="#5">Basic settings</a></li><li><a href="#6">Example 1: Isotropic spinodoid</a></li><li><a href="#7">Example 2: Lamellar spinodoid</a></li><li><a href="#8">Example 3: Columnar spinodoid</a></li><li><a href="#9">Example 4: Cubic spinodoid</a></li><li><a href="#10">Example 5: Non-cubic specimens</a></li><li><a href="#11">Example 6: Spatially-graded spinodoids</a></li></ul></div><pre class="codeinput">clear; close <span class="string">all</span>; clc;
</pre><h2 id="2">Syntax</h2><p><tt>[F,V,C,GRF,X,Y,Z,levelset]=spinodoid(inputStruct);</tt></p><h2 id="3">Description</h2><p>-----------------------------------------------------------------------</p><p>This function generates Spinodoid microstructures which are non-periodic and stochastic bi-continous microstructures that approximate the topology observed in spinodal decomposition. The microstructures are generated using a Gaussian random field (GRF) and can be made anisotropic by tuning the anisotropy of the GRF.</p><p>To generate spatially-graded spinodoids, check the spatially-graded example below (HELP_spinodoid: example 5)</p><p>Based on / how to cite:</p><p>-----------------------------------------------------------------------</p><p>(1) S. Kumar, S. Tan, L. Zheng, D.M. Kochmann. Inverse-designed spinodoid metamaterials. npj Computational Materials, 6 (2020), 73. <a href="https://doi.org/10.1038/s41524-020-0341-6">https://doi.org/10.1038/s41524-020-0341-6</a></p><p>(2) L. Zheng, S. Kumar, D.M. Kochmann. Data-driven topology optimization of spinodoid metamaterials with seamlessly tunable anisotropy. Computer Methods in Applied Mechanics and Engineering, 383 (2021), 113894. <a href="https://doi.org/10.1016/j.cma.2021.113894">https://doi.org/10.1016/j.cma.2021.113894</a></p><p>-----------------------------------------------------------------------</p><p>Input structure and default values:</p><p>inputStruct.isocap=true; % option to cap the isosurface</p><p>inputStruct.domainSize=1; % domain size</p><p>inputStruct.resolution=60; % resolution for sampling GRF</p><p>inputStruct.waveNumber=10*pi; % GRF wave number</p><p>inputStruct.numWaves=1000; % number of waves in GRF</p><p>inputStruct.relativeDensity=0.5; % relative density: between [0.3,1]</p><p>inputStruct.thetas=[15 15 15]; % conical half angles (in degrees) along xyz axes for controlling the anisotropy. Note: each entry must be either 0 or between [15,90] degrees.</p><p>inputStruct.R = eye(3); % Rotate the GRF, R must be SO(3)</p><p>inputStruct.ignoreChecks = false; % Ignore checks on parameters if true (not advised)</p><p>The function returns the following:</p><p>F: faces of the surface mesh</p><p>V: vertices of the surfae mesh</p><p>C: color data for the surface mesh</p><p>GRF (3d matrix): Underlying Gaussian random field (GRF) before levelset is applied</p><p>X (3d matrix): X coordinates where GRF is evaluated</p><p>Y (3d matrix): Y coordinates where GRF is evaluated</p><p>Z (3d matrix): Z coordinates where GRF is evaluated leveset (scalar): Levelset applied on GRF to compute the isosurfaces</p><p>-----------------------------------------------------------------------</p><p>Original author: Siddhant Kumar, September 2020</p><p>(contact: <a href="mailto:Sid.Kumar@tudelft.nl">Sid.Kumar@tudelft.nl</a>)</p><p>-----------------------------------------------------------------------</p><h2 id="4">Examples</h2><h2 id="5">Basic settings</h2><pre class="codeinput"><span class="comment">% Random seed</span>
rng(1)

Expand Down Expand Up @@ -190,7 +190,7 @@
axisGeom; camlight <span class="string">headlight</span>;
colormap <span class="string">gjet</span>; icolorbar;
gdrawnow;
</pre><img width="100%" height="auto" vspace="5" hspace="5" src="HELP_spinodoid_04.jpg" alt=""> <h2 id="10">%% Example 6: Non-cubic specimens</h2><pre class="codeinput"><span class="comment">% In this example, we create a spinodoid in the shape of 1/8th of a sphere</span>
</pre><img width="100%" height="auto" vspace="5" hspace="5" src="HELP_spinodoid_04.jpg" alt=""> <h2 id="10">Example 5: Non-cubic specimens</h2><pre class="codeinput"><span class="comment">% In this example, we create a spinodoid in the shape of 1/8th of a sphere</span>
<span class="comment">% with radius=1 and centered at (0,0,0). % For this purpose, we first</span>
<span class="comment">% create a function with handle trimDomainFunction (preceeded by @) that</span>
<span class="comment">% takes as input coordinates (x,y,z) and outputs true if the point lies</span>
Expand Down Expand Up @@ -591,7 +591,7 @@
gdrawnow;
%% %% Example 6: Non-cubic specimens
%% Example 5: Non-cubic specimens
% In this example, we create a spinodoid in the shape of 1/8th of a sphere
% with radius=1 and centered at (0,0,0). % For this purpose, we first
Expand Down
Binary file modified docs/html/HELP_spinodoid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0901adb

Please sign in to comment.