Options
All
  • Public
  • Public/Protected
  • All
Menu

The object which is returned after calling Forward.run, or created given a Model and the computed Burger's vectors on the discontinuities making the Model.

example
solver.run()
const solution = new arch.Solution(model)

const displOnSurfaces = solution.burgers(true, true) // locally and at triangle centers

const pos = [] ;
for (let i=0; i<10; ++i) pos.push(4*(Math.random()-0.5), 4*(Math.random()-0.5), 0)

const displ = solution.displ (pos)
const strain = solution.strain(pos)
const stress = solution.stress(pos)

Hierarchy

  • Solution

Index

Constructors

Methods

  • burgers(local: boolean, atTriangles: boolean): FlatVectors[]
  • brief

    Get the computed displacement vectors on surface discontinuities, also known as Burger's vectors. For a given triangle, the Burger's vector, b, can be written as the difference between b(+), the displacment on the positive side of the triangle, and b(-), the displacment on the negtive side of the triangle. That is to say: b = b(+) - b(-), with b provided by burgers, b(+) provided by burgersPlus and b(-) provided by burgersMinus.

    warning

    The returned array comprises all Surface. This is why the return type is an array of FlatVectors (one entry for each Surface) and not a FlatVectors. The order of the corresponding surface is the same as the addition in the model.

    warning

    If you want to display iso-contours of a component of the Burger's vectors, you have to use local = false and atTriangles = false, as OpenGL uses values at nodes and because interpolation from triangles to nodes have to be done in the global coordinate systems (we cannot add vectors from differents coordinate systems, i.e., local coordinate system of the triangles).

    Parameters

    • local: boolean

      Local or global coordinate system

    • atTriangles: boolean

      Compute at triangle center, at vertices otherwise

    Returns FlatVectors[]

    An array of flat vectors. Each entry corresponds to the burger vectors of a Surface.

  • burgersMinus(local: boolean, atTriangles: boolean): FlatVectors[]
  • brief

    Get the computed displacement discontinuity on the negative side of the triangles. If you do the substraction of burgersPlus and burgersMinus, you should retrieve burgers

    warning

    The returned array comprises all Surface. This is why the return type is an array of FlatVectors (one entry for each Surface) and not a FlatVectors. The order of the corresponding surface is the same as the addition in the model.

    warning

    If you want to display iso-contours of a component of the Burger's vectors, you have to use local = false and atTriangles = false, as OpenGL uses values at nodes and because interpolation from triangles to nodes have to be done in the global coordinate systems (we cannot add vectors from differents coordinate systems, i.e., local coordinate system of the triangles).

    see

    [[delta]]

    Parameters

    • local: boolean

      Local or global coordinate system

    • atTriangles: boolean

      Compute at triangle center, at vertices otherwise

    Returns FlatVectors[]

    An array of flat vectors. Each entry corresponds to a Surface.

  • burgersPlus(local: boolean, atTriangles: boolean): FlatVectors[]
  • brief

    Get the computed displacement discontinuity on the positive side of the triangles. If you do the substraction of burgersPlus and burgersMinus, you should retrieve burgers

    warning

    The returned array comprises all Surface. This is why the return type is an array of FlatVectors (one entry for each Surface) and not a FlatVectors. The order of the corresponding surface is the same as the addition in the model.

    warning

    If you want to display iso-contours of a component of the Burger's vectors, you have to use local = false and atTriangles = false, as OpenGL uses values at nodes and because interpolation from triangles to nodes have to be done in the global coordinate systems (we cannot add vectors from differents coordinate systems, i.e., local coordinate system of the triangles).

    see

    [[delta]]

    Parameters

    • local: boolean

      Local or global coordinate system

    • atTriangles: boolean

      Compute at triangle center, at vertices otherwise

    Returns FlatVectors[]

    An array of flat vectors. Each entry corresponds to a Surface.

  • brief

    Compute the displacement field at points given in the flat array position.

    Parameters

    Returns FlatVectors

    The array of displacement in flat array

  • displAt(x: number, y: number, z: number): Vector
  • brief

    Get the displacement at one observation point

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Vector

  • onEnd(cb: Function): void
  • Triggered when a post-process (displ, strain or stress) is done or stopped.

    Parameters

    • cb: Function

      Callback of type cb(): void

    Returns void

  • onMessage(cb: Function): void
  • Notification when a message is sent by this class

    Parameters

    • cb: Function

      Signature is cb(msg: string): void

    Returns void

  • Set the callback function to call to notify the advance of the post-process.

    example
    solver.run()
    const solution = new arch.Solution(model)
    solution.onProgress( (i,p) => {
    console.log(`nb-pts so far: ${i}, realized: ${p.toFixed(0)}%`))
    }
    solution.displ(positions)

    will display

    nb-pts so far:    0, realized:  0%
    nb-pts so far: 2000, realized: 5%
    nb-pts so far: 4000, realized: 10%
    nb-pts so far: 6000, realized: 15%
    ...

    Parameters

    Returns void

  • brief

    Get the residual tractions after computing the Burger's vectors. For a model without any inequality constraints, the residual should be zero. However, for example for frictional model, residual tractions are different from zero.

    warning

    The returned array comprises all Surface. This is why the return type is an array of FlatVectors (one entry for each Surface) and not a FlatVectors. The order of the corresponding surface is the same as the addition in the model.

    example

    Display the resisual traction vectors for the first Surface

    ...
    solver.run()
    const solution = new arch.Solution(model)

    const resT = solution.residualTractions()[0] // first surface

    const it = new arch.VectorIt(resT)
    it.forEach( t => console.log(t) )

    Returns FlatVectors[]

    An array of flat vectors. Each entry corresponds to the residual traction vectors of a Surface.

  • setDelta(d: number): any
  • setNbCores(n: number): any
  • brief

    Set the number of threads to use for computing displacement, strain or stress at observation points. It is understood that this procedure applies only for multiple observation points, i.e., when calling displ, strain or stress only.

    default

    1

    Parameters

    • n: number

    Returns any

  • stopRequested(cb: Function): void
  • Set the callback function to call to khnow if the user want to stop the computation.

    Parameters

    • cb: Function

      The callback to pass with signature cb(): boolean

    Returns void

  • brief

    Compute the strain field at points given in the flat array position.

    Parameters

    Returns FlatTensors

    The array of strains in flat array

  • strainAt(x: number, y: number, z: number): Tensor
  • brief

    Get the strain at one observation point

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Tensor

  • brief

    Compute the stress field at points given in the flat array position.

    Parameters

    Returns FlatTensors

    The array of strains in flat array

  • stressAt(x: number, y: number, z: number): Tensor
  • brief

    Get the stress at one observation point

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Tensor

  • Create a Solution given a model and the computed burgers vectors for each discontinuities.

    example
    ...
    const burgers = solution.burgers(true, true)

    // In a web-worker
    const sol = arch.Solution.create(model, burgers)

    sol.onProgress( (i,p) => console.log(`nb-pts so far: ${i},\trealized: ${p.toFixed(0)}%`))
    sol.onMessage( m => console.log('arch-Message :', m) )

    const U = sol.displ (pos)
    const S = sol.stress(pos)

    Will display

    arch-Message : performing displacement post-process
    nb-pts so far: 0, realized: 0%
    nb-pts so far: 12500, realized: 5%
    nb-pts so far: 25000, realized: 10%
    ...
    arch-Message : performing stress post-process
    nb-pts so far: 0, realized: 0%
    nb-pts so far: 12500, realized: 5%
    nb-pts so far: 25000, realized: 10%
    ...

    Parameters

    • model: Model
    • burgers: FlatVectors[]

      An array of FlatVectors, where each entry of the array represents the burger's vector of a surface discontinuity in the model.

    Returns Solution