Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PyLauncher: OpenSees Cantilever Sweep

A parameter sweep over a 2D cantilever pushover analysis using PyLauncher.

Try on DesignSafe

For PyLauncher basics, see PyLauncher Parameter Sweeps.

The model

   ^Y
   |
   2       __
   |         |
   |         |
   |         |
 (1)      LCol
   |         |
   |         |
   |         |
 =1=    ----  -------->X

Sweep parameters

5 nodal masses x 3 column lengths = 15 independent runs.

sweep = {
    "NODAL_MASS": [4.19, 4.39, 4.59, 4.79, 4.99],
    "LCOL": [100, 200, 300],
}

Preview

ds.jobs.parametric_sweep.generate(
    "python3 cantilever.py --NodalMass NODAL_MASS --LCol LCOL --outDir out_NODAL_MASS_LCOL",
    sweep,
    preview=True,
)

Generate and submit

ds.jobs.parametric_sweep.generate(
    "python3 cantilever.py --NodalMass NODAL_MASS --LCol LCOL --outDir out_NODAL_MASS_LCOL",
    sweep,
    "/home/jupyter/MyData/opensees_sweep/",
)

job = ds.jobs.parametric_sweep.submit(
    "/MyData/opensees_sweep/",
    app_id="designsafe-agnostic-app",
    allocation="your_allocation",
    node_count=1,
    cores_per_node=48,
    max_minutes=30,
)
job.monitor()

Output

Each run writes to its own directory (out_4.19_100, out_4.19_200, etc.) containing: