Skip to content

Commit

Permalink
fmk - updating to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Apr 8, 2024
1 parent 1cf324b commit 8c6da1f
Show file tree
Hide file tree
Showing 538 changed files with 4,071 additions and 1,860 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a49f996b9ace8a35d372fd47dc5adfe7
config: 29bd5caf935e36bf364639652356b2fc
tags: a27640df3ba0b93526ffd98313c5dace
Binary file modified docs/.doctrees/common/front-matter/cite.doctree
Binary file not shown.
Binary file modified docs/.doctrees/common/reqments/All-Requirements_allCols.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/examples/desktop/examples.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/releases/pbeReleaseNotes.doctree
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/releases/quoReleaseNotes.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/usage/desktop/RV.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/usage/desktop/UQ.doctree
Binary file not shown.
Binary file modified docs/.doctrees/common/user_manual/usage/desktop/usage.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/_images/B4_Debris_Picture.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/B4_Flume_Schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/DSToolsAndAppsJobsStatus.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/DSToolsAndAppsJobsStatus1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/DSToolsAndAppsJobsStatus2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/DSToolsAndAppsJobsStatusFinished.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Forces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Forces1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Forces2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/MatlabScriptCopyToLocation.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/MatlabScriptCopyToLocation1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/MatlabScriptCopyToLocation2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Moments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Moments1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Moments2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/OSU_Flume_Schematic_Dakota_Alam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/OSU_LWF_Dakota_8L_Impact_3Photos.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/OSU_LWF_MPM_32L_Impact_3Photos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Paraview.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Paraview1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Paraview2.PNG
Binary file added docs/_images/Pressures.png
Binary file added docs/_images/Pressures1.png
Binary file added docs/_images/Pressures2.png
Binary file added docs/_images/ReactionForces.png
Binary file added docs/_images/ReactionForces1.png
Binary file added docs/_images/ReactionForces2.png
Binary file added docs/_images/TipDisplacement.png
Binary file added docs/_images/TipDisplacement1.png
Binary file added docs/_images/TipDisplacement2.png
Binary file added docs/_images/Velocities.png
Binary file added docs/_images/Velocities1.png
Binary file added docs/_images/Velocities2.png
Binary file added docs/_images/WaveGauges.png
Binary file added docs/_images/WaveGauges1.png
Binary file added docs/_images/WaveGauges2.png
Binary file added docs/_images/downloadResults.PNG
Binary file added docs/_images/downloadResults1.PNG
Binary file added docs/_images/downloadResults2.PNG
Binary file added docs/_images/extractonDS.PNG
Binary file added docs/_images/extractonDS1.PNG
Binary file added docs/_images/extractonDS2.PNG
Binary file added docs/_images/hdro-0003example.png
Binary file added docs/_images/hdro-0003exampleprobeLoc.png
Binary file added docs/_images/inletVTH.png
Binary file removed docs/_images/pythonDownload.png
Diff not rendered.
Binary file added docs/_images/results.png
Binary file added docs/_images/results1.png
Binary file added docs/_images/results2.png
Binary file added docs/_images/resultsZip.png
Binary file added docs/_images/resultsZip1.png
Binary file added docs/_images/resultsZip2.png
Binary file modified docs/_images/rv.png
Binary file added docs/_images/storyForces.png
Binary file added docs/_images/storyForces1.png
Binary file added docs/_images/storyForces2.png
Binary file modified docs/_images/uq.png
5 changes: 5 additions & 0 deletions docs/_sources/common/front-matter/cite.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ How To Cite
NHERI-SimCenter/quoFEM: Version 3.5.0 (v3.5.0).
Zenodo. `DOI: 10.5281/zenodo.10443180 <https://doi.org/10.5281/zenodo.10443180>`_

.. only:: HydroUQ_app

1. Frank McKenna, Ajay B Harish, Justin Bonus. (2024).
NHERI-SimCenter/HydroUQ: Version 3.0.0 (v3.0.0).
Zenodo. `DOI: 0.5281/zenodo.10443180 <https://doi.org/10.5281/zenodo.8396242>`_

2. Gregory G. Deierlein, Frank McKenna, Adam Zsarnóczay, Tracy Kijewski-Correa, Ahsan Kareem,
Wael Elhaddad, Laura Lowes, Matt J. Schoettler, and Sanjay Govindjee (2020)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Hydro-UQ Requirements
---------------------

.. csv-filter:: Requirements - H
:header: "#", "Description", "Source", "Priority", "Status"
:widths: 10, 50, 10, 10, 10
:header: "#", "Description", "Source", "Priority", "Status", "quoFEM", "EE-UQ", "WE-UQ", "HydroUQ", "PBE", "R2D"
:widths: 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10
:file: generalHydro.csv

