Plot Command
The micromechanical plot run
command can be used to perform micromechanical model plots. The command requires a configuration file to specify the plot settings. By default, the following configuration files are searched if it is not specified in the command line:
micromechanical-plots.(toml|yaml|yml|json)
,[plots]
inmicromechanical.(toml|yaml|yml|json)
,[plots]
inmicromechanical/config.(toml|yaml|yml|json)
,[tool.micromechanical.plots]
inpyproject.toml
.
The following is an example of a configuration file:
# Command line options
[cli]
overwrite = true
# ...
# Grid options
[grids.layout]
numfig = 6
# ...
# Base calculation options
[calculation]
disp_steps = -1
# ...
# Base experiments
[experiments]
files = []
# ...
# Base figure options
[figures.macroscopic]
method = "plotComparisons"
# ...
# Base model options
[plots.CH-OSIMSAND]
calculation = {}
experiments = {}
figures = {}
matrix = {}
# ...
The following mermaid diagram shows the relationship between the different sections of the configuration file:
flowchart LR
CLI[CLI Options]
GRID[Grid Options]
CALC[Calculation Options]
EXP[Experiments]
FIG[Figures]
PLOT[Plots]
OVER_CALC[Overridden Calculation Options]
OVER_EXP[Overridden Experiment Options]
OVER_FIG[Overridden Figures]
CALC -->|overridden| PLOT --> OVER_CALC
EXP -->|overridden| PLOT --> OVER_EXP
FIG -->|overridden| PLOT --> OVER_FIG
The grid options are used to specify the layout of the figures in the grid that is passed to the subplots method. For example, the following configuration will create a grid with 3 rows and 2 columns:
Then it is possible to reference the created grid in the figures
:
figures:
fig:
ax: ["drained", [0, 2, 4]] # or "drained" for all axes; or ["drained", "slice(2)"] for slicing
where drained
is the name of the grid and [0, 2, 4]
are the indices of the subfigures in the grid.
Note
The grids
, plots
, and figures
can be expanded with matrix configurations as described in Calibration Command.
Note
It is possible to set different configurations for different languages with the syntax like <<en:English Text,zh:Chinese Text>>
.