Skip to content

Commit

Permalink
Merge pull request #126 from JustinBonus/master
Browse files Browse the repository at this point in the history
HydroUQ examples update + some MPM OSU LWF validation case preset fixes
  • Loading branch information
fmckenna authored Sep 30, 2024
2 parents 9f1becd + 9e1b4c3 commit c25f518
Show file tree
Hide file tree
Showing 22 changed files with 4,444 additions and 173 deletions.
26 changes: 13 additions & 13 deletions EVENTS/MPM/GeometryMPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ GeometryMPM::GeometryMPM(QWidget *parent)
layout->addWidget(new QLabel("m"), numRow++, 4, 1, 1);

length = new SC_DoubleLineEdit("span_x", 84.0);
height = new SC_DoubleLineEdit("span_y", 4.6);
width = new SC_DoubleLineEdit("span_z", 3.65);
height = new SC_DoubleLineEdit("span_y", 4.5);
width = new SC_DoubleLineEdit("span_z", 3.6);
layout->addWidget(new QLabel("Dimensions (X,Y,Z)"), numRow, 0, 1, 1, Qt::AlignRight);
layout->addWidget(length, numRow, 1, 1, 1);
layout->addWidget(height, numRow, 2, 1, 1);
Expand Down Expand Up @@ -250,7 +250,7 @@ GeometryMPM::GeometryMPM(QWidget *parent)

