Data of "Stochastic Deep Material Networks as Efficient Surrogates for Stochastic Homogenisation of Non-linear Heterogeneous Materials"
Description
Stochastic Deep Material Networks as Efficient Surrogates for Stochastic Homogenisation of Non-linear Heterogeneous Materials
This directory contains the data and algorithms generated in publication1
Table of Contents
- Dependencies and Prerequisites
- Structure of Repository
- Images/Geometries and IB-DMN training data of the 6 SVEs
- Stochastic analysis - Direct numerical simulations of SVEs
- Training of the reference IB-DMN
- Stochastic analysis - Stochastic IB-DMN
- Reproduce paper[^1] figures
Dependencies and Prerequisites
-
Python, pandas, matplotlib, texttabble and latextable are pre requisites for visualizing and navigating the data.
-
For generating mesh and for vizualization, gmsh (www.gmsh.info) is required.
-
For running simulations, cm3Libraries (http://www.ltas-cm3.ulg.ac.be/openSource.htm) is required.
Instructions using apt & pip3 package manager
Instructions for Debian/Ubuntu based workstations are as follows.
python, pandas and dependencies
sudo apt install python3 python3-scipy libpython3-dev python3-numpy python3-pandas
matplotlib, texttabble and latextable
pip3 install matplotlib texttable latextable
Pytorch
- Without GPU
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
- With GPU
pip3 install torch torchvision torchaudio
Libtorch (only when using cm3Libraries)
- Without GPU: In a local directory (e.g.
~/localwithexport TORCHDIR=$HOME/local/libtorch)
wget wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.3.0%2Bcpu.zip
unzip libtorch-shared-with-deps-2.1.1+cpu.zip
- With GPU: In a local directory (e.g.
~/localwithexport TORCHDIR=$HOME/local/libtorch)
wget https://download.pytorch.org/libtorch/cu121/libtorch-shared-with-deps-2.1.1%2Bcu121.zip
unzip libtorch-shared-with-deps-2.1.1+cu121.zip
Structure of Repository
- 6SVE_Example: Images/Geometries and IB-DMN training data of the 6 SVEs.
- Vf_Mat: Training of the reference IB-DMN.
- Stochastic_DNS_LinearHardening: Stochastic analysis - Direct numerical simulations of SVEs
- Stochastic analysis - Stochastic IB-DMN: Stochastic analysis - Stochastic IB-DMN
Images/Geometries and IB-DMN training data of the 6 SVEs: 6SVE_Example
- 6SVE_Example/6SVE_Data: Images/Geometries and IB-DMN training data of the 6 SVEs
- 6SVE_Example/6SVE_DNS:
- 6SVE_Example/6SVE_DNS/DNS_LinearHardening:
- Direct numerical simulations (require cm3Libraries) on the 6 SVEs in a finite-deformation setting:
python3 RVE_Test.py TestKey = 'Shear'orTestKey = 'Tensile'orTestKey = 'UniStrain'inRVE_Test.pyto run the test in uniaxial stress, shearing or uniaxial strain loading conditions- Results are stored in 6SVE_Example/DNS_LinearHardening/Path_Res
- Direct numerical simulations (require cm3Libraries) on the 6 SVEs in a finite-deformation setting:
- 6SVE_Example/6SVE_DNS/DNS_LinearHardening_SmallDefo:
- Direct numerical simulations (require cm3Libraries) on the 6 SVEs in a small-deformation setting:
python3 RVE_Test.py Tensile = FalseorTensile = TrueinRVE_Test.pyto run the test in uniaxial stress or uniaxial strain loading conditions- Results are stored in 6SVE_Example/6SVE_DNS/DNS_LinearHardening_SmallDefo/Path_Res
- Direct numerical simulations (require cm3Libraries) on the 6 SVEs in a small-deformation setting:
- 6SVE_Example/6SVE_DMN/NNW_Tool.py:
- Defines the class of IB-DMN and loss function
- Called in the following files (not stand alone)
- 6SVE_Example/6SVE_DMN/WriteSingleRVEPara.py:
- Training IB-DMN for single SVE
Training = Truefor warm start or notlevel = 5to select the IB-DMN level- Results are written in datafile in directory 6SVE_Example/6SVE_DMN/DMNPara for nonlinear simulations
- 6SVE_Example/6SVE_DMN/SimulationDMN.py:
- Nonlinear IB-DMN simulations (require cm3Libraries) in a finite deformation setting
- Use the trained IB-DMN parameters stored in 6SVE_Example/6SVE_DMN/DMNPara
TestKey = 'Shear'orTestKey = 'Tensile'orTestKey = 'UniStrain'inRVE_Test.pyto run the test in uniaxial stress, shearing or uniaxial strain loading conditionslevel = 4,level = 5orlevel = 6specifies the level of the IB-DMN to be used- SVE number and training case can be manually specified at the end of the file, e.g;
f_Para = './DMNPara/rve6_Level'+str(level)+'_300Data.dat'andId = prefix+'rve6_Level'+str(level)+'_'+Load+'Res300.csv' - Results are stored in 6SVE_Example/6SVE_DMN/DMN_simulation
- 6SVE_Example/6SVE_DMN/SmallDefoDMN.py:
- Nonlinear IB-DMN simulations (require cm3Libraries) in a small deformation setting
- Use the trained IB-DMN parameters stored in 6SVE_Example/6SVE_DMN/DMNPara
- Results are stored in 6SVE_Example/6SVE_DMN/DMN_simulation_SmallDefo
- 6SVE_Example/6SVE_DMN/Plot_DNS_DMN.py:
- Plot the comparison of the results of nonlinear simulations using IB-DMN and DNS
Load = 'Tensile'orLoad = 'Shear'orLoad = 'UniStrain'to vizualize the results in uniaxial stress, shearing or uniaxial strain loading conditions- Use
LargeDefo = Trueto plot results in finite-strain setting or useLargeDefo = Falsefor the small strain setting (onlyLoad = 'Tensile'is possible then)
- 6SVE_Example/6SVE_DMN/DMNPara_rve6.py:
- Training IB-DMN for SVE 6 with 300 sets of material properties
Training = Truefor warm start or notlevel = 5to select the IB-DMN level- Results are stored in 6SVE_Example/6SVE_DMN/DMNPara for nonlinear simulations
- 6SVE_Example/6SVE_DMN/Plot_rve6_DMN.py:
- Plot the comparison of the results of nonlinear simulations of SVE 6 using DNS and DMNs which are trained successively with 10 and 300 sets of material properties
Stochastic analysis - Direct numerical simulations of SVEs: Stochastic_DNS_LinearHardening
- Functions and data used to generate SVE of UD fiber reinforced composites following 2:
- Stochastic_DNS_LinearHardening/utils.py, Stochastic_DNS_LinearHardening/Ana_Gen_MicStru.py, Stochastic_DNS_LinearHardening/Copula_Grvs.py and data from UD analysis in directory Stochastic_DNS_LinearHardening/UD_CopulaData
- Test setup
- Stochastic_DNS_LinearHardening/TensileTest.py, Stochastic_DNS_LinearHardening/ShearTest.py and Stochastic_DNS_LinearHardening/UniStrain.py describe the BC and material models of the DNS under uniaxial stress, shear or uniaxial strain
- Used by the following function (no stand alone)
- Generate SVEs and running simulations
- Stochastic_DNS_LinearHardening/MicroSample_UDComp.py Generates the SVEs and runs the DNS (requires cm3Libraries)
- Calls previously listed files to generate SVE
Nsim = 100to set the number of SVE realisations to be generatedTestKey = 'Tensile'orTestKey = 'Shear'orTestKey = 'UniStrain'to run under uniaxial stress, shear or uniaxial strainminVf = 0.3andmaxVf = 0.35to set the bounds on the fiber volume fractionprefix = './Res'+TestKey+'/Vf_03_035/'sets the directory where to save the results (to be consistent with the volume fraction bounds and directory should exist)- Results of simulations stored in Stochastic_DNS_LinearHardening/ResTensile and Stochastic_DNS_LinearHardening/ResShear for uniaxial stress and shear
Training of the reference IB-DMN: Vf_Mat
- Training of general IB-DMN:
- Vf_Mat/NNW_Tool.py:
- Defines the class of IB-DMN and Data shuffle
- Called in the following files (not stand alone)
- Vf_Mat/Vf_Mat.py:
- Training of the reference IB-DMN
- Trained reference IB-DMN parameters are stored in Vf_Mat/ResNNW
Stochastic analysis - Stochastic IB-DMN: Stochastic_DMN_LinearHardening
- Files used to initialize the IB-DMN material law of levels 4, 5 and 6:
- Stochastic_DMN_LinearHardening/Para_Level4.dat, Stochastic_DMN_LinearHardening/Para_Level5.dat and Stochastic_DMN_LinearHardening/Para_Level6.dat
- Adding a random perturbation on the reference IB-DMN parameters and perform nonlinear simulations:
- Stochastic_DMN_LinearHardening/Tool.py
- Called by the following file (not stand alone)
- Stochastic_DMN_LinearHardening/GenParaDMN.py
GenPara = Falseis adding perturbation on the reference IB-DMNGenPara = Trueis generating a random IB-DMNLoad = 'Tensile'orLoad = 'Shear'to run under uniaxial stress or shearingFigureOnly = Trueto plot figures using archieved results,FigureOnly = Falseto generate new stochastic IB-DMN, new data and run tests (requires cm3Libraries) before plotting figuresId_Para = '_partial'orId_Para = '_a25_b05',Id_Para = '_a5_b075',Id_Para = '_a10_b05'defines the saving directory and if only partial distribution (inln=[depth]andlw=[depth]) or not are considereda= 2.5andb = 0.5define the distribution parameters- ``level = 4
,level = 5``` or ```level = 6``` specifies the level of the IB-DMN to be used - Results are stored in
./Res*for the different loading cases and combinations of parametersaandbof the random perturbation distributions (partial or not).
Reproduce paper1 figures
-
Fig. 3: The images are in the diretory 6SVE_Example/6SVE_Data
-
Fig. 4:
Load = 'Tensile'orLoad = 'Shear'orLoad = 'UniStrain'to vizualize the results under uniaxial stress, shearing or uniaxial strain loading conditions- Use
LargeDefo = Truein 6SVE_Example/6SVE_DMN/Plot_DNS_DMN.py - The command to be run from the directory 6SVE_Example/6SVE_DMN is
python3 Plot_DNS_DMN.py
- Fig. 5:
- The command to be run from the root directory . to plot the beta distribution is
python3 Beta.py
- Fig. 6, Fig. 7, and Fig. 8:
- Set
FigureOnly = True - Parameters:
Id_Para = '_a25_b05',a=2.5,b=0.5 - Use successively
level = 4,level = 5, andlevel = 6 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 9 and Fig. 10:
- Set
FigureOnly = True - Parameter:
level = 5 - Use successively
Id_Para = '_a25_b05',a=2.5,b=0.5, thenId_Para = '_a5_b075',a=5,b=0.75, and thenId_Para = '_a10_b05',a=10,b=0.5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 11:
- Set
FigureOnly = True - Parameters:
Id_Para = '_partial',ln=[0,1,2,3,4],lw=[],a=2.5,b=0.5andlevel = 5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 12:
- Set
FigureOnly = True - Parameters:
Id_Para = '_partial',ln=[],lw=[0,1,2,3],a=2.5,b=0.5andlevel = 5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 13:
- Set
FigureOnly = True - Parameters:
Id_Para = '_partial',ln=[4],lw=[3],a=2.5,b=0.5andlevel = 5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 14:
- Set
FigureOnly = True - Parameters:
Id_Para = '_partial',ln=[3],lw=[2],a=2.5,b=0.5andlevel = 5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. 15:
- Set
FigureOnly = True - Parameters:
Id_Para = '_partial',ln=[0,1,2,3,4],lw=[],a=2.5,b=1andlevel = 5 - Use successively
Load = 'Shear'andLoad = 'Tensile' - The command to be run from the directory Stochastic_DMN_LinearHardening is
- Set
python3 GenParaDMN.py
- Fig. B16:
- The command to be run from the directory 6SVE_Example/6SVE_DMN/ is
python3 Plot_rve6_DMN.py
- Fig. B17:
- Use
LargeDefo = FalseandLoad = 'Tensile'in 6SVE_Example/6SVE_DMN/Plot_DNS_DMN.py - The command to be run from the directory 6SVE_Example/6SVE_DMN/ is
- Use
python3 Plot_DNS_DMN.py
Disclaimer
This project has received funding from the European Union’s Horizon Europe Framework Programme under grant agreement No. 101056682 for the project “DIgital DEsign strategies to certify and mAnufacture Robust cOmposite sTructures (DIDEAROT)”. The contents of this publication are the sole responsibility of ULiege and do not necessarily reflect the opinion of the European Union. Neither the European Union nor the granting authority can be held responsible for them.
-
The present work is described in: "Wu, L. and Noels, L. (Submitted). Stochastic Deep Material Networks as Efficient Surrogates for Stochastic Homogenisation of Non-linear Heterogeneous Materials , doi: " which can be downloaded. We would be grateful if you could cite this publication in case you use the files.0 ↩ ↩2
-
The micro-structure generator is described in: "Wu, L. and Chung, C. N. and Major, Z. and Adam, L. and Noels, L. (2018) From sem images to elastic responses: A stochastic multiscale analysis of ud fiber reinforced composites, Composite Structures 189, doi: 10.1016/j.compstruct.2018.01.051 ↩
Files
2025_StochasticIBDMN-main.zip
Files
(478.0 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:e6d501934aaaf357fbb5b3befd8121b3
|
478.0 MB | Preview Download |
Additional details
Related works
- Is described by
- Publication: 10.1016/j.compstruct.2018.01.051 (DOI)
Funding
Software
- Repository URL
- https://gitlab.onelab.info/cm3/cm3Libraries/