Skip to content

Stiffness of custom microstructure

For details about the effective elastic modulus calculation please see here.

Overview

Since for custom microstructure setup, we need to read a microstructure file, to save some download bandwidth, we will only setup a cubic simulation with only 64 microns along each dimension, that's 64 simulations grids points with 1 micrometer for each grid.

We will need to prepare a microstructure.in file in advance for this calculation, you can download an example one from here.

We would like to separate the continuous composition distribution defined in microstructure.in file into two phases with a threshold value of 0.5.

In this example, we are using a bicontinuous structure. You can use any microstructure input file as long as it follows the correct format.

Step 1: Fill Input

Follow the introduction to the input part in the user manual and make sure you fill all of the blank boxes in the following four sections.

Dimension

dimension

Output

Choose vti for the output format, since we may want to visualize with Paraview.

output

System

Choose "Elastic" system for the System Type. Since we also want to calculate the mechanical field distribution under external stimuli, we need to turn on the Distribution switch. For this example, we choose Strain for the Constraint Type, with a value of ϵ11=0.01\epsilon_{11}=0.01.

Next, set the reference modulus value to be used in our solver. Here, we are supposing the material is isotropic, and we set the elastic stiffness by providing the Youngs modulus and Poisson ratio.

system

Then, set the two phase.

phase0

phase1

Structure

Since we are using our own custom microstructure, we should choose "Read from dat" for the Source Type.

If you download and examine the microstructure.in file, you will find the data is continuous floating point number rather than discrete integer, thus toggle the swtich of Data type to Continuous and set a threshold value of 0.5 for the Keys.

structure

Step 1.5: Or Import Input

If you don't want to enter all of the values manually, you may import the following input file directly into the software.

Save the following content into a local file, then click the File -> Import in the menu to read your saved file.

<input>
  <output>
    <format>vti</format>
  </output>
  <dimension>
    <nx>64</nx>
    <ny>64</ny>
    <nz>64</nz>
    <dx>1e-6</dx>
    <dy>1e-6</dy>
    <dz>1e-6</dz>
  </dimension>
  <system>
    <type>elastic</type>
    <distribution>1</distribution>
    <external>
      <elastic>
        <type>strain</type>
        <strain>
          <tensor11>0.01</tensor11>
          <tensor22>0.00</tensor22>
          <tensor33>0.00</tensor33>
          <tensor23>0.00</tensor23>
          <tensor13>0.00</tensor13>
          <tensor12>0.00</tensor12>
        </strain>
      </elastic>
    </external>
    <solver>
      <ref>
        <tensor>
          <name>stiffness</name>
          <rank>4</rank>
          <pointGroup>isotropic</pointGroup>
          <component>
            <value>1e10</value>
            <index>young</index>
          </component>
          <component>
            <value>0.3</value>
            <index>poisson</index>
          </component>
        </tensor>
      </ref>
    </solver>
    <material>
      <phase>
        <label>0</label>
        <tensor>
          <name>stiffness</name>
          <rank>4</rank>
          <pointGroup>isotropic</pointGroup>
          <component>
            <value>1e10</value>
            <index>young</index>
          </component>
          <component>
            <value>0.3</value>
            <index>poisson</index>
          </component>
        </tensor>
      </phase>
      <phase>
        <label>1</label>
        <tensor>
          <name>stiffness</name>
          <rank>4</rank>
          <pointGroup>isotropic</pointGroup>
          <component>
            <value>1e7</value>
            <index>young</index>
          </component>
          <component>
            <value>0.3</value>
            <index>poisson</index>
          </component>
        </tensor>
      </phase>
    </material>
  </system>
  <structure>
    <sourceType>dat</sourceType>
    <dataType>continuous</dataType>
    <keypoints>
      <value>0.5</value>
    </keypoints>
  </structure>
</input>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

Step 2: Export Input

Click the Create Inputs button. Select the folder that you want to run the simulation in, and create a file named input.xml.

This step is simple but very important because the input.xml file is a prerequisite for starting any calculation.

Step 3: Run calculation

Make sure you have finished Step 2, you have to click the Create Input button, because it will both export the input.xml file and set the current working directory to that folder.

Then, you can click the Start simulation button to start the calculation. If you have not click the Create Input button and create the input.xml file, nothing will happen because the program does not know where to look for the input.xml file.

Step 4: Check Output

You will see the following output files in your simulation folder. Meaning for each of the files are explained in the Elastic System.

structure

Overall, there are two types of output data, vti files for 3D data, and csv files for tabular data.

Step 4.1: Check 3D data

We can quickly take a look at the bicontinuous structure that we used within the software.

Select the file you want to visualize using the dropdown menu, then click Load data button.

select_data

Then you will see a structure like this.

microstructure(width=100%)

Step 4.2: Paraview

Next, we can try visualizing other files with Paraview. Click the first Open icon in the tool bar.

paraview

After the data is loaded, click Apply, then switch to Volume rendering, and you will see.

stress

Step 4.2: Check tabular data

You can check the out_effective_stiffness.csv file for the effective stiffness result of the system.

Index111213212223313233
114.8e+098.5e+07-1.2+088.5e+071.6e+097.3e+06-1.2+087.3+061.7+09
128.6e+072.0e+092.8+072.0e+092.2e+076.1e+072.8+076.1+075.6+07
13-1.2e+082.8e+072.3+092.8e+074.6e+071.2e+082.3+091.2+08-7.7+07
218.6e+072.0e+092.8+072.0e+092.2e+076.1e+072.8+076.1+075.6+07
221.6e+092.2e+074.6+072.2e+074.2e+091.7e+074.6+071.7+071.6+09
237.4+066.1e+071.2+086.1e+071.7e+072.0e+091.2+082.0+091.2+08
31-1.2+082.8e+072.3+092.8e+074.6e+071.2e+082.3+091.2+08-7.7+07
327.4+066.1e+071.2+086.1e+071.7e+072.0e+091.2+082.0+091.2+08
331.7+095.6e+07-7.7+075.6e+071.6e+091.2e+08-7.7+071.2+084.5+09

This website is developed using vitepress.