.. include:: key.rst
Expand Down Expand Up @@ -91,8 +91,8 @@ Surge/Tsunami Loading Requirements
----------------------------------

.. csv-filter:: Requirements - HL
:header: "#", "Description", "Source", "Priority", "Status"
:widths: 10, 50, 10, 10, 10
:header: "#", "Description", "Source", "Priority", "Status", "quoFEM", "EE-UQ", "WE-UQ", "PBE", "R2D", "HydroUQ"
:widths: 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10
:included_cols: 0, 1, 2, 3, 4
:file: HydroLoading.csv

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ We provide different verification measures for two different cases.
| The surrogate model is considered well-trained when the **correlation coefficient (** :math:`-1<\rho<1` **) approaches 1**
.. Note::
.. note::

Since these measures are calculated from the cross-validation predictions rather than external validation predictions, they can be biased, particularly when a **highly localized nonlinear range exists in the actual response surface** and those regions are not covered by the training samples.

Expand Down Expand Up @@ -534,24 +534,25 @@ The goal of MFMC is to estimate the statistics of the HF model using a small num
Deierlein, Gregory G., Andrei M. Reinhorn, and Michael R. Willford. (2010). Nonlinear structural analysis for seismic design. *NEHRP seismic design technical brief* 4 : 1-36.
.. note::
The concept of MFMC is different from that of **multi-model forward propagation** referred to at other parts of the documentation.

* **MFMC** algorithm has a clear hierarchy between different models in terms of accuracy. A good MFMC algorithm will give accurate estimates of the statistics of HF model.
The concept of MFMC is different from that of **multi-model forward propagation** referred to at other parts of the documentation.

* **Multi-model forward propagation** is used when one has different alternative models without clear hierarchy in accuracy, meaning for each model, we have certain *belief* that this model gives true value. Therefore, a good multi-model forward propagation algorithm will give the final estimate that compromises the estimation from different models by considering how much *belief* we have in each model.
* **MFMC** algorithm has a clear hierarchy between different models in terms of accuracy. A good MFMC algorithm will give accurate estimates of the statistics of HF model.

* **Multi-model forward propagation** is used when one has different alternative models without clear hierarchy in accuracy, meaning for each model, we have certain *belief* that this model gives true value. Therefore, a good multi-model forward propagation algorithm will give the final estimate that compromises the estimation from different models by considering how much *belief* we have in each model.


Pre-execution checklist for MFMC
----------------------------------------------
Before running the MFMC simulation model, the users are advised to check the validity and effectiveness of MFMC for their problem. Only when the below conditions are satisfied, the users are expected to gain meaningful benefit by using MFMC compared to only HF simulations:

* **The models should take the same input random variables and produces the same output quantities of interest.** For example, if target system is a structure, if one model takes stiffness as random variable and the other does not, the model violates the problem definition. Similarly, if :math:`j`-th output of the HF model is the 1st floor inter-story drift, :math:`j`-th output of the LF model should also be 1st floor inter-story drift.
* **The models should take the same input random variables and produce the same output quantities of interest.** For example, if target system is a structure, if one model takes stiffness as random variable and the other does not, the model violates the problem definition. Similarly, if :math:`j`-th output of the HF model is the 1st floor inter-story drift, :math:`j`-th output of the LF model should also be 1st floor inter-story drift.

* **The models should have clear hierarchy in terms of accuracy and time.** When the HF and LF model responses are different, the assumption is that the HF response is always accurate. Therefore, if a LF model runs faster than the HF model, it is optimal to run only the HF model, and there is no reason to introduce MFMC.
* **The models should have a clear hierarchy in terms of accuracy and time.** When the HF and LF model responses are different, the assumption is that the HF response is always accurate. Therefore, if a LF model runs faster than the HF model, it is optimal to run only the HF model, and there is no reason to introduce MFMC.

* **The response of different models should have high correlation**. The efficiency of MFMC heavily depends on the correlation between the HF and LF model outputs. Only if the correlation is fairly high, the MF estimation is meaningfully efficient than conducting only HF simulations.
* **The response of different models should have a high correlation**. The efficiency of MFMC heavily depends on the correlation between the HF and LF model outputs. Only if the correlation is fairly high, the MF estimation is meaningfully efficient than conducting only HF simulations.

