You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/mpm.md
+4-181Lines changed: 4 additions & 181 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,7 @@ This example demonstrates how to submit and monitor a Material Point Method (MPM
4
4
5
5
[](https://jupyter.designsafe-ci.org/hub/user-redirect/lab/tree/CommunityData/dapi/mpm/mpm-minimal.ipynb)
6
6
7
-
## Overview
8
-
9
-
This example covers the essential workflow for running MPM simulations:
10
-
11
-
- Installing and importing dapi
12
-
- Setting up MPM job parameters and input files
13
-
- Configuring analysis types, materials, and boundary conditions
14
-
- Submitting and monitoring MPM jobs
15
-
- Post-processing results and output analysis
7
+
For general job submission concepts, see [Jobs](../jobs.md). For resource sizing, see [DesignSafe Workflows](https://kks32.github.io/ds-workflows/guide/job-resources.html).
16
8
17
9
## Complete Example
18
10
@@ -27,23 +19,13 @@ from dapi import DSClient
27
19
import json
28
20
```
29
21
30
-
**What this does:**
31
-
- Installs the DesignSafe API package from PyPI
32
-
- Imports the main client class and JSON for pretty-printing job requests
33
-
34
22
### Step 2: Initialize Client
35
23
36
24
```python
37
25
# Initialize DesignSafe client
38
26
ds = DSClient()
39
27
```
40
28
41
-
**What this does:**
42
-
43
-
- Creates an authenticated connection to DesignSafe services
44
-
- Handles OAuth2 authentication automatically
45
-
- Sets up connections to Tapis API, file systems, and job services
46
-
47
29
**Authentication:** dapi supports multiple authentication methods including environment variables, .env files, and interactive prompts. For detailed authentication setup instructions, see the [authentication guide](../authentication.md).
"particles": "particles.txt", # Material point locations and properties
74
-
"materials": { # Material constitutive models
75
-
"LinearElastic2D": "For elastic analysis",
76
-
"MohrCoulomb": "For soil mechanics",
77
-
"NeoHookean": "For large deformation"
78
-
},
79
-
"analysis": {
80
-
"type": "MPMExplicit2D", # Analysis type: 2D or 3D explicit
81
-
"nsteps": 1000, # Number of time steps
82
-
"dt": 0.001# Time step size
83
-
}
84
-
}
85
-
```
42
+
The MPM input file is a JSON configuration that defines the mesh, particle locations, material constitutive models (e.g., LinearElastic2D, MohrCoulomb, NeoHookean), and analysis parameters (type, number of steps, time step size).
0 commit comments