<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>COMSOL Blog &#187; Mats Danielsson</title>
	<atom:link href="http://www.comsol.de/blogs/author/mats-danielsson/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.comsol.de/blogs</link>
	<description></description>
	<lastBuildDate>Thu, 22 Nov 2018 09:33:42 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>How to Activate Material in Simulations of Manufacturing Processes</title>
		<link>https://www.comsol.de/blogs/how-to-activate-material-in-simulations-of-manufacturing-processes/</link>
		<comments>https://www.comsol.de/blogs/how-to-activate-material-in-simulations-of-manufacturing-processes/#comments</comments>
		<pubDate>Wed, 07 Nov 2018 09:26:55 +0000</pubDate>
		<dc:creator><![CDATA[Mats Danielsson]]></dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Materials]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Structural Mechanics & Thermal Stress]]></category>
		<category><![CDATA[3D Printing]]></category>
		<category><![CDATA[MEMS Module]]></category>
		<category><![CDATA[Structural Mechanics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=286151</guid>
		<description><![CDATA[Material deposition is an essential ingredient in certain manufacturing processes, including welding and additive manufacturing. Say that you want to simulate such a manufacturing process. A challenge that you will face during the simulation is depositing material in a way that introduces it in a state of zero stress. Here, we look at the Activation functionality in the COMSOL Multiphysics® software and how it facilitates the simulation of material deposition. Why Activate or Deactivate Material? Imagine that you want to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Material deposition is an essential ingredient in certain manufacturing processes, including welding and additive manufacturing. Say that you want to simulate such a manufacturing process. A challenge that you will face during the simulation is depositing material in a way that introduces it in a state of zero stress. Here, we look at the <em>Activation</em> functionality in the COMSOL Multiphysics® software and how it facilitates the simulation of material deposition.</p>
<p><span id="more-286151"></span></p>
<h3>Why Activate or Deactivate Material?</h3>
<p>Imagine that you want to simulate a structural material that is in a molten state and then solidifies. Alternatively, the material is initially solid and then melts. This can be the case when you want to simulate manufacturing processes such as arc welding, selective laser melting, and selective laser sintering &mdash; the last two being common additive manufacturing methods.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/07/3D-printer-head.jpg" alt="A photograph of a 3D printer." width="800" height="445" class="alignnone size-full wp-image-229591" title="3D printer head" /><br />
<em>Material activation is useful when simulating additive manufacturing processes. Image of a 3D printer by Jonathan Juursema &mdash; Own work. Licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/deed.en" target="_blank">CC BY-SA 3.0</a>, via <a href="https://commons.wikimedia.org/wiki/File:Felix_3D_Printer_-_Printing_Head.JPG" target="_blank">Wikimedia Commons</a>.</em></p>
<p>You can use the <em>Activation</em> node to activate or deactivate material in a simple manner during a simulation. As a note, the <em>Activation</em> node is available in the add-on Structural Mechanics Module and MEMS Module as of version 5.4 of COMSOL Multiphysics®.</p>
<h3>Activation of Material: The Naive Approach</h3>
<p>One approach to emulate that material is structurally absent is to simply reduce its elastic stiffness to a point where it becomes negligible. This way, the rest of the structure is free to deform without &#8220;feeling&#8221; the structurally weaker material. This is a viable approach as long as we have no desire to actually activate material.</p>
<p>A problem arises if we try to activate the weak material by simply restoring its stiffness to the nominal level at some point during the simulation. When the stiffness is restored, any strains present in the activated material will suddenly produce stresses. In most situations, this is not a desired effect when activating material. Instead, material should be activated in a state of zero stress. This is more physical, as we usually want to emulate that material is deposited or solidified.</p>
<h3>Activate Material in a Stress-Free State</h3>
<p>The <em>Activation</em> node avoids the problem of the artificially produced stresses described above. This node reduces the stiffness of the inactive material as described before, but, importantly, it also removes any elastic strains that are present at the instant of activation. Simply put, material is activated in a state of zero stress.</p>
<p>The <em>Activation</em> node is located under the <em>Linear Elastic Material</em> node, as shown in the figure below, and it is available for the <em>Solid Mechanics</em> and <em>Membrane</em> interfaces.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/activation-feature-settings-window.png" title="" alt="A screenshot of the Activation feature settings used to activate material." width="739" height="480" class="alignnone size-full wp-image-286171" /><br />
<em>The</em> Activation <em>feature and its</em> Settings <em>window.</em></p>
<p>The <em>Activation</em> panel of the <em>Settings</em> window contains two settings, namely:</p>
<ul>
<li><em>Activation expression</em></li>
<li><em>Activation scale factor</em></li>
</ul>
<p>The <em>Activation expression</em> setting is a logical expression that you define. It is used to determine whether the material is active or not, and it is defined per integration point of the mesh elements. For example, an activation expression that reads <code>T&lt;T_s</code> says that the material is active if the expression is logically true (when the temperature, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAARBAMAAAAidOHKAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIZneqRFWZIt3uM8w0ZYRTAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAFtJREFUCNdjYMAGhJRAwADIck1kf8SQ0QBkBTCwvGTgVGBg4DRgYF3AwJbAwMAswMDdwMA2AaznnAFMt98EGCsKbuIOGIPnMYwFNA4KgMZBAXcDlGF0b5ECqpsAJWYPDhtP+s0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6MTQ6MzYrMDE6MDDKyUHiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjE0OjM2KzAxOjAwu5T5XgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMXgxMCszMDArNjM5GO98mwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2I5ZWNlMThjOTUwYWZiZmE2YjBmZGJmYTRmZjczMWQzLmR2aSAtb+cbL6UAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9iOWVjZTE4Yzk1MGFmYmZhNmIwZmRiZmE0ZmY3MzFkMy5wc5d5OxUAAAAASUVORK5CYII=" />, is less than the solidification temperature, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAUBAMAAACUkLs9AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIZneqRFWZIt3uM8w0ZYRTAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAHNJREFUGNNjYMANGJVAQBnCYQkTqFNg64BwWBkY/CYwTIJwJjMwRDEwpEE4hgwMOxgYMmFG8DxGMo/lJRKHdQESh7sBiXPOAIkDtAYBokBEcTmEA7SGgTPgKIjJrPtKCcjZgazx0BIE+xRDCYIzKV0BzZ8AgGYUawKAfnoAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6MTQ6MzcrMDE6MDBsvkpWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjE0OjM3KzAxOjAwHePy6gAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxNHgxMisyOTgrNjM3+AoftwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzQyNTgwMWVhYjFjZjg5NmNiNTViMmY5NzVlMTEzMzBkLmR2aSAtb1Y27y4AAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS80MjU4MDFlYWIxY2Y4OTZjYjU1YjJmOTc1ZTExMzMwZC5wcywQOhoAAAAASUVORK5CYII=" />) and inactive otherwise.</p>
<p>The <em>Activation scale factor</em> setting defines the factor that multiplies the elastic stiffness to emulate that material is not present. It has a default value of 10<sup>-5</sup>, but you can change it if you wish. However, a value that is too low could make the stiffness matrix ill-conditioned.</p>
<p>Two built-in variables are provided to describe the active/inactive state, namely:</p>
<ul>
<li><code>isactive</code></li>
<li><code>wasactive</code></li>
</ul>
<p>The variable <code>isactive</code> indicates the current active/inactive state of the material, while the variable <code>wasactive</code> indicates whether the material has been active at any previous point during the simulation. In the case of a <em>Solid Mechanics</em> interface with the tag <code>solid</code>, the variable describing the current state of the material is called <code>solid.isactive</code>. The <code > wasactive</code> variable can be used to simplify the formulation of the activation expression in some situations, as we will see below.</p>
<blockquote><p>Note: If a material undergoes multiple activation/deactivation events, the elastic strains are removed at every instant of activation. This means that the material is always activated in a state of zero stress, regardless of its history, including past activations or deactivations. Inelastic strains, such as plastic strains, are not removed.</p></blockquote>
<p>Let us look at some examples of how to use the <em>Activation</em> node.</p>
<h4>Example 1: Pointwise Activation</h4>
<p>As a simple 2D example, suppose that you want to gradually activate a material in the <em>y</em> direction as time, <em>t</em>, progresses. The imagined &#8220;activation front&#8221; travels at a velocity, <em>vel</em>, and the region of active material is therefore given by <img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7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvY2E1OWU2YzQxOGI0OWNhNzQzZTc4ZDFiMThhNmRhNGQuZHZpIC1vnxAokQAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlL2NhNTllNmM0MThiNDljYTc0M2U3OGQxYjE4YTZkYTRkLnBzS9mfDgAAAABJRU5ErkJggg==" />. It is entered as the activation expression, as shown in the following figure.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/pointwise-material-activation-comsol.png" title="" alt="A screenshot of the expression used for pointwise material activation in COMSOL." width="405" height="179" class="alignnone size-full wp-image-286181" /><br />
<em>Activation expression for pointwise material activation.</em></p>
<p>To illustrate this, consider a solid quadrilateral element with four integration points (Gauss points), as in the figure below. With the activation expression above, each integration point is activated individually by evaluating the activation expression. This means, in practice, that a single mesh element can be partially active if it has more than one integration point.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/individual-mesh-integration-point-activation.png" title="" alt="A schematic showing individual integration points activated in a mesh element." width="703" height="410" class="alignnone size-full wp-image-286191" /><br />
<em>Activation of individual integration points in a mesh element.</em></p>
<h4>Example 2: Elementwise Activation</h4>
<p>Now, consider a case where you want to activate entire mesh elements, and not on an individual integration point basis. To do so, you need to phrase the activation expression so that it evaluates equally for every integration point in each mesh element. This can be done using the <em>centroid</em> operator. The activation expression that was used in the previous example is modified, as shown in the following figure. The coordinate <em>Y</em> is now evaluated at the mesh element centroid, which means that the activation expression will evaluate to the same value for all of the integration points in the mesh element.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/elementwise-material-activation-comsol.png" title="" alt="A screenshot of the expression used for elementwise material activation." width="407" height="178" class="alignnone size-full wp-image-286201" /><br />
<em>Activation expression for elementwise material activation.</em></p>
<p>Inside the mesh element in the figure below, the activation expression is fulfilled for the element centroid, and therefore all four integration points are active.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/integration-point-mesh-element-activation.png" title="" alt="A schematic showing all integration points activated in a mesh element." width="817" height="423" class="alignnone size-full wp-image-286211" /><br />
<em>Activation of all integration points in a mesh element by using the centroid operator.</em></p>
<h4>Example 3: Using the Previous State of Activation</h4>
<p>Suppose that you want to simulate a <a href="https://en.wikipedia.org/wiki/Cladding_(metalworking)" target="_blank">laser cladding process</a> where a filler material is melted and deposited over time. In this situation, the current position of the laser beam defines the location where material is currently deposited. The region of previously activated material is defined by the entire trajectory of the laser beam from the start of the process. (For details on how to model the movement of a laser beam, you can read this <a href="/blogs/3-approaches-to-modeling-moving-loads-and-constraints-in-comsol">blog post on modeling moving loads and constraints</a>.) The variable <code>wasactive</code> can be used to avoid having to describe this trajectory mathematically. You can express an activation expression for this situation schematically as:</p>
<p><em>(logical expression describing the current position of the laser beam) || solid.wasactive</em></p>
<p>which states that the material is active if the &#8220;logical expression describing the current position of the laser beam&#8221; is true <em>or</em> if the material has been active at any previous time (or parameter step) during the simulation. If the activation expression is used without the <code>wasactive</code> variable, the material would become inactive once the laser beam has passed, which is likely contrary to what is intended.</p>
<h3>Visualizing the Results</h3>
<p>Suppose that you have simulated a time-dependent process where material is deposited over time. It may be interesting to display results only for the active parts of a domain. You can do this by using the variable <code>isactive</code> as the <em>Logical expression for inclusion</em> in the <em>Filter</em> node, as shown in the figure below. Note that depending on the chosen fulfillment type, the <code>isactive</code> filtering may show slight differences compared to the underlying <code > isactive</code> variable defined at the integration points of the mesh elements.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/11/filter-node-comsol-multiphysics.png" title="" alt="A screenshot of the Filter node Settings window." width="600" height="260" class="alignnone size-full wp-image-286221" /><br />
<em>Using the</em> Filter <em>node to display only active parts of a domain.</em></p>
<h3>Concluding Thoughts on the Activation Node</h3>
<p>In this blog post, we have described different ways of using the <em>Activation</em> node to activate material during a simulation. The <em>Activation</em> node makes it easy to simulate the deposition of material in simulations of different types of manufacturing processes, such as welding and additive manufacturing. If you want to examine a model that uses the <em>Activation</em> node, click the button below to see the Thermal Initial Stresses in a Layered Plate example in the Application Gallery. Note that you need to have a COMSOL Access account and valid software license to download the related MPH-file.</p>
<div class="flex-center">
<a href="/model/thermal-initial-stresses-in-a-layered-plate-273" class="btn-solid btn-md btn-red">Try the Tutorial</a>
</div>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.de/blogs/how-to-activate-material-in-simulations-of-manufacturing-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Implement Elastoplasticity in a Model Using External Materials</title>
		<link>https://www.comsol.de/blogs/how-to-implement-elastoplasticity-in-a-model-using-external-materials/</link>
		<comments>https://www.comsol.de/blogs/how-to-implement-elastoplasticity-in-a-model-using-external-materials/#comments</comments>
		<pubDate>Thu, 02 Nov 2017 13:52:48 +0000</pubDate>
		<dc:creator><![CDATA[Mats Danielsson]]></dc:creator>
				<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Structural Mechanics & Thermal Stress]]></category>
		<category><![CDATA[Nonlinear Structural Materials Module]]></category>
		<category><![CDATA[Structural Mechanics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=238321</guid>
		<description><![CDATA[In structural mechanics, there may be situations when you want to implement your own material model. The COMSOL Multiphysics® software gives you the option to program your own material model in C code. The compiled code can then be called from the program using the External Material feature. Here, we demonstrate how to implement an external material model and then use it in an example analysis. The External Material Functionality The Nonlinear Structural Materials Module, an add-on product to COMSOL [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In structural mechanics, there may be situations when you want to implement your own material model. The COMSOL Multiphysics® software gives you the option to program your own material model in C code. The compiled code can then be called from the program using the <em>External Material</em> feature. Here, we demonstrate how to implement an external material model and then use it in an example analysis.</p>
<p><span id="more-238321"></span></p>
<h3>The External Material Functionality</h3>
<p>The Nonlinear Structural Materials Module, an add-on product to COMSOL Multiphysics®, provides a plethora of material models, including models for hyperelasticity, isotropic/kinematic hardening plasticity, viscoelasticity, creep, porous plasticity, soils, and more. These material models cover a vast majority of engineering problems within structural analysis.</p>
<p>However, in some situations, the mechanical behavior of a material is not readily expressed in terms of an existing material model. For instance, suppose you developed a specialized material model for a certain alloy and want to use it to solve a large structural mechanics boundary value problem in COMSOL Multiphysics. What do you do?</p>
<p>As a matter of fact, there are three different ways in which you can define your own material:</p>
<ol>
<li>Many of the material models have a <em>User Defined</em> option. As an example, you can create your own hyperelastic material by typing in an expression for the strain energy density as a function of the strains directly in the GUI.</li>
<li>The next level, which is useful when there is no suitable material model that you can tune through a <em>User Defined</em> option, is to express your material model as a set of separate PDEs or ODEs, and enter the appropriate expressions using one of the mathematical interfaces.</li>
<li>Finally, you can program your own material model in C, using the <em>External Material</em> feature. If the material model is expressed as an algorithm, rather than as a set of equations, this would be the preferred method.</li>
</ol>
<p>The implementation of a material model as an external DLL can seem like a complex endeavor, but this blog post demonstrates how to implement an elastoplastic material model in COMSOL Multiphysics using hands-on steps that you can follow.</p>
<h3>Implementing an Elastoplastic Material Model in COMSOL Multiphysics®</h3>
<p>As a starting point, we need to decide on a material model to implement. We choose an isotropic linear-elastic material with isotropic hardening. This is a simple plasticity model that already exists in COMSOL Multiphysics, but it serves nicely to convey some key points.</p>
<p>First, let&#8217;s go over some assumptions, definitions, and nomenclature:</p>
<ul>
<li>Strains are additive and assumed small</li>
<li>The elastic response is linear and isotropic, and defined by Young&#8217;s modulus <em>E</em> and Poisson&#8217;s ratio <em>ν</em> (or equivalently by the bulk and shear moduli, <em>K</em> and <em>G</em>)</li>
<li>The plastic response is isotropic with an initial yield stress of <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAASCAMAAADrP+ckAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIEcy7d2bdRO4iM5mqxZfsbAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACxSURBVCjPrZHhDsMgCIQRh0ix+v5vu9OuS9N2LkvGD6Lmk4OD6IcIPGLKxIewNOY0hxQ561yOpWe56kU2jvtlCR8ocei8ztbGv1bOUOkaUo6UDlllPK6YWUOgJEeJBdole4ccc5qQVyp16/dN2WpaR5ex/4BtvqxKJwrcPgnqkBhKc04UBnVjEOrEBnl0lijmbqNfKReraIst8JjF+c5riB335HZTiTxvJn0JnW/8H/EEMKMD3BqLj8UAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTUrMDE6MDB+BPcHAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE1KzAxOjAwD1lPuwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAyMngxMSsyOTQrNjM1uI5mcQAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzU0ZmY1ODdlNGY0YmMwNTdmOTVhNjEzNjAwZmY3YjY0LmR2aSAtbwmedDgAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS81NGZmNTg3ZTRmNGJjMDU3Zjk1YTYxMzYwMGZmN2I2NC5wc4OhE2sAAAAASUVORK5CYII=" /></li>
<li>The yield stress of the material is a function of effective plastic strain, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAAAZCAMAAAB0Kl4SAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAA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GCGAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDA0OjI3OjE2KzAxOjAwT+ztmgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwNDoyNzoxNiswMTowMD6xVSYAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gANTJ4MTQrMjc5KzYzNtT50R0AAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS8zMWIxYzBkZTliNjEyMDRmYmZlNmYwMWM1ODdkM2YyZS5kdmkgLW/AmGGRAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvMzFiMWMwZGU5YjYxMjA0ZmJmZTZmMDFjNTg3ZDNmMmUucHMRDMcCAAAAAElFTkSuQmCC" /> (the <em>hardening function</em>)</li>
<li>Plastic flow follows <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAIgi3bsRd1Uz7syqmURmwo5M5gAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABvSURBVBjTpZBLEsAgCEPFSsUPcv/bFmzdqF10ml2CPjI491lg8kt8hPUpyrmGUWgDTZtNufxGEkD1ExKVwAm7J3yQLOqELWMB55rYN7ZpZ59BfYbBrncZQCwj4zoqtjZWkpLnU1HUwlNfn0T1cvALni0CsMM2DIIAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTYrMDE6MDBP7O2aAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE2KzAxOjAwPrFVJgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMngxMisyOTkrNjM3KleT5wAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2RkNGRmNDEyYjJlYWUwMWE3Y2Q1MzBiMjIxMmI5OGE2LmR2aSAtb6v4dzwAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9kZDRkZjQxMmIyZWFlMDFhN2NkNTMwYjIyMTJiOThhNi5wcwP0/N4AAAAASUVORK5CYII=" /> theory</li>
<li>An increment in effective plastic strain is given by <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANUAAAA3CAMAAACsEv84AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAHciiDOqmWZEEe5Vu8zdJ3P2bQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAOHSURBVGje7VqLkp0gDAWDPATl//+2gKigVUCN23Z6ZnbnupubcPKAABLyH380aPfTI3gPHbD4qSeEAfB/gZsQVs6fGCWKEiIH9dNjegMLK66ItMnz342VlftxH5Vlj9T9DgyQOXR8n2CRldDzI/D3SZloU0msohXjjlZkFclIBFJTjD51c9H4fibMunfjnll1c5K4KYO87E81xiygnhAMSOHq8yyfWUEwxtwA9MvehMWc8SaURaoxNSTjFmC5txMC2A3W4V1r20phzfYbAXQ8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h0cHM6SGlSZXNCb3VuZGluZ0JveAAxMjh4MzMrMjQxKzYyMfbWj9kAAAAmdEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNUjEyIDAwMy4wMDIK7bPeSwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzdkNDFmYmEwMThkMTZmYzE2NjRkNGU3ZjMzMzEwMTBjLmR2aSAtbyR/9FAAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS83ZDQxZmJhMDE4ZDE2ZmMxNjY0ZDRlN2YzMzMxMDEwYy5wcx1dyVYAAAAASUVORK5CYII=" /></li>
</ul>
<p><img src="https://cdn.comsol.com/wordpress/2017/11/elastoplastic-material-model-uniaxial-stress-strain-curve-and-yield-surface.png" title="" alt="Diagrams illustrating the uniaxial stress-strain curve and yield surface for an elastoplastic material model." width="1000" height="585" class="alignnone size-full wp-image-238401" /><br />
<em>The example material model: Uniaxial stress-strain curve and yield surface in principal stress space.</em></p>
<p>Now, let&#8217;s discuss approaches for implementing a material model as an external material. There are several different ways of calling user-coded routines for external materials, which we refer to as <em>sockets</em>.</p>
<h4>Approach 1: General Stress-Strain Relation</h4>
<p>We can use the <em>General stress-strain relation</em> socket of the external material to define a complete material model that includes (possibly) both elastic and inelastic strain contributions. This is the most general of the two modeling approaches discussed here. When we use the <em>General stress-strain relation</em> socket, we are faced with two tasks:</p>
<ol>
<li>Computation of the <em>stress</em> tensor <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAMCAMAAACz+6aNAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIEcy7d2bd7kQzIpmqssagbgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABMSURBVAjXjY5BDoAwCATpItJSlf//ttqDYE/uYZOdZAJEf1Mw827eBOLAHkDvrhoK5GkJh1pZiPlUvS9EJZ1uTNTrkYidphd/H7S8B2uuAUKA+Ng8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDA0OjI3OjE2KzAxOjAwT+ztmgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwNDoyNzoxNiswMTowMD6xVSYAAAAgdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTB4NyszMDErNjM5JZVjrgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzI4MWIyNDdiOGVjYzAwYmQ0Y2E0ZjVhNmU3YmRlMjQ5LmR2aSAtbwmj0f8AAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8yODFiMjQ3YjhlY2MwMGJkNGNhNGY1YTZlN2JkZTI0OS5wc89Ts9wAAAAASUVORK5CYII=" /></li>
<li>Computation of the <em>Jacobian</em> of stress <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAMCAMAAACz+6aNAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIEcy7d2bd7kQzIpmqssagbgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABMSURBVAjXjY5BDoAwCATpItJSlf//ttqDYE/uYZ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WZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTYrMDE6MDA+sVUmAAAAH3RFWHRwczpIaVJlc0JvdW5kaW5nQm94ADh4NyszMDIrNjM5N1mGKgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzI0Njg4MmYwYzM5MGM1OWYwYmI3MjllYzA3MDMyMGMxLmR2aSAtbzUn6dMAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8yNDY4ODJmMGMzOTBjNTlmMGJiNzI5ZWMwNzAzMjBjMS5wc9ye3REAAAAASUVORK5CYII=" /></li>
</ol>
<h4>Approach 2: Inelastic Residual Strain</h4>
<p>We can also use the <em>Inelastic residual strain</em> socket to define a description of an inelastic strain contribution <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAPCAMAAAC/QE1iAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIIjPMZhHuRKrdu5l3SBlojgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACeSURBVCjPtVFZCsQgDM1ik7rF+9+20aIzjNB+TQgSksdbEOAPhUT8CgqH6DsVn/HhuFTSMVdpQ8Usc2yFiIIPijtbXmztSTOvcVoTT6tS2dBGeHRyqQtGdKOYDESLH9q99K7LGihZFAOFU/szlLgRYfi21h0MWelBsQAYQSy/1lYlFB5iR5DQYcGt8ZY+uTIUVypuvmI0hJjs/Xs+dQHCJQNqCrNQyAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwNDoyNzoxNyswMTowMOmb5i4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTcrMDE6MDCYxl6SAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADIzeDkrMjk0KzYzN60L9MYAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9kOTRmMTEyMTNkNDI0N2NjYTYzOTAwM2U2MzEzMjQ2Yy5kdmkgLW9s3e9YAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvZDk0ZjExMjEzZDQyNDdjY2E2MzkwMDNlNjMxMzI0NmMucHNpNEDpAAAAAElFTkSuQmCC" /> to the overall material model. An example of this would be if we wanted to add our own creep strain term to the built-in linear elastic material. The <em>Inelastic residual strain</em> socket assumes an additive decomposition of the total (Green-Lagrange) strain into elastic and inelastic parts. Thus, this is an adequate assumption when strains are of the order < 10%. When we use the <em>Inelastic residual strain</em> socket of the external material model, we are faced with two tasks:</p>
<ol>
<li>Computation of the <em>inelastic strain</em> tensor <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAPCAMAAAC/QE1iAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIIjPMZhHuRKrdu5l3SBlojgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACeSURBVCjPtVFZCsQgDM1ik7rF+9+20aIzjNB+TQgSksdbEOAPhUT8CgqH6DsVn/HhuFTSMVdpQ8Usc2yFiIIPijtbXmztSTOvcVoTT6tS2dBGeHRyqQtGdKOYDESLH9q99K7LGihZFAOFU/szlLgRYfi21h0MWelBsQAYQSy/1lYlFB5iR5DQYcGt8ZY+uTIUVypuvmI0hJjs/Xs+dQHCJQNqCrNQyAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwNDoyNzoxNyswMTowMOmb5i4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTcrMDE6MDCYxl6SAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADIzeDkrMjk0KzYzN60L9MYAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS8zZDNiZDVhZGEyMDRmYTQxNTEzNjZkYjg1ZTAwNjMzNS5kdmkgLW9r6UMTAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvM2QzYmQ1YWRhMjA0ZmE0MTUxMzY2ZGI4NWUwMDYzMzUucHMIroiKAAAAAElFTkSuQmCC" /></li>
<li>Computation of a <em>Jacobian</em> of inelastic strain <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAPCAMAAAC/QE1iAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIIjPMZhHuRKrdu5l3SBlojgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACeSURBVCjPtVFZCsQgDM1ik7rF+9+20aIzjNB+TQgSksdbEOAPh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cDKlo5wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwNDoyNzoxNiswMTowME/s7ZoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTYrMDE6MDA+sVUmAAAAH3RFWHRwczpIaVJlc0JvdW5kaW5nQm94ADh4NyszMDIrNjM5N1mGKgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzI0Njg4MmYwYzM5MGM1OWYwYmI3MjllYzA3MDMyMGMxLmR2aSAtbzUn6dMAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8yNDY4ODJmMGMzOTBjNTlmMGJiNzI5ZWMwNzAzMjBjMS5wc9ye3REAAAAASUVORK5CYII=" /></li>
</ol>
<p>Two related <em>External Material</em> sockets are the <em>General stress-deformation relation</em> and the <em>Inelastic residual deformation</em>. These are more general versions of those discussed above. Instead of defining the deformation in terms of the Green-Lagrange strain tensor, the deformation gradient is provided. Many large-strain elastoplastic material models use a multiplicative decomposition of the deformation gradient into elastic and plastic parts. In these situations, you would likely want to use one of these sockets instead.</p>
<blockquote><p>Tip: We link to the source file and model file at <a href="#nextsteps">the bottom of this blog post</a>.</p></blockquote>
<h3>Computation of the Stress Tensor: Stress Update Algorithm</h3>
<p>The complexity of computing the stress tensor varies significantly between material models. In practice, the computation of the stress tensor often needs to be formulated as an algorithm. This is often called a <em>stress update algorithm</em> in literature. In essence, the objective of a stress update algorithm for a material model is to compute the <em>stresses</em>, knowing:</p>
<ul>
<li>The <em>total strains</em> corresponding to the current estimate of the displacement field</li>
<li>The <em>material state</em> of the previously converged increment</li>
</ul>
<p>These quantities are provided to the external material as input.</p>
<p>The term &#8220;material state&#8221; represents any solution-dependent internal variables that are required to describe the material. Examples of such variables are plastic strain tensor components, current yield stress, back stress tensor components, damage parameters, effective plastic strain, etc. The choice of such <em>state variables</em> will depend on the material model. We must ensure that the material state is properly initialized at the start of the analysis, and that it is updated at the end of the increment.</p>
<p>We first need to investigate if there is plastic flow occurring during the increment. We do this by assuming that the elastic strain is equal to the total strain of the <em>current increment</em>, less the (deviatoric) plastic strain of the <em>previously converged increment</em>, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAbCAMAAAAnBw3vAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACIzEUTdZnfMiFWZu6rucIVWsgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADASURBVDjLnVLLEgMhCENREHTr//9tYe30tD7aHITRDAkgwBchjBgRFkiZ7sh9SYM8qsWyZIU8IstMjpUBqFpKxE2fWf4uBNWsiQBOrAW/t3ez5unMGjc7Crk1anNr2u7uqAZ1+ab0zBMlQUgXA15JKjP8ABUJW1IshPtS4ZVOFK9ywoLeRCTuaUea8LGGVCMtqspYBWFjG+iUhsKJbNzQ7f+s2gm3bPIlX7CDi+d9x6Um0S0L+9Fc/I/tgSeb+AdvkjIEefNNqaUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTcrMDE6MDDpm+YuAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE3KzAxOjAwmMZekgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAyM3gxNisyOTQrNjM1R0pH1wAAACZ0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTggMDAzLjAwMgrA/I+5AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvYjk3NTM4N2I2ZDVmNDRiYWJmOWU0MzExMmVkMjljNTEuZHZpIC1vEm+eKgAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlL2I5NzUzODdiNmQ1ZjQ0YmFiZjllNDMxMTJlZDI5YzUxLnBz9oVZ2QAAAABJRU5ErkJggg==" />. This assumption would hold true if there was, indeed, no plastic flow during the increment. The deviatoric stress tensor that is computed this way is aptly called a <em>trial stress deviator</em> and is given by</p>
<div class="latex">\mathrm{dev}\left(\bm\sigma_{trial}\right) = 2G\,\mathrm{dev}\left(\bm\epsilon-^{old}\bm\epsilon_{p}\right)</div>
<p>with an effective (von Mises) value <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAASCAMAAADIZLbxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIEcy7d2bdIqpE7jOZxm3FawAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADeSURBVCjPrZHRrgMhCERBVmeRqv//txe1tZt022Tby4Mh6IEZJPolOIy4SMkWQ2whpKsY/Nzx6Y3qay3EfsahUg73mldqZ11v/OSOHoWf+f46z9p41Mqg7VzmTm84xLHWFkxQC3wsQp8BpKSEuhbPS8VNiMoUYk5DYpKNoH2/rluaUL3b6zaWE6uGLKsuNIX3fupM2ZY99c/icpAq92TY47FfQp7qU1j2LL75pkaKx04zQ7uvyEBVJh9UOldOuI3dU5w3GYkkW6gpWfZydqiyJaaLcRmYIfiOK99h/xR/qqYFRgRdvCEAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTcrMDE6MDDpm+YuAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE3KzAxOjAwmMZekgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAzM3gxMSsyODkrNjM1zXHkjwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzg1ODJmNDllYTdiYzY5ODY0MWExNDM0NWQzN2RiMDI1LmR2aSAtb3GeX4QAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS84NTgyZjQ5ZWE3YmM2OTg2NDFhMTQzNDVkMzdkYjAyNS5wc5w72VgAAAAASUVORK5CYII=" />.</p>
<p>The effective trial stress is compared to the yield stress of the material by assuming that there is no plastic flow during the increment. The yield stress corresponding to the previously converged increment is given by</p>
<div class="latex">^{old}\sigma_{ys} = \sigma_{ys0}+\sigma_h\left(^{old}\epsilon_{pe}\right)</div>
<p>Notice that the left-superscripted <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAbCAMAAAAnBw3vAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACIzEUTdZnfMiFWZu6rucIVWsgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADASURBVDjLnVLLEgMhCENREHTr//9tYe30tD7aHITRDAkgwBchjBgRFkiZ7sh9SYM8qsWyZIU8IstMjpUBqFpKxE2fWf4uBNWsiQBOrAW/t3ez5unMGjc7Crk1anNr2u7uqAZ1+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FLgNTN2yAyh47+WuTGbZvD9gybGns2DyO2DoeH7gndaahvJVDGYXqLVTuii4ScfDvkUCKanPjUKLLp6/6AuMOpf9TcwDIYfUbEPpgF+6Z/QyFbqYHK1AuQyyI53ETcYFUtrRo2oS2NAHd3iI9LNUH5/Y1Uo5w5ezqgEOtV9j1utoPcxSX+cZIDQJ/nInn+f/6BouzBTOkXAC0AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDA0OjI3OjE4KzAxOjAwH9OWxwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwNDoyNzoxOCswMTowMG6OLnsAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMjd4MTYrMjkyKzYzNcsMiQgAAAAmdEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUk4IDAwMy4wMDIKwPyPuQAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2ZhZjNiOTg2NWFkOTUyOWI2ZDgwNmZmMThlODJkZDY4LmR2aSAtb+BaZWMAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9mYWYzYjk4NjVhZDk1MjliNmQ4MDZmZjE4ZTgyZGQ2OC5wc3Qr12wAAAAASUVORK5CYII=" /> in Steps 1 and 2 represent the material state of the previously converged increment, as we discussed earlier.</p>
<p>Now we check if the trial stress causes plastic flow. For another way of expressing this, if the trial stress is inside the yield surface, the response will be purely elastic during the increment. If not, plastic flow will result. The check is performed using the yield condition:</p>
<div class="latex">f=\left\{\begin{array}{c l}\sigma_{trial,e}-^{old}\sigma_{ys}<0 &#038; \mathrm{Elastic}\\         \sigma_{trial,e}-^{old}\sigma_{ys}\ge0 &#038; \mathrm{Elastoplastic}\end{array}\right.</div>
<p><img src="https://cdn.comsol.com/wordpress/2017/11/elastic-and-elastoplastic-computations.png" title="" alt="Diagrams illustrating the yield condition for elastic and elastoplastic computations." width="1000" height="472" class="alignnone size-full wp-image-238411" /><br />
<em>Check of the yield condition to determine elastic or elastoplastic computation.</em></p>
<p>The stress update algorithm now necessarily branches off into either a purely elastic computation or an elastoplastic computation. We will follow each of these branches, starting with the purely elastic branch.</p>
<h4>Elastic Computation</h4>
<p>Because we determined that there is no plastic flow during the increment, the trial stress deviator is, in fact, identical to the stress deviator, and the update of the plastic strain tensor and the effective plastic strain is trivial.</p>
<div class="latex">\left\{\begin{array}{lcl}\bm\sigma &#038;=&#038; \mathrm{dev}\left(\bm\sigma_{trial}\right) + K\mathrm{trace}\left(\bm\epsilon\right)\mathbf{1}\\\bm\epsilon_p &#038;=&#038; ^{old}\bm\epsilon_p\\\epsilon_{pe} &#038;=&#038; ^{old}\epsilon_{pe}\end{array}\right.</div>
<p>We can directly return the pure elastic stress-strain relation as the Jacobian.</p>
<h4>Elastoplastic Computation</h4>
<p>The objective of the elastoplastic branch of the stress update algorithm is to compute the stress deviator <em>and</em> update the plastic strains. We begin by again expressing the stress deviator, now knowing that plastic flow takes place during the increment:</p>
<div class="latex">\mathrm{dev}\left(\bm\sigma\right) =2G\,\mathrm{dev}\left(\bm\epsilon-^{old}\bm\epsilon_{p}-\Delta\bm\epsilon_p\right)=\mathrm{dev}\left(\bm\sigma_{trial}\right)- 2G\Delta{\lambda}\,\mathrm{dev}\left(\bm{\sigma}\right)</div>
<p>or</p>
<div class="latex">\mathrm{dev}\left(\bm\sigma\right) = \frac{1}{\left(1+2G\Delta\lambda\right)}\mathrm{dev}\left(\bm\sigma_{trial}\right)</div>
<p>In the above equation, we used a discrete form for the flow rule that states that an increment in plastic strain is proportional to the stress deviator through a so-called plastic multiplier <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAARBAMAAAChsNjxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIuzOZRN1mIu53zFUl1XfZAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAJZJREFUGNNjYMAKGAXQRZgMQCRLGEJE/BmY6psAF1F5DKa4NsCNUYhLANGsB+DGTJgHNoj3JUxEiIH1CZixGiaiycD5FMwIhxvDwBAHtuaeA8wYBoZ5ASAHqSvAjAFaAzLUWagAZgwD2CCWQpYncGPABnk5MJRCjAlSAoK4AJYVDAxaELe/A4OX7EC18y4gBwALCAOtBQBrniDbEiT0rgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwNDoyNzoxOCswMTowMB/TlscAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTgrMDE6MDBuji57AAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADIweDEwKzI5Nis2MzkwuPPmAAAAJnRFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTVIxMiAwMDMuMDAyCu2z3ksAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS8wZDFhNzM1MzBmN2E1OWQ3ZmM4NGIzYTUwOTRkMDllMS5kdmkgLW+ke8CMAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvMGQxYTczNTMwZjdhNTlkN2ZjODRiM2E1MDk0ZDA5ZTEucHMsuIK5AAAAAElFTkSuQmCC" />. Let&#8217;s stop for a moment and consider a graphical representation of this equation for stress:</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/11/schematic-of-the-trial-stress-deviator-correction.png" title="" alt="A diagram showing the correction of the trial stress deviator." width="623" height="468" class="alignnone size-full wp-image-238421" /><br />
<em>Graphical representation of the correction of the trial stress deviator.</em></p>
<p>If we compute a trial stress deviator that lies outside the yield surface, we need to make a correction so that the stress deviator is returned to the to-be-determined yield surface. The plastic multiplier determines the exact amount by which the trial stress deviator should be scaled back to give the correct stress deviator. If we compute the plastic multiplier, it is straightforward to then compute the stress deviator and the plastic strain increment.</p>
<p>The key steps are to:</p>
<ol>
<li>Transform the equation for stress into a governing scalar equation</li>
<li>Express all the unknowns in a single parameter</li>
<li>Solve the scalar equation for this parameter</li>
</ol>
<p>We can relate the plastic multiplier to the effective plastic strain increment <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAXCAMAAABK+S0aAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TABGIu91EM5kiVcxm7qp3WNoVNwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACzSURBVCjPrdNBEsMgCAVQIAFEE7n/bauJtt3EsujfOYMPDBOAEUSIhrZoJe7OUVQ8yCKBBllKkGJsQ6GxMs9G7e4jCo3V+yS54BLt7EWlYzH06DbYM/+Y9MP6RkSyRCe7+GhvdLBjVCwqpetGZhNVmtHO0n214FaBz+s4scO/k1qXyqUCggNwTk5k8jhSukbgtr16cmSHvfMu0kvlR2lWpvYeNa62rkQPdL5j8d/icWP/zQsijgTtMvj/oAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwNDoyNzoxOCswMTowMB/TlscAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDQ6Mjc6MTgrMDE6MDBuji57AAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADI1eDE0KzI5Mys2MzU0oRahAAAAJnRFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTVIxMiAwMDMuMDAyCu2z3ksAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82NGFhNzU0MjQ3ZjdkODllMmRjMDczMzY2N2Q1NmMyZi5kdmkgLW9Bzv63AAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNjRhYTc1NDI0N2Y3ZDg5ZTJkYzA3MzM2NjdkNTZjMmYucHOmpFMzAAAAAElFTkSuQmCC" /> using the flow rule and then transform the equation for stress into a governing scalar equation:</p>
<div class="latex">\sigma_{ys0}+\sigma_h\left(^{old}\epsilon_{pe} + \Delta\epsilon_{pe}\right)+3G\Delta\epsilon_{pe}-\sigma_{trial,e}=0.</div>
<p>This is in general a nonlinear equation, and we need to solve it using a suitable iterative scheme. We are now ready to compute the stress tensor, the plastic strain tensor, and the effective plastic strain.</p>
<div class="latex">\left\{    \begin{array}{ccl}\bm\sigma &#038;=&#038; \frac{1}{1+2G\Delta\lambda}\mathrm{dev}\left(\bm\sigma_{trial}\right) + K\mathrm{trace}\left(\bm\epsilon\right)\mathbf{1}\\ \\\bm\epsilon_p &#038;=&#038; ^{old}\bm\epsilon_p + \Delta\bm\epsilon_p\\\epsilon_{pe} &#038;=&#038; ^{old}\epsilon_{pe} + \Delta\epsilon_{pe}         \end{array}\right.</div>
<p>The updated plastic strain tensor and effective plastic strain are stored as state variables.</p>
<h3>Computing the Jacobian of the Material</h3>
<p>We computed the stresses and updated the material state (the <em>state variables</em>) for our material model. Now, we turn our attention to the Jacobian computation. The Jacobian has other names in literature, such as <em>tangent stiffness</em>, <em>tangent modulus</em>, or <em>tangent operator</em>. In the stress update algorithm, we express the deviatoric and hydrostatic parts of the stress tensor as:</p>
<div class="latex">\begin{array}{rcl}	\mathrm{dev}\left(\bm\sigma\right) &#038;=&#038;  \mathrm{dev}\left(\bm\sigma_{trial}\right)-2G\,\Delta\bm\epsilon_p \\\mathrm{trace}\left(\bm\sigma\right)&#038;=&#038;3K\mathrm{trace}\left(\bm\epsilon\right)\end{array}.</div>
<p>The Jacobian that we want to compute is the derivative of the Second Piola-Kirchhoff stress tensor with respect to the Green-Lagrange strain tensor. For our example material, we assume that strains are small. This means that we do not need to distinguish between various measures of stresses and strains, because they are indistinguishable in the small-strain limit. The derivative <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACKIzO5VmUQRZqrdM7t3WyW0ngAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABgSURBVBjTjY/dDoAgCEYVFX+Svvd/27IaGusiLr6NMxgH536Xp4CYFkCcSwVNwHWMYc5Qu3JT0OHPLKErEbZnkAzZUQxhWDn5IM+WVxvUe1uVM+IwoeUHAqTJS6ET5dkdE88CD95Ya+cAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTgrMDE6MDAf05bHAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE4KzAxOjAwbo4uewAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMHgxMCszMDErNjM5vioZRAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01TWTEwIDAwMy4wMDIKdxsBEAAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2RjZjVhOWQxZDA5MjFlODhiYmJiNzUyNGM4NGQ5OWFmLmR2aSAtb9sQ3nUAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9kY2Y1YTlkMWQwOTIxZTg4YmJiYjc1MjRjODRkOTlhZi5wczm2uzUAAAAASUVORK5CYII=" /> of stress with respect to strain is written as</p>
<div class="latex">\mathrm{d}\bm\sigma=\mathcal{C}:\mathrm{d}\bm\epsilon</div>
<p>If we use the equations for the deviatoric and hydrostatic stress and the definition of the trial stress, we can express the Jacobian in the following way:</p>
<div class="latex">\mathrm{d}\bm\sigma= \underbrace{ \left[  \underbrace{2G\left(\mathcal{I}-\frac{1}{3}\mathbf{1}\otimes\mathbf{1}\right) + K\left(\mathbf{1}\otimes\mathbf{1}\right)}_{\mathcal{C}^{e}} - 2G\frac{\mathrm{d}\bm\epsilon_p}{\mathrm{d}\bm\epsilon} \right]}_{\mathcal{C}}:\mathrm{d}\bm{\epsilon}</div>
<p>Note that we replaced the increment of the plastic strain tensor by the total plastic strain tensor in the expression above. Their derivatives with respect to strain are the same, by virtue of the additive update of the plastic strains. Recall that our two modeling approaches require differently defined Jacobians. We see immediately how they are related. In the <em>General stress-strain relation</em>, the Jacobian is given by the full expression above. In the <em>Inelastic residual strain</em>, the Jacobian is given by one term in the expression, namely:</p>
<div class="latex">\frac{ \mathrm{d}\bm\epsilon_{inel}}{\mathrm{d}\epsilon}=\frac{\mathrm{d}\bm\epsilon_p}{\mathrm{d}\epsilon}</div>
<p>The term <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAARCAMAAAABrcePAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIIszumUQRZjO7qt133vuZ1QAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAB4SURBVBjTjY+BDoMgDETbQ1ugzvv/vxU2dWpYsiY06Qu8HiJ/lkL1MiZMnBsA2vlimOdCSCKg9cRW+hOqeFydWN79JVI7P+5Xptbz1GdTX4+9YcNk3TuqlXnIjeMfxk++e9Kdg+Xjw507554ceIpAxhKDsBXwB9oA9nUCe/uD6twAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTkrMDE6MDC5pJ1zAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE5KzAxOjAwyPklzwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxNHgxMCsyOTgrNjM5MUQaNgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01TWTEwIDAwMy4wMDIKdxsBEAAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2ZmZGYzM2JkMWViZjA1ZmM2YWEyODMxZmM1YWZlZDk1LmR2aSAtb9cTazMAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9mZmRmMzNiZDFlYmYwNWZjNmFhMjgzMWZjNWFmZWQ5NS5wc7+2tjUAAAAASUVORK5CYII=" /> is the elastic Jacobian. For a purely elastic computation, the total Jacobian of the <em>General stress-strain relation</em> equals this quantity, while the Jacobian of the <em>Inelastic residual strain</em> in this case is zero.</p>
<p>If we use the flow rule and the chain rule for differentiation, we arrive at the following expression:</p>
<div class="latex">\frac{\mathrm{d}\bm\epsilon_p}{\mathrm{d}\bm\epsilon} = \Delta\lambda\frac{\mathrm{d}\,\mathrm{dev}\left(\bm\sigma\right)}{\mathrm{d}\bm\epsilon}\,+ \,\mathrm{dev}\bm\sigma\otimes\frac{\mathrm{d}\Delta\lambda}{\mathrm{d}\bm\epsilon}</div>
<p>Notice that this expression depends on the plastic multiplier. This suggests that for the current material model, there is little benefit in choosing the <em>Inelastic residual strain</em> over the <em>General stress-strain relation</em>, because both approaches require a full stress update algorithm to compute the plastic multiplier. For other material models, such as creep models, the benefit would be greater. Using the governing scalar equation and the flow rule, we can compute the last derivative in the expression above.</p>
<div class="latex">\frac{\mathrm{d}\Delta\lambda}{\mathrm{d}\bm\epsilon} = \left(\frac{3G}{\sigma_{ys}}\right)^2 \, \frac{1}{1+2G\Delta\lambda} \, \frac{1}{3G+\frac{\mathrm{d}\sigma_h}{\mathrm{d}\Delta\epsilon_{pe}}} \, \left(1-\frac{2}{3}\Delta\lambda\frac{\mathrm{d}\sigma_h}{\mathrm{d}\Delta\epsilon_{pe}}\right) \, \mathrm{dev}\left(\bm\sigma\right)</div>
<p>In order to ensure rapid convergence of the global equation solver and ultimately reduce the simulation time, the computed Jacobian should be accurate. Well, what does <em>accurate</em> mean? Simply put, it means that the computed derivative must be consistent with the stress update algorithm that was used to compute stresses. That is, any assumptions or simplifications used in the stress update algorithm should be reflected in the computation of the Jacobian. A derivative based on the stress update algorithm is often called <em>algorithmic</em> or <em>consistent</em>. </p>
<p>In some situations, the Jacobian computation can be cumbersome. It is often possible in these situations to use an approximate Jacobian. Keep in mind that the accuracy of the solution is determined by the stress update algorithm. As long as the Jacobian is not too far off, the global equation solver will still converge to the correct solution, albeit at a lower rate of convergence.</p>
<h4>Further Comments on Jacobian Computation</h4>
<ul>
<li>The external material uses a reduced vector and matrix form for stresses, strains, and Jacobians. We need to phrase our stress update algorithm and Jacobian computation accordingly.</li>
<li>The strain vector that enters into the external material uses <em>tensor</em> components for the shears. The Jacobian is defined assuming tensor components of the shears; therefore, it is generally nonsymmetric.</li>
<li>The case of plane stress is handled outside the external material feature, so we only need to make one implementation of our model. In other words, the model we implement can be directly used in 3D, 2D axial symmetry, and 2D plane stress and plane strain analyses.</li>
</ul>
<h3>Application Example: Specialization of the Material Model</h3>
<p>In the sections above, we developed a stress update algorithm and outlined how to compute a Jacobian. Now, we will consider a special case for the hardening curve. We assume that the yield stress is a linear function of effective plastic strain. This is usually called <em>linear hardening</em>, and it is defined by a constant &#8220;plastic modulus&#8221; <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAUCAMAAADWUb86AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIRCLMqpndd7tVETPujkj4LgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACxSURBVCjPtZJBEsMgCEUFjKhovP9tA5pmuqiaTVk4jH7h8dW5PwTgE0sdtX7u8ViXa34kYSnjeCdpKYtsnXcy30DXNX5HAyLcyjgSUZadrKNhGQDTYQdaHXhlWvRxjeCVa2zvZlcExIpSki+HOpq2Y3TgMXW+qoig+/hpgLlle/R8tuKKO3USfzIYsqYTm6APWjEml7Jmx2/cIOCrsiqUqKxOvkyApP+JxHqhwG3mu7gAATUDv8DnhZsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTkrMDE6MDC5pJ1zAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE5KzAxOjAwyPklzwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAyM3gxMisyOTQrNjM39Kh39wAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2IxZjA0YjJkNTlkOGYwZDNmYmRiMDIxODEyZTRjZjk0LmR2aSAtb1pUBQoAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9iMWYwNGIyZDU5ZDhmMGQzZmJkYjAyMTgxMmU0Y2Y5NC5wcxlDFggAAAAASUVORK5CYII=" />, which is the constant slope of the hardening curve. As it turns out, linear hardening means that the plastic strain increment can be solved on closed form:</p>
<div class="latex">\Delta\epsilon_{pe} = \frac{\sigma_{trial,e}-^{old}\sigma_{ys}}{3G+E_{iso}}</div>
<p>In the example&#8217;s source code file, we have made use of this specialization into linear hardening.</p>
<p>Let&#8217;s consider an example problem of pulling a plate with a hole. </p>
<p><img src="https://cdn.comsol.com/wordpress/2017/11/plate-with-a-hole-COMSOL-Multiphysics.png" title="" alt="A schematic of a plate with a hole." width="1000" height="518" class="alignnone size-full wp-image-238431" /><br />
<em>Dimensions, boundary conditions, and loads for a plate with a hole.</em></p>
<p>The problem has two symmetry planes and only one-quarter of the plate is modeled. We use the following material parameters:</p>
<ul>
<li><em>E</em> = 70 GPa</li>
<li><em>ν</em> = 0.2</li>
<li><img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAASCAMAAADrP+ckAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIEcy7d2bdRO4iM5mqxZfsbAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACxSURBVCjPrZHhDsMgCIQRh0ix+v5vu9OuS9N2LkvGD6Lmk4OD6IcIPGLKxIewNOY0hxQ561yOpWe56kU2jvtlCR8ocei8ztbGv1bOUOkaUo6UDlllPK6YWUOgJEeJBdole4ccc5qQVyp16/dN2WpaR5ex/4BtvqxKJwrcPgnqkBhKc04UBnVjEOrEBnl0lijmbqNfKReraIst8JjF+c5riB335HZTiTxvJn0JnW/8H/EEMKMD3BqLj8UAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDQ6Mjc6MTUrMDE6MDB+BPcHAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExL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Q6Mjc6MTkrMDE6MDC5pJ1zAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDA0OjI3OjE5KzAxOjAwyPklzwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAyOXgxMisyOTErNjM31n8Q5gAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzcyNmQyZWUxMDJmNjdjOGY3Y2QzM2MzZWNlNmQ4ZTdhLmR2aSAtb710dmEAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS83MjZkMmVlMTAyZjY3YzhmN2NkMzNjM2VjZTZkOGU3YS5wc2gW7U4AAAAASUVORK5CYII=" /> = 2.17 GPa</li>
</ul>
<p>The problem assumes plane stress. We can compare predictions of the implementation of our material model with the built-in counterpart. We expect differences only within the order of numerical round-off as long as the tolerance when solving the nonlinear equations is tight enough.</p>
<div class="row">
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2017/11/effective-von-Mises-stress-in-MPa-of-external-material-COMSOL-Multiphysics-model.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/11/effective-von-Mises-stress-in-MPa-of-external-material-COMSOL-Multiphysics-model.png" title="External material implementation" alt="A COMSOL Multiphysics model of the effective von Mises stress for the external material model." class="alignnone size-full wp-image-238441" /></a>
</div>
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2017/11/COMSOL-Multiphysics-built-in-material-model-of-the-effective-von-Mises-stress.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/11/COMSOL-Multiphysics-built-in-material-model-of-the-effective-von-Mises-stress.png" title="Built-in material model " alt="A COMSOL Multiphysics model of the effective von Mises stress for the built-in material model." class="alignnone size-full wp-image-238451" /></a>
</div>
</div>
<p><em>Computations of the effective von Mises stress in MPa of the external material implementation (left) and built-in material model (right).</em></p>
<div class="row">
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2017/11/effective-plastic-strain-for-a-external-material-model.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/11/effective-plastic-strain-for-a-external-material-model.png" title="External material implementation" alt="A COMSOL Multiphysics model of the effective plastic strain for the external material model." class="alignnone size-full wp-image-238461" /></a>
</div>
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2017/11/effective-plastic-strain-built-in-material-model.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/11/effective-plastic-strain-built-in-material-model.png" title="Built-in material model" alt="A COMSOL Multiphysics model of the effective plastic strain for the built-in material model." class="alignnone size-full wp-image-238471" /></a>
</div>
</div>
<p><em>Computations of the effective plastic strain for the external material implementation (left) and built-in material model (right).</em></p>
<h3>Some Concluding Remarks</h3>
<p>There are actually more scenarios where you can employ the possibility to add external materials.</p>
<p>Consider a situation where you have a source code for a material model that has been verified in another context. You may have created it yourself or found it in a textbook or journal paper. In this case, it may be more efficient to use the external material functionality than casting it into a new form and enter it as set of ODEs. Even when the code is written in, for example, Fortran or C++, it is usually rather straightforward to wrap it into the C interface used by the external material.</p>
<p>A coded implementation may be computationally more efficient than using the <em>User Defined</em> or extra PDE options. The reason is that the detailed knowledge about the material law makes it possible to devise efficient stress updates, using, for example, local time stepping.</p>
<p>You may want to distribute your material model in a compiled form so that the end user cannot access the source code. As a matter of fact, the third-party product <a href="https://polyumod.com/" target="_blank">PolyUMod</a> is implemented this way.</p>
<p id="nextsteps">
<h3>Next Steps</h3>
</p>
<ul>
<li>Download the example source code and model files featured in this blog post (linear_hardening.mph, linear_hardening.c, linear_hardening.dll) and get more details on how to use external materials:
<ul>
<li><a href="/model/external-material-examples-structural-mechanics-32331">External Material Examples, Structural Mechanics</a></li>
</ul>
</li>
<li>Read a previous blog post about <a href="/blogs/accessing-external-material-models-for-structural-mechanics/">accessing external material models</a></li>
<li>Learn more about computational plasticity with these highly informative books:
<ul>
<li>J.C. Simo and T.J.R. Hughes, <em>Computational Inelasticity</em>, Interdisciplinary Applied Mathematics, Vol. 7, Springer-Verlag, 1998.</li>
<li>M. Kojic and K.J. Bathe, <em>Inelastic Analysis of Solids and Structures</em>, Computational Fluid and Solid Mechanics, Springer-Verlag, 2005.</li>
<li>T. Belytschko, W.K. Liu, and B. Moran, <em>Nonlinear Finite Elements for Continua and Structures</em>, Wiley, 2000.</li>
</ul>
</li>
</ul>
<p><em>PolyUMod software is developed by Veryst Engineering LLC. COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by Veryst Engineering LLC.</em></p>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.de/blogs/how-to-implement-elastoplasticity-in-a-model-using-external-materials/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>What Is the Physics Behind a Counterweight Trebuchet?</title>
		<link>https://www.comsol.de/blogs/what-is-the-physics-behind-a-counterweight-trebuchet/</link>
		<comments>https://www.comsol.de/blogs/what-is-the-physics-behind-a-counterweight-trebuchet/#comments</comments>
		<pubDate>Wed, 11 Oct 2017 14:14:44 +0000</pubDate>
		<dc:creator><![CDATA[Mats Danielsson]]></dc:creator>
				<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Structural Mechanics & Thermal Stress]]></category>
		<category><![CDATA[Multibody Dynamics Module]]></category>
		<category><![CDATA[Structural Mechanics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=236511</guid>
		<description><![CDATA[The trebuchet is a large siege weapon that you might recognize from movies set in the Middle Ages or fantasy worlds. This weapon is built on the idea of converting potential energy into kinetic energy to hurl a projectile over a large distance. Simple as it seems, the trebuchet is a complicated dynamical system. In this blog post, we will build a simplified model of a counterweight trebuchet using the Multibody Dynamics Module and examine some of its design features. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The <em>trebuchet</em> is a large siege weapon that you might recognize from movies set in the Middle Ages or fantasy worlds. This weapon is built on the idea of converting potential energy into kinetic energy to hurl a projectile over a large distance. Simple as it seems, the trebuchet is a complicated dynamical system. In this blog post, we will build a simplified model of a counterweight trebuchet using the Multibody Dynamics Module and examine some of its design features.</p>
<p><span id="more-236511"></span></p>
<h3>War Wolf: The Ultimate Siege Weapon</h3>
<p>A trebuchet is a long-range weapon that uses a swinging arm to send a projectile toward a target. The machine is generally associated with hurling boulders at a castle wall to bring it down, but trebuchets have also been used to throw <em><a href="https://www.britannica.com/technology/Greek-fire" target="_blank">Greek fire</a></em> and wreak all kinds of havoc. Trebuchets have appeared in several films and TV shows, such as <em>The Return of the King</em> (2003); <em>Marco Polo</em> (2014&ndash;2016); and even in <em>Monty Python and the Holy Grail</em> (1975), where a cow was catapulted from inside the castle walls toward an unsuspecting King Arthur!</p>
<p>One nonfictional and historically notable trebuchet is <em><a href="https://en.wikipedia.org/wiki/Warwolf" target="_blank">War Wolf</a></em> (known to the English soldiers at the time as &#8220;Ludgar&#8221;). In 1304, on one of his campaigns to defeat Scotland, King Edward I besieged Stirling Castle and ordered his engineers to build a giant trebuchet. War Wolf was the largest trebuchet ever made and was rumored to send boulders of about 150 kilograms across a distance of over 200 meters.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/10/Stirling_Warwolf_Trebuchet.jpg" title="" alt="A photo of a War Wolf trebuchet replica." width="1000" height="863" class="alignnone size-full wp-image-236581" /><br />
<em>A small-scale replica of War Wolf, a counterweight trebuchet that uses a boulder-holding sling at the end of a swinging arm. Image by Ron L. Toms. Licensed under <a href="https://creativecommons.org/licenses/by/3.0/deed.en" target="_blank">CC BY 3.0</a>, via <a href="https://commons.wikimedia.org/wiki/File:Stirling_Warwolf_Trebuchet.jpg" target="_blank">Wikimedia Commons</a>.</em></p>
<p>Large trebuchets of this type would typically feature a counterweight roughly ten times the weight of the projectile, which would put War Wolf&#8217;s counterweight in the neighborhood of 1.5 tons! The poor prospects of surviving an assault from War Wolf prompted the Scottish garrison inside the castle to offer their surrender. However, the king would not have it, as he was eager to try out his new trebuchet. He forced the Scots to remain inside the castle and restarted his siege. War Wolf proved its worth, and the rest is, as they say, history.</p>
<p>The working principle of a trebuchet is simple. The counterweight is raised and the trebuchet is cocked. When the trebuchet is fired, the counterweight drops, and the potential energy of the system is converted into a combination of kinetic and potential energy. The projectile undergoes a swinging motion and is released at some suitable position along its trajectory. This happens when one end of the sling slips off the tip of the swinging arm.</p>
<h3>Performing a Multibody Analysis of a Counterweight Trebuchet</h3>
<p>Here, we build a computational model of a basic trebuchet with the Multibody Dynamics Module and version 5.3 of the COMSOL Multiphysics® software.</p>
<p>Our model uses the following assumptions and physical dimensions:</p>
<ul>
<li>All of the components are assumed rigid (including the sling)</li>
<li>All hinged joints are assumed frictionless</li>
<li>The projectile is prevented from falling through the ground using a penalty stiffness</li>
<li>The vertical beam of length <em>L</em><sub>5</sub> = 3.5 m, representing the carriage, is fixed</li>
<li>The ratio of counterweight mass (<em>M</em> = 2000 kg) to projectile mass (<em>m</em>) is 100</li>
<li>The counterweight hangs from a beam of length <em>L</em><sub>4</sub> = 1 m</li>
<li>The swinging arm is 6 meters in total length with <em>L</em><sub>1</sub> = 1 m</li>
<li>The length of the sling is <em>L</em><sub>3</sub> = 3 m</li>
</ul>
<p><img src="https://cdn.comsol.com/wordpress/2017/10/counterweight-trebuchet-model-geometry.png" title="" alt="The geometry of a counterweight trebuchet model before adding physics and running the simulation." width="604" height="498" class="alignnone size-full wp-image-236591" /><br />
<em>A schematic of the counterweight trebuchet model.</em></p>
<p>As the projectile is swung around by the swinging arm, it describes a nontrivial motion of varying velocity. If the trebuchet is to be designed for maximum throwing distance, a question arises: At what point during its trajectory should the projectile be released? Elementary mechanics tells us that if we neglect air resistance and the height from the ground at which the projectile is released, the throwing distance <em>s</em> of the projectile (measured in the positive <em>x</em> direction) can be expressed as</p>
<div class="latex">s=\frac{v_0^2 \,\mathrm{sin}\left(2\alpha\right)}{g}</div>
<p>where <em>v</em><sub>0</sub> and <em>α</em> are the velocity and angle at the time of projectile release, respectively, and <em>g</em> is the gravitational acceleration.</p>
<p>Thus, finding the maximum throwing distance is equivalent to finding the combination of <em>v</em><sub>0</sub> and <em>α</em> that maximizes <em>s</em>. Intuitively, you might think that the angle of release should be <em>α</em> = 45°. Let&#8217;s see if this holds true for the trebuchet model.</p>
<p>The animation below shows the motion of the trebuchet as it is fired. The quantity <em>s</em> is shown along the projectile trajectory, and it represents the throwing distance that would follow from releasing the projectile at a certain point on this trajectory.</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:75.0% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_dofp7w60qr seo=false videoFoam=true" style="height:100%;position:relative;width:100%">
<div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/dofp7w60qr/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" onload="this.parentNode.style.opacity=1;" title="" /></div>
</div>
</div>
</div>
<p>In the results below, the throwing distance is plotted as a function of the release angle <em>α</em>. The maximum throwing distance is obtained if the projectile is released at <em>α</em> ≈ 38°. The plot reveals that deviations of the order of 5° from this optimum only affect the throwing distance by a few meters. In other words, as long as the release angle is roughly correct, the trebuchet will function as intended.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/10/counterweight-trebuchet-throwing-distance-COMSOL-Multiphysics-plot.png" title="" alt="A 1D plot of the throwing distance of a counterweight trebuchet for different release angles." width="614" height="441" class="alignnone size-full wp-image-236601" /></p>
<p>Now, let&#8217;s examine what happens if we modify the length of the sling by ±10% using a parametric sweep. The plot below shows that the maximum throwing distance that can be obtained is greatly affected by the length of the sling. So, if you are in the business of designing trebuchets for medieval kings, you should pay attention to this design parameter.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/10/counterweight-trebuchet-throwing-distance-for-different-sling-lengths.png" title="" alt="A plot of a counterweight trebuchet's throwing distance for different sling lengths." width="612" height="452" class="alignnone size-full wp-image-236621" /></p>
<p>Using a parametric sweep, you could easily examine the effect of changing other physical lengths in the model (while keeping the counterweight at fixed height for consistency). Try for yourself by downloading the model file from our Application Gallery.</p>
<div class="flex-center">
<a href="https://www.comsol.com/model/simulation-of-a-counterweight-trebuchet-55381" class="btn-solid btn-md btn-red">Get the MPH-File</a>
</div>
<h3>Concluding Remarks</h3>
<p>In this blog post, we demonstrated that the Multibody Dynamics Module can be used to build a simple model of a counterweight trebuchet. If you are interested in learning more about multibody dynamics modeling, check out these additional blog posts:</p>
<ul>
<li><a href="/blogs/an-introduction-to-gear-modeling-in-comsol-multiphysics/">An Introduction to Gear Modeling in COMSOL Multiphysics</a></li>
<li><a href="/blogs/modeling-the-dynamics-of-a-gyroscope/">Modeling the Dynamics of a Gyroscope</a></li>
<li><a href="/blogs/the-motions-and-mechanics-of-a-truck-mounted-crane/">The Motions and Mechanics of a Truck-Mounted Crane</a></li>
</ul>
<p>Wondering why War Wolf was also called Ludgar? Apparently, the French name <em>Loup de Guerre</em> (&#8220;wolf of war&#8221;) proved more than a mouthful for the English soldiers, so it was condensed into &#8220;Ludgar&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.de/blogs/what-is-the-physics-behind-a-counterweight-trebuchet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