Efficiency of MFMC can be evaluated using the speed-up ratio, defined as the reduction of computational effort you need to get the same Monte Carlo statistical accuracy by the MFMC and direct Monte Carlo method. :numref:`fig-MF-SP` shows the expected speed-up factor for different computation time ratios and correlation coefficient values. One can notice that only when the ratio of the model evaluation time is greater than 100 and when the correlation is greater than 0.85-0.9, the expected speed-up is significant [Patsialis2021]_. The formulation used to estimate the speed-up ratio can found at the end of this section.
The efficiency of MFMC can be evaluated using the speed-up ratio, defined as the reduction of computational effort you need to get the same Monte Carlo statistical accuracy by the MFMC and direct Monte Carlo method. :numref:`fig-MF-SP` shows the expected speed-up factor for different computation time ratios and correlation coefficient values. One can notice that only when the ratio of the model evaluation time is greater than 100 and when the correlation is greater than 0.85-0.9, the expected speed-up is significant [Patsialis2021]_. The formulation used to estimate the speed-up ratio can found at the end of this section.

.. _fig-MF-SP:

Expand Down Expand Up @@ -608,6 +609,7 @@ Randomly generate :math:`N_p` sample points and run both HF and LF simulations.
Considering the remaining computational budget (:math:`C_T`), the optimal number of HF and LF simulations (denoted as :math:`N_1` and :math:`N_1+N_2`) can ideally be decided such that :math:`N_1:(N_1+N_2) = 1:r` and :math:`C_T = N_1 c_{HF} + (N_1+N_2) c_{LF}`. However, the due to practical obstacles (e.g. when multiple outputs are simultaneously considered or when the number of pilot samples exceeds :math:`N_1`) the final ratio :math:`r` can be different from the optimal one.

.. note::

When multiple outputs are considered, the simulation ratio is chosen to be the average of the optimal ratios (:math:`r^*`) for different outputs.

**Step 2: Final Simulations**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,18 @@ Examples

The following are a few examples showing the usage of quoFEM. Video companions showing these examples are also provided for selected problems. The files for the examples are available on Github.


.. only:: EEUQ_app

The following are a few examples showing the usage of EE-UQ. Video companions showing these examples are also provided. The files for the examples are available in Github.

.. only:: Hydro

The following are a few examples showing the usage of Hydro-UQ. The files for the examples are available on Github.


.. only:: WEUQ_app

The following are a few examples showing the usage of WE-UQ. The files for the examples are available on Github.

.. only:: HydroUQ_app

The following are a few examples showing the usage of Hydro-UQ. The files for the examples are available on `Github <https://github.com/NHERI-SimCenter/HydroUQ/tree/master/Examples>`_.

.. only:: PBE_app

The following are a few examples showing the usage of PBE. The files for the examples are available on Github. The scope of these examples is limited to damage and loss assessment. The usage of the tool for response estimation is identical to that of the EE-UQ application. Examples of those features are available in the `EE-UQ Documentation <https://nheri-simcenter.github.io/EE-UQ-Documentation/common/user_manual/examples/desktop/examples.html>`_.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,182 @@
.. _hydro-0001:
.. _hdro-0001:

Coupled Digital Twin Example
============================

Example to demonstrate how to run a coupled OpenSees-OpenFOAM simulation to determine floor loads on a building and then perform
an OpenSees simulation of the building assuming uncertainties in the building properties.
+---------------+----------------------------------------------+
| Problem files | :github:`Github <Examples/hdro-0001/>` |
+---------------+----------------------------------------------+

.. figure:: figures/coupled.png
Outline
-------
This example uses a NHERI wave-flume digital twin, the OSU LWF, to simulate a scaled structure during wave loading in HydroUQ. Two-way coupled OpenFOAM-OpenSees is configured to simulate the scenario.

You will define a Waterborne Event (EVT) to determine the engineering demand parameters (EDP) on a specified structure, i.e. EVT --> EDP, with the following steps:

1. Configure a FOAMySees simulation. This is a two-way coupling of OpenFOAM Finite Volume Method (FVM) for Computational Fluid Dynamics (CFD) and OpenSees Finite Element Analaysis (FEA) for Computational Structural Dynamics (CSD).

2. Next, the coupled model will determine floor loads on the building, also known as intensity measures (IM) in performance based engineering (PBE).

3. Then, perform an OpenSees finite element analysis (FEA) simulation of the building by taking IMs as inputs.

4. Finally, recieve engineering demand parameters (EDP) of the structural response. Though beyond this example, you can use these EDPs to perform a fragility analysis of the structure.


Data
----
The dataset used presented in this example originates from experimental tests conducted in the Hinsdale Wave Research Laboratory's Large Wave Flume at Oregon State University (OSU LWF), Corvallis, in 2020. Refer to Lewis 2023 [Lewis2023]_ and Bonus 2023 [Bonus2023]_ for details.

.. _figCoupled:

.. figure:: figures/Coupled.png
:align: center
:figclass: align-center
:width: 400

Coupled Digital Twin Illustration

Model
-----

This model is characterized by the parameters:
- Youngs modulus :math:`E_0`for elastic behavior,
- Initial yield stress and strain hardening ratio :math:`(f_y, b)` for plastic behavior,

Files required
--------------