facilityLength = new SC_DoubleLineEdit("facility_span_x",104.0);
facilityHeight = new SC_DoubleLineEdit("facility_span_y",4.6);
facilityWidth = new SC_DoubleLineEdit("facility_span_z",3.658);
facilityWidth = new SC_DoubleLineEdit("facility_span_z",3.6);
dimensionsBoxLayout->addWidget(new QLabel("Facility Dimensions (X,Y,Z)"), numDimRow, 0);
dimensionsBoxLayout->itemAt(dimensionsBoxLayout->count()-1)->setAlignment(Qt::AlignRight);
dimensionsBoxLayout->addWidget(facilityLength, numDimRow, 1);
Expand Down Expand Up @@ -356,7 +356,7 @@ GeometryMPM::GeometryMPM(QWidget *parent)
if (val == "Hinsdale Large Wave Flume (OSU LWF)") {
facilityLength->setText("84.0");
facilityHeight->setText("4.6");
facilityWidth->setText("3.65");
facilityWidth->setText("3.6");
if (bodyPreset->currentText() == "Fluid") {
objectType->setCurrentText("OSU LWF");
}
Expand Down Expand Up @@ -554,7 +554,7 @@ GeometryMPM::GeometryMPM(QWidget *parent)
if (bodyPreset->currentText() == "Fluid") {
length->setText("84.0");
height->setText("2.0");
width->setText("3.65");
width->setText("3.6");
originX->setText("1.9");
originY->setText("0.0");
originZ->setText("0.0");
Expand Down Expand Up @@ -711,7 +711,7 @@ GeometryMPM::GeometryMPM(QWidget *parent)
if (val == "Fluid") {
length->setText("84.0");
height->setText("2.0");
width->setText("3.65");
width->setText("3.6");
originX->setText("1.9"); // wave-maker paddle neutral at OSU LWF
originY->setText("0.0");
originZ->setText("0.0");
Expand All @@ -720,7 +720,7 @@ GeometryMPM::GeometryMPM(QWidget *parent)
facility->setCurrentText("Hinsdale Large Wave Flume (OSU LWF)");
facilityLength->setText("104.0");
facilityHeight->setText("4.6");
facilityWidth->setText("3.658");
facilityWidth->setText("3.6");
standingWaterLevel->setEnabled(true);
standingWaterLevel->show();
standingWaterLevel->setText("2.0");
Expand Down Expand Up @@ -1114,17 +1114,17 @@ GeometryMPM::setDigitalTwin(int twinIdx)
}
else if (twinIdx == 2) { // UW WASIRF
objectType->setCurrentIndex(0);
length->setText(QString::number(0.1016));
height->setText(QString::number(0.0254));
width->setText(QString::number(0.0254));
length->setText(QString::number(0.10));
height->setText(QString::number(0.025));
width->setText(QString::number(0.025));
// TODO: Recheck specs of the debris from Nikkis work (4x1x1"?)
originX->setText(QString::number(4.0));
originY->setText(QString::number(0.2)); // Recheck the height
originZ->setText(QString::number(0.5873));
applyArray->setChecked(false);
spacingX->setText(QString::number(0.1016));
spacingY->setText(QString::number(0.0254));
spacingZ->setText(QString::number(0.0254));
spacingX->setText(QString::number(0.10));
spacingY->setText(QString::number(0.025));
spacingZ->setText(QString::number(0.025));
arrayX->setText(QString::number(1));
arrayY->setText(QString::number(1));
arrayZ->setText(QString::number(1));
Expand Down
4 changes: 2 additions & 2 deletions EVENTS/MPM/PartitionMPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ PartitionMPM::PartitionMPM(QWidget *parent)

// TODO: Update default to the simulation domain dimensions set in the settings tab
partitionDimensions_X = new SC_DoubleLineEdit("partition_dimensions_x", 90.0);
partitionDimensions_Y = new SC_DoubleLineEdit("partition_dimensions_y", 2.9);
partitionDimensions_Z = new SC_DoubleLineEdit("partition_dimensions_z", 3.65);
partitionDimensions_Y = new SC_DoubleLineEdit("partition_dimensions_y", 4.5);
partitionDimensions_Z = new SC_DoubleLineEdit("partition_dimensions_z", 3.6);
layout->addWidget(new QLabel("Partition Dimensions (X,Y,Z)"), numRow, 0);
layout->itemAt(layout->count()-1)->setAlignment(Qt::AlignRight);
layout->addWidget(partitionDimensions_X, numRow, 1);
Expand Down
7 changes: 5 additions & 2 deletions EVENTS/MPM/SettingsMPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ SettingsMPM::SettingsMPM(QWidget *parent)
for (int i=0; i<3; ++i) dimensionsBoxLayout->itemAt(dimensionsBoxLayout->count()-(i+1))->widget()->setToolTip("Size of the Cartesian grid's cells. Assumed to be cubes, so volume is dx^3. Smaller values provide more accurate results, but require more computer memory, O(dx^3), and smaller time-steps, O(dx^-1).");

domainSizeX = new SC_DoubleLineEdit("domain_X", 90);
domainSizeY = new SC_DoubleLineEdit("domain_Y", 2.9);
domainSizeY = new SC_DoubleLineEdit("domain_Y", 4.5);
domainSizeZ = new SC_DoubleLineEdit("domain_Z", 3.6);
dimensionsBoxLayout->addWidget(new QLabel("Full Domain (X,Y,Z)"), numRow, 0, 1, 1, Qt::AlignRight);
dimensionsBoxLayout->addWidget(domainSizeX, numRow, 1, 1, 1);
Expand All @@ -127,6 +127,9 @@ SettingsMPM::SettingsMPM(QWidget *parent)
mirrorDomainX = new SC_CheckBox("mirrorDomainX",false);
mirrorDomainY = new SC_CheckBox("mirrorDomainY",false);
mirrorDomainZ = new SC_CheckBox("mirrorDomainZ",false);
mirrorDomainX->setEnabled(false);
mirrorDomainY->setEnabled(false);
mirrorDomainZ->setEnabled(false);
dimensionsBoxLayout->addWidget(new QLabel("Mirror On YZ-XZ-XY"), numRow, 0, 1, 1, Qt::AlignRight);
dimensionsBoxLayout->addWidget(mirrorDomainX, numRow, 1, 1, 1);
dimensionsBoxLayout->itemAt(dimensionsBoxLayout->count()-1)->setAlignment(Qt::AlignCenter);
Expand Down Expand Up @@ -170,7 +173,7 @@ SettingsMPM::SettingsMPM(QWidget *parent)
timeBoxLayout->itemAt(timeBoxLayout->count()-1)->widget()->setMaximumWidth(maxWidth);
timeBoxLayout->addWidget(new QLabel("sec."), numRow++, 4, 1, 1);

duration = new SC_DoubleLineEdit("duration", 1.0);
duration = new SC_DoubleLineEdit("duration", 5.0);
timeBoxLayout->addWidget(new QLabel("Duration (tf-t0)"), numRow, 0, 1, 1, Qt::AlignRight);
timeBoxLayout->addWidget(duration, numRow, 1, 1, 3);
timeBoxLayout->itemAt(timeBoxLayout->count()-1)->widget()->setMaximumWidth(maxWidth);
Expand Down
4 changes: 1 addition & 3 deletions Examples/.conf/conf.db.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

<items>
<map id="hdro-0005" base="hdro-0005" type="hdro" />
<map id="hdro-1005" base="hdro-1005" type="hdro" />
<map id="hdro-2005" base="hdro-2005" type="hdro" />
<map id="hdro-3005" base="hdro-3005" type="hdro" />
<map id="hdro-0010" base="hdro-0010" type="hdro" />
<map id="hdro-0001" base="hdro-0001" type="hdro" />
<map id="hdro-0002" base="hdro-0002" type="hdro" />
<map id="hdro-0003" base="hdro-0003" type="hdro" />
Expand Down
5 changes: 5 additions & 0 deletions Examples/Examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"description": "Generate a Gaussian Process (GP) surrogate model for stochastic wave loading on a simple frame structure using a stochastic wave spectra in a local UQ workflow. The structure is a simple 1-story OpenSees frame structure. Engineering Demand Parameters are PFA, RMSA, PFD, and PID. The wave loading is generated using a stochastic wave spectra (JONSWAP). The wave loading is applied to the floors as lateral forces.",
"inputFile": "hdro-0005/src/input_GP.json"
},
{
"name": "Forward Sampling - Simple Piston Generated Wave - Taichi Event",
"description": "Forward sample a 2D wave maker piston's generated wave implemented in the high-performance Taichi Lang. The structure is a simple 1-story OpenSees frame structure. Engineering Demand Parameters are PFA, RMSA, PFD, and PID. The wave loading is generated using a stochastic wave spectra (JONSWAP). The wave loading is applied to the floors as lateral forces.",
"inputFile": "hdro-0010/src/input.json"
},
{
"name": "Digital Twin of OSU LWF - Simple Multi-Story Structure Example - FOAMySees",
"description": "This example takes a brief look at uncertainty quantification in a three story shear frame subjected to earthquake loading.",
Expand Down
5 changes: 3 additions & 2 deletions Examples/hdro-0005/src/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@
"parallelExecution": true,
"samplingMethodData": {
"method": "LHS",
"samples": 20,
"samples": 100,
"seed": 1
},
"saveWorkDir": true,
"saveWorkDir": false,
"uqEngine": "Dakota",
"uqType": "Forward Propagation"
},
"correlationMatrix": [
Expand Down
12 changes: 1 addition & 11 deletions Examples/hdro-0005/src/input_GP.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,9 @@
"trainingSeed": 1
},
"saveWorkDir": true,
"uqEngine": "Dakota",
"uqType": "Forward Propagation"
},
"correlationMatrix": [
1,
0,
0,
0,
1,
0,
0,
0,
1
],
"localAppDir": "/home/justinbonus/SimCenter/HydroUQ/build",
"randomVariables": [
{
Expand Down
42 changes: 21 additions & 21 deletions Examples/hdro-0005/src/input_Reliability.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Application": "OpenSeesInput",
"ApplicationData": {
"fileName": "Frame.tcl",
"filePath": "/home/justinbonus/SimCenter/HydroUQ/build/Examples/hdro-0005/src"
"filePath": "{Current_Dir}/."
}
},
"Simulation": {
Expand Down Expand Up @@ -149,33 +149,33 @@
"probabilityLevel": [
0.99,
0.98,
0.9,
0.95,
0.90,
0.85,
0.8,
0.6,
0.5,
0.4,
0.80,
0.75,
0.70,
0.65,
0.60,
0.55,
0.50,
0.45,
0.40,
0.35,
0.30,
0.25,
0.19999999999999996,
0.09999999999999998,
0.020000000000000018,
0.010000000000000009
0.20,
0.15,
0.10,
0.05,
0.02,
0.01
]
},
"saveWorkDir": false,
"uqEngine": "Dakota",
"uqType": "Reliability Analysis"
},
"correlationMatrix": [
1,
0,
0,
0,
1,
0,
0,
0,
1
],
"localAppDir": "/home/justinbonus/SimCenter/HydroUQ/build",
"randomVariables": [
{
Expand Down
16 changes: 3 additions & 13 deletions Examples/hdro-0005/src/input_Sensitivity.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Application": "OpenSeesInput",
"ApplicationData": {
"fileName": "Frame.tcl",
"filePath": "/home/justinbonus/SimCenter/HydroUQ/build/Examples/hdro-0005/src"
"filePath": "{Current_Dir}/."
}
},
"Simulation": {
Expand Down Expand Up @@ -153,23 +153,13 @@
"parallelExecution": true,
"samplingMethodData": {
"method": "LHS",
"samples": 20,
"samples": 30,
"seed": 1
},
"saveWorkDir": false,
"uqEngine": "Dakota",
"uqType": "Sensitivity Analysis"
},
"correlationMatrix": [
1,
0,
0,
0,
1,
0,
0,
0,
1
],
"localAppDir": "/home/justinbonus/SimCenter/HydroUQ/build",
"numQoI": 4,
"numRV": 3,
Expand Down
Loading

0 comments on commit c25f518

Please sign in to comment.