MultiPlasticityDebugger computes various finite-difference things to help developers remove bugs in their derivatives, etc. More...
#include <MultiPlasticityDebugger.h>
Public Member Functions | |
MultiPlasticityDebugger (const MooseObject *moose_object) | |
void | outputAndCheckDebugParameters () |
Outputs the debug parameters: _fspb_debug_stress, _fspd_debug_pm, etc and checks that they are sized correctly. More... | |
void | checkDerivatives () |
Checks the derivatives, eg dyieldFunction_dstress by using finite difference approximations. More... | |
void | checkJacobian (const RankFourTensor &E_inv, const std::vector< Real > &intnl_old) |
Checks the full Jacobian, which is just certain linear combinations of the dyieldFunction_dstress, etc, by using finite difference approximations. More... | |
void | checkSolution (const RankFourTensor &E_inv) |
Checks that Ax does equal b in the NR procedure. More... | |
UserObjectName | getUserObjectName (const std::string ¶m_name) const |
const T & | getUserObject (const std::string ¶m_name, bool is_dependency=true) const |
const T & | getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const |
const UserObject & | getUserObjectBase (const std::string ¶m_name, bool is_dependency=true) const |
const UserObject & | getUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObjectByName (const UserObjectName &object_name) const |
bool | hasUserObjectByName (const UserObjectName &object_name) const |
bool | hasUserObjectByName (const UserObjectName &object_name) const |
bool | hasUserObjectByName (const UserObjectName &object_name) const |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Member Functions | |
virtual void | calculateConstraints (const RankTwoTensor &stress, const std::vector< Real > &intnl_old, const std::vector< Real > &intnl, const std::vector< Real > &pm, const RankTwoTensor &delta_dp, std::vector< Real > &f, std::vector< RankTwoTensor > &r, RankTwoTensor &epp, std::vector< Real > &ic, const std::vector< bool > &active) |
The constraints. More... | |
virtual void | calculateRHS (const RankTwoTensor &stress, const std::vector< Real > &intnl_old, const std::vector< Real > &intnl, const std::vector< Real > &pm, const RankTwoTensor &delta_dp, std::vector< Real > &rhs, const std::vector< bool > &active, bool eliminate_ld, std::vector< bool > &deactivated_due_to_ld) |
Calculate the RHS which is rhs = -(epp(0,0), epp(1,0), epp(1,1), epp(2,0), epp(2,1), epp(2,2), f[0], f[1], ..., f[num_f], ic[0], ic[1], ..., ic[num_ic]) More... | |
virtual void | calculateJacobian (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< Real > &pm, const RankFourTensor &E_inv, const std::vector< bool > &active, const std::vector< bool > &deactivated_due_to_ld, std::vector< std::vector< Real >> &jac) |
d(rhs)/d(dof) More... | |
virtual void | nrStep (const RankTwoTensor &stress, const std::vector< Real > &intnl_old, const std::vector< Real > &intnl, const std::vector< Real > &pm, const RankFourTensor &E_inv, const RankTwoTensor &delta_dp, RankTwoTensor &dstress, std::vector< Real > &dpm, std::vector< Real > &dintnl, const std::vector< bool > &active, std::vector< bool > &deactivated_due_to_ld) |
Performs one Newton-Raphson step. More... | |
virtual void | yieldFunction (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &f) |
The active yield function(s) More... | |
virtual void | dyieldFunction_dstress (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &df_dstress) |
The derivative of the active yield function(s) with respect to stress. More... | |
virtual void | dyieldFunction_dintnl (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &df_dintnl) |
The derivative of active yield function(s) with respect to their internal parameters (the user objects assume there is exactly one internal param per yield function) More... | |
virtual void | flowPotential (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &r) |
The active flow potential(s) - one for each yield function. More... | |
virtual void | dflowPotential_dstress (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankFourTensor > &dr_dstress) |
The derivative of the active flow potential(s) with respect to stress. More... | |
virtual void | dflowPotential_dintnl (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &dr_dintnl) |
The derivative of the active flow potentials with respect to the active internal parameters The UserObjects explicitly assume that r[alpha] is only dependent on intnl[alpha]. More... | |
virtual void | hardPotential (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &h) |
The active hardening potentials (one for each internal parameter and for each yield function) by assumption in the Userobjects, the h[a][alpha] is nonzero only if the surface alpha is part of model a, so we only calculate those here. More... | |
virtual void | dhardPotential_dstress (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &dh_dstress) |
The derivative of the active hardening potentials with respect to stress By assumption in the Userobjects, the h[a][alpha] is nonzero only for a = alpha, so we only calculate those here. More... | |
virtual void | dhardPotential_dintnl (const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &dh_dintnl) |
The derivative of the active hardening potentials with respect to the active internal parameters. More... | |
virtual void | buildActiveConstraints (const std::vector< Real > &f, const RankTwoTensor &stress, const std::vector< Real > &intnl, const RankFourTensor &Eijkl, std::vector< bool > &act) |
Constructs a set of active constraints, given the yield functions, f. More... | |
unsigned int | modelNumber (unsigned int surface) |
returns the model number, given the surface number More... | |
bool | anyActiveSurfaces (int model, const std::vector< bool > &active) |
returns true if any internal surfaces of the given model are active according to 'active' More... | |
void | activeModelSurfaces (int model, const std::vector< bool > &active, std::vector< unsigned int > &active_surfaces_of_model) |
Returns the internal surface number(s) of the active surfaces of the given model This may be of size=0 if there are no active surfaces of the given model. More... | |
void | activeSurfaces (int model, const std::vector< bool > &active, std::vector< unsigned int > &active_surfaces) |
Returns the external surface number(s) of the active surfaces of the given model This may be of size=0 if there are no active surfaces of the given model. More... | |
bool | returnMapAll (const RankTwoTensor &trial_stress, const std::vector< Real > &intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &stress, std::vector< Real > &intnl, std::vector< Real > &pm, std::vector< Real > &cumulative_pm, RankTwoTensor &delta_dp, std::vector< Real > &yf, unsigned &num_successful_plastic_returns, unsigned &custom_model) |
Performs a returnMap for each plastic model using their inbuilt returnMap functions. More... | |
virtual void | addUserObjectDependencyHelper (const UserObject &) const |
Protected Attributes | |
MooseEnum | _fspb_debug |
none - don't do any debugging crash - currently inactive jacobian - check the jacobian entries jacobian_and_linear_system - check entire jacobian and check that Ax=b More... | |
RankTwoTensor | _fspb_debug_stress |
Debug the Jacobian entries at this stress. More... | |
std::vector< Real > | _fspb_debug_pm |
Debug the Jacobian entires at these plastic multipliers. More... | |
std::vector< Real > | _fspb_debug_intnl |
Debug the Jacobian entires at these internal parameters. More... | |
Real | _fspb_debug_stress_change |
Debug finite-differencing parameter for the stress. More... | |
std::vector< Real > | _fspb_debug_pm_change |
Debug finite-differencing parameters for the plastic multipliers. More... | |
std::vector< Real > | _fspb_debug_intnl_change |
Debug finite-differencing parameters for the internal parameters. More... | |
Real | _svd_tol |
Tolerance on the minimum ratio of singular values before flow-directions are deemed linearly dependent. More... | |
Real | _min_f_tol |
Minimum value of the _f_tol parameters for the Yield Function User Objects. More... | |
const InputParameters & | _params |
unsigned int | _num_models |
Number of plastic models for this material. More... | |
unsigned int | _num_surfaces |
Number of surfaces within the plastic models. More... | |
std::vector< std::vector< unsigned int > > | _surfaces_given_model |
_surfaces_given_model[model_number] = vector of surface numbers for this model More... | |
MooseEnum | _specialIC |
Allows initial set of active constraints to be chosen optimally. More... | |
std::vector< const SolidMechanicsPlasticModel * > | _f |
User objects that define the yield functions, flow potentials, etc. More... | |
Private Member Functions | |
void | fddyieldFunction_dstress (const RankTwoTensor &stress, const std::vector< Real > &intnl, std::vector< RankTwoTensor > &df_dstress) |
The finite-difference derivative of yield function(s) with respect to stress. More... | |
void | fddyieldFunction_dintnl (const RankTwoTensor &stress, const std::vector< Real > &intnl, std::vector< Real > &df_dintnl) |
The finite-difference derivative of yield function(s) with respect to internal parameter(s) More... | |
virtual void | fddflowPotential_dstress (const RankTwoTensor &stress, const std::vector< Real > &intnl, std::vector< RankFourTensor > &dr_dstress) |
The finite-difference derivative of the flow potential(s) with respect to stress. More... | |
virtual void | fddflowPotential_dintnl (const RankTwoTensor &stress, const std::vector< Real > &intnl, std::vector< RankTwoTensor > &dr_dintnl) |
The finite-difference derivative of the flow potentials with respect to internal parameters. More... | |
virtual void | fdJacobian (const RankTwoTensor &stress, const std::vector< Real > &intnl_old, const std::vector< Real > &intnl, const std::vector< Real > &pm, const RankTwoTensor &delta_dp, const RankFourTensor &E_inv, bool eliminate_ld, std::vector< std::vector< Real >> &jac) |
The Jacobian calculated using finite differences. More... | |
bool | dof_included (unsigned int dof, const std::vector< bool > &deactivated_due_to_ld) |
MultiPlasticityDebugger computes various finite-difference things to help developers remove bugs in their derivatives, etc.
Definition at line 19 of file MultiPlasticityDebugger.h.
MultiPlasticityDebugger::MultiPlasticityDebugger | ( | const MooseObject * | moose_object | ) |
Definition at line 40 of file MultiPlasticityDebugger.C.
|
protectedinherited |
Returns the internal surface number(s) of the active surfaces of the given model This may be of size=0 if there are no active surfaces of the given model.
model | the model number | |
active | array with entries being 'true' if the surface is active | |
[out] | active_surfaces_of_model | the output |
Definition at line 809 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityRawComponentAssembler::dflowPotential_dintnl(), MultiPlasticityRawComponentAssembler::dflowPotential_dstress(), MultiPlasticityRawComponentAssembler::dhardPotential_dintnl(), MultiPlasticityRawComponentAssembler::dhardPotential_dstress(), MultiPlasticityRawComponentAssembler::dyieldFunction_dintnl(), MultiPlasticityRawComponentAssembler::dyieldFunction_dstress(), MultiPlasticityRawComponentAssembler::flowPotential(), MultiPlasticityRawComponentAssembler::hardPotential(), and MultiPlasticityRawComponentAssembler::yieldFunction().
|
protectedinherited |
Returns the external surface number(s) of the active surfaces of the given model This may be of size=0 if there are no active surfaces of the given model.
model | the model number | |
active | array with entries being 'true' if the surface is active | |
[out] | active_surfaces | the output |
Definition at line 798 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateConstraints().
|
protectedinherited |
returns true if any internal surfaces of the given model are active according to 'active'
Definition at line 789 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian(), MultiPlasticityLinearSystem::calculateRHS(), checkSolution(), dof_included(), MultiPlasticityLinearSystem::nrStep(), and ComputeMultiPlasticityStress::residual2().
|
protectedvirtualinherited |
Constructs a set of active constraints, given the yield functions, f.
This uses SolidMechanicsPlasticModel::activeConstraints to identify the active constraints for each model.
f | yield functions (should be _num_surfaces of these) | |
stress | stress tensor | |
intnl | internal parameters | |
Eijkl | elasticity tensor (stress = Eijkl*strain) | |
[out] | act | the set of active constraints (will be resized to _num_surfaces) |
Definition at line 342 of file MultiPlasticityRawComponentAssembler.C.
Referenced by ComputeMultiPlasticityStress::returnMap().
|
protectedvirtualinherited |
The constraints.
These are set to zero (or <=0 in the case of the yield functions) by the Newton-Raphson process, except in the case of linear-dependence which complicates things.
stress | The stress | |
intnl_old | old values of the internal parameters | |
intnl | internal parameters | |
pm | Current value(s) of the plasticity multiplier(s) (consistency parameters) | |
delta_dp | Change in plastic strain incurred so far during the return | |
[out] | f | Active yield function(s) |
[out] | r | Active flow directions |
[out] | epp | Plastic-strain increment constraint |
[out] | ic | Active internal-parameter constraint |
active | The active constraints. |
Definition at line 227 of file MultiPlasticityLinearSystem.C.
Referenced by MultiPlasticityLinearSystem::calculateRHS(), and ComputeMultiPlasticityStress::lineSearch().
|
protectedvirtualinherited |
d(rhs)/d(dof)
Definition at line 366 of file MultiPlasticityLinearSystem.C.
Referenced by checkJacobian(), checkSolution(), and MultiPlasticityLinearSystem::nrStep().
|
protectedvirtualinherited |
Calculate the RHS which is rhs = -(epp(0,0), epp(1,0), epp(1,1), epp(2,0), epp(2,1), epp(2,2), f[0], f[1], ..., f[num_f], ic[0], ic[1], ..., ic[num_ic])
Note that the 'epp' components only contain the upper diagonal. These contain flow directions and plasticity-multipliers for all active surfaces, even the deactivated_due_to_ld surfaces. Note that the 'f' components only contain the active and not deactivated_due_to_ld surfaces Note that the 'ic' components only contain the internal constraints for models which contain active and not deactivated_due_to_ld surfaces. They contain hardening-potentials and plasticity-multipliers for the active surfaces, even the deactivated_due_to_ld surfaces
stress | The stress | |
intnl_old | old values of the internal parameters | |
intnl | internal parameters | |
pm | Current value(s) of the plasticity multiplier(s) (consistency parameters) | |
delta_dp | Change in plastic strain incurred so far during the return | |
[out] | rhs | the rhs |
active | The active constraints. | |
eliminate_ld | Check for linear dependence of constraints and put the results into deactivated_due_to_ld. Usually this should be true, but for certain debug operations it should be false | |
[out] | deactivated_due_to_ld | constraints deactivated due to linear-dependence of flow directions |
Definition at line 287 of file MultiPlasticityLinearSystem.C.
Referenced by checkSolution(), fdJacobian(), and MultiPlasticityLinearSystem::nrStep().
void MultiPlasticityDebugger::checkDerivatives | ( | ) |
Checks the derivatives, eg dyieldFunction_dstress by using finite difference approximations.
Definition at line 85 of file MultiPlasticityDebugger.C.
Referenced by ComputeMultiPlasticityStress::initQpStatefulProperties(), and ComputeMultiPlasticityStress::plasticStep().
void MultiPlasticityDebugger::checkJacobian | ( | const RankFourTensor & | E_inv, |
const std::vector< Real > & | intnl_old | ||
) |
Checks the full Jacobian, which is just certain linear combinations of the dyieldFunction_dstress, etc, by using finite difference approximations.
Definition at line 163 of file MultiPlasticityDebugger.C.
Referenced by ComputeMultiPlasticityStress::computeQpStress(), and ComputeMultiPlasticityStress::plasticStep().
void MultiPlasticityDebugger::checkSolution | ( | const RankFourTensor & | E_inv | ) |
Checks that Ax does equal b in the NR procedure.
Definition at line 371 of file MultiPlasticityDebugger.C.
Referenced by ComputeMultiPlasticityStress::computeQpStress(), and ComputeMultiPlasticityStress::plasticStep().
|
protectedvirtualinherited |
The derivative of the active flow potentials with respect to the active internal parameters The UserObjects explicitly assume that r[alpha] is only dependent on intnl[alpha].
stress | the stress at which to calculate the flow potential | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "dr_dintnl" | |
[out] | dr_dintnl | the derivatives. dr_dintnl[alpha](i, j) = dr[alpha](i, j)/dintnl[alpha] |
Definition at line 233 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian(), checkDerivatives(), and ComputeMultiPlasticityStress::consistentTangentOperator().
|
protectedvirtualinherited |
The derivative of the active flow potential(s) with respect to stress.
stress | the stress at which to calculate the flow potential | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "dr_dstress" | |
[out] | dr_dstress | the derivative. dr_dstress[alpha](i, j, k, l) = dr[alpha](i, j)/dstress(k, l) |
Definition at line 205 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian(), checkDerivatives(), and ComputeMultiPlasticityStress::consistentTangentOperator().
|
protectedvirtualinherited |
The derivative of the active hardening potentials with respect to the active internal parameters.
stress | the stress at which to calculate the hardening potentials | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "dh_dintnl" | |
[out] | dh_dintnl | the derivatives. dh_dintnl[a][alpha][b] = dh[a][alpha]/dintnl[b]. Note that the userobjects assume that there is exactly one internal parameter per yield function, so the derivative is only nonzero for a=alpha=b, so that is all we calculate |
Definition at line 315 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian().
|
protectedvirtualinherited |
The derivative of the active hardening potentials with respect to stress By assumption in the Userobjects, the h[a][alpha] is nonzero only for a = alpha, so we only calculate those here.
stress | the stress at which to calculate the hardening potentials | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "dh_dstress" | |
[out] | dh_dstress | the derivative. dh_dstress[a](i, j) = dh[a]/dstress(k, l) |
Definition at line 287 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian().
|
private |
Definition at line 353 of file MultiPlasticityDebugger.C.
Referenced by fdJacobian().
|
protectedvirtualinherited |
The derivative of active yield function(s) with respect to their internal parameters (the user objects assume there is exactly one internal param per yield function)
stress | the stress at which to calculate the yield function | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "df_dintnl" | |
[out] | df_dintnl | the derivatives. df_dstress[alpha] = dyieldFunction[alpha]/dintnl[alpha] |
Definition at line 151 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateJacobian(), checkDerivatives(), and ComputeMultiPlasticityStress::consistentTangentOperator().
|
protectedvirtualinherited |
The derivative of the active yield function(s) with respect to stress.
stress | the stress at which to calculate the yield function | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active derivatives are put into "df_dstress" | |
[out] | df_dstress | the derivative (or derivatives in the case of multisurface plasticity). df_dstress[alpha](i, j) = dyieldFunction[alpha]/dstress(i, j) |
Definition at line 123 of file MultiPlasticityRawComponentAssembler.C.
Referenced by ComputeMultiPlasticityStress::buildDumbOrder(), MultiPlasticityLinearSystem::calculateJacobian(), checkDerivatives(), ComputeMultiPlasticityStress::consistentTangentOperator(), and MultiPlasticityLinearSystem::eliminateLinearDependence().
|
privatevirtual |
The finite-difference derivative of the flow potentials with respect to internal parameters.
stress | the stress at which to calculate the flow potential | |
intnl | vector of internal parameters | |
[out] | dr_dintnl | the derivatives. dr_dintnl[alpha](i, j) = dr[alpha](i, j)/dintnl[alpha] |
Definition at line 612 of file MultiPlasticityDebugger.C.
Referenced by checkDerivatives().
|
privatevirtual |
The finite-difference derivative of the flow potential(s) with respect to stress.
stress | the stress at which to calculate the flow potential | |
intnl | vector of internal parameters | |
[out] | dr_dstress | the derivative. dr_dstress[alpha](i, j, k, l) = dr[alpha](i, j)/dstress(k, l) |
Definition at line 583 of file MultiPlasticityDebugger.C.
Referenced by checkDerivatives().
|
private |
The finite-difference derivative of yield function(s) with respect to internal parameter(s)
stress | the stress at which to calculate the yield function | |
intnl | vector of internal parameters | |
[out] | df_dintnl | the derivative (or derivatives in the case of multisurface plasticity). df_dintnl[alpha] = dyieldFunction[alpha]/dintnl[alpha] |
Definition at line 552 of file MultiPlasticityDebugger.C.
Referenced by checkDerivatives().
|
private |
The finite-difference derivative of yield function(s) with respect to stress.
stress | the stress at which to calculate the yield function | |
intnl | vector of internal parameters | |
[out] | df_dstress | the derivative (or derivatives in the case of multisurface plasticity). df_dstress[alpha](i, j) = dyieldFunction[alpha]/dstress(i, j) |
Definition at line 524 of file MultiPlasticityDebugger.C.
Referenced by checkDerivatives().
|
privatevirtual |
The Jacobian calculated using finite differences.
The output should be equal to calculateJacobian(...) if everything is coded correctly.
stress | the stress at which to calculate the Jacobian | |
intnl_old | the old values of internal variables (jacobian is inependent of these, but they are needed to do the finite-differencing cleanly) | |
intnl | the vector of internal parameters at which to calculate the Jacobian | |
pm | the plasticity multipliers at which to calculate the Jacobian | |
delta_dp | plastic_strain - plastic_strain_old (Jacobian is independent of this, but it is needed to do the finite-differencing cleanly) | |
E_inv | inverse of the elasticity tensor | |
eliminate_ld | only calculate the Jacobian for the linearly independent constraints | |
[out] | jac | the finite-difference Jacobian |
Definition at line 225 of file MultiPlasticityDebugger.C.
Referenced by checkJacobian(), and checkSolution().
|
protectedvirtualinherited |
The active flow potential(s) - one for each yield function.
stress | the stress at which to calculate the flow potential | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active flow potentials are put into "r" | |
[out] | r | the flow potential (flow potentials in the multi-surface case) |
Definition at line 178 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateConstraints(), MultiPlasticityLinearSystem::calculateJacobian(), ComputeMultiPlasticityStress::consistentTangentOperator(), fddflowPotential_dintnl(), and fddflowPotential_dstress().
|
protectedvirtualinherited |
The active hardening potentials (one for each internal parameter and for each yield function) by assumption in the Userobjects, the h[a][alpha] is nonzero only if the surface alpha is part of model a, so we only calculate those here.
stress | the stress at which to calculate the hardening potential | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active hardening potentials are put into "h" | |
[out] | h | the hardening potentials. h[alpha] = hardening potential for yield fcn alpha (and, by the above assumption we know which hardening parameter, a, this belongs to) |
Definition at line 260 of file MultiPlasticityRawComponentAssembler.C.
Referenced by MultiPlasticityLinearSystem::calculateConstraints(), MultiPlasticityLinearSystem::calculateJacobian(), and ComputeMultiPlasticityStress::consistentTangentOperator().
|
protectedinherited |
returns the model number, given the surface number
Definition at line 783 of file MultiPlasticityRawComponentAssembler.C.
Referenced by ComputeMultiPlasticityStress::applyKuhnTucker(), MultiPlasticityLinearSystem::calculateJacobian(), ComputeMultiPlasticityStress::canAddConstraints(), ComputeMultiPlasticityStress::checkAdmissible(), ComputeMultiPlasticityStress::checkKuhnTucker(), ComputeMultiPlasticityStress::consistentTangentOperator(), fddflowPotential_dintnl(), fddyieldFunction_dintnl(), ComputeMultiPlasticityStress::residual2(), ComputeMultiPlasticityStress::returnMap(), and ComputeMultiPlasticityStress::singleStep().
|
protectedvirtualinherited |
Performs one Newton-Raphson step.
The purpose here is to find the changes, dstress, dpm and dintnl according to the Newton-Raphson procedure
stress | Current value of stress | |
intnl_old | The internal variables at the previous "time" step | |
intnl | Current value of the internal variables | |
pm | Current value of the plasticity multipliers (consistency parameters) | |
E_inv | inverse of the elasticity tensor | |
delta_dp | Current value of the plastic-strain increment (ie plastic_strain - plastic_strain_old) | |
[out] | dstress | The change in stress for a full Newton step |
[out] | dpm | The change in all plasticity multipliers for a full Newton step |
[out] | dintnl | The change in all internal variables for a full Newton step |
active | The active constraints | |
[out] | deactivated_due_to_ld | The constraints deactivated due to linear-dependence of the flow directions |
Definition at line 614 of file MultiPlasticityLinearSystem.C.
Referenced by checkSolution(), and ComputeMultiPlasticityStress::singleStep().
void MultiPlasticityDebugger::outputAndCheckDebugParameters | ( | ) |
Outputs the debug parameters: _fspb_debug_stress, _fspd_debug_pm, etc and checks that they are sized correctly.
Definition at line 53 of file MultiPlasticityDebugger.C.
Referenced by checkDerivatives(), checkJacobian(), and checkSolution().
|
protectedinherited |
Performs a returnMap for each plastic model using their inbuilt returnMap functions.
Performs a returnMap for each plastic model.
This may be used to quickly ascertain whether a (trial_stress, intnl_old) configuration is admissible, or whether a single model's customized returnMap function can provide a solution to the return-map problem, or whether a full Newton-Raphson approach such as implemented in ComputeMultiPlasticityStress is needed.
There are three cases mentioned below: (A) The (trial_stress, intnl_old) configuration is admissible according to all plastic models (B) The (trial_stress, intnl_old) configuration is inadmissible to exactly one plastic model, and that model can successfully use its customized returnMap function to provide a returned (stress, intnl) configuration, and that configuration is admissible according to all plastic models (C) All other cases. This includes customized returnMap functions failing, or more than one plastic_model being inadmissible, etc
trial_stress | the trial stress | |
intnl_old | the old values of the internal parameters | |
E_ijkl | the elasticity tensor | |
ep_plastic_tolerance | the tolerance on the plastic strain | |
[out] | stress | is set to trial_stress in case (A) or (C), and the returned value of stress in case (B). |
[out] | intnl | is set to intnl_old in case (A) or (C), and the returned value of intnl in case (B) |
[out] | pm | Zero in case (A) or (C), otherwise the plastic multipliers needed to bring about the returnMap in case (B) |
[in/out] | cumulative_pm cumulative plastic multipliers, updated in case (B), otherwise left untouched | |
[out] | delta_dp | is unchanged in case (A) or (C), and is set to the change in plastic strain in case(B) |
[out] | yf | will contain the yield function values at (stress, intnl) |
[out] | num_successful_plastic_returns | will be 0 for (A) and (C), and 1 for (B) |
If all models actually signal "elastic" by returning true from their returnMap, and by returning model_plastically_active=0, then yf will contain the yield function values num_successful_plastic_returns will be zero intnl = intnl_old delta_dp will be unchanged from its input value stress will be set to trial_stress pm will be zero cumulative_pm will be unchanged return value will be true num_successful_plastic_returns = 0
If only one model signals "plastically active" by returning true from its returnMap, and by returning model_plastically_active=1, then yf will contain the yield function values num_successful_plastic_returns will be one intnl will be set by the returnMap algorithm delta_dp will be set by the returnMap algorithm stress will be set by the returnMap algorithm pm will be nonzero for the single model, and zero for other models cumulative_pm will be updated return value will be true num_successful_plastic_returns = 1
If >1 model signals "plastically active" or if >=1 model's returnMap fails, then yf will contain the yield function values num_successful_plastic_returns will be set appropriately intnl = intnl_old delta_dp will be unchanged from its input value stress will be set to trial_stress pm will be zero cumulative_pm will be unchanged return value will be true if all returnMap functions returned true, otherwise it will be false num_successful_plastic_returns is set appropriately
Definition at line 597 of file MultiPlasticityRawComponentAssembler.C.
Referenced by ComputeMultiPlasticityStress::quickStep().
|
static |
Definition at line 15 of file MultiPlasticityDebugger.C.
Referenced by ComputeMultiPlasticityStress::validParams().
|
protectedvirtualinherited |
The active yield function(s)
stress | the stress at which to calculate the yield function | |
intnl | vector of internal parameters | |
active | set of active constraints - only the active yield functions are put into "f" | |
[out] | f | the yield function (or functions in the case of multisurface plasticity) |
Definition at line 96 of file MultiPlasticityRawComponentAssembler.C.
Referenced by ComputeMultiPlasticityStress::buildDumbOrder(), MultiPlasticityLinearSystem::calculateConstraints(), ComputeMultiPlasticityStress::checkAdmissible(), fddyieldFunction_dintnl(), fddyieldFunction_dstress(), and ComputeMultiPlasticityStress::returnMap().
|
protectedinherited |
User objects that define the yield functions, flow potentials, etc.
Definition at line 70 of file MultiPlasticityRawComponentAssembler.h.
Referenced by MultiPlasticityRawComponentAssembler::activeModelSurfaces(), MultiPlasticityRawComponentAssembler::activeSurfaces(), MultiPlasticityRawComponentAssembler::anyActiveSurfaces(), ComputeMultiPlasticityStress::applyKuhnTucker(), MultiPlasticityRawComponentAssembler::buildActiveConstraints(), MultiPlasticityRawComponentAssembler::buildActiveConstraintsJoint(), MultiPlasticityRawComponentAssembler::buildActiveConstraintsRock(), ComputeMultiPlasticityStress::canAddConstraints(), ComputeMultiPlasticityStress::checkAdmissible(), ComputeMultiPlasticityStress::checkKuhnTucker(), MultiPlasticityRawComponentAssembler::dflowPotential_dintnl(), MultiPlasticityRawComponentAssembler::dflowPotential_dstress(), MultiPlasticityRawComponentAssembler::dhardPotential_dintnl(), MultiPlasticityRawComponentAssembler::dhardPotential_dstress(), MultiPlasticityRawComponentAssembler::dyieldFunction_dintnl(), MultiPlasticityRawComponentAssembler::dyieldFunction_dstress(), MultiPlasticityRawComponentAssembler::flowPotential(), MultiPlasticityRawComponentAssembler::hardPotential(), MultiPlasticityLinearSystem::MultiPlasticityLinearSystem(), MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler(), ComputeMultiPlasticityStress::quickStep(), ComputeMultiPlasticityStress::residual2(), ComputeMultiPlasticityStress::returnMap(), MultiPlasticityRawComponentAssembler::returnMapAll(), ComputeMultiPlasticityStress::singleStep(), and MultiPlasticityRawComponentAssembler::yieldFunction().
|
protected |
none - don't do any debugging crash - currently inactive jacobian - check the jacobian entries jacobian_and_linear_system - check entire jacobian and check that Ax=b
Definition at line 57 of file MultiPlasticityDebugger.h.
Referenced by ComputeMultiPlasticityStress::computeQpStress(), and ComputeMultiPlasticityStress::initQpStatefulProperties().
|
protected |
Debug the Jacobian entires at these internal parameters.
Definition at line 66 of file MultiPlasticityDebugger.h.
Referenced by checkDerivatives(), checkJacobian(), checkSolution(), outputAndCheckDebugParameters(), and ComputeMultiPlasticityStress::plasticStep().
|
protected |
Debug finite-differencing parameters for the internal parameters.
Definition at line 75 of file MultiPlasticityDebugger.h.
Referenced by fddflowPotential_dintnl(), fddyieldFunction_dintnl(), fdJacobian(), and outputAndCheckDebugParameters().
|
protected |
Debug the Jacobian entires at these plastic multipliers.
Definition at line 63 of file MultiPlasticityDebugger.h.
Referenced by checkJacobian(), checkSolution(), outputAndCheckDebugParameters(), and ComputeMultiPlasticityStress::plasticStep().
|
protected |
Debug finite-differencing parameters for the plastic multipliers.
Definition at line 72 of file MultiPlasticityDebugger.h.
Referenced by fdJacobian(), and outputAndCheckDebugParameters().
|
protected |
Debug the Jacobian entries at this stress.
Definition at line 60 of file MultiPlasticityDebugger.h.
Referenced by checkDerivatives(), checkJacobian(), checkSolution(), outputAndCheckDebugParameters(), and ComputeMultiPlasticityStress::plasticStep().
|
protected |
Debug finite-differencing parameter for the stress.
Definition at line 69 of file MultiPlasticityDebugger.h.
Referenced by fddflowPotential_dstress(), fddyieldFunction_dstress(), fdJacobian(), and outputAndCheckDebugParameters().
|
protectedinherited |
Minimum value of the _f_tol parameters for the Yield Function User Objects.
Definition at line 131 of file MultiPlasticityLinearSystem.h.
Referenced by MultiPlasticityLinearSystem::eliminateLinearDependence(), and MultiPlasticityLinearSystem::MultiPlasticityLinearSystem().
|
protectedinherited |
Number of plastic models for this material.
Definition at line 52 of file MultiPlasticityRawComponentAssembler.h.
Referenced by MultiPlasticityRawComponentAssembler::buildActiveConstraints(), MultiPlasticityLinearSystem::calculateConstraints(), MultiPlasticityLinearSystem::calculateJacobian(), MultiPlasticityLinearSystem::calculateRHS(), checkSolution(), MultiPlasticityRawComponentAssembler::dflowPotential_dintnl(), MultiPlasticityRawComponentAssembler::dflowPotential_dstress(), MultiPlasticityRawComponentAssembler::dhardPotential_dintnl(), MultiPlasticityRawComponentAssembler::dhardPotential_dstress(), MultiPlasticityRawComponentAssembler::dyieldFunction_dintnl(), MultiPlasticityRawComponentAssembler::dyieldFunction_dstress(), fddflowPotential_dintnl(), fddyieldFunction_dintnl(), fdJacobian(), MultiPlasticityRawComponentAssembler::flowPotential(), MultiPlasticityRawComponentAssembler::hardPotential(), ComputeMultiPlasticityStress::initQpStatefulProperties(), MultiPlasticityLinearSystem::MultiPlasticityLinearSystem(), MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler(), MultiPlasticityLinearSystem::nrStep(), outputAndCheckDebugParameters(), ComputeMultiPlasticityStress::plasticStep(), ComputeMultiPlasticityStress::residual2(), ComputeMultiPlasticityStress::returnMap(), MultiPlasticityRawComponentAssembler::returnMapAll(), ComputeMultiPlasticityStress::singleStep(), and MultiPlasticityRawComponentAssembler::yieldFunction().
|
protectedinherited |
Number of surfaces within the plastic models.
For many situations this will be = _num_models since each model will contain just one surface. More generally it is >= _num_models. For instance, Mohr-Coulomb is a single model with 6 surfaces
Definition at line 61 of file MultiPlasticityRawComponentAssembler.h.
Referenced by ComputeMultiPlasticityStress::activeCombinationNumber(), ComputeMultiPlasticityStress::applyKuhnTucker(), MultiPlasticityRawComponentAssembler::buildActiveConstraints(), ComputeMultiPlasticityStress::buildDumbOrder(), MultiPlasticityLinearSystem::calculateConstraints(), MultiPlasticityLinearSystem::calculateJacobian(), MultiPlasticityLinearSystem::calculateRHS(), ComputeMultiPlasticityStress::canAddConstraints(), ComputeMultiPlasticityStress::canIncrementDumb(), ComputeMultiPlasticityStress::changeScheme(), ComputeMultiPlasticityStress::checkAdmissible(), checkDerivatives(), checkJacobian(), ComputeMultiPlasticityStress::checkKuhnTucker(), checkSolution(), ComputeMultiPlasticityStress::ComputeMultiPlasticityStress(), ComputeMultiPlasticityStress::computeQpStress(), ComputeMultiPlasticityStress::consistentTangentOperator(), MultiPlasticityRawComponentAssembler::dflowPotential_dintnl(), MultiPlasticityRawComponentAssembler::dflowPotential_dstress(), MultiPlasticityRawComponentAssembler::dhardPotential_dintnl(), MultiPlasticityRawComponentAssembler::dhardPotential_dstress(), dof_included(), MultiPlasticityRawComponentAssembler::dyieldFunction_dintnl(), MultiPlasticityRawComponentAssembler::dyieldFunction_dstress(), MultiPlasticityLinearSystem::eliminateLinearDependence(), fddflowPotential_dintnl(), fddflowPotential_dstress(), fddyieldFunction_dintnl(), fddyieldFunction_dstress(), fdJacobian(), MultiPlasticityRawComponentAssembler::flowPotential(), MultiPlasticityRawComponentAssembler::hardPotential(), ComputeMultiPlasticityStress::incrementDumb(), ComputeMultiPlasticityStress::initQpStatefulProperties(), MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler(), MultiPlasticityLinearSystem::nrStep(), ComputeMultiPlasticityStress::numberActive(), outputAndCheckDebugParameters(), ComputeMultiPlasticityStress::plasticStep(), ComputeMultiPlasticityStress::reinstateLinearDependentConstraints(), ComputeMultiPlasticityStress::residual2(), ComputeMultiPlasticityStress::returnMap(), MultiPlasticityRawComponentAssembler::returnMapAll(), ComputeMultiPlasticityStress::singleStep(), and MultiPlasticityRawComponentAssembler::yieldFunction().
|
protectedinherited |
Definition at line 49 of file MultiPlasticityRawComponentAssembler.h.
Referenced by MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler().
|
protectedinherited |
Allows initial set of active constraints to be chosen optimally.
Definition at line 67 of file MultiPlasticityRawComponentAssembler.h.
Referenced by MultiPlasticityRawComponentAssembler::buildActiveConstraints(), and MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler().
|
protectedinherited |
_surfaces_given_model[model_number] = vector of surface numbers for this model
Definition at line 64 of file MultiPlasticityRawComponentAssembler.h.
Referenced by MultiPlasticityRawComponentAssembler::activeModelSurfaces(), MultiPlasticityRawComponentAssembler::activeSurfaces(), MultiPlasticityRawComponentAssembler::anyActiveSurfaces(), MultiPlasticityRawComponentAssembler::MultiPlasticityRawComponentAssembler(), ComputeMultiPlasticityStress::quickStep(), and MultiPlasticityRawComponentAssembler::returnMapAll().
|
protectedinherited |
Tolerance on the minimum ratio of singular values before flow-directions are deemed linearly dependent.
Definition at line 128 of file MultiPlasticityLinearSystem.h.
Referenced by MultiPlasticityLinearSystem::eliminateLinearDependence().