Settings, Catalogs and Geometry
Read settings, catalogs, regions and FEA definitions back in the shape their commands accept, change one catalog entry at a time, and script result-derived and imported geometry.
Every settings dialog, catalog and definition table in JSlope has a query that prints it in the shape its command accepts. You can read a value, change it and send it back, or copy one scenario's settings into another, without retyping whole tables.
Reading settings back
settings.get
settings.get section="compute"
settings.get scenario="scenario-2" section="seismic"settings.get prints one JSON block per section. scenario= reads another
scenario without switching to it. Each section is in the shape its setter
takes:
section= | Pass it back to |
|---|---|
"compute", "advanced", "groundwater", "stress", "rockfall", "runoutSimulation", "runoutVolumetric", "mesh", "seismic", "slopeLimits" | scenario.settings.apply <section>= |
"project" | project.settings.apply, as its arguments; project settings are the same for every scenario |
"slopeLimits" | also slopeLimits.set, as {custom:true, set1:[L1,R1], set2:[L2,R2], secondSet} for custom limits, or {custom:false} for the default limits, which keep following the exposed slope |
"seismic" | also seismic.set, as {horizontal, vertical} |
"search" | lem.search.set, as {width, depth} |
"refinement" | lem.refinement.set, as {width, depth, enabled} |
"mesh" | also fea.mesh.settings.set analysis=, as {groundwater: {elementSideLength, elementOrder, biasStrength, maxRefinementPasses}, stress: {…}} |
In groundwater, stage times and the manual time step are in the scenario's
time unit, and the message names the unit. search and refinement name a
width or depth level only when the stored values are exactly that level's
values. A half with custom values is left out, and the compute section carries
those values. Passing a section back therefore changes nothing. search is
empty when neither half matches or the search method has no Search Complexity
presets, and then there is nothing to pass back.
Changing settings
Circular searches can be constrained to a point, a finite crossing segment, or an infinite tangent line. Coordinates are in metres. For example:
scenario.settings.apply compute={"searchMethod":"adaptive-circular","surfaceRefinementEnabled":false,"circularFocus":{"type":"point","point":{"x":27.432,"y":9.144}}} advanced={"automaticTensionCrackEnabled":false}Use {"type":"line","start":{"x":10,"y":0},"end":{"x":50,"y":0}}
for a crossing segment, or "type":"tangent" for tangency to the infinite
line through those endpoints. compute={"circularFocus":null} removes the
constraint. Surface Refinement, automatic tension cracks and other search
methods cannot be enabled while a circular focus is active.
project.settings.apply runoutSolverMode="partitioned" changes the
Runout solver for every scenario and calibration run, as Project Settings >
Runout does. The choices are exact and partitioned. Exact preserves the
serial contact order. Partitioned solves independent contact groups in parallel;
its results are deterministic across thread counts but can differ from Exact.
Applying a different mode
clears existing Runout simulation results while retaining particle packing;
the selection is saved with the project and supports undo and redo.
project.settings.apply runoutPositionIterations=12 runoutVelocityIterations=8
sets the maximum Runout solver passes per simulation step, as Project
Settings → Runout does. The defaults are 6 position and 4 velocity passes;
both accept integers from 1 to 1000.
runoutPositionTolerance (metres) and runoutVelocityTolerance (m/s) enable
early exit when positive. A tolerance of 0, the default, uses the full count
for that solver. These choices apply to every Runout scenario and calibration
run, are saved with the project, and support undo and redo. Changing them
clears Runout results while retaining particle packing.
scenario.settings.apply takes one JSON object per Scenario Settings section.
Without scenarios= it applies to the Scenario Explorer selection: the active
scenario and every scenario or group selected with it. The other settings
setters (fea.mesh.settings.set, seismic.set, slopeLimits.set,
slopeLimits.reset, lem.search.set and lem.refinement.set) apply to the
same selection.
help scenario.settings.apply lists every key of every section with its unit
and allowed values, and the terminal completes keys and values inside the
object. Only listed keys are accepted: a misspelt key, a choice that does not
exist or a value out of range is refused with a suggestion, and nothing
changes. In a script these are refused before any line runs; the Runout
timeScale, which is fixed at 0.5, is refused the same way. A key given with
its stored value changes nothing.
scenario.settings.apply compute={"slices":50,"iterations":6}
scenario.settings.apply stress={"elasticStressMaterialModel":"elastic-perfectly-plastic","elasticStressAnalysis":{"type":"srf","srf":{"tolerance":0.005}}}
scenario.settings.apply stress={"elasticStressMaterialModel":"elastic-plastic-approximation","elasticStressAnalysis":{"type":"load","approximation":{"loadStageCount":5}}}
scenario.settings.apply stress={"elasticStressMaterialModel":"elastic-perfectly-plastic","elasticStressAnalysis":{"type":"large-strain","largeStrain":{"increments":20,"drivingMode":"displacement","remesh":{"enabled":false}}}}
fea.bc.assign analysis="stress" segments=[2] type="prescribed" uy=-0.05
lem.search.set width="medium" depth="high"
lem.refinement.set width="low" depth="low" enabled=trueThe stress material model is elastic, elastic-plastic-approximation
(Elastic with plastic approximation) or elastic-perfectly-plastic. A strength
reduction analysis needs elastic-perfectly-plastic; a large-strain analysis
needs it too, with the CPU solver backend (used automatically for every stress solve)
and no joints. The approximation does not run with joints; a combination the
scenario cannot solve is refused for that scenario. The approximation's controls are under
elasticStressAnalysis.approximation: tolerance, maxIterationsPerStage,
loadStageCount and relaxationFactor.
For small-strain Initial Stiffness analyses,
elasticStressAnalysis.plastic.initialLoadSteps accepts "auto" or a fixed
integer from 1 to 1000. Auto selects the count when the solver prepares each
stage; it is preserved when importing RS2 models and saving the project.
An active adaptiveSteps object uses its own increment rules and overrides
the stored Auto or Fixed choice.
scenario.settings.apply stress={"elasticStressAnalysis":{"plastic":{"initialLoadSteps":"auto","adaptiveSteps":null}}}lem.search.set sets the Search Complexity width and depth presets for the
active scenario's search method, as the Search page of the compute settings
does. lem.refinement.set sets the Surface Refinement presets. In both, a
half you leave out keeps its values, so lem.refinement.set enabled=false
only turns refinement off. Block Search combines width and depth into one
surface count, so it needs both.
slopeLimits.set custom=false restores the default slope limits, as
slopeLimits.reset does. Default limits span the exposed slope and follow it
when the External Boundary changes; custom limits stay where you put them.
A pair you leave out of slopeLimits.set keeps each selected scenario's own
values, so slopeLimits.set set1=[5,30] moves only the first pair and
slopeLimits.set secondSet=false only turns the second pair off. Each scenario
is checked with its own other pair; if the windows would overlap in any of
them, nothing changes and the message names that scenario. The Slope Limits
dialog and dragging the markers send only the pair you changed.
Transient times
Transient groundwater times in commands are in the scenario's time unit, as in
the Groundwater dialogs: stage times, time-function point times and the manual
time step (groundwaterSetup.integration.timeStep). The unit is days unless
you change it.
scenario.settings.apply groundwater={"groundwaterSetup":{"mode":"transient","timeUnit":"days","stages":[{"name":"Day 1","time":1,"calculateFos":true},{"name":"Day 30","time":30,"calculateFos":true}]}}
fea.groundwater.stages.set stages=[{"name":"Day 1","time":1,"calculateFos":true},{"name":"Day 10","time":10,"calculateFos":false}]Groundwater setup also accepts a mesh-independent prescribed initial field and complete boundary replacement sets. Replacement times use the same selected time unit; an empty set releases all preceding boundary conditions. The steady iteration limit is independent of the transient iteration limit.
scenario.settings.apply groundwater={"groundwaterMaxIterations":500,"groundwaterConvergenceTolerance":1e-10,"groundwaterSetup":{"mode":"transient","timeUnit":"seconds","initialCondition":"prescribed-field","prescribedInitialField":{"type":"uniform-pressure-head","value":100},"stages":[{"name":"End","time":10,"calculateFos":false}],"boundaryStages":[{"id":"release","time":5,"conditions":[]}]}}Use groundwater.groundwaterBoundaryConditions to replace ordinary conditions.
An exterior target uses its zero-based segmentIndex; a coordinate target uses
segmentIndex:-1 with geometryTarget set to either
{"kind":"nodes","points":[{"x":1,"y":2}]} or
{"kind":"segment","start":{"x":0,"y":1},"end":{"x":2,"y":1}}.
normal-flux values are m/s, positive inward and negative outward.
settings.get section="groundwater" returns these inputs in the setter's shape.
- A
timeUnitin the same object sets the unit of the times given with it. - Changing
timeUniton its own keeps the stored durations and only changes how they are shown. - A transient setup given without stages gets stages at 1, 10 and 100 days. A steady setup may have no stages; a transient one needs at least one.
- A stage without an
idgets the first free idstage-1,stage-2and so on. - When the Scenario Settings dialog applies a groundwater edit to several scenarios, it sends the time unit only with stage times or a time step, or when you changed the unit, so each other scenario keeps its own unit.
Materials
material.get id="clay"
material.update id="clay" properties={"cohesion":12,"frictionAngle":27}
material.update id="clay" properties={"probabilistic":{"cohesion":null}}
material.update id="clay" properties={"feaCohesion":8,"residualCohesion":2}
material.update id="clay" properties={"feaCohesion":null}
catalog.reorder kind="material" id="clay" position=0material.listlists every material with its unit weight, failure criterion and strength: c, φ, tensile strength and any low-stress envelope for Mohr-Coulomb; UCS and either GSI, mi and D or direct mb, s and a for Hoek-Brown; the point count and stress basis of a shear function; and the base material and row count of an anisotropic material. It then gives the stress-analysis strength (strength.fea): each FEA value with whether it follows its LEM value or is overridden, the tension cutoff and its source, and whether the residual departs from the peak (elastic-brittle-plastic) or equals it.- The
fea*properties (feaCohesion,feaFrictionAngle,feaUcs,feaGsi,feaMi,feaD,feaMb,feaS,feaA,feaTensileStrength) and theresidual*properties are null to follow the LEM value (the FEA tension follows the enabled LEM tensile strength, else the cohesion) or the peak; a number overrides it for stress analysis only. - For Hoek-Brown,
hoekBrownParameterInput="direct"usesucs,mb,sandain LEM and stress analysis."gsi"derives the envelope fromucs,gsi,miandd. Direct input requires positive UCS and mb, s from zero to one, and a greater than zero and at most one. - For Mohr-Coulomb strength,
cohesionDepthEnabled=trueappliescohesionDepthRatebelow the elevationcohesionDatumYin LEM and stress analysis.cohesionMaxcaps the resulting cohesion;nullleaves it uncapped. Cohesion stays at its reference value above the datum. For example,material.update id="clay" properties={"cohesion":10,"cohesionDepthEnabled":true,"cohesionDatumY":5,"cohesionDepthRate":4,"cohesionMax":18}gives 10 kPa at elevation 5 m and above, increasing to 18 kPa at 3 m and below. - An explicit
unitWeight=0is retained for weightless stress benchmarks. It contributes no self-weight force. Negative unit weights are rejected; LEM requires positive unit weights. material.getprints{id, name, properties}with every property. Pass it back withmaterial.update id=… properties=…, or copy the material withmaterial.add id="clay-2" name="Clay copy" properties=…. Each scenario has its own material and support catalogs;scenario=reads another scenario's material, as it does forsupport.listandregion.list.- Material and support edits, from these commands or Define Properties, apply to the Scenario Explorer selection. Each selected scenario receives only what the edit changed in the active scenario: the changed properties of the same material or support, added entries and deleted entries. Its other values stay its own. A deleted material or support that a selected scenario still uses stays in that scenario, with a warning in the Console.
material.updatemerges nested objects (probabilistic,hydraulicModel,generalizedAnisotropicandanisotropyAddon): keys you leave out keep their values, arrays such asangleRangeRowsreplace the stored array, and a nestednullremoves that key. The second example removes only the cohesion distribution.{"probabilistic":{}}changes nothing; to clear every distribution, set each one tonull. AhydraulicModelwith a differenttype, such as{"type":"simple","volumeCompressibility":0.0002}on a van Genuchten material, replaces the stored model whole, so you can switch models or copy another material's model frommaterial.get.catalog.reordermoves one entry, as Move Up and Move Down do in Define Properties. Give exactly one ofbefore=<id>,after=<id>orposition=<index from 0>. It works on the"material","support","weakLayerJointMaterial","rock"and"sourceDefinition"catalogs.
Support, Weak Layer/Joint, Rock and Rock Source catalogs
Each catalog in Define Properties has commands that add, change and delete one entry. Each is one undo step and is checked as the Define Properties Apply is.
support.list
support.material.add id="nail" name="Soil Nail" properties={"supportType":"soil-nail","tensileCapacity":150}
support.material.update id="nail" properties={"tensileCapacity":180}
support.material.delete id="nail"
weakLayerJointMaterial.list
weakLayerJointMaterial.add id="bedding" name="Bedding" properties={"color":"#0070c0","lem":{"cohesion":0,"frictionAngle":25}}
weakLayerJointMaterial.update id="bedding" properties={"fea":{"normalStiffness":2e6,"dilationAngle":3}}
weakLayerJoint.add points=[[10,20],[30,28],[42,30]] material="bedding" lemEnabled=true feaEnabled=true
rockfall.catalog.get
rockfall.rock.add id="boulder" name="Boulder" properties={"mass":500}
rockfall.rock.update id="boulder" properties={"mass":750}
rockfall.sourceDefinition.add id="fast" name="Fast" properties={"initialVelocity":{"x":2,"y":0}}
rockfall.sourceDefinition.update id="fast" properties={"rockAllocations":[{"rockId":"boulder","count":200}]}support.listlists the support catalog in order;*marks the support material new supports use. Each entry is complete, in the shapesupport.catalog.updateaccepts.support.material.updatetakes the same fields without theid, which goes inid=.support.material.addfills any property you leave out with its support type's default (end-anchored unlesssupportTypesays otherwise).support.material.updatekeeps properties you leave out;nullmeans unspecified for nullable properties. ChangingsupportTyperesets the engineering properties to the new type's defaults, keeping its identity, name and colour. A property the type does not have is refused.- End-anchored support uses
kind: "anchor". ItstensileCapacityis the effective anchor capacity, withoutOfPlaneSpacing,youngsModulus,areaandresidualCapacityfor the member. LEA applies constant capacity; FEM connects a single axial member only at its endpoints. Development lengths, end contributions, pullout and soil-interface properties are unavailable for anchors. A null residual holds peak capacity; zero permits complete loss after peak. - A support type chosen by command sets the force application and orientation
as the Type list in Define Properties does. End-anchored and grouted
tiebacks and sheets are active; nails and piles are passive. Piles act
perpendicular to the pile, sheets tangentially to the slip surface, and
anchors/tiebacks/nails axially. A
forceApplicationorforceOrientationgiven with the type is kept. weakLayerJointMaterial.listlists the scenario's reusable properties. Each entry has acolor, alemstrength group and afeagroup for stiffness, strength overrides and other joint controls. LEM supports Mohr-Coulomb and Generalized Shear Function; FEA also supports None (elastic). FEA follows LEM by default. Set a scalar override tonullto resume inheritance; strength table overrides replace the whole table. The property colour is the live default for drawn boundaries, with explicit CAD colour overrides preserved.weakLayerJointMaterial.addfills omitted properties with their defaults.weakLayerJoint.adddraws a boundary through two or more vertices. Withoutmaterial=it uses the selected property, and it is refused while the catalog is empty. The joint is clipped to the External Boundary: a path that leaves and re-enters becomes several joints, the others with-2,-3ids, and a path wholly outside is refused.weakLayerJoint.updatechanges vertices, name, property, visibility, lock or independentlemEnabled/feaEnabledswitches; it clips new vertices the same way and refuses vertices that the boundary would cut into several parts.weakLayerJoint.setEndCondition id="j-1" end="start" condition="closed"ties the two displacement traces at that exterior endpoint without fixing it in space. Usecondition="open"for independent faces. New ends are Open; interior tips have no endpoint action. Imported RS2 mesh ends are read-only. Only FEA-enabled boundaries constrain the generated mesh, even when hidden.rockfall.catalog.getprints the Rock and Source definition catalogs in the shapematerial.catalog.apply rockfall=accepts.rockfall.rock.adddefaults to the Add button's rock: New Rock, 50 kg, 2500 kg/m³, circular.rockfall.sourceDefinition.adddefaults to New Rock Source releasing 100 of the first Rock at zero velocity.- In the Rock and Rock Source
updatecommands a field you give replaces the stored field whole, andnullremoves an optional field such asmassDistribution. A field every entry needs, such asmassorrockAllocations, refusesnull.help rockfall.rock.updatelists every field with its unit: mass in kg, density in kg/m³, velocities in m/s, angular velocity in rad/s and the initial rotation in radians (the Define Properties dialog shows it in degrees). - A delete is refused while the entry is in use (a support material by a Ground Support, a joint material by a joint, a Rock by a Source definition, a Source definition by a Rock Source in any scenario) and, except for joint materials, for the last entry of its catalog.
- Rock and Rock Source catalogs belong to the whole project and need the Rockfall verified account and accepted Terms to change.
rockfall.source.add definition="fast" points=[[12,28]] places a Rock Source that
releases a given Source definition; without definition= it uses the first.
Regions
region.list
region.list target="analysis"
material.assign.region material="clay" at=[10,25]
material.assign.region material="sand" region=1region.list lists regions with their index, material, area (m²) and a point
at inside each, which you can pass to material.assign.region at=. With
scenario=, the material names come from that scenario's own catalog.
material.assign.region assigns a material to one region, picked by a point or
by its index in the list:
- In a project that uses the Soil Profile it assigns Soil Profile regions
(
target="profile"). Analysis regions take their materials from the profile, sotarget="analysis"is refused. - Otherwise it assigns analysis regions (
target="analysis"), andtarget="profile"is refused.
The Geometry or Results tab no longer changes which regions are assigned.
FEA definitions
fea.groundwater.get
fea.groundwater.get table="functions"
fea.bc.list
fea.bc.list analysis="stress"fea.groundwater.getprints the transient time functions, Transient Total Head overlays, probes and discharge sections in the shapefea.groundwater.defineaccepts. Function times are in the scenario's time unit. Time functions are shared by every scenario.fea.bc.listlists the groundwater boundary conditions, the Transient Total Head overlays and the stress supports by External Boundary segment.
fea.stress.solve needs stage= when the pore pressures come from a transient
FEA groundwater analysis, naming the solved stage whose pore pressures to use.
Tab completion offers the solved stages. Without a transient result it asks
you to run fea.groundwater.solve first, and for a steady analysis or
water-table pore pressures stage= is refused.
fea.groundwater.solve
fea.stress.solve stage="stage-2"Geometry from results
| Command | Does what the GUI does in |
|---|---|
water.table.fromGroundwater keepPrevious=true | The FEA water-table context menu: sets the Water Table from the groundwater result's water table (its upper envelope) |
water.table.fromGroundwater as="polyline" polyline=0 | Adds that line as a construction polyline named FEA Calculated Water Table instead |
runout.failureMass.set source="critical" method="spencer" | The Runout Failure Mass from the LEM critical slip surface and the exposed ground |
rockfall.berm.add at=21.5 height=2 angle=37 | The Project Berm tool |
water.table.fromGroundwateruses the last transient stage, or the steady result when there is none;stage=picks another solved stage. When the result has several water-table lines,polyline=picks one.keepPreviousworks only when setting the Water Table.runout.failureMass.settakes exactly one ofpoints=,surface=orsource="critical". Withsource="critical"it uses the lowest-FOS critical surface of the stored LEM result, or that ofmethod=.rockfall.berm.add at=<x>puts the crestheightabove the exposed ground at x and runs the faces down atangleuntil they meet the ground. Height defaults to 2 m and angle to 37°.points=[[x,y],[x,y],[x,y]]instead stores the three points as given. Both takematerial=for the berm's Rockfall material.
Editing a berm's height or face angle, in the inspector or with
domain.entity.update id="berm-1" patch={"bermHeight":3}, keeps its Rockfall
material. patch={"materialId":null} clears it.
Editing geometry
cad.points.set id="pl-1" points=[[0,0],[4,0],[4,3],[8,3]]
cad.layer.set id="mesh" colorLight="#1f5fa8" lineWidth=2 opacity=0.8
cad.layers.set visible=true locked=false selectable=true
geometry.simplify minVertexDistance=0.05
geometry.simplify families=["material-boundaries","weak-layers"] colinearDistance=0.01 colinearAngle=1 includeLocked=true
geometry.simplify ids=["water-table"] colinearDistance=0.01cad.points.setreplaces the vertices of a CAD polyline or polygon, for example to extend it; it needs at least 2 points, or 3 for a closed one. Styles stay on the vertices and segments that remain. Pasting coordinates in Properties > Coordinates runs it.cad.layer.setsets the Mesh layer's colour for each theme (colorLight,colorDark), line width (0.5–8 px) and opacity (0–1). Other layers have no colour, width or opacity settings.cad.layers.setsetsvisible,lockedorselectablefor all layers, including empty layers, in one undo step. The three buttons in the Layers heading run this command. A mixed state shows all, locks all or makes all selectable; clicking again reverses the setting.geometry.simplifyremoves redundant vertices, as Simplify Geometry does, from the External Boundary, Water Table, Material Boundaries and Weak Layers, or only thefamilies=or itemids=you name; every other item stays as it is. Give at least one tolerance. Locked items are skipped unlessincludeLocked=true, and a vertex whose removal would make Material Boundaries cross is kept. A run that removes nothing adds no undo step.domain.entity.updatechanges a domain item's visibility, lock, name, style or type-specific values, such as a tension crack'swaterModeor a load'smagnitude;help domain.entity.updatelists every key and the items that take it. A tension crack'swaterPercentis a fraction from 0 to 1, and a value outside a key's range is refused rather than clamped. An item refuses keys it does not own.- Select a drawn ground support and use Properties → Support Property to
assign a different property from the Support catalog. The terminal equivalent
is
domain.entity.update id="gs-1" patch={"supportMaterialId":"pile"}. Reassignment preserves the support geometry, invalidates analysis results, and supports undo/redo. Missing property IDs and locked supports are refused.
Imports
project.import.rocfall2
cad.image.import at=[40,30] width=60 name="Site plan"project.import.rocfall2asks about unsaved changes, then for a RocFall2.fal8model, and imports it as the current project; it is refused while an analysis runs. Its report gives the analysis method and the number of objects converted, and lists the import limitations, which are also kept in the imported scenario group's description. RocFall2 results are not imported.cad.image.importasks for an image and places it on the Images layer as a reference image,widthmetres wide (20 by default) and centred onat=; withoutat=it sits above the model, left-aligned with the External Boundary. It then selects the image and opens image calibration. Calibration itself has no command. Like other model edits, an import (including an image dropped on the canvas) waits while an analysis runs or a dialog such as Define Properties is open.
Stress piles
fea.piles.get returns the active scenario's pile properties and pile definitions;
scenario= reads another scenario without switching to it. Pass that shape to
fea.piles.define definition={...} to replace the active definition. The edit
supports undo and is retained in .jws projects.
Each pile names its propertyId, head (start), toe (end), zero-based
installStage, headLoad (fx, fy, counterclockwise moment) and total
headLoadFactors, one per stress stage. Use m, kPa and kN per pile. Out-of-plane
spacing converts pile stiffness and forces to the two-dimensional section.
Shaft stiffness is kN/m/m; perimeter multiplies frictional strength. Toe
stiffness is kN/m and its compression capacity is kN.
Pile properties select Euler–Bernoulli or Timoshenko bending, E, Poisson ratio,
area, inertia, spacing and perimeter, normal/shear shaft stiffness, effective
or total soil confinement, optional peak/residual shaft cohesion/friction and
shear cutoff, and an optional compression-only toe spring. Elastic shafts omit
strength; shaft-only piles omit toe.
Run piles with CPU plane strain and the incremental plastic stress driver.
fea.piles.results returns their independent translations/rotations, beam
forces, shaft resistance and toe force at the final solved state, together with
the convergence status. An import or definition is not a completed solve.