Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
Stabilization viscosity was always assigned from phase zero.
  • Loading branch information
sgeotech committed Apr 4, 2024
1 parent c45fc2a commit cb426b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/constEq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ PetscErrorCode devConstEq(ConstEqCtx *ctx)
Controls *ctrl;
PetscScalar *phRat;
SolVarDev *svDev;
Material_t *phases;
Material_t *mat;
PetscInt i, numPhases;

PetscErrorCode ierr;
Expand All @@ -336,7 +336,6 @@ PetscErrorCode devConstEq(ConstEqCtx *ctx)
numPhases = ctx->numPhases;
phRat = ctx->phRat;
svDev = ctx->svDev;
phases = ctx->phases;

// zero out results
ctx->eta = 0.0; // effective viscosity
Expand Down Expand Up @@ -374,7 +373,8 @@ PetscErrorCode devConstEq(ConstEqCtx *ctx)
ierr = getPhaseVisc(ctx, i); CHKERRQ(ierr);

// update stabilization and viscoplastic viscosity
svDev->eta_st += phRat[i]*phases->eta_st;
mat = ctx->phases + i;
svDev->eta_st += phRat[i]*mat->eta_st;
}
}

Expand Down

0 comments on commit cb426b7

Please sign in to comment.