// Add a "pre-defined" Traction-Inequality-constraint (Coulomb friction) // NOTE: Arch for node.js does not support yet the inequalities. // If needed, just let me (Frantz) know... // constc1 = arch.Coulomb() c1.setFriction(0.2) c1.setCohesion(0.01) surface.addConstraint(c1)
// --------------------------------------
// Add a "user-defined" Displacement Inequality Constraint // Make dip displacement to be >= 0 // surface.addConstraint( newarch.UserDic( u=> [u[0], u[1]<0?0:u[1], u[2]] ) )
// Add a remote stress constrho = 2200// Density between 0 and 3000 constRh = 0.1// Normalized Sh according to Sv, between 0 and 2 and <= SH constRH = 0.6// Normalized SH according to Sv, between 0 and 2 and >= Sh constSv = rho*9.81*z constremote = newarch.UserRemote( (x,y,z) => [Rh*Sv, 0, 0, RH*Sv, 0, Sv] ) model.addRemote( remote )
// --------------------------------------
// Solve the problem constsolver = newarch.Forward(model) solver.select("seidel") solver.setMaxIter(2000) solver.setEps(1e-9) solver.run()
// --------------------------------------
// Post-process at some random points (with z=0) constsolution = newarch.Solution(model) conststresses = newArray(100) .fill([0,0,0]) .map( v=> [Math.random(), Math.random(), 0]) .map( p=>solution.stressAt(p[0], p[1], p[2])) // compute the stress at p .map (s=>console.log(s))