Go to the documentation of this file.
34 template <
size_t materialTangentSize,
size_t nIntegrationDependentStateVars >
123 template <
size_t n,
size_t nState >
125 double minimumStepSize,
126 double maxScaleUpFactor,
127 double scaleDownFactor,
128 double integrationErrorTolerance,
129 int nPassesToIncrease,
131 : initialStepSize( initialStepSize ),
132 minimumStepSize( minimumStepSize ),
133 maxScaleUpFactor( maxScaleUpFactor ),
134 scaleDownFactor( scaleDownFactor ),
135 integrationErrorTolerance( integrationErrorTolerance ),
136 nPassesToIncrease( nPassesToIncrease ),
137 ignoreErrorToleranceOnMinimumStepSize( true ),
139 currentProgress( 0.0 ),
140 currentSubstepSize( initialStepSize ),
143 discardedDueToError( 0 )
159 template <
size_t n,
size_t nState >
165 tmp.topLeftCorner( 6, 6 ) = Matrix6d::Identity();
171 template <
size_t n,
size_t nState >
182 template <
size_t n,
size_t nState >
186 stressProgress = stressOld;
187 stateProgress = stateVarsOld;
190 template <
size_t n,
size_t nState >
193 return ( ( 1.0 - currentProgress ) <= 2e-16 && currentState == FullStep );
196 template <
size_t n,
size_t nState >
199 switch ( currentState ) {
201 const double remainingProgress = 1.0 - currentProgress;
202 if ( remainingProgress < currentSubstepSize )
203 currentSubstepSize = remainingProgress;
205 return currentSubstepSize;
208 case FirstHalfStep: {
209 return 0.5 * currentSubstepSize;
212 case SecondHalfStep: {
213 return 0.5 * currentSubstepSize;
219 template <
size_t n,
size_t nState >
223 switch ( currentState ) {
225 stress = stressProgress;
226 stateVars = stateProgress;
229 case FirstHalfStep: {
230 stress = stressProgress;
231 stateVars = stateProgress;
234 case SecondHalfStep: {
235 stress = stressProgressHalfTemp;
236 stateVars = stateProgressHalfTemp;
242 template <
size_t n,
size_t nState >
246 switch ( currentState ) {
248 currentSubstepSize *= scaleDownFactor;
254 "converged full step" );
255 return acceptSubstepWithFullStepOnly();
259 "converged full step" );
260 return acceptSubstepWithFullStepOnly();
263 currentState = FullStep;
265 if ( currentSubstepSize < minimumStepSize )
271 template <
size_t n,
size_t nState >
274 currentState = FullStep;
277 currentSubstepSize *= factorNew;
279 if ( currentSubstepSize < minimumStepSize )
285 template <
size_t n,
size_t nState >
291 if ( currentState == FullStep ) {
292 stressProgressFullTemp = resultStress;
293 stateProgressFullTemp = stateVars;
294 consistentTangentProgressFullTemp = consistentTangentProgress;
295 consistentTangentProgressFullTemp.applyOnTheLeft( IXX() - dYdXOld );
296 consistentTangentProgressFullTemp += currentSubstepSize * IX6() * Cel;
297 consistentTangentProgressFullTemp.applyOnTheLeft( dXdY );
298 currentState = FirstHalfStep;
301 else if ( currentState == FirstHalfStep ) {
303 stressProgressHalfTemp = resultStress;
304 stateProgressHalfTemp = stateVars;
305 consistentTangentProgressHalfTemp = consistentTangentProgress;
306 consistentTangentProgressHalfTemp.applyOnTheLeft( IXX() - dYdXOld );
307 consistentTangentProgressHalfTemp += 0.5 * currentSubstepSize * IX6() * Cel;
308 consistentTangentProgressHalfTemp.applyOnTheLeft( dXdY );
309 currentState = SecondHalfStep;
313 else if ( currentState == SecondHalfStep ) {
316 currentState = FullStep;
317 const double error = ( resultStress - stressProgressFullTemp ).norm();
318 const double errorRatio = error / integrationErrorTolerance;
319 double scaleFactor = 1.0;
320 if ( errorRatio > 1e-10 )
321 scaleFactor = 0.9 * std::sqrt( 1. / errorRatio );
324 if ( scaleFactor < 0.1 )
326 if ( scaleFactor * currentSubstepSize < minimumStepSize )
327 scaleFactor = minimumStepSize / currentSubstepSize;
328 if ( scaleFactor > maxScaleUpFactor )
329 scaleFactor = maxScaleUpFactor;
330 if ( scaleFactor > 10 )
334 if ( error > integrationErrorTolerance ) {
335 discardedDueToError++;
337 if ( errorRatio < 2 ) {
338 return splitCurrentSubstep();
341 return repeatSubstep( scaleFactor );
347 stressProgressHalfTemp = resultStress;
348 stateProgressHalfTemp = stateVars;
349 consistentTangentProgressHalfTemp.applyOnTheLeft( IXX() - dYdXOld );
350 consistentTangentProgressHalfTemp += 0.5 * currentSubstepSize * IX6() * Cel;
351 consistentTangentProgressHalfTemp.applyOnTheLeft( dXdY );
353 consistentTangentProgress = 2 * consistentTangentProgressHalfTemp - consistentTangentProgressFullTemp;
354 stressProgress = 2 * stressProgressHalfTemp - stressProgressFullTemp;
355 stateProgress = 2 * stateProgressHalfTemp - stateProgressFullTemp;
356 currentProgress += currentSubstepSize;
359 currentSubstepSize *= scaleFactor;
367 template <
size_t n,
size_t nState >
370 switch ( currentState ) {
374 consistentTangentProgress += currentSubstepSize * IX6() * Cel;
375 stressProgress = newStress;
377 currentProgress += currentSubstepSize;
378 currentState = FullStep;
383 case FirstHalfStep: {
384 consistentTangentProgressHalfTemp = consistentTangentProgress;
385 consistentTangentProgressHalfTemp += 0.5 * currentSubstepSize * IX6() * Cel;
386 stressProgressHalfTemp = newStress;
387 currentState = SecondHalfStep;
390 case SecondHalfStep: {
391 acceptSubstepWithFullStepOnly();
397 template <
size_t n,
size_t nState >
399 Matrix6d& consistentTangentOperator,
402 stress = stressProgress;
403 stateVars = stateProgress;
404 consistentTangentOperator = consistentTangentProgress.topLeftCorner( 6, 6 );
407 template <
size_t n,
size_t nState >
410 consistentTangentProgress = consistentTangentProgressFullTemp;
411 stressProgress = stressProgressFullTemp;
412 stateProgress = stateProgressFullTemp;
414 currentProgress += currentSubstepSize;
415 currentState = FullStep;
420 template <
size_t n,
size_t nState >
423 if ( currentSubstepSize < 2 * minimumStepSize ) {
424 if ( ignoreErrorToleranceOnMinimumStepSize )
425 return acceptSubstepWithFullStepOnly();
430 consistentTangentProgressFullTemp = consistentTangentProgressHalfTemp;
431 stressProgressFullTemp = stressProgressHalfTemp;
432 stateProgressFullTemp = stateProgressHalfTemp;
433 currentSubstepSize *= 0.5;
434 currentState = FirstHalfStep;
438 template <
size_t n,
size_t nState >
443 template <
size_t n,
size_t nState >
446 return discardedDueToError;
MatrixStateStrain consistentTangentProgress
internal storages for the progress of the total increment
Definition: AdaptiveSubstepperExplicit.h:100
void setConvergedProgress(const Marmot::Vector6d &stressOld, const IntegrationStateVector &stateVarsOld)
Set the current converged state.
Definition: AdaptiveSubstepperExplicit.h:183
IntegrationStateVector stateProgressFullTemp
Definition: AdaptiveSubstepperExplicit.h:105
int getNumberDiscardedSubstepsDueToError()
get the number of discarded subincrements
Definition: AdaptiveSubstepperExplicit.h:444
double getNextSubstep()
get the next subincrement size
Definition: AdaptiveSubstepperExplicit.h:197
MatrixStateStrain consistentTangentProgressHalfTemp
temporal storages, which are used until a cycle full/half/half has finished successfully
Definition: AdaptiveSubstepperExplicit.h:107
int substepIndex
Definition: AdaptiveSubstepperExplicit.h:92
Definition: MarmotNumericalDifferentiation.h:34
bool repeatSubstep(double decrementationFactor)
repeat the current subincrement with a smaller step
Definition: AdaptiveSubstepperExplicit.h:272
bool finishSubstep(const Marmot::Vector6d &resultStress, const TangentSizedMatrix &dXdY, const TangentSizedMatrix &dYdXOld, const IntegrationStateVector &stateVars)
finish a subincrement with plasticity
Definition: AdaptiveSubstepperExplicit.h:286
int discardedDueToError
Definition: AdaptiveSubstepperExplicit.h:93
const bool ignoreErrorToleranceOnMinimumStepSize
Definition: AdaptiveSubstepperExplicit.h:86
double currentSubstepSize
Definition: AdaptiveSubstepperExplicit.h:90
Marmot::Vector6d stressProgressHalfTemp
temporal storages, which are used until a cycle full/half/half has finished successfully
Definition: AdaptiveSubstepperExplicit.h:103
void getResults(Marmot::Vector6d &stress, Matrix6d &consistentTangent, IntegrationStateVector &stateVars)
Write the current results.
Definition: AdaptiveSubstepperExplicit.h:398
bool acceptSubstepWithFullStepOnly()
Definition: AdaptiveSubstepperExplicit.h:408
Eigen::Matrix< double, 6, 6 > Matrix6d
Definition: MarmotTypedefs.h:35
@ FirstHalfStep
Definition: AdaptiveSubstepperExplicit.h:112
const TangentSizedMatrix & IXX()
Definition: AdaptiveSubstepperExplicit.h:173
Matrix6d getCurrentTangentOperator()
get the algorithmic tangent for the current state
void getConvergedProgress(Marmot::Vector6d &stress, IntegrationStateVector &stateVars)
get the last converged state
Definition: AdaptiveSubstepperExplicit.h:220
Eigen::Matrix< double, materialTangentSize, 6 > MatrixStateStrain
Definition: AdaptiveSubstepperExplicit.h:44
const double minimumStepSize
Definition: AdaptiveSubstepperExplicit.h:84
Eigen::Matrix< double, materialTangentSize, materialTangentSize > TangentSizedMatrix
Matrix for describing the nonlinear equation system of the return mapping algorithm.
Definition: AdaptiveSubstepperExplicit.h:43
@ FullStep
Definition: AdaptiveSubstepperExplicit.h:112
bool discardSubstep()
discard the current subincrement
Definition: AdaptiveSubstepperExplicit.h:243
bool isFinished()
Check if the subincrementation is finished.
Definition: AdaptiveSubstepperExplicit.h:191
const double scaleDownFactor
Definition: AdaptiveSubstepperExplicit.h:84
const MatrixStateStrain & IX6()
Definition: AdaptiveSubstepperExplicit.h:161
Definition: AdaptiveSubstepperExplicit.h:35
AdaptiveSubstepperExplicit(double initialStepSize, double minimumStepSize, double maxScaleUpFactor, double scaleDownFactor, double integrationErrorTolerance, int nPassesToIncrease, const Matrix6d &Cel)
Definition: AdaptiveSubstepperExplicit.h:124
SubsteppingState
Definition: AdaptiveSubstepperExplicit.h:112
IntegrationStateVector stateProgressHalfTemp
temporal storages, which are used until a cycle full/half/half has finished successfully
Definition: AdaptiveSubstepperExplicit.h:105
MatrixStateStrain consistentTangentProgressFullTemp
Definition: AdaptiveSubstepperExplicit.h:107
const double maxScaleUpFactor
Definition: AdaptiveSubstepperExplicit.h:84
Eigen::Matrix< double, 6, 1 > Vector6d
Definition: MarmotTypedefs.h:43
const Matrix6d & Cel
Definition: AdaptiveSubstepperExplicit.h:88
double currentProgress
Definition: AdaptiveSubstepperExplicit.h:89
IntegrationStateVector stateProgress
internal storages for the progress of the total increment
Definition: AdaptiveSubstepperExplicit.h:98
int passedSubsteps
Definition: AdaptiveSubstepperExplicit.h:91
const double integrationErrorTolerance
Definition: AdaptiveSubstepperExplicit.h:84
@ SecondHalfStep
Definition: AdaptiveSubstepperExplicit.h:112
Marmot::Vector6d stressProgress
internal storages for the progress of the total increment
Definition: AdaptiveSubstepperExplicit.h:96
bool splitCurrentSubstep()
Definition: AdaptiveSubstepperExplicit.h:421
const int nPassesToIncrease
Definition: AdaptiveSubstepperExplicit.h:85
Marmot::Vector6d stressProgressFullTemp
Definition: AdaptiveSubstepperExplicit.h:103
const double initialStepSize
Definition: AdaptiveSubstepperExplicit.h:84
void finishElasticSubstep(const Marmot::Vector6d &resultStress)
finish a subincrement with elasticity only
Definition: AdaptiveSubstepperExplicit.h:368
static bool warningToMSG(const std::string &message)
Eigen::Matrix< double, nIntegrationDependentStateVars, 1 > IntegrationStateVector
Definition: AdaptiveSubstepperExplicit.h:45
int getNumberOfSubsteps()
get the finished number of subincrements
Definition: AdaptiveSubstepperExplicit.h:439
SubsteppingState currentState
Definition: AdaptiveSubstepperExplicit.h:113