contactlaw
ContactLawBase
Base class for contact laws. Define the relationship between the force and displacement increment
_plasticCorrection
instance-attribute
_plasticCorrection: numba_int = 0
The contact plastic correction step
CSL
CSL(idx: int, sv0: StateVariable, sv: StateVariable) -> float
Calculate critical void ratio. You must define the critical void ratio in the elastoplastic contact law, but it is not necessary for the nonlinear elastic contact law, though you can still define it to use in the nonlinear integration method.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ec
|
Critical void ratio
TYPE:
|
__init__
Constructor for the base class of all contact laws.
check
check(idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable)
Check the increment is reasonable
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
elasticStiffness
elasticStiffness(
idx: int, fn: float, sv0: StateVariable, sv: StateVariable
) -> ndarray
Calculate the elastic stiffness matrix, a 3x3 matrix in the following form:
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Ke
|
Elastic stiffness matrix
TYPE:
|
forceDisplacement
forceDisplacement(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Integrate the force-displacement contact law, update the following variables:
sv.force
: force
The following steps are performed:
- Go to the last step if the displacement increment is zero
preIntegration
: called before the integrationintegrate
: integrate the force-displacement contact law to update the contact forcepostIntegration
: called after the integration
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
The stiffness matrix |
frictionCoefficient
frictionCoefficient(idx: int, sv0: StateVariable, sv: StateVariable) -> float
Calculate the friction coefficient combined with different criteria.
increment
increment(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Increment the displacement and calculate the force. The following steps are performed:
preIncrement
: called before the increment- Return the stiffness matrix if the displacement increment is zero
disp += ddisp
: update the displacementK = stiffness
: calculate the stiffness matrixforce += K @ ddisp
: update the forcecheck
: check the convergencepostIncrement
: called after the increment
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
The stiffness matrix |
initialize
initialize(sv: StateVariable)
Initialize the state variables for the contact law
RETURNS | DESCRIPTION |
---|---|
sv
|
Initial state variables
TYPE:
|
integrate
integrate(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Integrate the force-displacement contact law, with a number of increments.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment calculated from the elastic trial from the force increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
The stiffness matrix at the end of the increment |
postIncrement
postIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Post-processing after each increment for the contact law
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
postIntegration
postIntegration(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Post-processing after the contact integration
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
preIncrement
preIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Pre-processing before each increment for the contact law
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
preIntegration
preIntegration(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Pre-processing before the contact integration
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
stiffness
stiffness(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Stiffness matrix for the contact law. You are required to define the nonlinear relationship between the force and displacement increment:
ElastoplasticContactLaw
Bases: ContactLawBase
Base class for elastoplastic contact laws.
CPPM
CPPM(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Solve plastic problem (plastic strain) with the closest point projection method (CPPM)
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Kep
|
Elasto-plastic stiffness matrix
TYPE:
|
ExplicitCPA
ExplicitCPA(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Solve plastic problem (plastic strain) with the explicit or cutting plane algorithm (CPA)
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Kep
|
Elasto-plastic stiffness matrix
TYPE:
|
dfdforce
dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function f with respect to the force:
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dfdsig
|
Derivative of yield function f with respect to the force
TYPE:
|
dgdforce
dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of potential function g with respect to the force:
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dgdsig
|
Derivative of potential function g with respect to the stress
TYPE:
|
hardening
hardening(
idx: int, dgdsig: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
Hardening items in the equation of plastic multiplier, coefficient of plastic multiplier:
make sure to define the derivative of plastic multiplier with respect to plastic strain dkappa_ddispp
(:math:\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}
) attribute in this class since it will be used in
the :meth:.updateHardeningVariables
method to update hardening variables.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
dgdsig
|
Derivative of potential function g with respect to the force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
hardening
|
Hardening items in the equation of plastic multiplier
TYPE:
|
integrate
integrate(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
isConverged
isConverged(
idx: int, f: float, trial: bool, sv0: StateVariable, sv: StateVariable
) -> bool
Determine whether the contact force state is converged to the yield surface or the force state is in the elastic region.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
f
|
Yield function value
TYPE:
|
trial
|
Whether it is for elastic trial
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
Whether the contact force state is converged to the yield surface or the force state is in the elastic region |
maintainYieldSurface
maintainYieldSurface(
idx: int,
ddisp: ndarray,
dforce: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
Revert state variables from elastic state to maintain the force state on the yield surface
Notes
This method should be overridden when the force state is already plastic, but the mixed load iteration converges to the elastic state. This is similar to the yield surface correction method, but the force state is in the elastic region initially caused by the mixed load iteration. However, previous mixed load iteration indicates that the force state is already in the plastic region. This method is used to update the state variables to keep the force state on the yield surface.
If you override this method, make sure to initialize the sv.cscalars["plastic"]
state variable to an array
of zeros with the same size as the number of integration points in the initialize
method of the contact law.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
dforce
|
Force increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
plasticModulus
plasticModulus(
idx: int,
Ke: ndarray,
dfdforce: ndarray,
dgdforce: ndarray,
hardening: float,
sv0: StateVariable,
sv: StateVariable,
) -> float
Calculate the plastic modulus
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
dfdforce
|
Derivative of the yield function with respect to the force
TYPE:
|
dgdforce
|
Derivative of the hardening variable with respect to the force
TYPE:
|
hardening
|
Hardening item
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Plastic modulus |
plasticMultiplier
plasticMultiplier(
idx: int,
f: float,
Ke: ndarray,
ddisp: ndarray,
dfdforce: ndarray,
Kp: float,
sv0: StateVariable,
sv: StateVariable,
) -> float
Calculate the plastic multiplier
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
f
|
Yield function value
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
dfdforce
|
Derivative of the yield function with respect to the force
TYPE:
|
Kp
|
Plastic modulus
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Plastic multiplier |
revertHardeningVariables
revertHardeningVariables(
idx: int,
dlambda: float,
ddispp: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
Revert hardening variables.
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
dlambda
|
Plastic multiplier
TYPE:
|
ddispp
|
Plastic displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
setPlasticMethod
setPlasticMethod(method: str)
Set the plastic method
PARAMETER | DESCRIPTION |
---|---|
method
|
The plastic method
TYPE:
|
updateHardeningVariables
updateHardeningVariables(
idx: int,
dlambda: float,
ddispp: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
Update hardening variables, the derivative of plastic multiplier with respect to plastic strain is available
in the dkappa_ddispp
(:math:\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}
) attribute:
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
dlambda
|
Plastic multiplier
TYPE:
|
ddispp
|
Plastic displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
yieldSurface
yieldSurface(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Calculate yield function. You are required to define the yield function of the contact force and the state variables:
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
fr
|
Shear force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Value of the yield function |
yieldSurfaceCorrection
yieldSurfaceCorrection(idx: int, sv0: StateVariable, sv: StateVariable)
Update state variables after every plastic increment to keep the force state on the yield surface
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
yieldSurfaces
yieldSurfaces(
idx: int, fn: ndarray, fr: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Calculate yield function for multiple times
PARAMETER | DESCRIPTION |
---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
fr
|
Shear force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
Values of the yield function |
NonlinearElasticContactLaw
Bases: ContactLawBase
Nonlinear elastic contact law
integrate
integrate(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
postIncrement
postIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None