Skip to content

Commit

Permalink
deploy: e8b4350
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusgh committed Oct 2, 2024
1 parent cc44ce2 commit dbd1a2a
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 86 deletions.
12 changes: 2 additions & 10 deletions _sources/examples/material_parameters.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,6 @@
"stiffness_cu = lambda x: bulk_modulus_cu(x) * IxI + 2.0 * shear_modulus_cu(x) * P2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "438cfe95",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "49cccd0a",
Expand Down Expand Up @@ -391,7 +383,7 @@
" gca1.legend(loc=\"upper left\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" gca2.legend(loc=\"center right\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" plt.tight_layout(pad=0.025)\n",
" plt.savefig(os.path.join(data_path, \"results\", f\"{fig_name}.pdf\"))\n",
" plt.savefig(os.path.join(data_path, \"figures\", f\"{fig_name}.pdf\"))\n",
" plt.show()"
]
},
Expand Down Expand Up @@ -520,7 +512,7 @@
" gca1.grid(ls=\"--\", color=\"gray\", linewidth=0.5)\n",
" gca1.legend(loc=\"upper right\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" plt.tight_layout(pad=0.025)\n",
" plt.savefig(os.path.join(data_path, \"results\", f\"{fig_name}.pdf\"))\n",
" plt.savefig(os.path.join(data_path, \"figures\", f\"{fig_name}.pdf\"))\n",
" plt.show()"
]
},
Expand Down
26 changes: 12 additions & 14 deletions _sources/examples/reproduce_article.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,14 @@
"id": "2fa3edb7-cffc-4c02-8f7b-5c0cc8241a05",
"metadata": {},
"source": [
"## Mode study\n",
"\n",
"## Training reproduction tests\n",
"\n",
"## Analysis of the training directions of the temperature range\n",
"Analysis of the training directions of the temperature range\n",
"\n",
"### Load data from hdf5 files\n",
"- compare efficiency of the interpolation over the temperature\n",
"- show select stress-strain curves\n",
"- results are generated based on `generate_inputs.py` and external C/C++ UMAT\n",
"\n",
"### Analysis of the training directions of the temperature range\n",
"\n",
"First figure: comparison of $\\theta$-NTFA and FEM for training scenarios\n",
"\n",
"loadcases: 0, 2, 5\n",
"\n",
"temperatures: 0, 3, 9 (0, 33, -1)\n",
"\n",
"N_modes: 12, 18, 24"
"- results are generated based on `generate_inputs.py` and external C/C++ UMAT"
]
},
{
Expand Down Expand Up @@ -270,6 +258,16 @@
"id": "8221681f-2959-46eb-97a3-a1b6e72c5dc6",
"metadata": {},
"source": [
"### Analysis of the training directions of the temperature range\n",
"\n",
"First figure: comparison of $\\theta$-NTFA and FEM for training scenarios\n",
"\n",
"loadcases: 0, 2, 5\n",
"\n",
"temperatures: 0, 3, 9 (0, 33, -1)\n",
"\n",
"N_modes: 12, 18, 24\n",
"\n",
"### Relative error in sig_bar for 300K, 633.3K and 1300 K"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h1>Examples<a class="headerlink" href="#examples" title="Link to this heading">
<div>Thermo-mechanical NTFA - results of the CMAME article</div>
</a>
<a class="reference internal" href="examples/material_parameters.html">
<div><img alt="" src="./_images/examples_material_parameters_16_0.png"></div>
<div><img alt="" src="./_images/examples_material_parameters_15_0.png"></div>
<div>Material parameters</div>
</a>
<a class="reference internal" href="examples/truncate_ntfa_modes.html">
Expand Down
18 changes: 5 additions & 13 deletions examples/material_parameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,6 @@ <h2>Temperature-dependent material parameters of copper (Cu) phase (phase no. 0)
</pre></div>
</div>
</div>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>
</pre></div>
</div>
</div>
</section>
<section id="Temperature-dependent-material-parameters-of-wsc/FTC-phase-(phase-no.-1)">
<h2>Temperature-dependent material parameters of wsc/FTC phase (phase no. 1)<a class="headerlink" href="#Temperature-dependent-material-parameters-of-wsc/FTC-phase-(phase-no.-1)" title="Link to this heading"></a></h2>
Expand Down Expand Up @@ -400,7 +392,7 @@ <h2>Plot temperature-dependent material parameters of both phases<a class="heade
<span class="n">gca1</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s2">&quot;upper left&quot;</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.6</span><span class="p">),</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s2">&quot;black&quot;</span><span class="p">)</span>
<span class="n">gca2</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s2">&quot;center right&quot;</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.6</span><span class="p">),</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s2">&quot;black&quot;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">tight_layout</span><span class="p">(</span><span class="n">pad</span><span class="o">=</span><span class="mf">0.025</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_path</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">fig_name</span><span class="si">}</span><span class="s2">.pdf&quot;</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_path</span><span class="p">,</span> <span class="s2">&quot;figures&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">fig_name</span><span class="si">}</span><span class="s2">.pdf&quot;</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
Expand All @@ -418,14 +410,14 @@ <h2>Plot temperature-dependent material parameters of both phases<a class="heade
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/examples_material_parameters_12_1.png" src="../_images/examples_material_parameters_12_1.png" />
<img alt="../_images/examples_material_parameters_11_1.png" src="../_images/examples_material_parameters_11_1.png" />
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/examples_material_parameters_12_2.png" src="../_images/examples_material_parameters_12_2.png" />
<img alt="../_images/examples_material_parameters_11_2.png" src="../_images/examples_material_parameters_11_2.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -525,7 +517,7 @@ <h2>Plot sig0 over the temperature range<a class="headerlink" href="#Plot-sig0-o
<span class="n">gca1</span><span class="o">.</span><span class="n">grid</span><span class="p">(</span><span class="n">ls</span><span class="o">=</span><span class="s2">&quot;--&quot;</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;gray&quot;</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">)</span>
<span class="n">gca1</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s2">&quot;upper right&quot;</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="p">(</span><span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">,</span> <span class="mf">0.6</span><span class="p">),</span> <span class="n">edgecolor</span><span class="o">=</span><span class="s2">&quot;black&quot;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">tight_layout</span><span class="p">(</span><span class="n">pad</span><span class="o">=</span><span class="mf">0.025</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_path</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">fig_name</span><span class="si">}</span><span class="s2">.pdf&quot;</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">data_path</span><span class="p">,</span> <span class="s2">&quot;figures&quot;</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">fig_name</span><span class="si">}</span><span class="s2">.pdf&quot;</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
Expand All @@ -534,7 +526,7 @@ <h2>Plot sig0 over the temperature range<a class="headerlink" href="#Plot-sig0-o
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/examples_material_parameters_16_0.png" src="../_images/examples_material_parameters_16_0.png" />
<img alt="../_images/examples_material_parameters_15_0.png" src="../_images/examples_material_parameters_15_0.png" />
</div>
</div>
<div class="nbinput nblast docutils container">
Expand Down
12 changes: 2 additions & 10 deletions examples/material_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,6 @@
"stiffness_cu = lambda x: bulk_modulus_cu(x) * IxI + 2.0 * shear_modulus_cu(x) * P2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "438cfe95",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "49cccd0a",
Expand Down Expand Up @@ -391,7 +383,7 @@
" gca1.legend(loc=\"upper left\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" gca2.legend(loc=\"center right\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" plt.tight_layout(pad=0.025)\n",
" plt.savefig(os.path.join(data_path, \"results\", f\"{fig_name}.pdf\"))\n",
" plt.savefig(os.path.join(data_path, \"figures\", f\"{fig_name}.pdf\"))\n",
" plt.show()"
]
},
Expand Down Expand Up @@ -520,7 +512,7 @@
" gca1.grid(ls=\"--\", color=\"gray\", linewidth=0.5)\n",
" gca1.legend(loc=\"upper right\", facecolor=(0.9, 0.9, 0.9, 0.6), edgecolor=\"black\")\n",
" plt.tight_layout(pad=0.025)\n",
" plt.savefig(os.path.join(data_path, \"results\", f\"{fig_name}.pdf\"))\n",
" plt.savefig(os.path.join(data_path, \"figures\", f\"{fig_name}.pdf\"))\n",
" plt.show()"
]
},
Expand Down
39 changes: 16 additions & 23 deletions examples/reproduce_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@
<li class="toctree-l1 current"><a class="reference internal" href="../examples.html">Examples</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Thermo-mechanical NTFA - results of the CMAME article</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#Imports:">Imports:</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Mode-study">Mode study</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Training-reproduction-tests">Training reproduction tests</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Analysis-of-the-training-directions-of-the-temperature-range">Analysis of the training directions of the temperature range</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#Training-reproduction-tests">Training reproduction tests</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#Load-data-from-hdf5-files">Load data from hdf5 files</a></li>
<li class="toctree-l4"><a class="reference internal" href="#analysis-of-the-training-directions-of-the-temperature-range-1">Analysis of the training directions of the temperature range</a></li>
<li class="toctree-l4"><a class="reference internal" href="#Analysis-of-the-training-directions-of-the-temperature-range">Analysis of the training directions of the temperature range</a></li>
<li class="toctree-l4"><a class="reference internal" href="#Relative-error-in-sig_bar-for-300K,-633.3K-and-1300-K">Relative error in sig_bar for 300K, 633.3K and 1300 K</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#id2">Training reproduction tests</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">Training reproduction tests</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#Relative-error-in-sig_bar-for-300-and-1300-K">Relative error in sig_bar for 300 and 1300 K</a></li>
<li class="toctree-l4"><a class="reference internal" href="#Plot-the-for-loadcase-no.-2-relevant-curves">Plot the for loadcase no. 2 relevant curves</a></li>
<li class="toctree-l4"><a class="reference internal" href="#3D-Plots">3D Plots</a></li>
Expand All @@ -81,7 +79,7 @@
<li class="toctree-l3"><a class="reference internal" href="#Twoscale-simulation">Twoscale simulation</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#Load-results-of-simulation-on-the-macroscale-with-NTFA-material-model">Load results of simulation on the macroscale with NTFA material model</a></li>
<li class="toctree-l4"><a class="reference internal" href="#Use-temperature-and-strain-as-boundary-conditions-for-FE-simulation-on-the-microscale">Use temperature and strain as boundary conditions for FE simulation on the microscale</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id3">Load results from FE simulation on the microscale</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id2">Load results from FE simulation on the microscale</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -251,28 +249,16 @@ <h2>Imports:<a class="headerlink" href="#Imports:" title="Link to this heading">
</div>
</div>
</section>
<section id="Mode-study">
<h2>Mode study<a class="headerlink" href="#Mode-study" title="Link to this heading"></a></h2>
</section>
<section id="Training-reproduction-tests">
<h2>Training reproduction tests<a class="headerlink" href="#Training-reproduction-tests" title="Link to this heading"></a></h2>
</section>
<section id="Analysis-of-the-training-directions-of-the-temperature-range">
<h2>Analysis of the training directions of the temperature range<a class="headerlink" href="#Analysis-of-the-training-directions-of-the-temperature-range" title="Link to this heading"></a></h2>
<p>Analysis of the training directions of the temperature range</p>
<section id="Load-data-from-hdf5-files">
<h3>Load data from hdf5 files<a class="headerlink" href="#Load-data-from-hdf5-files" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>compare efficiency of the interpolation over the temperature</p></li>
<li><p>show select stress-strain curves</p></li>
<li><p>results are generated based on <code class="docutils literal notranslate"><span class="pre">generate_inputs.py</span></code> and external C/C++ UMAT</p></li>
</ul>
</section>
<section id="analysis-of-the-training-directions-of-the-temperature-range-1">
<span id="id1"></span><h3>Analysis of the training directions of the temperature range<a class="headerlink" href="#analysis-of-the-training-directions-of-the-temperature-range-1" title="Link to this heading"></a></h3>
<p>First figure: comparison of <span class="math notranslate nohighlight">\(\theta\)</span>-NTFA and FEM for training scenarios</p>
<p>loadcases: 0, 2, 5</p>
<p>temperatures: 0, 3, 9 (0, 33, -1)</p>
<p>N_modes: 12, 18, 24</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
Expand Down Expand Up @@ -345,6 +331,13 @@ <h3>Load data from hdf5 files<a class="headerlink" href="#Load-data-from-hdf5-fi
</pre></div></div>
</div>
</section>
<section id="Analysis-of-the-training-directions-of-the-temperature-range">
<h3>Analysis of the training directions of the temperature range<a class="headerlink" href="#Analysis-of-the-training-directions-of-the-temperature-range" title="Link to this heading"></a></h3>
<p>First figure: comparison of <span class="math notranslate nohighlight">\(\theta\)</span>-NTFA and FEM for training scenarios</p>
<p>loadcases: 0, 2, 5</p>
<p>temperatures: 0, 3, 9 (0, 33, -1)</p>
<p>N_modes: 12, 18, 24</p>
</section>
<section id="Relative-error-in-sig_bar-for-300K,-633.3K-and-1300-K">
<h3>Relative error in sig_bar for 300K, 633.3K and 1300 K<a class="headerlink" href="#Relative-error-in-sig_bar-for-300K,-633.3K-and-1300-K" title="Link to this heading"></a></h3>
<div class="nbinput docutils container">
Expand Down Expand Up @@ -404,8 +397,8 @@ <h3>Relative error in sig_bar for 300K, 633.3K and 1300 K<a class="headerlink" h
</div>
</section>
</section>
<section id="id2">
<h2>Training reproduction tests<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<section id="id1">
<h2>Training reproduction tests<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<p>Analysis of the training directions of the temperature range</p>
<p>Load data from hdf5 file - compare efficiency of the interpolation over the temperature - show select stress-strain curves - results are generated based on <code class="docutils literal notranslate"><span class="pre">generate_inputs.py</span></code> and external C/C++ UMAT</p>
<div class="nbinput nblast docutils container">
Expand Down Expand Up @@ -1402,8 +1395,8 @@ <h3>Use temperature and strain as boundary conditions for FE simulation on the m
</div>
</div>
</section>
<section id="id3">
<h3>Load results from FE simulation on the microscale<a class="headerlink" href="#id3" title="Link to this heading"></a></h3>
<section id="id2">
<h3>Load results from FE simulation on the microscale<a class="headerlink" href="#id2" title="Link to this heading"></a></h3>
<p>The in-house FE simulation software stores the simulation results (homogenized overall stress <code class="docutils literal notranslate"><span class="pre">sig</span></code>, homogenized stress in cu phase <code class="docutils literal notranslate"><span class="pre">sig_cu</span></code>, homogenized stress in ftc phase <code class="docutils literal notranslate"><span class="pre">sig_ftc</span></code>, and homogenized hardening variable <code class="docutils literal notranslate"><span class="pre">qbar</span></code>) on the microscale in a new HDF5 (<code class="docutils literal notranslate"><span class="pre">.h5</span></code>) file. These results serve as validation data for the two-scale simulation at the specific integration point of the macroscale simulation.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[20]:
Expand Down
Loading

0 comments on commit dbd1a2a

Please sign in to comment.