![]() |
|
This tutorial is an extension to ParameterStudy1DDemo, and thus also has very similar code structure. It shows how to do a parameter study by using the DPMBase::autonumber function in DPMBase. This tutorial treats the case in which a 2D parameter study has to be performed. The difference with ParameterStudy1DDemo is only the addition of the second dimension of the parameter study. Only the differences with respect to the 1D case are given here, as it is assumed that one looks at ParameterStudy1DDemo first. In this case ParameterStudy1D is extended to change both particle radii, and thus a parameter space can be created. This parameter space is also visualised in the image below.
The following headers are included:
These are the headers needed for this tutorial.
The main class inherits from Mercury3D.
All steps needed in order to create this class have been explained below.
Step 1: (Private) Member variables.
Compared to ParameterStudy1DDemo a new variable is added, dim2_, that stores the information of the second dimension of the parameter study. Furthermore the size of studyNum is now also incremented by 1, as it stores information of both dimensions. studyNum is now build up as follows: The first entry is (still) storing an integer value giving information of the completeness of the study. The second and third entry store the current run in the first and second dimension respectively.
Step 2: Set- and Get-functions for private member variables.
The set- and get-functions are extended to incorporate the second dimension with respect to ParameterStudy1DDemo.
Step 3: Create the particle species.
Nothing changed with respect to ParameterStudy1DDemo
Step 4: Setup the initial conditions.
The only change with respect to ParameterStudy2DDemo is that now the second particle is dependent on the second dimension of the parameter study.
Step 5: Setting up the parameter study.
Nothing changed with respect to ParameterStudy1DDemo, both actionsBeforeTimeLoop() and actionsAfterSolve() are the same.
Step 6: Creating the main function.
The only difference with ParameterStudy2DDemo is that now both study dimensions have to be set.
This line results in 4 simulations being run, in which all 4 combinations of particle sizes are solved.
If you would like to look at the 1D or 3D parameter study demos:
ParameterStudy1DDemo
ParameterStudy3DDemo
Or return to Overview of advanced tutorials