Binaries can be downloaded from here. Extract and run proper executable file from the bin directory. Make sure JRE (1.8+) is installed on the system and available on the PATH.
Command line arguments are:
- --log / -l => logging detailed results (off by default)
- --plot / -p => plotting results (on by default)
- --problem-size / -s => specifying problem size (12 by default)
- --max-threads / -t => enforcing maximum number of threads used (12 by default)
- --delta / -d => time step (0.001 by default)
- --steps / -o => number of time steps to run simulation for (100 by default)
Code can be easily modified to solve a different problem. Only the following piece of code from SolverLauncher class should be replaced with values specific to the new problem:
SolutionsInTime solutionsInTime = nonStationarySolver.solveInTime(new NonStationaryProblem(delta) {
@Override
protected double getInitialValue(double x, double y) {
double dist = (x - mesh.getCenterX()) * (x - mesh.getCenterX())
+ (y - mesh.getCenterY()) * (y - mesh.getCenterY());
return dist < finalProblemSize ? finalProblemSize - dist : 0;
}
@Override
protected double getValueAtTime(double x, double y, Solution currentSolution, double delta) {
double value = currentSolution.getValue(x, y);
return value + delta * currentSolution.getLaplacian(x, y);
}
})
In this example an exemplary problem of heat transfer is being solved. A ball of heat is put into the center of the plane gradually heating the surface. The grid size is 24x24 though it can be any value.