Options
All
  • Public
  • Public/Protected
  • All
Menu

Represent a user-defined constraint on traction. The implementation is provided by a callback.

const c = new arch.UserTic( t => [t[0]<0?0:t[0], t[1], t[2]] )
surface.addConstraint(c)

Another example for coulomb friction

const c = new arch.UserTic()

// We assume a distribution of friction and cohesion
// Arrays frictionArray and cohesionArray are given for triangles

// tract is the traction before convertion to displacement
// id is the id of the triangle for the considered surface
c.setFunction( (tract, id) => {
const μ = frictionArray[id]
const C = cohesionArray[id]
const σ = tract[0]
const τ = μ*σ + C
const t = Math.sqrt(tract[1]**2 + tract[2]**2)

if (t >= τ) {
const δ = τ/t
tract[1] -= δ*tract[1]
tract[2] -= δ*tract[2]
} else {
tract[1] = tract[2] = 0 // stick
}

return tract
})

surface.addConstraint(c)
see

UserDic

Hierarchy

  • UserTic

Implements

Index

Constructors

Methods

Constructors

  • see

    func

    Parameters

    • cb: Function

      The arrow function

    Returns UserTic

Methods

  • brief

    The arrow function that will change the ``. This arrow function should return the modified traction

    Parameters

    Returns any