Skip to content

USNavalResearchLaboratory/UQPINN

Repository files navigation

General Notes: All file share embedded directory names which will need to be edited to for the code to function correctly. There are two environments (2DHeat_enviorment.yaml and Tensorflow_enviorment.yaml) that are included. This occurred because of an updates to TensorFlow and Fenics/DolfinX which make having current versions of both libraries installed problematic. 2DHeat_enviorment.yaml is used for the source field generation and finite element solver and Tensorflow_enviorment.yaml is used to train the models. File Descriptions

Main.py – This file contains the core training code and training algorithms. Key user variables with descriptions are set at the end of the script in clearly labeled section

Generate_source_data.py – This code is used to generate the source distribution.

Analyize_Input_Distribution.py – This file is used for view the generated stochastic distributions

Batch_source_generation.sh – A bash file to assist with source distribution generation.

FEM_Initialize.py – This code is used to solve the 2D heat equation using DolfinX

Model_Viewer.py – This file is used to load a trained model and compute various error metrics and generate solution field plots.

Compare_Models.py - Post Processing file used to generate plots comparing the performance of various models.

Trial_name.txt – This is a text file which identifies each trial by its number and is used in the generation of plots.

User Guide:

To begin users need select a source field distribution. To generate a custom source field use Generate_source_data.py where user can modify the underlaying auto correlation functions (line 30) and source fields scaling. Note: If modifying the source field scaling (line 232) a corresponding change needs to be made in FEM_Initialize.py (line 53). Or user can select the progenerated fields sorted in FE_data.

Once selected, users can run Analyize_Input_Distribution.py to compute input distribution statistics and visualize the distribution. Next, use Main.py to conduct model training. Users will need to set a number of network training variables to begin training. The locations to set these variables are clearly labeled in Main.py after the definitions of all script functions. Selected parameters are saved to a folder containing all relevant training information as Trial_parameters.txt. Once training is complete the model is saved to the same folder.

Once training is complete users can visualize the results using Model_Viewer.py which loads a train model. If users are interested in comparing multiple trainings Compare_Models.py can be used to compare multiple trials.

Folders:

FE_data – Contains files associated with the source fields

Paper_data – Contains all the relevant PINN, DDN, and DeepONet models which are referenced in the paper.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors