Jekyll2021-12-12T18:48:00+08:00https://lyk6756.github.io/feed.xml李宇琨的博客李宇琨的个人博客:分享科学,技术和他独特的生活。
李宇琨lyk6756@163.com【项目】使用Selenium IDE + Chrome进行虚拟实验的自动化测试2021-08-26T00:00:00+08:002021-08-26T00:00:00+08:00https://lyk6756.github.io/2021/08/26/autoTest_ilab<h2 id="简介">简介</h2>
<p>该项目使用Selenium IDE和Google Chrome对<a href="http://www.ilab-x.com/">《国家虚拟仿真实验教学课程共享平台》</a>中的<a href="http://www.ilab-x.com/details/2020?id=6585&isView=true">复合材料结构强度与稳定性积木式验证虚拟仿真实验</a>课程实现自动化测试。进行其中的虚拟实验操作并提交结果。具体测试内容参见项目中的<code class="language-plaintext highlighter-rouge">力学虚拟实验操作说明.pdf</code>文档。</p>
<h2 id="项目代码">项目代码</h2>
<p><a href="https://github.com/lyk6756/autoTest_ilab-x">lyk6756/autoTest_ilab-x - GitHub</a></p>
<h2 id="环境准备">环境准备</h2>
<p>已通过测试的运行环境:</p>
<ul>
<li>Google Chrome 92.0.4515.159</li>
<li>Selenium IDE for Chrome 3.17.0</li>
</ul>
<p>使用Google Chrome浏览器打开<a href="https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd">https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd</a>将Selenium IDE添加至Chrome即可。</p>
<p>或采用项目中的<code class="language-plaintext highlighter-rouge">Selenium-IDE_v3.17.0.crx</code>文件进行离线安装。具体安装方式详见<a href="https://www.cnplugins.com/tool/three-methods-to-install-crx.html">这里</a>。</p>
<h2 id="前置条件登陆">前置条件:登陆</h2>
<p>在运行自动化脚本前,<strong>务必</strong>先在Google Chrome浏览器中完成登陆:<a href="http://www.ilab-x.com/login">国家虚拟仿真实验教学课程共享平台</a>。</p>
<h2 id="运行脚本">运行脚本</h2>
<ol>
<li>
<p>将项目中的自动运行脚本<code class="language-plaintext highlighter-rouge">autoTest.side</code>下载到本地。</p>
</li>
<li>
<p>完成登陆后,在浏览器中打开安装好的Selenium IDE,在弹出的对话框中点击<code class="language-plaintext highlighter-rouge">Open an existing projct</code>,并选择刚才下载的脚本<code class="language-plaintext highlighter-rouge">autoTest.side</code>。</p>
</li>
</ol>
<p><img src="https://dm2305files.storage.live.com/y4m4SjFM2Ofz1XXb_SH6Bx9fPZBnCKSZ6Qt39w3gimZPEc-YCq1Qw1mFpk2iA3GKizCIOwPJfyKvi_l1aHLJcNpqUnB8CjldhluNNz2KERoZOyXU3oOUJuCOCaCGVJTA9VNT3fyWor58f9ImxCPWuc75HhNlV88Khz77rlmnJg42bst952X8mvRTNJZZCmBI7ns?width=618&height=756&cropmode=none" alt="Open project" /></p>
<ol>
<li>在运行脚本之前,<strong>务必</strong>先将运行速度调整至最慢。在Selenium IDE窗口中,选择工具栏中的<code class="language-plaintext highlighter-rouge">Test execution speed</code>(显示为:stopwatch: 图形),并将滑块拖动至最慢。</li>
</ol>
<p><img src="https://dm2305files.storage.live.com/y4mtFy9M7JkQOkIU6iW-CCQdZiqWKpf7V4Q8ehevXaPU0OJePPGC0jjwuwJna3LXydVYha1s4V3fPhcBwxMN-D5F2Dmex6swQFDj8CHnFXT2KJg8OOHo-W_LmwtD-7km8gCgzSn1FigJfb1mt3oNTYNlsdcUbHyFF5FAKREtsiSCPN9jkrAkj_g4n66-vtdt-v1?width=618&height=756&cropmode=none" alt="Open project" /></p>
<ol>
<li>点击工具栏中的<code class="language-plaintext highlighter-rouge">Run current test</code>(显示为:arrow_forward: 图形)。脚本开始自动运行,约15分钟左右完成实验操作,并自动提交。</li>
</ol>
<p><strong>注意</strong>:脚本运行过程中,请勿对浏览器窗口进行任何操作。</p>
<p><img src="https://dm2305files.storage.live.com/y4m2FNAOBaSe9QotT6YdK3jEXCPmjSkYYsgozNxTr0lmEtqKu8tB1l7rOP3idGYLxHWhkax8YIKY_QFyURWh2qUfN-3aAxYXvlAwFr7BOeFy9R-qz-AqNcNy14BnMaFIxU7lrLstoQrq_SRUfn_ycNuGyU4jipO-Ayvlu0n9Oq64QRTUEw2z8g_R0TZBoJkIBL4?width=618&height=756&cropmode=none" alt="Open project" /></p>
<hr />
<h2 id="延伸阅读">延伸阅读</h2>
<ul>
<li>
<p><a href="https://www.selenium.dev/selenium-ide/">Selenium IDE</a></p>
</li>
<li>
<p><a href="https://www.bilibili.com/video/BV1fJ411w7mk">Selenium IDE Web 自动化测试(上) - bilibili</a></p>
</li>
<li>
<p><a href="https://lyk6756.github.io/2017/08/01/selenium.html">Python语言下使用Selenium实现对浏览器的自动控制 - 李宇琨的博客</a></p>
</li>
</ul>李宇琨lyk6756@163.com简介 该项目使用Selenium IDE和Google Chrome对《国家虚拟仿真实验教学课程共享平台》中的复合材料结构强度与稳定性积木式验证虚拟仿真实验课程实现自动化测试。进行其中的虚拟实验操作并提交结果。具体测试内容参见项目中的力学虚拟实验操作说明.pdf文档。 项目代码 lyk6756/autoTest_ilab-x - GitHub 环境准备 已通过测试的运行环境: Google Chrome 92.0.4515.159 Selenium IDE for Chrome 3.17.0 使用Google Chrome浏览器打开https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd将Selenium IDE添加至Chrome即可。 或采用项目中的Selenium-IDE_v3.17.0.crx文件进行离线安装。具体安装方式详见这里。 前置条件:登陆 在运行自动化脚本前,务必先在Google Chrome浏览器中完成登陆:国家虚拟仿真实验教学课程共享平台。 运行脚本 将项目中的自动运行脚本autoTest.side下载到本地。 完成登陆后,在浏览器中打开安装好的Selenium IDE,在弹出的对话框中点击Open an existing projct,并选择刚才下载的脚本autoTest.side。 在运行脚本之前,务必先将运行速度调整至最慢。在Selenium IDE窗口中,选择工具栏中的Test execution speed(显示为:stopwatch: 图形),并将滑块拖动至最慢。 点击工具栏中的Run current test(显示为:arrow_forward: 图形)。脚本开始自动运行,约15分钟左右完成实验操作,并自动提交。 注意:脚本运行过程中,请勿对浏览器窗口进行任何操作。 延伸阅读 Selenium IDE Selenium IDE Web 自动化测试(上) - bilibili Python语言下使用Selenium实现对浏览器的自动控制 - 李宇琨的博客使用有限元方法求解相场断裂模型的主要软件及开源代码2021-08-25T00:00:00+08:002021-08-25T00:00:00+08:00https://lyk6756.github.io/2021/08/25/software_code_phase_field<h3 id="notable-software-packages-and-available-codes-that-implement-the-finite-element-method-for-solving-phase-field-fracture-pff-models">Notable software packages and available codes that implement the finite element method for solving phase-field fracture (PFF) models</h3>
<table>
<thead>
<tr>
<th>Software</th>
<th>Language interface</th>
<th>Price</th>
<th>Available codes for PFF</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://www.mathworks.com/products/matlab.html" title="MATLAB">MATLAB</a></td>
<td>MATLAB</td>
<td>Commercial</td>
<td>Biner<sup id="fnref:Biner" role="doc-noteref"><a href="#fn:Biner" class="footnote" rel="footnote">1</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="https://github.com/bourdin/mef90" title="mef90/vDef">mef90/vDef</a><sup id="fnref:mef90" role="doc-noteref"><a href="#fn:mef90" class="footnote" rel="footnote">2</a></sup></td>
<td>Fortran</td>
<td>Free</td>
<td><a href="https://github.com/bourdin/mef90" title="Bourdin">Bourdin</a><sup id="fnref:Bourdin" role="doc-noteref"><a href="#fn:Bourdin" class="footnote" rel="footnote">3</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="https://software.dynaflow.com/jive/" title="JIVE">JIVE</a><sup id="fnref:JIVE" role="doc-noteref"><a href="#fn:JIVE" class="footnote" rel="footnote">4</a></sup></td>
<td>C++</td>
<td>Free</td>
<td><a href="https://github.com/vinhphunguyen/ofeFRAC" title="Nguyen">Nguyen</a><sup id="fnref:Nguyen" role="doc-noteref"><a href="#fn:Nguyen" class="footnote" rel="footnote">5</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="https://www.dealii.org/" title="deal">deal.II</a><sup id="fnref:deal" role="doc-noteref"><a href="#fn:deal" class="footnote" rel="footnote">6</a></sup></td>
<td>C++</td>
<td>Free</td>
<td><a href="https://github.com/tjhei/cracks" title="Heister">Heister</a><sup id="fnref:Heister" role="doc-noteref"><a href="#fn:Heister" class="footnote" rel="footnote">7</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="https://fenicsproject.org/" title="FEniCS">FEniCS</a><sup id="fnref:FEniCS" role="doc-noteref"><a href="#fn:FEniCS" class="footnote" rel="footnote">8</a></sup></td>
<td>C++ & Python</td>
<td>Free</td>
<td><a href="https://bitbucket.org/pefarrell/varfrac-solvers" title="Farrell">Farrell</a><sup id="fnref:Farrell" role="doc-noteref"><a href="#fn:Farrell" class="footnote" rel="footnote">9</a></sup>, <a href="https://home.iitm.ac.in/ratna/codes/phasefield/" title="Ratna">Ratna</a><sup id="fnref:Ratna" role="doc-noteref"><a href="#fn:Ratna" class="footnote" rel="footnote">10</a></sup>, <a href="https://www.empaneda.com/codes/" title="Martínez-Pañeda">Martínez-Pañeda</a><sup id="fnref:Martinez-Paneda1" role="doc-noteref"><a href="#fn:Martinez-Paneda1" class="footnote" rel="footnote">11</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="https://www.comsol.com/" title="COMSOL">COMSOL</a></td>
<td>MATLAB</td>
<td>Commercial</td>
<td><a href="https://sourceforge.net/projects/phasefieldmodelingcomsol/" title="Zhou">Zhou et al.</a><sup id="fnref:Zhou" role="doc-noteref"><a href="#fn:Zhou" class="footnote" rel="footnote">12</a></sup>, <a href="https://github.com/jianyingwu/pfczm-comsol" title="Wu1">Wu</a><sup id="fnref:Wu1" role="doc-noteref"><a href="#fn:Wu1" class="footnote" rel="footnote">13</a></sup></td>
</tr>
</tbody>
<tbody>
<tr>
<td><a href="http://www.abaqus.com/" title="ABAQUS">ABAQUS</a></td>
<td>Fortran</td>
<td>Commercial</td>
<td><a href="http://molnar-research.com/publication.html" title="Molnár">Molnár</a><sup id="fnref:Molnar" role="doc-noteref"><a href="#fn:Molnar" class="footnote" rel="footnote">14</a></sup>, <a href="https://doi.org/10.17632/9n6rhvmjjn" title="Fang">Fang et al.</a><sup id="fnref:Fang" role="doc-noteref"><a href="#fn:Fang" class="footnote" rel="footnote">15</a></sup>, <a href="https://doi.org/10.17632/p77tsyrbx2" title="Seles">Seles et al.</a><sup id="fnref:Seles" role="doc-noteref"><a href="#fn:Seles" class="footnote" rel="footnote">16</a></sup>, <a href="https://www.empaneda.com/codes/" title="Martínez-Pañeda">Martínez-Pañeda</a><sup id="fnref:Martinez-Paneda2" role="doc-noteref"><a href="#fn:Martinez-Paneda2" class="footnote" rel="footnote">17</a></sup>, <a href="https://github.com/jianyingwu/pfczm-abaqus" title="Wu2">Wu</a><sup id="fnref:Wu2" role="doc-noteref"><a href="#fn:Wu2" class="footnote" rel="footnote">18</a></sup></td>
</tr>
</tbody>
</table>
<h3 id="references">References</h3>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:Biner" role="doc-endnote">
<p><a href="https://doi.org/10.1007/978-3-319-41196-5">Biner, S. Bulent. Programming phase-field modeling. Springer International Publishing, 2017.</a> <a href="#fnref:Biner" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:mef90" role="doc-endnote">
<p><a href="https://doi.org/10.5281/zenodo.3242131">Bourdin, kumiori, cmaurini, et al. bourdin/mef90: Full rewrite of the assembly routines leveraging OO features of F2008. Zenodo, 2020.</a> <a href="#fnref:mef90" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Bourdin" role="doc-endnote">
<p><a href="http://doi.org/10.1016/S0022-5096(98)00034-9">Bourdin, B., Francfort, G., and Marigo, J.-J. (2000). Numerical experiments in revisited brittle fracture. J. Mech. Phys. Solids, 48(4):797–826.</a></p>
<p><a href="http://doi.org/10.4171/IFB/171">Bourdin, B. (2007). Numerical implementation of a variational formulation of quasi-static brittle fracture. Interfaces Free Bound., 9:411–430.</a></p>
<p><a href="http://doi.org/10.1007/s10659-007-9107-3">Bourdin, B., Francfort, G., and Marigo, J.-J. (2008). The variational approach to fracture. J. Elasticity, 91(1-3):1–148.</a> <a href="#fnref:Bourdin" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:JIVE" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.advengsoft.2020.102925">Nguyen-Thanh, Chi, et al. Jive: an open source, research-oriented C++ library for solving partial differential equations. Advances in Engineering Software 150 (2020): 102925.</a> <a href="#fnref:JIVE" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Nguyen" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.cma.2018.10.044">Wu, Jian-Ying, et al. Computational modeling of localized failure in solids: XFEM vs PF-CZM. Computer Methods in Applied Mechanics and Engineering 345 (2019): 618-643.</a></p>
<p><a href="https://doi.org/10.1016/j.engfracmech.2018.12.013">MANDAL T K, NGUYEN V P, HEIDARPOUR A. Phase field and gradient enhanced damage models for quasi-brittle failure: A numerical comparative study. Engineering Fracture Mechanics, 2019, 207: 48-67.</a></p>
<p><a href="https://doi.org/10.1016/j.engfracmech.2019.106532.">MANDAL T K, NGUYEN V P, WU J Y. Length scale and mesh bias sensitivity of phase-field models for brittle and cohesive fracture. Engineering Fracture Mechanics, 2019, 217: 106532.</a></p>
<p><a href="https://doi.org/10.1016/j.tafmec.2020.102840">MANDAL T K, NGUYEN V P, WU J Y. Comparative study of phase-field damage models for hydrogen assisted cracking. Theoretical and Applied Fracture Mechanics, 2021, 111: 102840.</a> <a href="#fnref:Nguyen" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:deal" role="doc-endnote">
<p><a href="https://doi.org/10.1515/jnma-2020-0043">ARNDT D, BANGERTH W, BLAIS B, et al. The deal.II library, version 9.2. Journal of Numerical Mathematics, 2020, 28(3): 131-146.</a> <a href="#fnref:deal" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Heister" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.cma.2015.03.009">HEISTER T, WHEELER M F, WICK T. A primal-dual active set method and predictor-corrector mesh adaptivity for computing fracture propagation using a phase-field approach. Computer Methods in Applied Mechanics and Engineering, 2015, 290: 466-495.</a></p>
<p><a href="https://doi.org/10.1002/pamm.201800353">HEISTER T, WICK T. Parallel solution, adaptivity, computational convergence, and open-source code of 2d and 3d pressurized phase-field fracture problems. PAMM, 2018, 18(1).</a> <a href="#fnref:Heister" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:FEniCS" role="doc-endnote">
<p><a href="https://doi.org/10.11588/ans.2015.100.20553">ALNÆS M S, BLECHTA J, HAKE J, et al. The fenics project version 1.5. Archive of Numerical Software, 2015, 3(100).</a> <a href="#fnref:FEniCS" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Farrell" role="doc-endnote">
<p><a href="https://doi.org/10.1002/nme.5300">FARRELL P, MAURINI C. Linear and nonlinear solvers for variational phase-field models of brittle fracture. International Journal for Numerical Methods in Engineering, 2016, 109(5): 648-667.</a> <a href="#fnref:Farrell" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Ratna" role="doc-endnote">
<p><a href="https://doi.org/10.1007/s11709-018-0471-9">HIRSHIKESH, NATARAJAN S, ANNABATTULA R K. A FEniCS implementation of the phase field method for quasi-static brittle fracture. Frontiers of Structural and Civil Engineering, 2018, 13(2): 380-396.</a> <a href="#fnref:Ratna" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Martinez-Paneda1" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.compositesb.2019.04.003">HIRSHIKESH, NATARAJAN S, ANNABATTULA R K, et al. Phase field modelling of crack propagation in functionally graded materials. Composites Part B: Engineering, 2019, 169: 239-248.</a> <a href="#fnref:Martinez-Paneda1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Zhou" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.advengsoft.2018.03.012">ZHOU S, RABCZUK T, ZHUANG X. Phase field modeling of quasi-static and dynamic crack propagation: COMSOL implementation and case studies. Advances in Engineering Software, 2018, 122: 31-49.</a> <a href="#fnref:Zhou" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Wu1" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.cma.2021.114125">WU J Y, CHEN W X. Phase-field modeling of electromechanical fracture in piezoelectric solids: Analytical results and numerical simulations. Computer Methods in Applied Mechanics and Engineering, 2021.</a></p>
<p><a href="https://doi.org/10.1016/j.tafmec.2021.103153">CHEN W X, WU J Y. Phase-field cohesive zone modeling of multi-physical fracture in solids and the open-source implementation in Comsol Multiphysics. Theoretical and Applied Fracture Mechanics, 2022, 117: 103153</a> <a href="#fnref:Wu1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Molnar" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.finel.2017.03.002">MOLNÁR G, GRAVOUIL A. 2d and 3d abaqus implementation of a robust staggered phase-field solution for modeling brittle fracture. Finite Elements in Analysis and Design, 2017, 130: 27-38.</a></p>
<p><a href="https://doi.org/10.1016/j.cma.2020.113004">MOLNÁR G, GRAVOUIL A, SEGHIR R, et al. An open-source abaqus implementation of the phase-field method to study the effect of plasticity on the instantaneous fracture toughness in dynamic crack propagation. Computer Methods in Applied Mechanics and Engineering, 2020, 365: 113004.</a> <a href="#fnref:Molnar" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Fang" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.tafmec.2019.102252">FANG J, WU C, RABCZUK T, et al. Phase field fracture in elasto-plastic solids: Abaqus implementation and case studies. Theoretical and Applied Fracture Mechanics, 2019, 103: 102252.</a> <a href="#fnref:Fang" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Seles" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.engfracmech.2018.09.027">SELEŠ K, LESIČAR T, TONKOVIĆ Z, et al. A residual control staggered solution scheme for the phase-field modeling of brittle fracture. Engineering Fracture Mechanics, 2019, 205: 370-386.</a> <a href="#fnref:Seles" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Martinez-Paneda2" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.tafmec.2019.102446">KRISTENSEN P K, MARTÍNEZ-PAÑEDA E. Phase field fracture modelling using quasi-newton methods and a new adaptive step scheme. Theoretical and Applied Fracture Mechanics, 2020, 107: 102446.</a></p>
<p><a href="https://doi.org/10.1016/j.cma.2018.07.021">MARTÍNEZ-PAÑEDA E, GOLAHMAR A, NIORDSON C F. A phase field formulation for hydrogen assisted cracking. Computer Methods in Applied Mechanics and Engineering, 2018, 342: 742-761.</a></p>
<p><a href="https://doi.org/10.1016/j.jmps.2020.104254">CUI C, MA R, MARTÍNEZ-PAÑEDA E. A phase field formulation for dissolutiondriven stress corrosion cracking. Journal of the Mechanics and Physics of Solids, 2021, 147: 104254.</a></p>
<p><a href="https://doi.org/10.3390/ma14081913">NAVIDTEHRANI Y, BETEGÓN C, MARTÍNEZ-PAÑEDA E. A unified abaqus implementation of the phase field fracture method using only a user material subroutine. Materials, 2021, 14(8): 1913.</a></p>
<p><a href="https://doi.org/10.1016/j.apples.2021.100050">NAVIDTEHRANI Y, BETEGÓN C, MARTÍNEZ-PAÑEDA E. A simple and robust abaqus implementation of the phase field fracture method. Applications in Engineering Science, 2021, 6: 100050.</a> <a href="#fnref:Martinez-Paneda2" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:Wu2" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.cma.2019.112704">WU J Y, HUANG Y, NGUYEN V P. On the BFGS monolithic algorithm for the unified phase field damage theory. Computer Methods in Applied Mechanics and Engineering, 2020, 360: 112704.</a></p>
<p><a href="https://doi.org/10.1016/10.1016/j.tafmec.2019.102440">WU J Y, HUANG Y. Comprehensive implementations of phase-field damage models in abaqus. Theoretical and Applied Fracture Mechanics, 2020, 106: 102440.</a> <a href="#fnref:Wu2" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>李宇琨lyk6756@163.comNotable software packages and available codes that implement the finite element method for solving phase-field fracture (PFF) models Software Language interface Price Available codes for PFF MATLAB MATLAB Commercial Biner1 mef90/vDef2 Fortran Free Bourdin3 JIVE4 C++ Free Nguyen5 deal.II6 C++ Free Heister7 FEniCS8 C++ & Python Free Farrell9, Ratna10, Martínez-Pañeda11 COMSOL MATLAB Commercial Zhou et al.12, Wu13 ABAQUS Fortran Commercial Molnár14, Fang et al.15, Seles et al.16, Martínez-Pañeda17, Wu18 References Biner, S. Bulent. Programming phase-field modeling. Springer International Publishing, 2017. ↩ Bourdin, kumiori, cmaurini, et al. bourdin/mef90: Full rewrite of the assembly routines leveraging OO features of F2008. Zenodo, 2020. ↩ Bourdin, B., Francfort, G., and Marigo, J.-J. (2000). Numerical experiments in revisited brittle fracture. J. Mech. Phys. Solids, 48(4):797–826. Bourdin, B. (2007). Numerical implementation of a variational formulation of quasi-static brittle fracture. Interfaces Free Bound., 9:411–430. Bourdin, B., Francfort, G., and Marigo, J.-J. (2008). The variational approach to fracture. J. Elasticity, 91(1-3):1–148. ↩ Nguyen-Thanh, Chi, et al. Jive: an open source, research-oriented C++ library for solving partial differential equations. Advances in Engineering Software 150 (2020): 102925. ↩ Wu, Jian-Ying, et al. Computational modeling of localized failure in solids: XFEM vs PF-CZM. Computer Methods in Applied Mechanics and Engineering 345 (2019): 618-643. MANDAL T K, NGUYEN V P, HEIDARPOUR A. Phase field and gradient enhanced damage models for quasi-brittle failure: A numerical comparative study. Engineering Fracture Mechanics, 2019, 207: 48-67. MANDAL T K, NGUYEN V P, WU J Y. Length scale and mesh bias sensitivity of phase-field models for brittle and cohesive fracture. Engineering Fracture Mechanics, 2019, 217: 106532. MANDAL T K, NGUYEN V P, WU J Y. Comparative study of phase-field damage models for hydrogen assisted cracking. Theoretical and Applied Fracture Mechanics, 2021, 111: 102840. ↩ ARNDT D, BANGERTH W, BLAIS B, et al. The deal.II library, version 9.2. Journal of Numerical Mathematics, 2020, 28(3): 131-146. ↩ HEISTER T, WHEELER M F, WICK T. A primal-dual active set method and predictor-corrector mesh adaptivity for computing fracture propagation using a phase-field approach. Computer Methods in Applied Mechanics and Engineering, 2015, 290: 466-495. HEISTER T, WICK T. Parallel solution, adaptivity, computational convergence, and open-source code of 2d and 3d pressurized phase-field fracture problems. PAMM, 2018, 18(1). ↩ ALNÆS M S, BLECHTA J, HAKE J, et al. The fenics project version 1.5. Archive of Numerical Software, 2015, 3(100). ↩ FARRELL P, MAURINI C. Linear and nonlinear solvers for variational phase-field models of brittle fracture. International Journal for Numerical Methods in Engineering, 2016, 109(5): 648-667. ↩ HIRSHIKESH, NATARAJAN S, ANNABATTULA R K. A FEniCS implementation of the phase field method for quasi-static brittle fracture. Frontiers of Structural and Civil Engineering, 2018, 13(2): 380-396. ↩ HIRSHIKESH, NATARAJAN S, ANNABATTULA R K, et al. Phase field modelling of crack propagation in functionally graded materials. Composites Part B: Engineering, 2019, 169: 239-248. ↩ ZHOU S, RABCZUK T, ZHUANG X. Phase field modeling of quasi-static and dynamic crack propagation: COMSOL implementation and case studies. Advances in Engineering Software, 2018, 122: 31-49. ↩ WU J Y, CHEN W X. Phase-field modeling of electromechanical fracture in piezoelectric solids: Analytical results and numerical simulations. Computer Methods in Applied Mechanics and Engineering, 2021. CHEN W X, WU J Y. Phase-field cohesive zone modeling of multi-physical fracture in solids and the open-source implementation in Comsol Multiphysics. Theoretical and Applied Fracture Mechanics, 2022, 117: 103153 ↩ MOLNÁR G, GRAVOUIL A. 2d and 3d abaqus implementation of a robust staggered phase-field solution for modeling brittle fracture. Finite Elements in Analysis and Design, 2017, 130: 27-38. MOLNÁR G, GRAVOUIL A, SEGHIR R, et al. An open-source abaqus implementation of the phase-field method to study the effect of plasticity on the instantaneous fracture toughness in dynamic crack propagation. Computer Methods in Applied Mechanics and Engineering, 2020, 365: 113004. ↩ FANG J, WU C, RABCZUK T, et al. Phase field fracture in elasto-plastic solids: Abaqus implementation and case studies. Theoretical and Applied Fracture Mechanics, 2019, 103: 102252. ↩ SELEŠ K, LESIČAR T, TONKOVIĆ Z, et al. A residual control staggered solution scheme for the phase-field modeling of brittle fracture. Engineering Fracture Mechanics, 2019, 205: 370-386. ↩ KRISTENSEN P K, MARTÍNEZ-PAÑEDA E. Phase field fracture modelling using quasi-newton methods and a new adaptive step scheme. Theoretical and Applied Fracture Mechanics, 2020, 107: 102446. MARTÍNEZ-PAÑEDA E, GOLAHMAR A, NIORDSON C F. A phase field formulation for hydrogen assisted cracking. Computer Methods in Applied Mechanics and Engineering, 2018, 342: 742-761. CUI C, MA R, MARTÍNEZ-PAÑEDA E. A phase field formulation for dissolutiondriven stress corrosion cracking. Journal of the Mechanics and Physics of Solids, 2021, 147: 104254. NAVIDTEHRANI Y, BETEGÓN C, MARTÍNEZ-PAÑEDA E. A unified abaqus implementation of the phase field fracture method using only a user material subroutine. Materials, 2021, 14(8): 1913. NAVIDTEHRANI Y, BETEGÓN C, MARTÍNEZ-PAÑEDA E. A simple and robust abaqus implementation of the phase field fracture method. Applications in Engineering Science, 2021, 6: 100050. ↩ WU J Y, HUANG Y, NGUYEN V P. On the BFGS monolithic algorithm for the unified phase field damage theory. Computer Methods in Applied Mechanics and Engineering, 2020, 360: 112704. WU J Y, HUANG Y. Comprehensive implementations of phase-field damage models in abaqus. Theoretical and Applied Fracture Mechanics, 2020, 106: 102440. ↩【项目】将Abaqus结果数据导入Matlab并计算J积分2021-07-23T00:00:00+08:002021-07-23T00:00:00+08:00https://lyk6756.github.io/2021/07/23/abq2mat_j_integral<h2 id="简介">简介</h2>
<p>该项目将Abaqus输入和结果文件读取到Matlab中,然后针对特定的二维算例计算J积分。两个算例分别计算了均匀板(HOMI)和功能梯度材料板(FGMII)的混合裂纹。算例的详细信息可参考如下文献,亦可在<a href="https://github.com/lyk6756/abq2mat_j-integral/tree/main/papers"><code class="language-plaintext highlighter-rouge">papers</code></a>文件夹中找到。</p>
<h2 id="项目代码">项目代码</h2>
<p><a href="https://github.com/lyk6756/abq2mat_j-integral">lyk6756/abq2mat_j-integral - GitHub</a></p>
<h2 id="参考文献">参考文献</h2>
<ul>
<li><a href="https://doi.org/10.1007/s11340-006-6416-6">Abanto-Bueno, J., Lambros, J. An Experimental Study of Mixed Mode Crack Initiation and Growth in Functionally Graded Materials. Exp Mech 46, 179–196 (2006).</a></li>
<li><a href="https://doi.org/10.1063/1.2896785">Alpay Oral, Jorge L. Abanto‐Bueno, John Lambros, and Gunay Anlas. Crack Initiation Angles in Functionally Graded Materials under Mixed Mode Loading. AIP Conference Proceedings 973, 248-253 (2008).</a></li>
<li><a href="https://doi.org/10.1115/1.2936238">Oral, A., Lambros, J., and Anlas, G. Crack Initiation in Functionally Graded Materials Under Mixed Mode Loading: Experiments and Simulations. ASME. J. Appl. Mech. September 2008; 75(5): 051110.</a></li>
<li><a href="https://doi.org/10.1007/s10999-014-9265-y">Martínez-Pañeda, E., Gallego, R. Numerical analysis of quasi-static fracture in functionally graded materials. Int J Mech Mater Des 11, 405–424 (2015).</a></li>
</ul>
<h2 id="使用步骤">使用步骤</h2>
<h3 id="步骤一在abaqus中建立模型">步骤一:在Abaqus中建立模型</h3>
<p>在文件夹<code class="language-plaintext highlighter-rouge">1.model</code>中,运行Abaqus脚本<code class="language-plaintext highlighter-rouge">myPlate_cps8_model.py</code>来建立有限元模型,并生成Abaqus输入文件(<code class="language-plaintext highlighter-rouge">.inp</code>)。</p>
<p>在提交作业前,修改输入文件的历史输出部分指令,加入如下代码来生成包含位移等信息的结果文件(<code class="language-plaintext highlighter-rouge">.fil</code>)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*FILE FORMAT, ASCII
*NODE FILE
U
</code></pre></div></div>
<p>如果计算的是非均匀材料板(<code class="language-plaintext highlighter-rouge">Example2.FGMII</code>),脚本会创建用户自定义材料,在提交作业时需要链接USDFLD用户子程序文件(<code class="language-plaintext highlighter-rouge">myUSDFLD_FGMII.for</code>)。此外,为了使得Abaqus能够计算非均匀材料的裂尖信息,需要在输入文件的材料定义部分添加如下代码:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1
All, 100
</code></pre></div></div>
<p>并在分析步中添加如下代码:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*FIELD, USER
All,
</code></pre></div></div>
<h3 id="步骤二abaqus至matlab">步骤二:Abaqus至Matlab</h3>
<p>将文件夹<code class="language-plaintext highlighter-rouge">1.model</code>中生成的输入文件(<code class="language-plaintext highlighter-rouge">.inp</code>)和结果文件(<code class="language-plaintext highlighter-rouge">.fil</code>)拷贝至文件夹<code class="language-plaintext highlighter-rouge">2.abq2mat</code>中。在文件夹<code class="language-plaintext highlighter-rouge">2.abq2mat</code>中,运行Matlab脚本<code class="language-plaintext highlighter-rouge">main_getdata.m</code>来获取模型信息。得到的模型信息将储存为Matlab数据文件(<code class="language-plaintext highlighter-rouge">.mat</code>)。</p>
<p><strong>注意</strong>脚本<code class="language-plaintext highlighter-rouge">main_getdata.m</code>中采用了小工具<a href="https://www.mathworks.com/matlabcentral/fileexchange/67437-abaqusmesh2matlab">abaqusMesh2Matlab</a>来读取Abaqus输入文件(<code class="language-plaintext highlighter-rouge">.inp</code>),采用了小工具<a href="http://www.abaqus2matlab.com/">Abaqus2Matlab V2.0</a><sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>来读取Abaqus结果文件(<code class="language-plaintext highlighter-rouge">.fil</code>)。运行<code class="language-plaintext highlighter-rouge">main_getdata.m</code>前应首先安装这两个小工具。相关安装文件可在<a href="https://github.com/lyk6756/abq2mat_j-integral/tree/main/gadgets/"><code class="language-plaintext highlighter-rouge">gadgets</code></a>文件夹中找到。</p>
<h3 id="步骤三在matlab中计算j积分">步骤三:在Matlab中计算<em>J</em>积分</h3>
<p>将文件夹<code class="language-plaintext highlighter-rouge">2.abq2mat</code>中生成的Matlab数据文件(<code class="language-plaintext highlighter-rouge">.mat</code>)拷贝至文件夹<code class="language-plaintext highlighter-rouge">3.J-int</code>中。在文件夹<code class="language-plaintext highlighter-rouge">3.J-int</code>中,运行Matlab脚本<code class="language-plaintext highlighter-rouge">main.m</code>来计算<em>J</em>积分及应力强度因子。结果将会输出在屏幕上,并写入文件中(<code class="language-plaintext highlighter-rouge">ResultsFromMat.csv</code>)。</p>
<p>积分程序中的部分代码来自于<a href="https://github.com/jfchessa/femlab">jfchessa/femlab - GitHub</a>。</p>
<hr />
<h2 id="introduction">Introduction</h2>
<p>This repository reads Abaqus input and result files to Matlab, then calculate the J-integral for specific 2D problems. Two examples calculate the mixed cracks of a homogeneous plate (HOMI) and functionally graded material plate (FGMII), respectively. The detailed information of the examples can be found in the following papers, which can also be found in the folder <a href="https://github.com/lyk6756/abq2mat_j-integral/tree/main/papers"><code class="language-plaintext highlighter-rouge">papers</code></a>.</p>
<h2 id="project-repository">Project repository</h2>
<p><a href="https://github.com/lyk6756/abq2mat_j-integral">lyk6756/abq2mat_j-integral - GitHub</a></p>
<h2 id="references">References</h2>
<ul>
<li><a href="https://doi.org/10.1007/s11340-006-6416-6">Abanto-Bueno, J., Lambros, J. An Experimental Study of Mixed Mode Crack Initiation and Growth in Functionally Graded Materials. Exp Mech 46, 179–196 (2006).</a></li>
<li><a href="https://doi.org/10.1063/1.2896785">Alpay Oral, Jorge L. Abanto‐Bueno, John Lambros, and Gunay Anlas. Crack Initiation Angles in Functionally Graded Materials under Mixed Mode Loading. AIP Conference Proceedings 973, 248-253 (2008).</a></li>
<li><a href="https://doi.org/10.1115/1.2936238">Oral, A., Lambros, J., and Anlas, G. Crack Initiation in Functionally Graded Materials Under Mixed Mode Loading: Experiments and Simulations. ASME. J. Appl. Mech. September 2008; 75(5): 051110.</a></li>
<li><a href="https://doi.org/10.1007/s10999-014-9265-y">Martínez-Pañeda, E., Gallego, R. Numerical analysis of quasi-static fracture in functionally graded materials. Int J Mech Mater Des 11, 405–424 (2015).</a></li>
</ul>
<h2 id="instructions">Instructions</h2>
<h3 id="step-1-modelling-in-abaqus">Step 1: Modelling in Abaqus</h3>
<p>In the folder <code class="language-plaintext highlighter-rouge">1.model</code>, run script <code class="language-plaintext highlighter-rouge">myPlate_cps8_model.py</code> in Abaqus/CAE to set up the FEM model and generate input job file (<code class="language-plaintext highlighter-rouge">.inp</code>).</p>
<p>Before submitting the job, modify the history output commands of the input file: add the following commands to generate a result file (<code class="language-plaintext highlighter-rouge">.fil</code>) containing displacement and other information:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*FILE FORMAT, ASCII
*NODE FILE
U
</code></pre></div></div>
<p>If a non-homogenerous plate is modeled (<code class="language-plaintext highlighter-rouge">Example2.FGMII</code>), the script will creat user-defined materials. And user subroutine USDFLD (<code class="language-plaintext highlighter-rouge">myUSDFLD_FGMII.for</code>) should be linked when submitting the job. To compute the <em>J</em>-integral and SIFs for non-homogenerous materials in Abaqus, following keywords should be added to MATERIALS module of the input file:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1
All, 100
</code></pre></div></div>
<p>Then, add following keywords in STEP module:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*FIELD, USER
All,
</code></pre></div></div>
<h3 id="step-2-abaqus-to-matlab">Step 2: Abaqus to Matlab</h3>
<p>Copy the input file (<code class="language-plaintext highlighter-rouge">.inp</code>) and result file (<code class="language-plaintext highlighter-rouge">.fil</code>) generated in the folder <code class="language-plaintext highlighter-rouge">1.model</code> to the folder <code class="language-plaintext highlighter-rouge">2.abq2mat</code>. In the folder <code class="language-plaintext highlighter-rouge">2.abq2mat</code>, run script <code class="language-plaintext highlighter-rouge">main_getdata.m</code> in Matlab to get the model information. The obtained model information will be stored as a Matlab data file (<code class="language-plaintext highlighter-rouge">.mat</code>).</p>
<p><strong>Note</strong> that inscript <code class="language-plaintext highlighter-rouge">main_getdata.m</code>, gadget <a href="https://www.mathworks.com/matlabcentral/fileexchange/67437-abaqusmesh2matlab">abaqusMesh2Matlab</a> is used to read the Abaqus input file (<code class="language-plaintext highlighter-rouge">.inp</code>), and <a href="http://www.abaqus2matlab.com/">Abaqus2Matlab V2.0</a><sup id="fnref:1:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> to Abaqus result file (<code class="language-plaintext highlighter-rouge">.fil</code>). These two gadgets should be installed before running <code class="language-plaintext highlighter-rouge">main_getdata.m</code>. The relevant files can be found in the folder <a href="https://github.com/lyk6756/abq2mat_j-integral/tree/main/gadgets/"><code class="language-plaintext highlighter-rouge">gadgets</code></a>.</p>
<h3 id="step-3-j-integral-in-matlab">Step 3: <em>J</em>-integral in Matlab</h3>
<p>Copy the Matlab data file (<code class="language-plaintext highlighter-rouge">.mat</code>) generated in the folder <code class="language-plaintext highlighter-rouge">2.abq2mat</code> to the folder <code class="language-plaintext highlighter-rouge">3.J-int</code>. In the folder <code class="language-plaintext highlighter-rouge">3.J-int</code>, run the Matlab script <code class="language-plaintext highlighter-rouge">main.m</code> to calculate the <em>J</em>-integrals and stress intensity factors. The results will be output on the screen, and write into the file (<code class="language-plaintext highlighter-rouge">ResultsFromMat.csv</code>).</p>
<p>Part of the code in this program comes from <a href="https://github.com/jfchessa/femlab">jfchessa/femlab-GitHub</a>.</p>
<hr />
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p><a href="https://doi.org/10.1016/j.advengsoft.2017.01.006">George Papazafeiropoulos, Miguel Muñiz-Calvente, Emilio Martínez-Pañeda. Abaqus2Matlab: A suitable tool for finite element post-processing. Advances in Engineering Software 105, 9-16 (2017)</a> / <a href="https://github.com/GeorgePapazafeiropoulos/Abaqus2Matlab">GeorgePapazafeiropoulos/Abaqus2Matlab - GitHub</a>. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a> <a href="#fnref:1:1" class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a></p>
</li>
</ol>
</div>李宇琨lyk6756@163.com简介 该项目将Abaqus输入和结果文件读取到Matlab中,然后针对特定的二维算例计算J积分。两个算例分别计算了均匀板(HOMI)和功能梯度材料板(FGMII)的混合裂纹。算例的详细信息可参考如下文献,亦可在papers文件夹中找到。 项目代码 lyk6756/abq2mat_j-integral - GitHub 参考文献 Abanto-Bueno, J., Lambros, J. An Experimental Study of Mixed Mode Crack Initiation and Growth in Functionally Graded Materials. Exp Mech 46, 179–196 (2006). Alpay Oral, Jorge L. Abanto‐Bueno, John Lambros, and Gunay Anlas. Crack Initiation Angles in Functionally Graded Materials under Mixed Mode Loading. AIP Conference Proceedings 973, 248-253 (2008). Oral, A., Lambros, J., and Anlas, G. Crack Initiation in Functionally Graded Materials Under Mixed Mode Loading: Experiments and Simulations. ASME. J. Appl. Mech. September 2008; 75(5): 051110. Martínez-Pañeda, E., Gallego, R. Numerical analysis of quasi-static fracture in functionally graded materials. Int J Mech Mater Des 11, 405–424 (2015). 使用步骤 步骤一:在Abaqus中建立模型 在文件夹1.model中,运行Abaqus脚本myPlate_cps8_model.py来建立有限元模型,并生成Abaqus输入文件(.inp)。 在提交作业前,修改输入文件的历史输出部分指令,加入如下代码来生成包含位移等信息的结果文件(.fil) *FILE FORMAT, ASCII *NODE FILE U 如果计算的是非均匀材料板(Example2.FGMII),脚本会创建用户自定义材料,在提交作业时需要链接USDFLD用户子程序文件(myUSDFLD_FGMII.for)。此外,为了使得Abaqus能够计算非均匀材料的裂尖信息,需要在输入文件的材料定义部分添加如下代码: *INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1 All, 100 并在分析步中添加如下代码: *FIELD, USER All, 步骤二:Abaqus至Matlab 将文件夹1.model中生成的输入文件(.inp)和结果文件(.fil)拷贝至文件夹2.abq2mat中。在文件夹2.abq2mat中,运行Matlab脚本main_getdata.m来获取模型信息。得到的模型信息将储存为Matlab数据文件(.mat)。 注意脚本main_getdata.m中采用了小工具abaqusMesh2Matlab来读取Abaqus输入文件(.inp),采用了小工具Abaqus2Matlab V2.01来读取Abaqus结果文件(.fil)。运行main_getdata.m前应首先安装这两个小工具。相关安装文件可在gadgets文件夹中找到。 步骤三:在Matlab中计算J积分 将文件夹2.abq2mat中生成的Matlab数据文件(.mat)拷贝至文件夹3.J-int中。在文件夹3.J-int中,运行Matlab脚本main.m来计算J积分及应力强度因子。结果将会输出在屏幕上,并写入文件中(ResultsFromMat.csv)。 积分程序中的部分代码来自于jfchessa/femlab - GitHub。 Introduction This repository reads Abaqus input and result files to Matlab, then calculate the J-integral for specific 2D problems. Two examples calculate the mixed cracks of a homogeneous plate (HOMI) and functionally graded material plate (FGMII), respectively. The detailed information of the examples can be found in the following papers, which can also be found in the folder papers. Project repository lyk6756/abq2mat_j-integral - GitHub References Abanto-Bueno, J., Lambros, J. An Experimental Study of Mixed Mode Crack Initiation and Growth in Functionally Graded Materials. Exp Mech 46, 179–196 (2006). Alpay Oral, Jorge L. Abanto‐Bueno, John Lambros, and Gunay Anlas. Crack Initiation Angles in Functionally Graded Materials under Mixed Mode Loading. AIP Conference Proceedings 973, 248-253 (2008). Oral, A., Lambros, J., and Anlas, G. Crack Initiation in Functionally Graded Materials Under Mixed Mode Loading: Experiments and Simulations. ASME. J. Appl. Mech. September 2008; 75(5): 051110. Martínez-Pañeda, E., Gallego, R. Numerical analysis of quasi-static fracture in functionally graded materials. Int J Mech Mater Des 11, 405–424 (2015). Instructions Step 1: Modelling in Abaqus In the folder 1.model, run script myPlate_cps8_model.py in Abaqus/CAE to set up the FEM model and generate input job file (.inp). Before submitting the job, modify the history output commands of the input file: add the following commands to generate a result file (.fil) containing displacement and other information: *FILE FORMAT, ASCII *NODE FILE U If a non-homogenerous plate is modeled (Example2.FGMII), the script will creat user-defined materials. And user subroutine USDFLD (myUSDFLD_FGMII.for) should be linked when submitting the job. To compute the J-integral and SIFs for non-homogenerous materials in Abaqus, following keywords should be added to MATERIALS module of the input file: *INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1 All, 100 Then, add following keywords in STEP module: *FIELD, USER All, Step 2: Abaqus to Matlab Copy the input file (.inp) and result file (.fil) generated in the folder 1.model to the folder 2.abq2mat. In the folder 2.abq2mat, run script main_getdata.m in Matlab to get the model information. The obtained model information will be stored as a Matlab data file (.mat). Note that inscript main_getdata.m, gadget abaqusMesh2Matlab is used to read the Abaqus input file (.inp), and Abaqus2Matlab V2.01 to Abaqus result file (.fil). These two gadgets should be installed before running main_getdata.m. The relevant files can be found in the folder gadgets. Step 3: J-integral in Matlab Copy the Matlab data file (.mat) generated in the folder 2.abq2mat to the folder 3.J-int. In the folder 3.J-int, run the Matlab script main.m to calculate the J-integrals and stress intensity factors. The results will be output on the screen, and write into the file (ResultsFromMat.csv). Part of the code in this program comes from jfchessa/femlab-GitHub. George Papazafeiropoulos, Miguel Muñiz-Calvente, Emilio Martínez-Pañeda. Abaqus2Matlab: A suitable tool for finite element post-processing. Advances in Engineering Software 105, 9-16 (2017) / GeorgePapazafeiropoulos/Abaqus2Matlab - GitHub. ↩ ↩2安装ABAQUS官方培训课程示例文件2021-07-11T00:00:00+08:002021-07-11T00:00:00+08:00https://lyk6756.github.io/2021/07/11/ABAQUS_install_course<p>ABAQUS的官方培训课程中包含了较多的演示及研讨实例(Workshops),所有的实例都提供了示例文件,包括脚本文件(<code class="language-plaintext highlighter-rouge">.py</code>)、输入文件(<code class="language-plaintext highlighter-rouge">.inp</code>)、子程序文件(<code class="language-plaintext highlighter-rouge">.for</code>)等。ABAQUS提供了两种安装方式:图形界面安装和命令行界面安装。</p>
<h2 id="通过-abaquscae-安装">通过 Abaqus/CAE 安装</h2>
<p>将用于安装的文件<code class="language-plaintext highlighter-rouge">samples.zip</code>解压缩后,打开Abaqus/CAE并在菜单栏选择:<code class="language-plaintext highlighter-rouge">Plug-ins</code> -> <code class="language-plaintext highlighter-rouge">Tools</code> -> <code class="language-plaintext highlighter-rouge">Install Courses</code>。</p>
<p><img src="https://dm2305files.storage.live.com/y4maxYLDzszUkH3t9gX2Y9v2Spm92HCdCu1PMZuJhHzE6cN0wM_iU-SyXgGTsN8Jp4GbAXfVeQe4O5_FAXPrREfXoJ_2sy1KFuJvsfl9wLJPkua-XQHxwd6V66jtlFzkyDqPinp-FuTIByo3BpE7AdbUXkM2sInwrdjgMMwM_e4WbC27NCI15EpjPtjRazGYD-R?width=427&height=266&cropmode=none" alt="Install Courses Menu" /></p>
<p>在弹出的<code class="language-plaintext highlighter-rouge">Install Courses</code>对话框中,选择示例文件需要安装的文件目录,选择需要安装的课程名称,并点击<code class="language-plaintext highlighter-rouge">OK</code>`。</p>
<p><img src="https://dm2305files.storage.live.com/y4mCRN_oeUlY_BMfD2vTQqZZPcF-ktQi6uQ7ti9IDYLOkGLhTPcb8mrH5YBjoLrQ5iLdb3ZZZjxxPVcQ4-sSGUu_axVsDog_RcphJjUjxoY4GEIG2WNC8fcncHoDDuVL5qmo3kWrOG4wNRovwyZrCAFH4WvdtnN9hYTidi03Z9Q480oe4ufyIzamXBaUR9FJHm7?width=401&height=411&cropmode=none" alt="Install Courses Dialog Box" /></p>
<h2 id="通过命令行界面安装">通过命令行界面安装</h2>
<p>首选需要获取Abaqus的安装路径,可以在命令行窗口输入以下命令来查询:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abqXXX whereami
</code></pre></div></div>
<p>其中<code class="language-plaintext highlighter-rouge">abqXXX</code>根据所安装的版本会有不同的名称。</p>
<p>接下来,从安装的压缩包源文件中提取示例文件:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abqXXX perl abaqus_dir/SMA/samples/course_setup.pl
</code></pre></div></div>
<p>其中的<code class="language-plaintext highlighter-rouge">abaqus_dir</code>表示Abaqus的安装路径。</p>
<p>该脚本会将文件安装到当前工作目录中。系统会请求你验证并选择需要安装的文件。出现提示时,按<code class="language-plaintext highlighter-rouge">y</code>来选择相应的课程文件。在完成需要的选择后,按<code class="language-plaintext highlighter-rouge">q</code>来跳过剩余的课程文件并继续安装。</p>
<h3 id="安装源文件">安装源文件</h3>
<p>用于安装的压缩包源文件<code class="language-plaintext highlighter-rouge">samples.zip</code>,其默认的路径为<code class="language-plaintext highlighter-rouge">abaqus_dir/SMA/samples/job_archive/samples.zip</code>。</p>李宇琨lyk6756@163.comABAQUS的官方培训课程中包含了较多的演示及研讨实例(Workshops),所有的实例都提供了示例文件,包括脚本文件(.py)、输入文件(.inp)、子程序文件(.for)等。ABAQUS提供了两种安装方式:图形界面安装和命令行界面安装。 通过 Abaqus/CAE 安装 将用于安装的文件samples.zip解压缩后,打开Abaqus/CAE并在菜单栏选择:Plug-ins -> Tools -> Install Courses。 在弹出的Install Courses对话框中,选择示例文件需要安装的文件目录,选择需要安装的课程名称,并点击OK`。 通过命令行界面安装 首选需要获取Abaqus的安装路径,可以在命令行窗口输入以下命令来查询: abqXXX whereami 其中abqXXX根据所安装的版本会有不同的名称。 接下来,从安装的压缩包源文件中提取示例文件: abqXXX perl abaqus_dir/SMA/samples/course_setup.pl 其中的abaqus_dir表示Abaqus的安装路径。 该脚本会将文件安装到当前工作目录中。系统会请求你验证并选择需要安装的文件。出现提示时,按y来选择相应的课程文件。在完成需要的选择后,按q来跳过剩余的课程文件并继续安装。 安装源文件 用于安装的压缩包源文件samples.zip,其默认的路径为abaqus_dir/SMA/samples/job_archive/samples.zip。为Abaqus中的状态变量(SDV)自定义关键字2020-08-17T00:00:00+08:002020-08-17T00:00:00+08:00https://lyk6756.github.io/2020/08/17/define_sdv<p>Abaqus子程序中常见的状态变量(Solution-Dependent state Variables, SDV),常见于UMAT、VUMAT、USDFLD、VUSDFLD等子程序中。其默认输出形式为<code class="language-plaintext highlighter-rouge">SDVn</code>,其中的n表示状态变量的顺序。其个数在<code class="language-plaintext highlighter-rouge">.inp</code>作业文件中由关键字<code class="language-plaintext highlighter-rouge">*Depvar</code>声明:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*Depvar
4
</code></pre></div></div>
<p>上述语句声明了4个状态变量,可在后处理中找到他们,分别是<code class="language-plaintext highlighter-rouge">SDV1</code>至<code class="language-plaintext highlighter-rouge">SDV4</code>。</p>
<p>为了能够在状态变量较多时更好地区分各个状态变量代表的含义,可在以上声明语句之后继续定义各个变量的关键字及其描述:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*Depvar
4
1, DFT, "fiber tensile damage"
2, DFC, "fiber compressive damage"
3, DMT, "matrix tensile damage"
4, DMC, "matrix compressive damage"
</code></pre></div></div>
<p>更一般的语法为:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>*Depvar
<number>
<index>, <label>, <description>
</code></pre></div></div>
<p>其中,</p>
<ul>
<li>
<p><code class="language-plaintext highlighter-rouge"><number></code>声明了状态变量的个数。</p>
</li>
<li>
<p><code class="language-plaintext highlighter-rouge"><index></code>表明定义输出关键字及描述的状态变量索引序号,对于第一个状态变量,该值为1。</p>
</li>
<li>
<p><code class="language-plaintext highlighter-rouge"><label></code>定义了状态变量的输出关键字,其命名需要满足:最多可包含80个字符;除非用引号引起来,否则标签内的所有空格都将被忽略;未用引号引起来的必须以字母开头,且不得包含句号(.);不得包含逗号和等号等字符。此外,不能以双下划线开头和结尾(例如<code class="language-plaintext highlighter-rouge">__STEEL__</code>),此标签格式保留供Abaqus内部使用。更详细的名称规范可参见<a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEMODRefMap/simamod-c-inputsyntax.htm">Input Syntax Rules</a>。<strong>特别的,大小写将会被保留。</strong></p>
</li>
<li>
<p><code class="language-plaintext highlighter-rouge"><description></code>给出了输出变量的描述,一般用引号引起来。其命名规则需满足<a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEMODRefMap/simamod-c-inputsyntax.htm">Input Syntax Rules</a>中规定的labels。</p>
</li>
</ul>
<p>最终在Abaqus/Viewer中看到的效果为:<code class="language-plaintext highlighter-rouge">SDV_<label></code>。以上述为例,最终显示为<code class="language-plaintext highlighter-rouge">SDV_DFC</code>、<code class="language-plaintext highlighter-rouge">SDV_DFT</code>、<code class="language-plaintext highlighter-rouge">SDV_DMC</code>和<code class="language-plaintext highlighter-rouge">SDV_DMT</code>。</p>
<hr />
<h2 id="延伸阅读">延伸阅读</h2>
<ul>
<li>
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKEYRefMap/simakey-r-depvar.htm">*DEPVAR - abaqus-docs.mit.edu › simakey-r-depvar</a></p>
</li>
<li>
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEMODRefMap/simamod-c-inputsyntax.htm">Input Syntax Rules - abaqus-docs.mit.edu › simamod-c-inputsyntax</a></p>
</li>
</ul>李宇琨lyk6756@163.comAbaqus子程序中常见的状态变量(Solution-Dependent state Variables, SDV),常见于UMAT、VUMAT、USDFLD、VUSDFLD等子程序中。其默认输出形式为SDVn,其中的n表示状态变量的顺序。其个数在.inp作业文件中由关键字*Depvar声明: *Depvar 4 上述语句声明了4个状态变量,可在后处理中找到他们,分别是SDV1至SDV4。 为了能够在状态变量较多时更好地区分各个状态变量代表的含义,可在以上声明语句之后继续定义各个变量的关键字及其描述: *Depvar 4 1, DFT, "fiber tensile damage" 2, DFC, "fiber compressive damage" 3, DMT, "matrix tensile damage" 4, DMC, "matrix compressive damage" 更一般的语法为: *Depvar <number> <index>, <label>, <description> 其中, <number>声明了状态变量的个数。 <index>表明定义输出关键字及描述的状态变量索引序号,对于第一个状态变量,该值为1。 <label>定义了状态变量的输出关键字,其命名需要满足:最多可包含80个字符;除非用引号引起来,否则标签内的所有空格都将被忽略;未用引号引起来的必须以字母开头,且不得包含句号(.);不得包含逗号和等号等字符。此外,不能以双下划线开头和结尾(例如__STEEL__),此标签格式保留供Abaqus内部使用。更详细的名称规范可参见Input Syntax Rules。特别的,大小写将会被保留。 <description>给出了输出变量的描述,一般用引号引起来。其命名规则需满足Input Syntax Rules中规定的labels。 最终在Abaqus/Viewer中看到的效果为:SDV_<label>。以上述为例,最终显示为SDV_DFC、SDV_DFT、SDV_DMC和SDV_DMT。 延伸阅读 *DEPVAR - abaqus-docs.mit.edu › simakey-r-depvar Input Syntax Rules - abaqus-docs.mit.edu › simamod-c-inputsyntax在CentOS上安装ABAQUS 2019并搭建子程序开发环境2020-08-13T00:00:00+08:002020-08-13T00:00:00+08:00https://lyk6756.github.io/2020/08/13/install_abaqus2019_on_centos<h2 id="系列文章">系列文章</h2>
<ul>
<li><a href="https://lyk6756.github.io/2020/08/01/ABAQUS_obj.html">在命令行窗口中运行ABAQUS</a></li>
<li><a href="https://lyk6756.github.io/2017/12/12/Link_Abaqus_with_Fortran.html">在Win10下搭建Abaqus子程序开发环境</a></li>
<li><a href="https://lyk6756.github.io/2016/11/18/install_abaqus2016_on_linux.html">Install Abaqus2016 on Linux (Ubuntu 16.04 64bit)</a></li>
</ul>
<h2 id="部署平台">部署平台</h2>
<ul>
<li>
<p>CentOS Linux release 7.8.2003</p>
</li>
<li>
<p>ABAQUS 2019</p>
</li>
<li>
<p>Intel Parallel Studio XE 2019</p>
</li>
</ul>
<h2 id="安装前的准备">安装前的准备</h2>
<p>首先,对系统中已安装的软件包进行更新:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yum update
<span class="nb">sudo </span>yum upgrade
</code></pre></div></div>
<p>然后进行必要环境的安装:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yum <span class="nb">install </span>ksh
<span class="nb">sudo </span>yum <span class="nb">install </span>redhat-lsb
<span class="nb">sudo </span>yum <span class="nb">install </span>gcc
<span class="nb">sudo </span>yum <span class="nb">install </span>gcc-c++
<span class="nb">sudo </span>yum <span class="nb">install </span>gcc-gfortran
<span class="nb">sudo </span>yum <span class="nb">install </span>openmotif
</code></pre></div></div>
<h2 id="安装证书服务器">安装证书服务器</h2>
<p>破解文件的目录如下:</p>
<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Crack
├── SSQ_UniversalLicenseServer_Core_<release-date>.zip
│ └── SolidSQUAD_License_Servers
│ └── ...
├── SSQ_UniversalLicenseServer_Module_DSSimulia_<release-date>.zip
│ └── Vendors
│ └── DSSimulia
│ └── ...
└──Readme.txt
</code></pre></div></div>
<p>如果从未安装过SolidSQUAD License Server:</p>
<ul>
<li>
<p>将<code class="language-plaintext highlighter-rouge">SSQ_UniversalLicenseServer_Core_<release-date>.zip</code>中的<code class="language-plaintext highlighter-rouge">SolidSQUAD_License_Servers</code>文件夹解压至目标文件夹,例如<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SolidSQUAD_License_Servers</code>;</p>
</li>
<li>
<p>将<code class="language-plaintext highlighter-rouge">SSQ_UniversalLicenseServer_Module_DSSimulia_<release-date>.zip</code>中的<code class="language-plaintext highlighter-rouge">Vendors</code>文件夹解压至刚才的<code class="language-plaintext highlighter-rouge">SolidSQUAD_License_Servers</code>文件夹中;</p>
</li>
<li>
<p>运行 <code class="language-plaintext highlighter-rouge">SolidSQUAD_License_Servers</code>文件夹中的<code class="language-plaintext highlighter-rouge">install_or_update.sh</code>,等待脚本完成;</p>
</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>ksh ./install_or_update.sh
</code></pre></div></div>
<h3 id="troubleshooting">Troubleshooting</h3>
<h4 id="运行install_or_updatesh时报错">运行<code class="language-plaintext highlighter-rouge">install_or_update.sh</code>时报错</h4>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>...
Cannot find a <span class="nb">source </span><span class="k">for </span>symlink to /lib/ld-lsb.so.3! Exiting...
</code></pre></div></div>
<p>使用<code class="language-plaintext highlighter-rouge">yum provides</code>命令查找缺失的库文件:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yum provides /lib/ld-lsb.so.3
</code></pre></div></div>
<p>返回:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>...
redhat-lsb-core-4.1-47.el8.i686 : LSB Core module support
Repo : AppStream
Matched from:
Filename : /lib/ld-lsb.so.3
</code></pre></div></div>
<p>安装缺失的库文件:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yum <span class="nb">install </span>redhat-lsb-core
</code></pre></div></div>
<h4 id="运行install_or_updatesh时系统日志journalctl--xe报错">运行<code class="language-plaintext highlighter-rouge">install_or_update.sh</code>时系统日志<code class="language-plaintext highlighter-rouge">journalctl -xe</code>报错</h4>
<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SELinux is preventing (lmgrd) from execute access on the file lmgrd.
...
</code></pre></div></div>
<p>SELinux系统是强制访问控制(MAC)安全系统,它拒绝了证书服务器的运行。<code class="language-plaintext highlighter-rouge">getenforce</code>命令用于查看SELinux运行状态;<code class="language-plaintext highlighter-rouge">setenforce 0</code>命令用于临时关闭SELinux,重启后失效;永久关闭SELinux,需要修改其配置文件<code class="language-plaintext highlighter-rouge">/etc/selinux/config</code>,将<code class="language-plaintext highlighter-rouge">SELINUX=enforcing</code>改为<code class="language-plaintext highlighter-rouge">SELINUX=disabled</code>,保存后退出,并重启系统。</p>
<h2 id="运行abaqus安装程序">运行Abaqus安装程序</h2>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>ksh 1/StartGUI.sh
</code></pre></div></div>
<p>选择需要安装的组件:</p>
<ul>
<li>Extended Product Documentation</li>
<li>Abaqus Simulation Services</li>
<li>Abaqus Simulation Services CAA API</li>
<li>Abaqus/CAE</li>
<li>fe-safe</li>
<li>Tosca</li>
<li>Isight</li>
</ul>
<p><strong>注意</strong>:<em>不要</em>安装自带的FLEXnet License Server</p>
<p>在安装Abaqus/CAE时,
Extended Product Documentation的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA2019doc</code></p>
<p>Abaqus Simulation Services及Abaqus Simulation Services CAA API的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SimulationServices/V6R2019x</code></p>
<p>Abaqus/CAE的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/CAE/2019</code></p>
<p>CAE Commands的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/Commands</code></p>
<p>CAE external plugins的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/CAE/plugins/2019</code></p>
<p>fe-safe的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/fe-safe/2019</code></p>
<p>Tosca的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/Tosca/2019</code></p>
<p>Isight的安装目录:<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SIMULIA/Isight/2019</code></p>
<h3 id="troubleshooting-1">Troubleshooting</h3>
<h4 id="ubuntu等linux发行版无法直接运行安装程序">Ubuntu等Linux发行版无法直接运行安装程序</h4>
<p>由于ABAQUS默认只支持一下几种Linux发行版:Red Hat Enterprise Linux,Centos和SuSE Linux Enterprise Server。因此首先我们需要使安装程序绕过系统监测:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">export </span>DSYAuthOS_<span class="sb">`</span>lsb_release <span class="nt">-si</span><span class="sb">`</span><span class="o">=</span>1
<span class="nb">export </span><span class="nv">DSY_Force_OS</span><span class="o">=</span>linux_a64
<span class="nb">export </span><span class="nv">NOLICENSECHECK</span><span class="o">=</span><span class="nb">true</span>
</code></pre></div></div>
<p>然后运行图形安装界面:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ksh 1/StartGUI.sh
</code></pre></div></div>
<p>或直接运行命令:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd</span> <mounted CD folder>/1/
<span class="nb">export </span>DSYAuthOS_<span class="sb">`</span>lsb_release <span class="nt">-si</span><span class="sb">`</span><span class="o">=</span>1 <span class="o">&&</span> <span class="nb">export </span><span class="nv">DSY_Force_OS</span><span class="o">=</span>linux_a64 <span class="o">&&</span> ksh ./StartGUI.sh
</code></pre></div></div>
<p>参考:</p>
<ul>
<li><a href="https://github.com/Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu">Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu: Abaqus 2018 Installation Instructions for Ubuntu 18.04</a></li>
</ul>
<h4 id="运行startguish时报错">运行<code class="language-plaintext highlighter-rouge">StartGUI.sh</code>时报错</h4>
<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>...
error while loading shared libraries: libz.so ...
</code></pre></div></div>
<p>安装包<code class="language-plaintext highlighter-rouge">zlib</code>中提供依赖的库文件<code class="language-plaintext highlighter-rouge">libz.so.1</code>,安装命令:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yum <span class="nb">install </span>zlib
</code></pre></div></div>
<p>然后分别将目录<code class="language-plaintext highlighter-rouge">/usr/lib/</code>及<code class="language-plaintext highlighter-rouge">/usr/lib64/</code>下的库文件<code class="language-plaintext highlighter-rouge">libz.so.1</code>复制并重命名为<code class="language-plaintext highlighter-rouge">libz.so</code>:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cp </span>libz.so.1 libz.so
</code></pre></div></div>
<h4 id="安装abaquscae时在选择证书服务器license-server-configuration为simulia-flexnet后点击下一步时报错">安装ABAQUS/CAE时,在选择证书服务器(License Server Configuration)为SIMULIA FLEXnet后点击下一步时报错</h4>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Stdout:
Stderr: unzip: loadlocale.c:130: _nl_intern_locale_data: Assertion <span class="sb">`</span>cnt < <span class="o">(</span>sizeof <span class="o">(</span>_nl_value_type_LC_TIME<span class="o">)</span> / sizeof <span class="o">(</span>_nl_value_type_LC_TIME[0]<span class="o">))</span><span class="s1">' failed.
Action LaunchAppAction from feature CODE\linux_a64\SMATocLicPanel failed.
Action ID: unzip_siteIDandDslsStat
</span></code></pre></div></div>
<p>可以在安装中跳过证书设置,这并不影响软件的安装。在完成安装之后,将<code class="language-plaintext highlighter-rouge">/opt/DassaultSystemes/SimulationServices/V6R2019x/linux_a64/SMA/site/custom_v6.env</code>中的</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">license_server_type</span><span class="o">=</span><span class="n">DSLS</span>
<span class="n">dsls_license_config</span><span class="o">=</span><span class="s">"/var/DassaultSystemes/Licenses/DSLicSrv.txt"</span>
</code></pre></div></div>
<p>改为</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">license_server_type</span><span class="o">=</span><span class="n">FLEXNET</span>
<span class="n">abaquslm_license_file</span><span class="o">=</span><span class="s">"27800@localhost"</span>
<span class="c1"># license_server_type=DSLS
# dsls_license_config="/var/DassaultSystemes/Licenses/DSLicSrv.txt"
</span></code></pre></div></div>
<p>可以使用以下指令来查看证书状态:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/opt/DassaultSystemes/SIMULIA/Commands/abaqus licensing ru
</code></pre></div></div>
<p>参考:<a href="https://github.com/Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu/issues/2">Error during installation · Issue #2 · Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu</a></p>
<h2 id="安装intel-fortran编译器">安装Intel Fortran编译器</h2>
<p>Intel Parallel Studio XE 2019支持的操作系统有:</p>
<ul>
<li>CentOS* 6 (Intel(R) 64), 7 (Intel(R) 64)</li>
<li>Debian* 8 (Intel(R) 64), 9 (Intel(R) 64)</li>
<li>Fedora* 27 (Intel(R) 64), 28 (Intel(R) 64)</li>
<li>Red Hat Enterprise Linux* 6 (Intel(R) 64), 7 (Intel(R) 64)</li>
<li>SUSE Linux Enterprise Server* 12 (Intel(R) 64), 15 (Intel(R) 64)</li>
<li>Ubuntu* 16.04 (Intel(R) 64), 18.04 (Intel(R) 64)</li>
</ul>
<p>安装目录:<code class="language-plaintext highlighter-rouge">/opt/intel</code></p>
<p>安装文件会提示需要安装以下32位的共享库文件:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>yum <span class="nb">install </span>libstdc++.i686
<span class="nb">sudo </span>yum <span class="nb">install </span>glibc glibc.i686
<span class="nb">sudo </span>yum <span class="nb">install </span>libgcc libgcc.i686
</code></pre></div></div>
<p>安装完成后,还需要使用其提供的脚本进行环境设置,在<code class="language-plaintext highlighter-rouge">~/.bashrc</code>中添加:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">source</span> <install_dir>/bin/compilervars.sh intel64
<span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/opt/intel/bin
</code></pre></div></div>
<p>重启命令行后就可以在任意目录下使用<code class="language-plaintext highlighter-rouge">ifort -v</code>查看intel fortran编译器的版本了。</p>
<p>使用<code class="language-plaintext highlighter-rouge">whereis ifort</code>指令可以查看其所在位置,默认路径为<code class="language-plaintext highlighter-rouge">/opt/intel/bin/ifort</code>。</p>
<h2 id="配置abaqus运行环境">配置Abaqus运行环境</h2>
<h3 id="运行abaquscae">运行Abaqus/CAE</h3>
<p>当系统开机或重启后,证书服务器将会自动启动。手动重启服务器:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>ksh /opt/DassaultSystemes/SolidSQUAD_License_Servers/install_or_update.sh
</code></pre></div></div>
<p>以管理员身份使用以下命令来启动Abaqus/CAE:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/opt/DassaultSystemes/SIMULIA/Commands/abaqus cae
</code></pre></div></div>
<p>或</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/opt/DassaultSystemes/SIMULIA/Commands/abq2016 cae
</code></pre></div></div>
<p>如果出现图形渲染问题,可以在启动指令后添加<code class="language-plaintext highlighter-rouge">-mesa</code>来禁止硬件图形加速渲染,参考:<a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEILGRefMap/simailg-c-viewcusthardware.htm">Hardware acceleration (all platforms)</a></p>
<p>如果出现CAE窗口透明的情况,可以在启动指令前添加<code class="language-plaintext highlighter-rouge">XLIB_SKIP_ARGB_VISUALS=1</code>。</p>
<p>打开CAE后,需要更改工作目录到/home下的任意路径。放置在/home下的文件才能够在普通权限下进行读写,如果没有更改工作路径,ABAQUS会报错sim文件不存在等问题,无法进行计算。</p>
<p>使用以下指令设置默认的工作目录:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">export </span><span class="nv">TMPDIR</span><span class="o">=</span>~/temp
</code></pre></div></div>
<h3 id="创建快捷方式">创建快捷方式</h3>
<p>使用以下几种方式中的任意一种来使<code class="language-plaintext highlighter-rouge">abaqus</code>指令得到全局访问:</p>
<ul>
<li>修改<code class="language-plaintext highlighter-rouge">~/.bashrc</code>,使用<code class="language-plaintext highlighter-rouge">export</code>将命令所在目录加入环境变量:</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/opt/DassaultSystemes/SIMULIA/Commands
</code></pre></div></div>
<ul>
<li>修改<code class="language-plaintext highlighter-rouge">~/.bashrc</code>,使用<code class="language-plaintext highlighter-rouge">alias</code>添加简化指令:</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">alias </span><span class="nv">abaqus</span><span class="o">=</span><span class="s1">'/opt/DassaultSystemes/SIMULIA/Commands/abaqus'</span>
</code></pre></div></div>
<ul>
<li>在<code class="language-plaintext highlighter-rouge">/usr/bin/</code>中创建同步链接:</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo ln</span> /opt/DassaultSystemes/SIMULIA/Commands/abaqus /usr/bin/abaqus
</code></pre></div></div>
<h3 id="连接intel-fortran编译器">连接Intel Fortran编译器</h3>
<p>修改<code class="language-plaintext highlighter-rouge">~/.bashrc</code>,添加Intel Fortran共享库的路径:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">export </span><span class="nv">LD_LIBRAY_PATH</span><span class="o">=</span><span class="nv">$LD_LIBRAY_PATH</span>:/opt/intel/compilers_and_libraries/linux/lib/intel64
</code></pre></div></div>
<p>综上,只需在<code class="language-plaintext highlighter-rouge">~/.bashrc</code>文件中增加如下内容,即可完成对Intel Fortran编译器和Abaqus运行环境的设置:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># User specific aliases and functions</span>
<span class="c"># ifort env. config.</span>
<span class="nb">source</span> /opt/intel/bin/compilervars.sh intel64
<span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/opt/intel/bin
<span class="c"># abaqus env. config.</span>
<span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/opt/DassaultSystemes/SIMULIA/Commands <span class="c"># global access to abaqus commands</span>
<span class="nb">export </span><span class="nv">LD_LIBRAY_PATH</span><span class="o">=</span><span class="nv">$LD_LIBRAY_PATH</span>:/opt/intel/compilers_and_libraries/linux/lib/intel64 <span class="c"># link shared libraries</span>
</code></pre></div></div>
<p>重启命令行后,使用以下指令来测试编译器的运行情况:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus <span class="nv">info</span><span class="o">=</span>system
abaqus verify <span class="nt">-user_std</span>
</code></pre></div></div>
<p>参考:</p>
<ul>
<li><a href="http://home.iitk.ac.in/~saiwal/engineering/intel-abaqus/">Linking Intel fortran compiler to ABAQUS and using UMAT - Saiwal’s HomePage</a></li>
<li><a href="https://imechanica.org/node/13804">Linking Abaqus/Fortran for running subroutine in UBUNTU (linux)-Abaqus GUI Graphical issue(Transparent-/transluscent) - iMechanica</a></li>
<li><a href="https://stackoverflow.com/questions/44133632/how-to-link-fortran-with-abaqus-cae-6-14-in-redhat-linux-terminal">how to link Fortran with Abaqus CAE 6.14 in Redhat linux terminal? - Stack Overflow</a></li>
</ul>
<hr />
<h2 id="延伸阅读">延伸阅读</h2>
<ul>
<li>
<p><a href="https://1drv.ms/b/s!Alob-1bHMoykm0VL_XlPEyE9rk2D?e=cD6RI3">Simulia Established Products 2019 Installation Guide</a></p>
</li>
<li><a href="https://github.com/Solid-Mechanics/Install-ABAQUS-on-Ubuntu">Solid-Mechanics/Install-ABAQUS-on-Ubuntu: Install ABAQUS 6.14-5 on Ubuntu 16.04 64bit</a></li>
<li>
<p><a href="https://github.com/imirzov/Install-Abaqus-2019-on-Ubuntu-18.04-LTS">imirzov/Install-Abaqus-2019-on-Ubuntu-18.04-LTS: Instruction manual to install Abaqus 2019 on Ubuntu 18.04 LTS</a></p>
</li>
<li><a href="http://coquake.eu/wp-content/uploads/2019/02/Abaqus18_on_Ubuntu18.04LTS.pdf">ABAQUS 2018 and Fortran Compilers on Ubuntu 18.04LTS - PDF</a></li>
<li>
<p><a href="http://home.iitk.ac.in/~saiwal/engineering/abaqus2016-2017-gfortran-compiler/">Using gfortran compiler for user subroutines in ABAQUS 2016/2017 - Saiwal’s HomePage</a></p>
</li>
<li><a href="http://home.iitk.ac.in/~saiwal/engineering/useful-commands-tips-for-using-abaqus-over-command-line-in-linux/">Useful commands, tips for using ABAQUS over command-line in linux - Saiwal’s HomePage</a></li>
<li><a href="http://www-h.eng.cam.ac.uk/help/programs/fe/abaqus/faq68/abaqusf2.html#Introductions">The ABAQUS FAQ</a></li>
</ul>李宇琨lyk6756@163.com系列文章 在命令行窗口中运行ABAQUS 在Win10下搭建Abaqus子程序开发环境 Install Abaqus2016 on Linux (Ubuntu 16.04 64bit) 部署平台 CentOS Linux release 7.8.2003 ABAQUS 2019 Intel Parallel Studio XE 2019 安装前的准备 首先,对系统中已安装的软件包进行更新: sudo yum update sudo yum upgrade 然后进行必要环境的安装: sudo yum install ksh sudo yum install redhat-lsb sudo yum install gcc sudo yum install gcc-c++ sudo yum install gcc-gfortran sudo yum install openmotif 安装证书服务器 破解文件的目录如下: Crack ├── SSQ_UniversalLicenseServer_Core_<release-date>.zip │ └── SolidSQUAD_License_Servers │ └── ... ├── SSQ_UniversalLicenseServer_Module_DSSimulia_<release-date>.zip │ └── Vendors │ └── DSSimulia │ └── ... └──Readme.txt 如果从未安装过SolidSQUAD License Server: 将SSQ_UniversalLicenseServer_Core_<release-date>.zip中的SolidSQUAD_License_Servers文件夹解压至目标文件夹,例如/opt/DassaultSystemes/SolidSQUAD_License_Servers; 将SSQ_UniversalLicenseServer_Module_DSSimulia_<release-date>.zip中的Vendors文件夹解压至刚才的SolidSQUAD_License_Servers文件夹中; 运行 SolidSQUAD_License_Servers文件夹中的install_or_update.sh,等待脚本完成; sudo ksh ./install_or_update.sh Troubleshooting 运行install_or_update.sh时报错 ... Cannot find a source for symlink to /lib/ld-lsb.so.3! Exiting... 使用yum provides命令查找缺失的库文件: yum provides /lib/ld-lsb.so.3 返回: ... redhat-lsb-core-4.1-47.el8.i686 : LSB Core module support Repo : AppStream Matched from: Filename : /lib/ld-lsb.so.3 安装缺失的库文件: sudo yum install redhat-lsb-core 运行install_or_update.sh时系统日志journalctl -xe报错 SELinux is preventing (lmgrd) from execute access on the file lmgrd. ... SELinux系统是强制访问控制(MAC)安全系统,它拒绝了证书服务器的运行。getenforce命令用于查看SELinux运行状态;setenforce 0命令用于临时关闭SELinux,重启后失效;永久关闭SELinux,需要修改其配置文件/etc/selinux/config,将SELINUX=enforcing改为SELINUX=disabled,保存后退出,并重启系统。 运行Abaqus安装程序 sudo ksh 1/StartGUI.sh 选择需要安装的组件: Extended Product Documentation Abaqus Simulation Services Abaqus Simulation Services CAA API Abaqus/CAE fe-safe Tosca Isight 注意:不要安装自带的FLEXnet License Server 在安装Abaqus/CAE时, Extended Product Documentation的安装目录:/opt/DassaultSystemes/SIMULIA2019doc Abaqus Simulation Services及Abaqus Simulation Services CAA API的安装目录:/opt/DassaultSystemes/SimulationServices/V6R2019x Abaqus/CAE的安装目录:/opt/DassaultSystemes/SIMULIA/CAE/2019 CAE Commands的安装目录:/opt/DassaultSystemes/SIMULIA/Commands CAE external plugins的安装目录:/opt/DassaultSystemes/SIMULIA/CAE/plugins/2019 fe-safe的安装目录:/opt/DassaultSystemes/SIMULIA/fe-safe/2019 Tosca的安装目录:/opt/DassaultSystemes/SIMULIA/Tosca/2019 Isight的安装目录:/opt/DassaultSystemes/SIMULIA/Isight/2019 Troubleshooting Ubuntu等Linux发行版无法直接运行安装程序 由于ABAQUS默认只支持一下几种Linux发行版:Red Hat Enterprise Linux,Centos和SuSE Linux Enterprise Server。因此首先我们需要使安装程序绕过系统监测: export DSYAuthOS_`lsb_release -si`=1 export DSY_Force_OS=linux_a64 export NOLICENSECHECK=true 然后运行图形安装界面: ksh 1/StartGUI.sh 或直接运行命令: cd <mounted CD folder>/1/ export DSYAuthOS_`lsb_release -si`=1 && export DSY_Force_OS=linux_a64 && ksh ./StartGUI.sh 参考: Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu: Abaqus 2018 Installation Instructions for Ubuntu 18.04 运行StartGUI.sh时报错 ... error while loading shared libraries: libz.so ... 安装包zlib中提供依赖的库文件libz.so.1,安装命令: sudo yum install zlib 然后分别将目录/usr/lib/及/usr/lib64/下的库文件libz.so.1复制并重命名为libz.so: cp libz.so.1 libz.so 安装ABAQUS/CAE时,在选择证书服务器(License Server Configuration)为SIMULIA FLEXnet后点击下一步时报错 Stdout: Stderr: unzip: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed. Action LaunchAppAction from feature CODE\linux_a64\SMATocLicPanel failed. Action ID: unzip_siteIDandDslsStat 可以在安装中跳过证书设置,这并不影响软件的安装。在完成安装之后,将/opt/DassaultSystemes/SimulationServices/V6R2019x/linux_a64/SMA/site/custom_v6.env中的 license_server_type=DSLS dsls_license_config="/var/DassaultSystemes/Licenses/DSLicSrv.txt" 改为 license_server_type=FLEXNET abaquslm_license_file="27800@localhost" # license_server_type=DSLS # dsls_license_config="/var/DassaultSystemes/Licenses/DSLicSrv.txt" 可以使用以下指令来查看证书状态: /opt/DassaultSystemes/SIMULIA/Commands/abaqus licensing ru 参考:Error during installation · Issue #2 · Kevin-Mattheus-Moerman/Abaqus-Installation-Instructions-for-Ubuntu 安装Intel Fortran编译器 Intel Parallel Studio XE 2019支持的操作系统有: CentOS* 6 (Intel(R) 64), 7 (Intel(R) 64) Debian* 8 (Intel(R) 64), 9 (Intel(R) 64) Fedora* 27 (Intel(R) 64), 28 (Intel(R) 64) Red Hat Enterprise Linux* 6 (Intel(R) 64), 7 (Intel(R) 64) SUSE Linux Enterprise Server* 12 (Intel(R) 64), 15 (Intel(R) 64) Ubuntu* 16.04 (Intel(R) 64), 18.04 (Intel(R) 64) 安装目录:/opt/intel 安装文件会提示需要安装以下32位的共享库文件: sudo yum install libstdc++.i686 sudo yum install glibc glibc.i686 sudo yum install libgcc libgcc.i686 安装完成后,还需要使用其提供的脚本进行环境设置,在~/.bashrc中添加: source <install_dir>/bin/compilervars.sh intel64 export PATH=$PATH:/opt/intel/bin 重启命令行后就可以在任意目录下使用ifort -v查看intel fortran编译器的版本了。 使用whereis ifort指令可以查看其所在位置,默认路径为/opt/intel/bin/ifort。 配置Abaqus运行环境 运行Abaqus/CAE 当系统开机或重启后,证书服务器将会自动启动。手动重启服务器: sudo ksh /opt/DassaultSystemes/SolidSQUAD_License_Servers/install_or_update.sh 以管理员身份使用以下命令来启动Abaqus/CAE: /opt/DassaultSystemes/SIMULIA/Commands/abaqus cae 或 /opt/DassaultSystemes/SIMULIA/Commands/abq2016 cae 如果出现图形渲染问题,可以在启动指令后添加-mesa来禁止硬件图形加速渲染,参考:Hardware acceleration (all platforms) 如果出现CAE窗口透明的情况,可以在启动指令前添加XLIB_SKIP_ARGB_VISUALS=1。 打开CAE后,需要更改工作目录到/home下的任意路径。放置在/home下的文件才能够在普通权限下进行读写,如果没有更改工作路径,ABAQUS会报错sim文件不存在等问题,无法进行计算。 使用以下指令设置默认的工作目录: export TMPDIR=~/temp 创建快捷方式 使用以下几种方式中的任意一种来使abaqus指令得到全局访问: 修改~/.bashrc,使用export将命令所在目录加入环境变量: export PATH=$PATH:/opt/DassaultSystemes/SIMULIA/Commands 修改~/.bashrc,使用alias添加简化指令: alias abaqus='/opt/DassaultSystemes/SIMULIA/Commands/abaqus' 在/usr/bin/中创建同步链接: sudo ln /opt/DassaultSystemes/SIMULIA/Commands/abaqus /usr/bin/abaqus 连接Intel Fortran编译器 修改~/.bashrc,添加Intel Fortran共享库的路径: export LD_LIBRAY_PATH=$LD_LIBRAY_PATH:/opt/intel/compilers_and_libraries/linux/lib/intel64 综上,只需在~/.bashrc文件中增加如下内容,即可完成对Intel Fortran编译器和Abaqus运行环境的设置: # User specific aliases and functions # ifort env. config. source /opt/intel/bin/compilervars.sh intel64 export PATH=$PATH:/opt/intel/bin # abaqus env. config. export PATH=$PATH:/opt/DassaultSystemes/SIMULIA/Commands # global access to abaqus commands export LD_LIBRAY_PATH=$LD_LIBRAY_PATH:/opt/intel/compilers_and_libraries/linux/lib/intel64 # link shared libraries 重启命令行后,使用以下指令来测试编译器的运行情况: abaqus info=system abaqus verify -user_std 参考: Linking Intel fortran compiler to ABAQUS and using UMAT - Saiwal’s HomePage Linking Abaqus/Fortran for running subroutine in UBUNTU (linux)-Abaqus GUI Graphical issue(Transparent-/transluscent) - iMechanica how to link Fortran with Abaqus CAE 6.14 in Redhat linux terminal? - Stack Overflow 延伸阅读 Simulia Established Products 2019 Installation Guide Solid-Mechanics/Install-ABAQUS-on-Ubuntu: Install ABAQUS 6.14-5 on Ubuntu 16.04 64bit imirzov/Install-Abaqus-2019-on-Ubuntu-18.04-LTS: Instruction manual to install Abaqus 2019 on Ubuntu 18.04 LTS ABAQUS 2018 and Fortran Compilers on Ubuntu 18.04LTS - PDF Using gfortran compiler for user subroutines in ABAQUS 2016/2017 - Saiwal’s HomePage Useful commands, tips for using ABAQUS over command-line in linux - Saiwal’s HomePage The ABAQUS FAQ在命令行窗口中运行ABAQUS2020-08-01T00:00:00+08:002020-08-01T00:00:00+08:00https://lyk6756.github.io/2020/08/01/ABAQUS_obj<h2 id="在关联了fortran编译器的环境中">在关联了Fortran编译器的环境中</h2>
<ul>
<li>提交作业:</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus <span class="nv">job</span><span class="o">=</span><jobname>
</code></pre></div></div>
<ul>
<li>提交带子程序的作业:</li>
</ul>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus <span class="nv">job</span><span class="o">=</span><jobname> <span class="nv">user</span><span class="o">=</span><subroutine filename> <span class="nv">cpus</span><span class="o">=</span>N
</code></pre></div></div>
<p>job后面输入inp文件名,一般省略inp文件后缀。user后面是用户子程序。常用的ABAQUS子程序源文件使用Fortran语言编写,在使用中实时编译链接成目标文件参与计算。在Windows环境下,源文件必须以<code class="language-plaintext highlighter-rouge">.for</code>结尾;在Linux环境下,必须使用<code class="language-plaintext highlighter-rouge">.f</code>后缀。cpus=N,N必须是整数,表示分析使用的处理器核数。</p>
<p>登陆后输入<code class="language-plaintext highlighter-rouge">cat /proc/cpuinfo</code>即可查询服务器的核数,注意内核的编号是从零开始,因此第N个核的编号是N+1。另外,输入<code class="language-plaintext highlighter-rouge">top</code>命令可以查询机器运行状态,Tasks中running前面的那个数字就是机器的已用内核数,总核数减去已用内核数既是剩余内核数。</p>
<p>要监视分析作业的进度,您可以查看<code class="language-plaintext highlighter-rouge">.sta</code>文件。但这不会随着进度的进行而更新状态文件。要动态显示进度,可以使用<code class="language-plaintext highlighter-rouge">tail</code>命令:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">tail</span> <span class="nt">-f</span> <jobname>.sta
</code></pre></div></div>
<p>如果需要终止正在运行的作业,则可以使用<code class="language-plaintext highlighter-rouge">top</code>命令结束相关进程或使用<code class="language-plaintext highlighter-rouge">killall <process name></code>结束该进程。进程名称可以从<code class="language-plaintext highlighter-rouge">top</code>命令中找到。</p>
<p>参考:</p>
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-m-ExecutionProcedures-sb.htm">Execution Procedures</a>, Section 3.2 in Abaqus Analysis User’s Guide
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-analysisproc.htm">Abaqus/Standard and Abaqus/Explicit execution</a>, Section 3.2.2</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-caeproc.htm">Abaqus/CAE execution</a>, Section 3.2.7</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-viewerproc.htm">Abaqus/Viewer execution</a>, Section 3.2.8</li>
</ul>
</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAECAERefMap/simacae-m-DbsNetworkodb-sb.htm">Accessing an output database on a remote computer</a></li>
</ul>
<p>详见帮助文档<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>
<h3 id="troubleshooting---could-not-write-file-check-the-disk-space-on-your-system">Troubleshooting - could not write file: check the disk space on your system</h3>
<p>在计算较大的作业时,可能会出现临时文件过大而超过临时文件的默认存储空间。可以在提交作业时通过<code class="language-plaintext highlighter-rouge">scratch</code>选项来指定用于存储临时文件的目录名称。</p>
<p>在Linux平台,该选项的默认值为<code class="language-plaintext highlighter-rouge">$TMPDIR</code>环境变量的值,如果未定义<code class="language-plaintext highlighter-rouge">$TMPDIR</code>,则为<code class="language-plaintext highlighter-rouge">/tmp</code>。</p>
<p>在Windows平台,该选项的默认值为<code class="language-plaintext highlighter-rouge">%TMP%</code>环境变量的值,如果未定义<code class="language-plaintext highlighter-rouge">%TMP%</code>,则为<code class="language-plaintext highlighter-rouge">\TEMP</code>。</p>
<p>在分析过程中,将在该目录下创建一个子目录来保存分析暂存文件。 可以在环境文件中设置此参数的默认值(请参阅<a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-envfile.htm">环境文件设置</a>)。</p>
<h2 id="在未关联编译器的环境中">在未关联编译器的环境中</h2>
<p>如果子程序已开发完成,需要进行分发使用。为了使子程序能够在没有关联编译环境的计算机上执行,或者不希望用户关注到源代码,可以使用ABAQUS自带的MAKE工具将<code class="language-plaintext highlighter-rouge">.for</code>源文件封装成目标文件和动态库文件。</p>
<p>在关联了Fortran编译器的环境下执行:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus make <span class="nv">library</span><span class="o">=</span>subroutine.for <span class="nv">object_type</span><span class="o">=</span>fortran
</code></pre></div></div>
<p>详见帮助文档<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>
<p>将生成两个文件,目标文件和动态库文件。目标文件以<code class="language-plaintext highlighter-rouge">.obj</code>(Windows系统下)或<code class="language-plaintext highlighter-rouge">.o</code>(Linux系统下)结尾,动态库文件以<code class="language-plaintext highlighter-rouge">.dll</code>(Windows系统下)或<code class="language-plaintext highlighter-rouge">.so</code>(Linux系统下)结尾。Abaqus/Standard的目标文件后缀为<code class="language-plaintext highlighter-rouge">-std</code>, Abaqus/Explicit的单精度目标文件后缀为<code class="language-plaintext highlighter-rouge">-xpl</code>;双精度目标文件后缀为<code class="language-plaintext highlighter-rouge">-xplD</code>。生成的Abaqus/Standard动态库文件名为<code class="language-plaintext highlighter-rouge">standardU</code>,Abaqus/Explicit动态库文件名为<code class="language-plaintext highlighter-rouge">explicitU</code>和<code class="language-plaintext highlighter-rouge">explicitU-D</code>。</p>
<p>我们这里可以使用生成的目标文件<code class="language-plaintext highlighter-rouge">subroutine-std.obj</code>来提交计算,但仍然需要链接编译器环境。</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus <span class="nv">job</span><span class="o">=</span>input.inp <span class="nv">user</span><span class="o">=</span>subroutine-std.obj <span class="nv">cpus</span><span class="o">=</span>n
</code></pre></div></div>
<p>为了摆脱编译器环境,可将目标文件和动态库文件放置在工作目录下,并在<code class="language-plaintext highlighter-rouge">abaqus_v6.env</code>文件中添加以下两行来将<code class="language-plaintext highlighter-rouge">usub_lib_dir</code>设置为当前工作目录,或将<code class="language-plaintext highlighter-rouge">usub_lib_dir</code>直接定义动态库文件所在的文件目录。<code class="language-plaintext highlighter-rouge">abaqus_v6.env</code>文件既可以放在工作目录,也可以放在主目录中。</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">os</span>
<span class="n">usub_lib_dir</span><span class="o">=</span><span class="n">os</span><span class="p">.</span><span class="n">getcwd</span><span class="p">()</span>
</code></pre></div></div>
<p>最后在不使用<code class="language-plaintext highlighter-rouge">user</code>选项的情况下运行作业。求解器将自动从动态库文件中将其加入运算:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus <span class="nv">job</span><span class="o">=</span>input.inp <span class="nv">cpus</span><span class="o">=</span>n
</code></pre></div></div>
<h2 id="运行python脚本">运行Python脚本</h2>
<p>脚本包含以纯ASCII格式存储的一系列Python语句。如果需要打开Abaqus/CAE并在其中运行脚本,可以直接在命令行输入:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus cae <span class="nv">script</span><span class="o">=</span>myscript.py
</code></pre></div></div>
<p>其中的<code class="language-plaintext highlighter-rouge">myscript.py</code>表示脚本的文件名。对于在Abaqus/Viewer中运行的脚本,同样有:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus viewer <span class="nv">script</span><span class="o">=</span>myscript.py
</code></pre></div></div>
<p>可以通过在命令行中输入<code class="language-plaintext highlighter-rouge">--</code>并以一个或多个空格分隔的参数来将参数传递到脚本中。这些参数可以在脚本中被访问,但将被Abaqus/CAE在执行时忽略。</p>
<p>如果要在没有图形用户界面(GUI)的情况下运行Abaqus/CAE脚本,可以直接在命令行输入:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus cae <span class="nv">noGUI</span><span class="o">=</span>myscript.py
</code></pre></div></div>
<p>Abaqus/CAE将在文件中运行命令,并在命令完成后退出。如果没有给出文件扩展名,则默认扩展名是.py。该选项对于自动化分析前或分析后的处理任务很有用,而无需增加运行显示器的费用。由于未提供任何界面,因此脚本不能包含任何用户交互。如果使用<code class="language-plaintext highlighter-rouge">noGUI</code>选项,则Abaqus/CAE将忽略提供的任何其他命令行选项。</p>
<p>同样的,对于在没有图形用户界面(GUI)的Abaqus/Viewer中运行的脚本有:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>abaqus viewer <span class="nv">noGUI</span><span class="o">=</span>myscript.py
</code></pre></div></div>
<p>如果已经打开了Abaqus/CAE的图形界面,除了可以通过菜单栏中选择<code class="language-plaintext highlighter-rouge">File > Run Script</code>来运行脚本,还可以在界面下方的Python命令行界面(CLI)采用Python内置函数<code class="language-plaintext highlighter-rouge">execfile</code>运行脚本:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">execfile</span><span class="p">(</span><span class="s">'myscript.py'</span><span class="p">)</span>
</code></pre></div></div>
<p>需要注意的是,Abaqus仅支持Python 2版本,在最近的Python 3中,<code class="language-plaintext highlighter-rouge">execfile(fn)</code>函数已被移除,取而代之的是<code class="language-plaintext highlighter-rouge">exec(open(fn).read())</code>。</p>
<p>详见帮助文档<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup></p>
<p>在Python脚本中,对于<code class="language-plaintext highlighter-rouge">Job</code>对象,可以采用方法<code class="language-plaintext highlighter-rouge">submit(...)</code>来提交一个分析作业;采用方法<code class="language-plaintext highlighter-rouge">kill()</code>来停止一个分析作业;采用方法<code class="language-plaintext highlighter-rouge">waitForCompletion()</code>来中断脚本的执行,直到分析结束。</p>
<p>详见帮助文档<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup></p>
<p>参考:</p>
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-m-ExecutionProcedures-sb.htm">Execution Procedures</a>, Section 3.2 in Abaqus Analysis User’s Guide
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-caeproc.htm">Abaqus/CAE execution</a>, Section 3.2.7</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-viewerproc.htm">Abaqus/Viewer execution</a>, Section 3.2.8</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-pythonproc.htm">Python execution</a>, Section 3.2.10</li>
</ul>
</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAECMDRefMap/simacmd-c-aclintintrointerface.htm">How does the Abaqus Scripting Interface interact with Abaqus/CAE?</a>, Section 2.2 in Abaqus Scripting User’s Guide</li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKERRefMap/simaker-m-JobPyc-sb.htm">Job commands</a> in Abaqus Scripting Reference Guide
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKERRefMap/simaker-c-jobpyc.htm">Job object</a></li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKERRefMap/simaker-c-jobfrominputfilepyc.htm">JobFromInputFile object</a></li>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKERRefMap/simaker-c-modeljobpyc.htm">ModelJob object</a></li>
</ul>
</li>
</ul>
<hr />
<h2 id="延伸阅读">延伸阅读</h2>
<ul>
<li><a href="https://www.linkedin.com/pulse/running-abaqus-analysis-user-subroutines-without-fortran-tripathy">Running an Abaqus analysis with user subroutines without FORTRAN compilers</a></li>
<li><a href="http://feishen.me/2018/02/06/Abaqus-Fortran/">Abaqus子程序使用方法 - Shen</a></li>
<li><a href="https://www.fangzhenxiu.com/post/23483">基于python或者.bat实现abaqus任务批处理 - 仿真秀</a></li>
<li>
<p><a href="https://blog.csdn.net/qq_39957456/article/details/107191096">批量执行ABAQUS的inp文件——整理 - CSDN博客</a></p>
</li>
<li><a href="http://130.149.89.49:2080/v2016/books/usb/default.htm">Abaqus Analysis User’s Guide - Abaqus 2016 Documentation</a>
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-m-ExecutionProcedures-sb.htm">“Execution Procedures” - MIT</a>, Section 3.2</li>
</ul>
</li>
<li><a href="http://130.149.89.49:2080/v2016/books/cmd/default.htm">Abaqus Scripting User’s Guide - Abaqus 2016 Documentation</a>
<ul>
<li><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAECMDRefMap/simacmd-c-aclintintrointerface.htm">“How does the Abaqus Scripting Interface interact with Abaqus/CAE?” - MIT</a>, Section 2.2</li>
</ul>
</li>
</ul>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-analysisproc.htm">“Abaqus/Standard and Abaqus/Explicit execution” - MIT</a>”, Section 3.2.2 in Abaqus Analysis User’s Guide <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:2" role="doc-endnote">
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEEXCRefMap/simaexc-c-makeproc.htm">“Making user-defined executables and subroutines” - MIT</a>, Section 3.2.18 in Abaqus Analysis User’s Guide <a href="#fnref:2" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:3" role="doc-endnote">
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAECMDRefMap/simacmd-c-aclintintrointerface.htm">“How does the Abaqus Scripting Interface interact with Abaqus/CAE?” - MIT</a>, Section 2.2 in Abaqus Scripting User’s Guide <a href="#fnref:3" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:4" role="doc-endnote">
<p><a href="https://abaqus-docs.mit.edu/2017/English/SIMACAEKERRefMap/simaker-c-jobpyc.htm">“Job object” - MIT</a> in Abaqus Scripting Reference Guide <a href="#fnref:4" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>李宇琨lyk6756@163.com在关联了Fortran编译器的环境中 提交作业: abaqus job=<jobname> 提交带子程序的作业: abaqus job=<jobname> user=<subroutine filename> cpus=N job后面输入inp文件名,一般省略inp文件后缀。user后面是用户子程序。常用的ABAQUS子程序源文件使用Fortran语言编写,在使用中实时编译链接成目标文件参与计算。在Windows环境下,源文件必须以.for结尾;在Linux环境下,必须使用.f后缀。cpus=N,N必须是整数,表示分析使用的处理器核数。 登陆后输入cat /proc/cpuinfo即可查询服务器的核数,注意内核的编号是从零开始,因此第N个核的编号是N+1。另外,输入top命令可以查询机器运行状态,Tasks中running前面的那个数字就是机器的已用内核数,总核数减去已用内核数既是剩余内核数。 要监视分析作业的进度,您可以查看.sta文件。但这不会随着进度的进行而更新状态文件。要动态显示进度,可以使用tail命令: tail -f <jobname>.sta 如果需要终止正在运行的作业,则可以使用top命令结束相关进程或使用killall <process name>结束该进程。进程名称可以从top命令中找到。 参考: Execution Procedures, Section 3.2 in Abaqus Analysis User’s Guide Abaqus/Standard and Abaqus/Explicit execution, Section 3.2.2 Abaqus/CAE execution, Section 3.2.7 Abaqus/Viewer execution, Section 3.2.8 Accessing an output database on a remote computer 详见帮助文档1 Troubleshooting - could not write file: check the disk space on your system 在计算较大的作业时,可能会出现临时文件过大而超过临时文件的默认存储空间。可以在提交作业时通过scratch选项来指定用于存储临时文件的目录名称。 在Linux平台,该选项的默认值为$TMPDIR环境变量的值,如果未定义$TMPDIR,则为/tmp。 在Windows平台,该选项的默认值为%TMP%环境变量的值,如果未定义%TMP%,则为\TEMP。 在分析过程中,将在该目录下创建一个子目录来保存分析暂存文件。 可以在环境文件中设置此参数的默认值(请参阅环境文件设置)。 在未关联编译器的环境中 如果子程序已开发完成,需要进行分发使用。为了使子程序能够在没有关联编译环境的计算机上执行,或者不希望用户关注到源代码,可以使用ABAQUS自带的MAKE工具将.for源文件封装成目标文件和动态库文件。 在关联了Fortran编译器的环境下执行: abaqus make library=subroutine.for object_type=fortran 详见帮助文档2 将生成两个文件,目标文件和动态库文件。目标文件以.obj(Windows系统下)或.o(Linux系统下)结尾,动态库文件以.dll(Windows系统下)或.so(Linux系统下)结尾。Abaqus/Standard的目标文件后缀为-std, Abaqus/Explicit的单精度目标文件后缀为-xpl;双精度目标文件后缀为-xplD。生成的Abaqus/Standard动态库文件名为standardU,Abaqus/Explicit动态库文件名为explicitU和explicitU-D。 我们这里可以使用生成的目标文件subroutine-std.obj来提交计算,但仍然需要链接编译器环境。 abaqus job=input.inp user=subroutine-std.obj cpus=n 为了摆脱编译器环境,可将目标文件和动态库文件放置在工作目录下,并在abaqus_v6.env文件中添加以下两行来将usub_lib_dir设置为当前工作目录,或将usub_lib_dir直接定义动态库文件所在的文件目录。abaqus_v6.env文件既可以放在工作目录,也可以放在主目录中。 import os usub_lib_dir=os.getcwd() 最后在不使用user选项的情况下运行作业。求解器将自动从动态库文件中将其加入运算: abaqus job=input.inp cpus=n 运行Python脚本 脚本包含以纯ASCII格式存储的一系列Python语句。如果需要打开Abaqus/CAE并在其中运行脚本,可以直接在命令行输入: abaqus cae script=myscript.py 其中的myscript.py表示脚本的文件名。对于在Abaqus/Viewer中运行的脚本,同样有: abaqus viewer script=myscript.py 可以通过在命令行中输入--并以一个或多个空格分隔的参数来将参数传递到脚本中。这些参数可以在脚本中被访问,但将被Abaqus/CAE在执行时忽略。 如果要在没有图形用户界面(GUI)的情况下运行Abaqus/CAE脚本,可以直接在命令行输入: abaqus cae noGUI=myscript.py Abaqus/CAE将在文件中运行命令,并在命令完成后退出。如果没有给出文件扩展名,则默认扩展名是.py。该选项对于自动化分析前或分析后的处理任务很有用,而无需增加运行显示器的费用。由于未提供任何界面,因此脚本不能包含任何用户交互。如果使用noGUI选项,则Abaqus/CAE将忽略提供的任何其他命令行选项。 同样的,对于在没有图形用户界面(GUI)的Abaqus/Viewer中运行的脚本有: abaqus viewer noGUI=myscript.py 如果已经打开了Abaqus/CAE的图形界面,除了可以通过菜单栏中选择File > Run Script来运行脚本,还可以在界面下方的Python命令行界面(CLI)采用Python内置函数execfile运行脚本: execfile('myscript.py') 需要注意的是,Abaqus仅支持Python 2版本,在最近的Python 3中,execfile(fn)函数已被移除,取而代之的是exec(open(fn).read())。 详见帮助文档3 在Python脚本中,对于Job对象,可以采用方法submit(...)来提交一个分析作业;采用方法kill()来停止一个分析作业;采用方法waitForCompletion()来中断脚本的执行,直到分析结束。 详见帮助文档4 参考: Execution Procedures, Section 3.2 in Abaqus Analysis User’s Guide Abaqus/CAE execution, Section 3.2.7 Abaqus/Viewer execution, Section 3.2.8 Python execution, Section 3.2.10 How does the Abaqus Scripting Interface interact with Abaqus/CAE?, Section 2.2 in Abaqus Scripting User’s Guide Job commands in Abaqus Scripting Reference Guide Job object JobFromInputFile object ModelJob object 延伸阅读 Running an Abaqus analysis with user subroutines without FORTRAN compilers Abaqus子程序使用方法 - Shen 基于python或者.bat实现abaqus任务批处理 - 仿真秀 批量执行ABAQUS的inp文件——整理 - CSDN博客 Abaqus Analysis User’s Guide - Abaqus 2016 Documentation “Execution Procedures” - MIT, Section 3.2 Abaqus Scripting User’s Guide - Abaqus 2016 Documentation “How does the Abaqus Scripting Interface interact with Abaqus/CAE?” - MIT, Section 2.2 “Abaqus/Standard and Abaqus/Explicit execution” - MIT”, Section 3.2.2 in Abaqus Analysis User’s Guide ↩ “Making user-defined executables and subroutines” - MIT, Section 3.2.18 in Abaqus Analysis User’s Guide ↩ “How does the Abaqus Scripting Interface interact with Abaqus/CAE?” - MIT, Section 2.2 in Abaqus Scripting User’s Guide ↩ “Job object” - MIT in Abaqus Scripting Reference Guide ↩将MATLAB的字符集编码更改为UTF-82019-10-16T00:00:00+08:002019-10-16T00:00:00+08:00https://lyk6756.github.io/2019/10/16/MATLAB_encoding<h1 id="部署平台">部署平台</h1>
<ul>
<li>
<p>Windows 10 64-bit</p>
</li>
<li>
<p>MATLAB R2019b (Version 9.7.0.1190202)</p>
</li>
</ul>
<h1 id="查看当前编码方式">查看当前编码方式</h1>
<p>在命令窗口输入命令:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>feature('DefaultCharacterSet')
feature('locale')
</code></pre></div></div>
<p>或使用命令:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>current = slCharacterEncoding()
</code></pre></div></div>
<p>返回当前 MATLAB 字符集编码。</p>
<h1 id="修改字符集编码">修改字符集编码</h1>
<p>如果要将编码方式更改为<code class="language-plaintext highlighter-rouge">UTF-8</code>编码,需要编辑MATLAB的locale数据库文件<code class="language-plaintext highlighter-rouge">lcdata.xml</code>。具体方法如下:</p>
<p>在MATLAB安装目录中找到<code class="language-plaintext highlighter-rouge">lcdata_utf8.xml</code>文件(其默认路径为<code class="language-plaintext highlighter-rouge">C:\Program Files\MATLAB\R2019b\bin</code>),并将其重命名为<code class="language-plaintext highlighter-rouge">lcdata.xml</code>。</p>
<p>在文件中删除</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><encoding name="GBK">
<encoding_alias name="936">
</encoding>
</code></pre></div></div>
<p>并将</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><encoding name="UTF-8">
<encoding_alias name="utf8"/>
</encoding>
</code></pre></div></div>
<p>修改为</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><encoding name="UTF-8">
<encoding_alias name="utf8"/>
<encoding_alias name="GBK"/>
</encoding>
</code></pre></div></div>
<p>然后重启MATLAB即可。</p>
<p>Enjoy:)</p>
<h1 id="延伸阅读">延伸阅读</h1>
<ul>
<li><a href="https://www.mathworks.com/help/simulink/slref/slcharacterencoding.html">slCharacterEncoding - MathWorks</a></li>
<li><a href="https://www.zhihu.com/question/27933621">Matlab如何以UTF-8编码保存? - 知乎</a></li>
<li><a href="https://www.mathworks.com/matlabcentral/answers/280988-how-do-i-get-my-matlab-editor-to-read-utf-8-characters-utf-8-characters-in-blank-squares-in-editors">How do I get my MATLAB editor to read UTF-8 characters? UTF-8 characters in blank squares in editors, but in the command window and workspace works fine. - MATLAB Answers</a></li>
</ul>李宇琨lyk6756@163.com部署平台 Windows 10 64-bit MATLAB R2019b (Version 9.7.0.1190202) 查看当前编码方式 在命令窗口输入命令: feature('DefaultCharacterSet') feature('locale') 或使用命令: current = slCharacterEncoding() 返回当前 MATLAB 字符集编码。 修改字符集编码 如果要将编码方式更改为UTF-8编码,需要编辑MATLAB的locale数据库文件lcdata.xml。具体方法如下: 在MATLAB安装目录中找到lcdata_utf8.xml文件(其默认路径为C:\Program Files\MATLAB\R2019b\bin),并将其重命名为lcdata.xml。 在文件中删除 <encoding name="GBK"> <encoding_alias name="936"> </encoding> 并将 <encoding name="UTF-8"> <encoding_alias name="utf8"/> </encoding> 修改为 <encoding name="UTF-8"> <encoding_alias name="utf8"/> <encoding_alias name="GBK"/> </encoding> 然后重启MATLAB即可。 Enjoy:) 延伸阅读 slCharacterEncoding - MathWorks Matlab如何以UTF-8编码保存? - 知乎 How do I get my MATLAB editor to read UTF-8 characters? UTF-8 characters in blank squares in editors, but in the command window and workspace works fine. - MATLAB AnswersWARP3D参考笔记2018-07-18T00:00:00+08:002018-07-18T00:00:00+08:00https://lyk6756.github.io/2018/07/18/WARP3D_Note<p><a href="https://lyk6756-warp3dnote.readthedocs.io/en/latest/">Yukun’s WARP3D(Version 17.8.7) Reference Note</a></p>李宇琨lyk6756@163.comYukun’s WARP3D(Version 17.8.7) Reference Note金属材料及其焊接接头的断裂试验标准2018-04-20T00:00:00+08:002018-04-20T00:00:00+08:00https://lyk6756.github.io/2018/04/20/Fracture_Test_Standard<h1 id="相关专题">相关专题</h1>
<ul>
<li><a href="https://www.astm.org/COMMIT/SUBCOMMIT/E0805.htm">ASTM Subcommittee E08.05</a> on Cyclic Deformation and Fatigue Crack Formation</li>
<li><a href="https://www.astm.org/COMMIT/SUBCOMMIT/E0806.htm">ASTM Subcommittee E08.06</a> on Crack Growth Behavior</li>
<li><a href="https://www.astm.org/COMMIT/SUBCOMMIT/E0807.htm">ASTM Subcommittee E08.07</a> on Fracture Mechanics</li>
<li>
<p><a href="https://www.astm.org/COMMIT/SUBCOMMIT/E2807.htm">ASTM Subcommittee E28.07</a> on Impact Testing</p>
</li>
<li><a href="https://www.iso.org/committee/53560.html">ISO/TC 164/SC 4</a> Fatigue, fracture and toughness testing</li>
<li><a href="https://www.iso.org/committee/48620.html">ISO/TC 44/SC 5</a> Testing and inspection of welds</li>
</ul>
<!--more-->
<h1 id="相关标准">相关标准</h1>
<ul>
<li><a href="https://www.astm.org/Standards/E1823.htm">ASTM E1823</a> Standard Terminology Relating to Fatigue and Fracture Testing</li>
<li><a href="https://www.astm.org/Standards/A370.htm">ASTM A370</a> Standard Test Methods and Definitions for Mechanical Testing of Steel Products</li>
<li><a href="https://www.astm.org/Standards/E561.htm">ASTM E561</a> Standard Test Method for KR Curve Determination</li>
</ul>
<h1 id="金属材料断裂韧性试验标准">金属材料断裂韧性试验标准</h1>
<ul>
<li><a href="https://www.astm.org/Standards/E399.htm">ASTM E399</a> Standard Test Method for Linear-Elastic Plane-Strain Fracture Toughness KIc of Metallic Materials</li>
<li><a href="https://www.astm.org/Standards/E1820.htm">ASTM E1820</a> Standard Test Method for Measurement of Fracture Toughness</li>
<li><a href="https://www.astm.org/Standards/E1290.htm">ASTM E1290</a> Standard Test Method for Crack-Tip Opening Displacement (CTOD) Fracture Toughness Measurement <strong>(Withdrawn 2013)</strong></li>
<li>
<p><a href="https://www.astm.org/Standards/E1681.htm">ASTM E1681</a> Standard Test Method for Determining Threshold Stress Intensity Factor for Environment-Assisted Cracking of Metallic Materials</p>
</li>
<li><a href="https://www.iso.org/standard/60891.html">ISO 12135:2016</a> Metallic materials – Unified method of test for the determination of quasistatic fracture toughness</li>
</ul>
<h1 id="金属焊缝断裂韧性试验标准">金属焊缝断裂韧性试验标准</h1>
<ul>
<li>
<p><a href="https://www.astm.org/Standards/E2818.htm">ASTM E2818</a> Standard Practice for Determination of Quasistatic Fracture Toughness of Welds</p>
</li>
<li><a href="https://www.iso.org/standard/70865.html">ISO 15653:2018</a> Metallic materials – Method of test for the determination of quasistatic fracture toughness of welds</li>
<li><a href="https://www.iso.org/standard/73808.html">ISO 9017:2017</a> Destructive tests on welds in metallic materials – Fracture test</li>
</ul>
<h1 id="金属材料冲击试验标准">金属材料冲击试验标准</h1>
<ul>
<li><a href="https://www.astm.org/Standards/E23.htm">ASTM E23</a> Standard Test Methods for Notched Bar Impact Testing of Metallic Materials</li>
<li><a href="https://www.astm.org/Standards/E208.htm">ASTM E208</a> Standard Test Method for Conducting Drop-Weight Test to Determine Nil-Ductility Transition Temperature of Ferritic Steels</li>
<li>
<p><a href="https://www.astm.org/Standards/E604.htm">ASTM E604</a> Standard Test Method for Dynamic Tear Testing of Metallic Materials</p>
</li>
<li><a href="https://www.iso.org/standard/63802.html">ISO 148-1:2016</a> Metallic materials – Charpy pendulum impact test – Part 1: Test method</li>
<li><a href="https://www.iso.org/standard/63812.html">ISO 148-2:2016</a> Metallic materials – Charpy pendulum impact test – Part 2: Verification of testing machines</li>
<li><a href="https://www.iso.org/standard/63813.html">ISO 148-3:2016</a> Metallic materials – Charpy pendulum impact test – Part 3: Preparation and characterization of Charpy V-notch test pieces for indirect verification of pendulum impact machines</li>
<li><a href="https://www.iso.org/standard/63814.html">ISO 14556:2015</a> Metallic materials – Charpy V-notch pendulum impact test – Instrumented test method</li>
<li><a href="https://www.iso.org/standard/65516.html">ISO 26843:2015</a> Metallic materials – Measurement of fracture toughness at impact loading rates using precracked Charpy-type test pieces</li>
</ul>
<h1 id="金属材料疲劳试验标准">金属材料疲劳试验标准</h1>
<ul>
<li><a href="https://www.astm.org/Standards/E466.htm">ASTM E466</a> Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials</li>
<li><a href="https://www.astm.org/Standards/E468.htm">ASTM E468</a> Standard Practice for Presentation of Constant Amplitude Fatigue Test Results for Metallic Materials</li>
<li><a href="https://www.astm.org/Standards/E606.htm">ASTM E606/E606M</a> Standard Test Method for Strain-Controlled Fatigue Testing</li>
<li><a href="https://www.astm.org/Standards/E2368.htm">ASTM E2368</a> Standard Practice for Strain Controlled Thermomechanical Fatigue Testing</li>
<li><a href="https://www.astm.org/Standards/E647.htm">ASTM E647</a> Standard Test Method for Measurement of Fatigue Crack Growth Rates</li>
<li><a href="https://www.astm.org/Standards/E1949.htm">ASTM E1949</a> Standard Test Method for Ambient Temperature Fatigue Life of Metallic Bonded Resistance Strain Gages</li>
<li><a href="https://www.astm.org/Standards/E739.htm">ASTM E739</a> Standard Practice for Statistical Analysis of Linear or Linearized Stress-Life (S-N) and Strain-Life (ε-N) Fatigue Data</li>
<li><a href="https://www.astm.org/Standards/E1049.htm">ASTM E1049</a> Standard Practices for Cycle Counting in Fatigue Analysis</li>
<li><a href="https://www.astm.org/Standards/E1942.htm">ASTM E1942</a> Standard Guide for Evaluating Data Acquisition Systems Used in Cyclic Fatigue and Fracture Mechanics Testing</li>
<li>
<p><a href="https://www.astm.org/Standards/E2472.htm">ASTM E2472</a> Standard Test Method for Determination of Resistance to Stable Crack Extension under Low-Constraint Conditions</p>
</li>
<li><a href="https://www.iso.org/standard/67847.html">ISO 1099:2017</a> Metallic materials – Fatigue testing – Axial force-controlled method</li>
<li><a href="https://www.iso.org/standard/64687.html">ISO 12106:2017</a> Metallic materials – Fatigue testing – Axial-strain-controlled method</li>
<li><a href="https://www.iso.org/standard/50242.html">ISO 12107:2012</a> Metallic materials – Fatigue testing – Statistical planning and analysis of data</li>
<li><a href="https://www.iso.org/standard/42815.html">ISO 12108:2012</a> Metallic materials – Fatigue testing – Fatigue crack growth method</li>
<li><a href="https://www.iso.org/standard/45583.html">ISO 12111:2011</a> Metallic materials – Fatigue testing – Strain-controlled thermomechanical fatigue testing method</li>
<li><a href="https://www.iso.org/standard/54712.html">ISO 12110-1:2013</a> Metallic materials – Fatigue testing – Variable amplitude fatigue testing – Part 1: General principles, test method and reporting requirements</li>
<li><a href="https://www.iso.org/standard/54713.html">ISO 12110-2:2013</a> Metallic materials – Fatigue testing – Variable amplitude fatigue testing – Part 2: Cycle counting and related data reduction methods</li>
</ul>
<h1 id="金属焊缝疲劳试验标准">金属焊缝疲劳试验标准</h1>
<ul>
<li><a href="https://www.iso.org/standard/24112.html">ISO/TR 14345:2012</a> Fatigue – Fatigue testing of welded components – Guidance</li>
</ul>
<h1 id="参考资料">参考资料</h1>
<ul>
<li><a href="https://pubs.aws.org/p/1675/b402016-standard-methods-for-mechanical-testing-of-welds">AWS B4.0-2016 Standard Methods for Mechanical Testing of Welds</a></li>
<li>Moore, Philippa L., and Geoff Booth. <em>The Welding Engineer’s Guide to Fracture and Fatigue</em>. Elsevier, 2014.</li>
</ul>李宇琨lyk6756@163.com相关专题 ASTM Subcommittee E08.05 on Cyclic Deformation and Fatigue Crack Formation ASTM Subcommittee E08.06 on Crack Growth Behavior ASTM Subcommittee E08.07 on Fracture Mechanics ASTM Subcommittee E28.07 on Impact Testing ISO/TC 164/SC 4 Fatigue, fracture and toughness testing ISO/TC 44/SC 5 Testing and inspection of welds