.. warning::
Do NOT place the files in your root, downloads, or desktop folder as when the application runs it will copy the contents on the directories and subdirectories containing these files multiple times. If you are like us, your root, Downloads or Documents folders contain a lot of files.

UQ workflow
-----------

The inputs needed to run this example can be loaded into the HydroUQ user interface by selecting the ``Coupled Digital Twin`` example from the ``Examples`` menu.

The inputs can also be set up manually through the following steps:

1. Start the application and the **UQ** panel will be highlighted. In the **UQ Method** drop-down menu, select the **Bayesian Calibration** option. In the **UQ Engine** dropdown menu select **UCSD-UQ** option. In the **Model** dropdown, select the **Hierarchical** option. Enter the values in this panel as shown in the figure below. A brief explanation of the different user input fields can be found in the :ref:`User Manual <lblUCSDHierarchical>`.

.. _figHBMUQ:

.. figure:: figures/UQ.png
:align: center
:figclass: align-center
:width: 600

Inputs in the UQ panel

2. Next in the **FEM** panel , select **OpenSees** and populate the **Input Script** field by choosing the path to the model file.

.. .. _figHBMFEM:
.. .. figure:: figures/FEM.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. Inputs in the FEM panel
3. Select the **RV** tab from the input panel. This panel should be pre-populated with the names of the variables that were defined in the model scripts. If not, press the **Add** button to create a new field to define the input random variable. Enter the same variable name, as required in the model script. For this example, choose the Normal probability distribution for all the random variables and enter the parameter values for each distribution as shown in the figures below:

.. _figHBMRV:

.. figure:: figures/RV.png
:align: center
:figclass: align-center
:width: 600

.. .. _figHBMRV1:
.. .. figure:: figures/RV1.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. .. _figHBMRV2:
.. .. figure:: figures/RV2.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. Inputs in the RV panel
4. In the **EDP** panel create the output quantities corresponding to each of the experiments with a descriptive name, as shown in the figures below:

.. .. _figHBMEDP1:
.. .. figure:: figures/EDP1.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. .. _figHBMEDP2:
.. .. figure:: figures/EDP2.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. Inputs in the EDP panel
5. Click on the **Run** button. This will create the necessary input files to perform a Bayesian calibration of the hierarchical model, run the analysis, and display the results when the analysis is completed. The results produced are sample values drawn from the distribution that represents the aleatory uncertainty in the estimated material parameters from each of the datasets.

The **Summary** tab shows the mean, standard deviation, and coefficient of variation of each of the seven parameters of the material model that were inferred in this example.

.. .. _figHBMRES1:
.. .. figure:: figures/RES1.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. .. _figHBMRES2:
.. .. figure:: figures/RES2.png
.. :align: center
.. :figclass: align-center
.. :width: 600
Results in the RES panel summary tab
In the **Data Values** tab of the **RES** panel, a chart and a table with all the sample values are shown. By clicking on the data inside the columns of the chart with the left or right mouse button, different chart types are created and shown in the chart area on the left.

.. .. _figHBMRES3:
.. .. figure:: figures/RES3.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. .. _figHBMRES4:
.. .. figure:: figures/RES4.png
.. :align: center
.. :figclass: align-center
.. :width: 600
.. Data values tab in the RES panel
.. _lblHBMRestart:

Files for restarting the analysis
---------------------------------

In addition to the results displayed in the RES panel in HydroUQ, JSON files with the state of the chain at every step of the sampling algorithm are saved in a directory called ``sampling_results`` within the ``tmp.SimCenter`` directory inside the jobs directory specified in the HydroUQ Preferences menu. Any of these files can be used to resume the sampling, by copying the file to the directory containing the model files and specifying its name in the Restart File Name field in the UQ panel.

.. warning::
The ``tmp.SimCenter`` directory is cleared every time the ``RUN`` button is clicked in HydroUQ. So, if you want to restart the analysis using one of the sampling results files outlined above, make sure to copy the results file to a location outside the ``tmp.SimCenter`` directory at the end of the analysis.

.. [Lewis2023]
Lewis, N. (2023). Development of An Open-Source Methodology for Simulation of Civil Engineering Structures Subject to Multi-Hazards. *PhD thesis*, University of Washington, Seattle, WA. ISBN: 979-8-381408-69-0.
.. [Bonus2023]
Bonus, J. (2023). Evaluation of Fluid-Driven Debris Impacts in a High-Performance Multi-GPU Material Point Method [University of Washington]. In ProQuest Dissertations and Theses. ISBN: 979-8-381406-66-5. https://www.proquest.com/dissertations-theses/evaluation-fluid-driven-debris-impacts-high/docview/2915819774/se-2?accountid=14784
Loading

0 comments on commit 8c6da1f

Please sign in to comment.