Code Structure#

In the VirtualLab directory you will find a number of sub-directories used to run the package. Input, Scripts and Materials are essential for any analysis performed. In addition to these you will find RunFiles and docs. Results generated by VirtualLab are written to the Output directory, which is created when the first analysis is performed.

Input#

Input contains the parameters which will be used for running simulations, such as dimensions to create meshes and boundary conditions and materials for FE simulations.

Input has a sub-directory for each simulation type, and within those are sub-directories for each Project, e.g. Input/$SIMULATON/$PROJECT.

Here you will find $PARAMETERS_MASTER.py and $PARAMETERS_VAR.py files, which are explained in more detail here.

For the example of Input/Tensile/Tutorials:

  • $PARAMETERS_MASTER.py = TrainingParameters.py

  • $PARAMETERS_VAR.py = Parametric_1.py

Scripts#

This directory includes the scripts required to install and launch VirtualLab.

Install#

The directory Install contains the scripts used by the non-manual installation, which will install and configure VirtualLab and its dependencies such as python, Code_Aster, SALOME and ERMES.

Methods#

The directory Methods contains files for the different methods available in VirtualLab, such as ‘Mesh’ and ‘Sim’.

Experiments#

The directory Experiments contain simulation-specific scripts for each experiment available, which currently are Tensile, LFA and HIVE. Inside the experiment directory are scripts, grouped by their method type, required to run that specific virtual experiment. In Mesh you will find SALOME python scripts which create the mesh of the testpiece, while in Sim you will find the Code_Aster command scripts which outline the steps followed to setup the FE simulation. Alongside these files used for PreAster and PostAster can be found. DA contains scripts used for data analysis.

Other simulation-specific sub-directories may also be included in the experiment directory here, such as Laser for the LFA simulation which contains different laser pulse profiles measured experimentally.

Common#

Common contains scripts used by VirtualLab for any type of experiment. These includes setting up the environment through creating directories and inerfacing with the various packages incorporated, such as SALOME and Code_Aster.

Materials#

This directory contains the material properties used for FE simulations.

Within this directory are sub-directories, the name of which are the different materials available. Within these sub-directories are files for the different type of material properties, e.g. ‘Youngs.dat’ contains information about the Youngs modulus of a material.

The data stored in these files can be a single number (used to perform linear analysis) or a list of two numbers, the first column is a varying property (e.g. Temperature) while the second column is the value of the material property at that quantity.

RunFiles#

This directory contains the driver files to launch virtual experiments, referred to as a RunFile.

This directory contains a number of templates which the user may customise for their own applications, including ones specifically for each of the tutorials in RunFiles/Tutorials. A detailed template file Run.py is also included in the top-level directory of VirtualLab i.e. the installation location.

docs#

The files required to create this documentation.

Output#

This directory will be created when the first VirtualLab analysis is performed.

This directory is structured similarly to the Input directory, where you will find a directory for the Simulation type followed by one of the Project name.

The ‘project directory’ (Output/$SIMULATON/$PROJECT) will hold all data generated for the Project, such as: meshes; simulation results; visualisation images; analysis reports. The structure of the project directory is detailed in this section.

Containers#

This directory will be created when a container is built using VirtualLab. This will occur when the first analysis is performed.

Code configuration#

As standard, the code structure is set up for the above directories to be located in the VirtualLab directory, however this can be altered using VLconfig.py (also in the VirtualLab directory). For example, if you wanted the containers to be saved to an alternative location, then ‘ContainerDir’ would need to be changed to the desired location.