Options
All
  • Public
  • Public/Protected
  • All
Menu

A user-defined remote using an arrow function.

Example for defining a gradient Andersonian remote stress

example
const theta = 45   // Orientation od SH according to the north, between 0° and 180°
const rho = 2200 // Density between 0 and 3000
const Rh = 0.1 // Normalized Sh according to Sv, between 0 and 2 and <= SH
const RH = 0.6 // Normalized SH according to Sv, between 0 and 2 and >= Sh

const remote = new arch.UserRemote( (x,y,z) => {
const ang = theta *Math.PI / 180
const cos = Math.cos(ang)
const sin = Math.sin(ang)
const cos2 = cos**2
const sin2 = sin**2
const Sv = rho*9.81*z // z is negatif, so is Sv
const Sh = Sv * Rh
const SH = Sv * RH
// Order is [xx, xy, xz, yy, yz, zz]
return [cos2*Sh + sin2*SH, cos*sin*(SH-Sh), 0, sin2*Sh + cos2*SH, 0, Sv]
})

Hierarchy

  • UserRemote

Implements

Index

Constructors

Methods

  • Set the arrow function of this user-defined remote. The signature is

    cb(x: number, y: number, z: number): Tensor
    

    The returned Array should be of size 6 with the following order for the components of the symetric tensor:

    [xx, xy, xz, yy, yz, zz]
    

    Example for defining an Andersonian remote stress

    example
    const remote = new arch.UserRemote( (x,y,z) => [1, 0, 0, 2, 0, -3] )
    model.addRemote(remote)

    model.run()
    ...
    r.setFunction( (x, y, z) => [0, 0, 0, 0, 0, 1] )
    model.run()
    ...

    Parameters

    Returns any

  • brief

    Evaluate the traction at pos(x,y,z) with normal n(x,y,z)

    Parameters

    • pos: Vector

      The position in 3D (e.g., center of a triangle)

    • normal: Vector

      The normal at point pos

    Returns Vector

    The traction vector in the form [x, y, z]

  • brief

    Get the resolved stress at a surface's triangles

    Parameters

    Returns FlatVectors

    A flat array of tractions, one for each triangle making the surface

  • brief

    Evaluate the remote at pos(x,y,z)

    Parameters

    • pos: Vector

      The position in 3D

    Returns Tensor

    The remote at pos. The returned array is in the form [xx, xy, xz, yy, yz, zz]