<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20. Sep 2017, at 19:05, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 20, 2017 at 12:57 PM, Maximilian Hartig<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:imilian.hartig@gmail.com" target="_blank" class="">imilian.hartig@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div class="">On 20. Sep 2017, at 18:17, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:</div><br class="m_820538064167687730Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 20, 2017 at 11:46 AM, Maximilian Hartig<span class="m_820538064167687730Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:imilian.hartig@gmail.com" target="_blank" class="">imilian.hartig@gmail.<wbr class="">com</a>></span><span class="m_820538064167687730Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Hello,<br class=""><br class="">I’m trying to implement plasticity using petscFE but I am quite stuck since a while. Here’s what I’m trying to do:<br class=""><br class="">I have a TS which solves the following equation:<br class="">gradient(stress) +Forces = density*acceleration<br class="">where at the moment stress is a linear function of the strain and hence the gradient of the displacement. This works fine. Now I want to compare the stress to a reference value and if it lies above this yield stress, I have to reevaluate the stress at the respective location. Then I need to update the plastic strain / yield stress at this location.<br class="">I tried doing that first by solving three fields at the same time: displacements, stresses and yield stress. This failed.<br class="">Then, I tried solving only for displacement increments, storing the displacements, stresses and yield stress from the past time step in an auxiliary field. The auxiliary fields are updated after each time step with a second SNES, using the displacement increments from the current, converged time step. This also failed.<br class="">In both cases the code had problems converging and when it did, I ended up with negative plastic strain. This is not possible and I don’t know how it happens because I explicitly only increment the plastic strain when the increment is positive.<br class=""><br class="">I am sure there is an easy solution to how I can update the internal variables and determine the correct stress for the residual but I just cannot figure it out. I’d be thankful for any hints.<br class=""></blockquote><div class=""><br class=""></div><div class="">It looks like there are two problems above:</div><div class=""><br class=""></div><div class="">1) Convergence</div><div class=""><br class=""></div><div class="">For any convergence question, we at minimum need to see the output of</div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>-snes_view -snes_converged_reason -snes_monitor -ksp_monitor_true_residual -snes_linesearch_monitor</div><div class=""><br class=""></div><div class="">However, this does not seem to be the main issue.</div><div class=""><br class=""></div><div class="">2) Negative plastic strain</div></div></div></div></div></blockquote><div class=""><br class=""></div>This is what I’m mainly concerned with.<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">If the system really converged (I cannot tell without other information), then the system formulation is wrong. Of course, its</div><div class="">really easy to check by just plugging your solution into the residual function too. I do not understand your explanation above</div><div class="">completely however. Do you solve for the plastic strain or the increment?</div></div></div></div></div></blockquote><br class=""><div class="">I am trying to find a formulation that works and I think there is a core concept I am just not “getting”. </div><div class="">I want to solve for the displacements. </div><div class="">This works fine in an elastic case. When plasticity is involved, I need to determine the actual stress for my residual evaluation and I have not found a way to do that.</div><div class="">All formulations for stress I found in literature use strain increments so I tried to just solve for increments each timestep and then add them together in tspoststep. But I still need to somehow evaluate the stress for my displacement increment residuals. So currently, I have auxiliary fields with the stress and the plastic strain.</div></div></div></blockquote><div class=""><br class=""></div><div class="">First question: Don't you get stress by just applying a local operator, rather than a solve?</div></div></div></div></div></blockquote><div>That depends on the type of plasticity. For a linear hardening formulation it is correct that I could just apply a local operator. I’d be happy with that for now. But I’d still need to save stress state and plastic strain to determine whether or not I’m dealing with a plasticity. I don’t know how to do that inside the residual evaluation. Plus DMProjectField seems to have problems evaluating the gradient when boundary conditions are imposed.</div><div><br class=""></div><div>Thanks,</div><div>Max</div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""> Thanks,</div><div class=""><br class=""></div><div class=""> Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class="">I evaluate the current trial stress by adding a stress increment assuming elastic behaviour. If the trial stress lies beyond the yield stress I calculate the corrected stress to evaluate my residual for the displacements. But now I somehow need to update my plastic strain and the stress in the auxiliary fields. So in tspoststep I created another SNES to now calculate the stress and plastic strain while the displacement is the auxiliary field. </div><div class=""><br class=""></div>I’m sure there’s an elegant solution on how to update internal variables but I have not found it.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Max<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""> <span class="m_820538064167687730Apple-converted-space"> </span>Thanks,</div><div class=""><br class=""></div><div class=""> Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Thanks,<br class="">Max</blockquote></div><br class=""><br clear="all" class=""><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div>--<span class="m_820538064167687730Apple-converted-space"> </span><br class=""><div class="m_820538064167687730gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.caam.rice.edu/~mk51/" target="_blank" class="">http://www.caam.rice.edu/~<wbr class="">mk51/</a></div></div></div></font></span></div></div></div></blockquote></div><br class=""></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.caam.rice.edu/~mk51/" target="_blank" class="">http://www.caam.rice.edu/~mk51/</a></div></div></div></div></div></div></blockquote></div><br class=""></body></html>