Forward Propagation of PM4Sand using samples of random variables

Problem files

Github

Problem description

A forward propagation analysis is helpful to characterize how parametric uncertainty propagates to the simulation results. For this purpose, it is good practice to run such an analysis and characterize the effect of uncertainties on application-specific quantities of interest before practically applying these parameter values in a simulation for decision making. In this example, we will predict the uncertainty (arising from the uncertainty in the PM4Sand parameters) in the lateral spreading response of a site subjected to an earthquake (Loma Prieta Gilroy Array #2) with peak ground acceleration of 0.37 g. The soil column model shown in the image is introduced in which the liquefiable layer in the middle is modeled using PM4Sand and the other parts are assumed to remain elastic throughout the shaking.

../../../../../_images/qfem0032-fig2.png

Schematic of 1D soil layer with liquefiable soil used in the forward propagation analysis.

Files required

  • An opensees soil column model for simulating lateral spreading response of a site subjected to an earthquake: N10_T3_ModifiedCase1.tcl

  • In this example, instead of defining the random variables by the distribution type and corresponding hyper-parameters, we will directly import the samples of the random variables. In our case, the samples are obtained as the results of Bayesian calibration example (Bayesian Calibration of PM4Sand Model using Cyclic Direct Simple Shear Test Data) in this PM4Sand example series: Dr.in , G0.in , hpo.in. An example visualization of posterior samples is shown below.

../../../../../_images/qfem0032-fig1.png

PM4Sand model parameters sampled from the joint posterior distribution

UQ workflow

The steps involved are as follows:

  1. Start the application and the UQ panel will be highlighted. Select Forward Propagaion and then SimCenterUQ. Note that only SimCenterUQ engine allows the users to define RVs through the realization samples. Also in order to maintain the correlation between sample realizations across different RVs (Dr, G0, and, hpo) set RV datagroups to be {Dr, G0, hpo}.

../../../../../_images/qfem0032-UQ.png

UQ tab

  1. Next select the FEM panel from the input panel selection. This will default to the OpenSees FEM engine. In the Input Script field, enter the path to the N10_T3_ModifiedCase1.tcl file or select Choose and navigate to the file.

../../../../../_images/qfem0032-FEM.png

FEM tab

  1. Next select the RV tab from the input panel. For each RV, select input type to be Dataset and distribution to be Discrete. Then import the datafile obtained by Bayesian calibration in example: Bayesian Calibration of PM4Sand Model using Cyclic Direct Simple Shear Test Data.

../../../../../_images/qfem0032-RV.png

RV tab

  1. In the EDP panel create entries for the quantities of interest. The total length should match the length of the simulation outcome, that will be written in the results.out file.

../../../../../_images/qfem0032-QoI.png

EDP tab

  1. Next click on the RUN at DesignSafe button, to run the job on cloud HPC computer. To do this, the user first need to request a job allocation by submitting a ticket at DesignSafe website. Navigate to DesignSafe webpage, click Help - Submit a Ticket, and request an allocation to run SimCenter tools. Once the allocation name is identified, the user can run the analysis by filling in the below entries.

../../../../../_images/qfem0032-DS1.png

RUN at DesignSafe window

It is recommended to request more than 5 nodes (i.e. more than 200 processors) to obtain the results within a few minutes. Once the job is successfully submitted, you can check the job status by clicking GET from DesignSafe button. Once the job status appears FINISHED, left-click the corresponding row of the table and click Retrieve Data

../../../../../_images/qfem0032-DS2.png

GET from DesignSafe window

  1. The forward propagation results should be loaded at RES tab. The below scatter can be viewed in Data Values tab.

../../../../../_images/qfem0032-RES2.png

RES tab

Post-processing script

The detailed and intermediate analysis results can be retrieved from the remote working directory. The remote working directory can be found by looking at preference windows, by clicking file-preference in the quoFEM menu bar. For example, the file named ‘dakotaTab.out’ contains the sample values shown in the Data Values tab in the user interface RES tab. You can create your own visualization script using this file. Below is an example of such a python script, that plots the uncertainty across the depth of the soil column. Replace {YOUR/PATH/TO/REMOTEWORKDIR} in line 5 with your remote working directory, found in your preference window.

 1import numpy as np
 2import matplotlib.pyplot as plt
 3import pandas as pd
 4
 5Path_to_RemoteWorkDir = r"{YOUR/PATH/TO/REMOTEWORKDIR}"
 6samples = np.genfromtxt(Path_to_RemoteWorkDir + "/results/dakotaTab.out", skip_header = 1)
 7depth = np.linspace(0.0, 6.0, 25)
 8
 9plt.figure(figsize=(8,12))
10
11maxdisp_tmp = samples[:,5::2]
12maxdisp = maxdisp_tmp - maxdisp_tmp[:, 0].reshape((-1, 1))
13
14# Finding mean max disp curve
15maxdispmean = np.mean(maxdisp, axis = 0)
16plt.grid(which = 'major', linewidth = '0.25');
17plt.grid(which = 'minor', linewidth = '0.25');
18plt.xticks(fontsize = 12)
19plt.yticks(fontsize = 12)
20plt.ylim(0,6)
21plt.xlim(-0.1,0.5)
22plt.xlabel("Max Disp. (m)", fontsize = 18)
23plt.ylabel("Depth (m)", fontsize = 18)
24plt.title("Vertical profile", fontsize = 20)
25for x in range(len(samples)):
26    plt.plot(maxdisp[x,:], depth, c = "gray", alpha = 0.25)
27plt.plot(maxdispmean, depth, c = "black", linewidth = 3, label='Max. residual disp. \nmean profile')
28plt.legend(fontsize=18)
../../../../../_images/qfem0032-fig3.png

Predicted earthquake response of soil column

The results of 500 simulations are shown above. The mean and standard deviation of the residual displacement at the surface level (6 m) are 0.24 m and 0.02 m, respectively. Depending on the application, the uncertainty in these results can be considered reasonably low. The sample of the predictive distribution shown on the top of the vertical profile can further be utilized in reliability and risk assessment workflows

Please visit DesignSafe use case gallery to find more information on
  1. running quoFEM on DesignSafe through jupyter-notebook (without using graphical user interface)

  2. postprocess the results using jupyer-notebook