<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=""><div dir="auto" 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 22:51, 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 3:46 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 20. Sep 2017, at 19:05, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:</div><br class="m_-4834572762739778173Apple-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 12:57 PM, Maximilian Hartig<span class="m_-4834572762739778173Apple-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_-4834572762739778173Apple-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_-4834572762739778173m_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_-4834572762739778173m_820538064167687730Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:imilian.hartig@gmail.com" target="_blank" class="">imilian.hartig@gmail.c<wbr class="">om</a>></span><span class="m_-4834572762739778173m_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="m_-4834572762739778173Apple-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 class="">That depends on the type of plasticity.</div></div></div></blockquote><div class=""><br class=""></div><div class="">What type of plasticity is not local?</div></div></div></div></div></blockquote>I did not express myself correctly. The plasticity is local, but for nonlinear hardening I would have to iteratively solve to get the correct stress and plastic strain from the displacement increments.<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; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><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="">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.</div></div></div></blockquote><div class=""><br class=""></div><div class="">I do not know what you mean by this, meaning why you can't just save these as auxiliary fields. Also, it would seem to be enough to have the old displacement and the plastic strain.</div></div></div></div></div></blockquote>Yes, I can update the auxiliary fields but only after I solved for the displacements in my understanding. I still need the stress though as I have to determine whether I am in the plastic or the elastic domain.<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; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><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="">Plus DMProjectField seems to have problems evaluating the gradient when boundary conditions are imposed.</div></div></div></blockquote><div class=""><br class=""></div><div class="">There are several examples where we do exactly this. Can you show me what you mean by this?</div></div></div></div></div></blockquote><div><br class=""></div>Yes, of course. I sent an example a week ago but maybe there was a problem with the attached files. I’ll copy and paste the code and the gmsh file as text below.</div><div><br class=""></div><div>Thanks,</div><div>Max</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><div>#include <petscdm.h></div><div>#include <petscdmlabel.h></div><div>#include <petscds.h></div><div>#include <petscdmplex.h></div><div>#include <petscksp.h></div><div>#include <petscsnes.h></div><div>#include <petscts.h></div><div>#include <math.h></div><div>#include <petscsys.h></div><div><br class=""></div><div>/* define the pointwise functions we'd like to project */</div><div><br class=""></div><div>void projectstress(PetscInt dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[],</div><div>                         const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[],</div><div>                         const PetscScalar u_x[], const PetscInt aOff[], const PetscInt aOff_x[],</div><div>                         const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],</div><div>                         PetscReal t, const PetscScalar x[], PetscInt numConstants,</div><div>                         const PetscScalar constants[], PetscScalar v[]){</div><div>  const PetscReal mu =76.923076923, lbda=115.384615385;</div><div>  PetscInt Ncomp = dim;</div><div>  PetscInt comp,d;</div><div>  PetscReal sigma[dim*dim];</div><div><br class=""></div><div>   for(comp=0;comp<Ncomp;comp++){</div><div>    for(d=0;d<dim;d++){</div><div>      sigma[comp*dim+d]=mu*(u_x[comp*dim+d]+u_x[d*dim+comp]);</div><div>    }</div><div>    for(d=0;d<dim;d++){</div><div>      sigma[comp*dim+comp]+=lbda*u_x[d*dim+d];</div><div>    }</div><div>  }</div><div><br class=""></div><div>   for(d=0;d<dim;d++){</div><div>     v[d] = sigma[d*dim+d];</div><div>   }</div><div>   v[3] = sigma[0*dim+1];</div><div>   v[4] = sigma[0*dim+2];</div><div>   v[5] = sigma[1*dim+2];</div><div><br class=""></div><div>    </div><div>}</div><div><br class=""></div><div>void projectdisplacement(PetscInt dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[],</div><div>                         const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[],</div><div>                         const PetscScalar u_x[], const PetscInt aOff[], const PetscInt aOff_x[],</div><div>                         const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],</div><div>                         PetscReal t, const PetscScalar x[], PetscInt numConstants,</div><div>                         const PetscScalar constants[], PetscScalar v[]){</div><div>  PetscInt d;</div><div>  </div><div>  for(d=0;d<dim;d++){</div><div>     v[d] =u[d];</div><div>   }</div><div>}</div><div><br class=""></div><div>static PetscErrorCode initial_displacement_vector(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void *ctx)</div><div>{</div><div>  u[0]=0.0;</div><div>  u[1]=0.1*pow(x[2],2);</div><div>  u[2]=0.1*x[2];</div><div>  return 0;</div><div>}</div><div><br class=""></div><div>static PetscErrorCode expected_stress_vector(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void *ctx)</div><div>{</div><div>  const PetscReal mu =76.923076923, lbda=115.384615385;</div><div>  PetscReal strain[dim*dim];</div><div>  PetscReal gradu[dim*dim];</div><div>  PetscReal stress[dim*dim];</div><div>  PetscInt i,j;</div><div><br class=""></div><div>  /* gradient of the displacement field: */</div><div>  for(i=0;i<dim;i++){</div><div>    for(j=0;j<dim;j++){</div><div>      gradu[i*dim+j]=0.0;</div><div>    }</div><div>  }</div><div><br class=""></div><div>  gradu[1*dim+2]=0.2*x[2];</div><div>  gradu[2*dim+2]=0.1;</div><div><br class=""></div><div>  for(i=0;i<dim;i++){</div><div>    for(j=0;j<dim;j++){</div><div>      strain[i*dim+j]=0.5*(gradu[i*dim+j]+gradu[j*dim+i]);</div><div>    }</div><div>  }</div><div><br class=""></div><div>  for(i=0;i<dim;i++){</div><div>    for(j=0;j<dim;j++){</div><div>      stress[i*dim+j]=2.0*mu*strain[i*dim+j];</div><div>    }</div><div>    for(j=0;j<dim;j++){</div><div>      stress[i*dim+i]+=lbda*strain[j*dim+j];</div><div>    }</div><div>  }</div><div>  </div><div>  for(i=0;i<dim;i++){</div><div>    u[i] = stress[i*dim+i];</div><div>  }</div><div>  u[3] = stress[0*dim+1];</div><div>  u[4] = stress[0*dim+2];</div><div>  u[5] = stress[1*dim+2];</div><div>  </div><div>  </div><div>  return 0;</div><div>}</div><div><br class=""></div><div>static PetscErrorCode zero_stress(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void *ctx)</div><div>{</div><div>  const PetscInt Ncomp = 2*dim;</div><div>  PetscInt comp;</div><div>  for (comp=0;comp<Ncomp;comp++) u[comp]=0.0;</div><div>  return 0;</div><div>}</div><div><br class=""></div><div>static PetscErrorCode zero_vector(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void *ctx)</div><div>{</div><div>  PetscInt comp;</div><div>  for (comp=0;comp<dim;comp++) u[comp]=0.0;</div><div>  return 0;</div><div>}</div><div><br class=""></div><div>static PetscErrorCode SetupDiscretization(DM dm){</div><div><br class=""></div><div>  PetscInt dim = 3;</div><div>  PetscFE fe_displacement, fe_stress;</div><div>  PetscDS prob;</div><div>  PetscErrorCode ierr;</div><div>  PetscBool simplex = PETSC_TRUE;</div><div>  PetscQuadrature q;</div><div>  PetscInt order;</div><div><br class=""></div><div>  /* get the dimension of the problem from the DM */</div><div><br class=""></div><div>  ierr = DMGetDimension(dm, &dim); CHKERRQ(ierr);</div><div><br class=""></div><div>  /* Creating the FE for the displacement */</div><div>  ierr = PetscFECreateDefault(dm, dim, dim, simplex,"disp_",PETSC_DEFAULT,&fe_displacement);CHKERRQ(ierr);</div><div>  ierr = PetscObjectSetName((PetscObject) fe_displacement, "displacement");CHKERRQ(ierr);</div><div>  ierr = PetscFEGetQuadrature(fe_displacement,&q);CHKERRQ(ierr);</div><div>  ierr = PetscQuadratureGetOrder(q,&order);CHKERRQ(ierr);</div><div>  /* Creating the FE for the stress */</div><div>  ierr = PetscFECreateDefault(dm,dim,2*dim,simplex,"stress_",PETSC_DEFAULT,&fe_stress);CHKERRQ(ierr);</div><div>  ierr = PetscFESetQuadrature(fe_stress,q);CHKERRQ(ierr);</div><div>  ierr = PetscObjectSetName((PetscObject) fe_stress, "cauchy_stress");CHKERRQ(ierr);</div><div><br class=""></div><div> </div><div>    /* Discretization and boundary conditons: */</div><div>  ierr = DMGetDS(dm, &prob);CHKERRQ(ierr);</div><div>  ierr = PetscDSSetDiscretization(prob, 0, (PetscObject) fe_displacement); CHKERRQ(ierr);</div><div>  ierr = PetscDSSetDiscretization(prob, 1, (PetscObject) fe_stress);CHKERRQ(ierr);</div><div>  ierr = DMSetDS(dm, prob); CHKERRQ(ierr); </div><div><br class=""></div><div>  /* Define the boundaries */</div><div>    </div><div>  const PetscInt Ncomp = dim;</div><div>  const PetscInt Nfid = 1;</div><div>  PetscInt fid[Nfid];  /* fixed faces [numer of fixed faces] */</div><div>  </div><div>  PetscInt restrictall[3] = {0, 1, 2};  /* restricting all movement */</div><div><br class=""></div><div>    </div><div> </div><div>    fid[0] = 3;   /* fixed face */</div><div>    </div><div>    ierr = DMAddBoundary(dm, PETSC_TRUE, "fixed", "Face Sets",0,Ncomp,restrictall,(void (*)()) zero_vector, Nfid,fid,NULL);CHKERRQ(ierr);</div><div><br class=""></div><div>    </div><div>  ierr = PetscFEDestroy(&fe_displacement); CHKERRQ(ierr);</div><div>  </div><div>  ierr = PetscFEDestroy(&fe_stress); CHKERRQ(ierr);</div><div>  </div><div>  return(0);</div><div>}</div><div>int main(int argc, char *argv[])</div><div>{</div><div>  DM dm, distributeddm;<span class="Apple-tab-span" style="white-space:pre">                        </span>/* problem definition */</div><div>  Vec u,expected_solution,projected_solution;<span class="Apple-tab-span" style="white-space:pre">                   </span></div><div>  PetscViewer viewer;</div><div>  int dim;                        /* dimension of the anlysis */</div><div>  PetscErrorCode ierr;</div><div>  PetscMPIInt rank, numProcs;</div><div>  PetscPartitioner part;</div><div>  </div><div><br class=""></div><div>  </div><div>  ierr = PetscInitialize(&argc,&argv,NULL,NULL);</div><div>  ierr = DMPlexCreateFromFile(PETSC_COMM_WORLD,"testcube.msh", PETSC_TRUE,&(dm));</div><div>  ierr = DMGetDimension(dm,&(dim));</div><div><br class=""></div><div><br class=""></div><div>  /* distribute the mesh */</div><div>  MPI_Comm_rank(PETSC_COMM_WORLD, &rank);</div><div>  MPI_Comm_size(PETSC_COMM_WORLD, &numProcs);</div><div>  DMPlexGetPartitioner(dm, &part);</div><div>  PetscPartitionerSetType(part, PETSCPARTITIONERPARMETIS);</div><div><br class=""></div><div>  ierr = DMPlexDistribute(dm,0,NULL,&distributeddm); </div><div><br class=""></div><div>  if (distributeddm) {</div><div>    ierr=DMDestroy(&(dm));</div><div>    dm = distributeddm;</div><div>  }</div><div><br class=""></div><div><br class=""></div><div>  ierr = DMView(dm,PETSC_VIEWER_STDOUT_WORLD);</div><div>  ierr = DMSetMatType(dm, MATAIJ);CHKERRQ(ierr);</div><div><br class=""></div><div><br class=""></div><div> </div><div>  ierr = SetupDiscretization(dm);CHKERRQ(ierr);</div><div>  </div><div>  ierr = DMPlexCreateClosureIndex(dm,NULL);CHKERRQ(ierr); </div><div>  ierr = DMCreateGlobalVector(dm, &(u)); CHKERRQ(ierr);</div><div>  ierr = VecDuplicate(u,&expected_solution); CHKERRQ(ierr);</div><div>  ierr = VecDuplicate(u,&projected_solution); CHKERRQ(ierr);</div><div><br class=""></div><div>  /* intitialize the fields:  */</div><div><br class=""></div><div>  PetscErrorCode (*initial[2])(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar u[], void* ctx) = {initial_displacement_vector,zero_stress};</div><div>  ierr = DMProjectFunction(dm,0.0,initial,NULL, INSERT_ALL_VALUES, u); CHKERRQ(ierr);</div><div><br class=""></div><div>  PetscErrorCode (*expected_sol[2])(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar u[], void* ctx) = {initial_displacement_vector,expected_stress_vector};</div><div>  ierr = DMProjectFunction(dm,0.0,expected_sol,NULL, INSERT_ALL_VALUES, expected_solution); CHKERRQ(ierr);</div><div><br class=""></div><div>  ierr = PetscViewerVTKOpen(PETSC_COMM_WORLD,"expected_solution.vtu",FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);</div><div>  ierr = PetscObjectSetName((PetscObject) expected_solution, "expected_fields"); CHKERRQ(ierr);</div><div>  ierr = VecView(expected_solution,viewer);CHKERRQ(ierr);</div><div>  ierr= PetscViewerDestroy(&viewer); CHKERRQ(ierr);</div><div>  </div><div>  </div><div><br class=""></div><div>  /* project the fields: */</div><div><br class=""></div><div>   void (*projection[2])(PetscInt dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[],</div><div>                         const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[],</div><div>                         const PetscScalar u_x[], const PetscInt aOff[], const PetscInt aOff_x[],</div><div>                         const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],</div><div>                         PetscReal t, const PetscScalar x[], PetscInt numConstants,</div><div>                         const PetscScalar constants[], PetscScalar v[]) = {projectdisplacement, projectstress};</div><div><br class=""></div><div><br class=""></div><div>   ierr = DMProjectField(dm, 0.0, u, projection,INSERT_ALL_VALUES,projected_solution); CHKERRQ(ierr);</div><div>   ierr = PetscViewerVTKOpen(PETSC_COMM_WORLD,"projected_solution.vtu",FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);</div><div>   ierr = PetscObjectSetName((PetscObject) projected_solution, "projected_fields"); CHKERRQ(ierr);</div><div>   ierr = VecView(projected_solution,viewer);CHKERRQ(ierr);</div><div>   ierr= PetscViewerDestroy(&viewer); CHKERRQ(ierr);</div><div><br class=""></div><div><br class=""></div><div>   VecDestroy(&u);</div><div>   VecDestroy(&expected_solution);</div><div>   VecDestroy(&projected_solution);</div><div>   DMDestroy(&dm);</div><div><br class=""></div><div>   PetscFinalize();</div><div><br class=""></div><div>  return 0;</div><div>}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class=""><i class="">testcube.msh:</i></b></div><div class=""><br class=""></div><div class=""><div class="">$MeshFormat</div><div class="">2.2 0 8</div><div class="">$EndMeshFormat</div><div class="">$PhysicalNames</div><div class="">6</div><div class="">2 1 "back"</div><div class="">2 2 "front"</div><div class="">2 3 "bottom"</div><div class="">2 4 "right"</div><div class="">2 5 "top"</div><div class="">2 6 "left"</div><div class="">$EndPhysicalNames</div><div class="">$Nodes</div><div class="">10</div><div class="">1 0 -0.05 0</div><div class="">2 0.1 -0.05 0</div><div class="">3 0.1 0.05 0</div><div class="">4 0 0.05 0</div><div class="">5 0 -0.05 0.1</div><div class="">6 0.1 -0.05 0.1</div><div class="">7 0.1 0.05 0.1</div><div class="">8 0 0.05 0.1</div><div class="">9 0.05 0 0</div><div class="">10 0.05 0 0.1</div><div class="">$EndNodes</div><div class="">$Elements</div><div class="">28</div><div class="">1 2 2 1 6 1 2 9</div><div class="">2 2 2 1 6 1 9 4</div><div class="">3 2 2 1 6 2 3 9</div><div class="">4 2 2 1 6 3 4 9</div><div class="">5 2 2 3 15 5 1 6</div><div class="">6 2 2 3 15 1 2 6</div><div class="">7 2 2 4 19 6 2 7</div><div class="">8 2 2 4 19 2 3 7</div><div class="">9 2 2 5 23 7 3 8</div><div class="">10 2 2 5 23 3 4 8</div><div class="">11 2 2 6 27 8 4 1</div><div class="">12 2 2 6 27 8 1 5</div><div class="">13 2 2 2 28 5 6 10</div><div class="">14 2 2 2 28 5 10 8</div><div class="">15 2 2 2 28 6 7 10</div><div class="">16 2 2 2 28 7 8 10</div><div class="">17 4 2 29 1 1 2 9 6</div><div class="">18 4 2 29 1 6 5 10 9</div><div class="">19 4 2 29 1 1 5 6 9</div><div class="">20 4 2 29 1 1 9 4 8</div><div class="">21 4 2 29 1 10 5 8 9</div><div class="">22 4 2 29 1 9 5 8 1</div><div class="">23 4 2 29 1 2 3 9 7</div><div class="">24 4 2 29 1 7 6 10 9</div><div class="">25 4 2 29 1 2 6 7 9</div><div class="">26 4 2 29 1 3 4 9 8</div><div class="">27 4 2 29 1 8 7 10 9</div><div class="">28 4 2 29 1 3 7 8 9</div><div class="">$EndElements</div></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div><br class=""></div><div><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; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""> <span class="Apple-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;"><div style="word-wrap: break-word;" class=""><div class=""><div class="">Thanks,</div><div class="">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;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""> <span class="Apple-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;"><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_-4834572762739778173m_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=""><span class="m_-4834572762739778173HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div>--<span class="m_-4834572762739778173m_820538064167687730Apple-converted-space"> </span><br class=""><div class="m_-4834572762739778173m_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/~mk51<wbr class="">/</a></div></div></div></font></span></font></span></div></div></div></blockquote></div><span class="HOEnZb"><font color="#888888" class=""><br class=""></font></span></div></blockquote></div><span class="HOEnZb"><font color="#888888" class=""><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="m_-4834572762739778173Apple-converted-space"> </span><br class=""><div class="m_-4834572762739778173gmail_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=""></div></body></html>