Invoking the spectral solver

Working directory

The configuration files must be located (also see general usage) in the working directory, i.e. the location where DAMASK_spectral is invoked.
The command line switch --workingdir can be used to specify another working directory:

Node parallelism

The solver can use an MPI environment to decompose the geometry into multiple domains that get solved in parallel.
For this, the grid dimension along z has to be an integer multiple of the intended number of nodes to be used.

The output results will be appended to SolverJobName.spectralOut, if results where written to that file after writing the restart information, they will appear double.
It works only if the restart information for total increment No. XX-1 and the usual configuration files are available in the working directory.

Please Note: The solver cannot determine to which increment the restart information belongs.
It is highly recommended to backup the output file (*.spectralOut) before restarting the calculation.

Step-by-step instruction (example included in DAMASK)

Running the simulation

Change to the directory containing the example files for the spectral solver.

> cd $DAMASK_ROOT/examples/SpectralMethod/Polycrystal

Invoke the spectral solver to run a tensile test in x-direction on the low-resolution example

> DAMASK_spectral --load tensionX.load --geom 20grains16x16x16.geom

Get ASCII data out of the binary result file

Convert selected output (deformation gradient F and 1st Piola--Kirchhoff stress P) from the result file to an separate ASCIItable for each time step with data on each grid point

Generate a file for visualization

To visualize the equivalent Cauchy stress, the first component (in loading direction) of P, and the equivalent logarithmic strain, generate a rectilinear grid VTK file from the geometry contained in the ASCIItable.
Then, add the data to be visualized to this skeleton VTK file.

Open the file 20grains16x16x16_tensionX_inc100_pos(cell).vtr in ParaView.
To view a time series showing the evolution of the quantities, repeat the last two steps for all files in postProc using the scripting facilities of your shell.

Visualize the displacement

To visualize the displacement, first calculate the average and fluctuating displacement from the results file.
For the voxel-based visualization (i.e. using vtk_rectilinearGrid), use the following command.

> addDisplacement --nodal 20grains16x16x16_tensionX_inc100.txt

This will create a new file as the displacements will be interpolated to the nodes of the voxels (due to the --nodal option) resulting in a grid of 17x17x17.
Now, add the data to the VTK file.

Reopen the file 20grains16x16x16_tensionX_inc100_pos(cell).vtr in ParaView.
Choose Filters > Common > Warp By Vector from the menu and select first "avg(f).pos".
Select the new entry in the pipeline to visualize the uniformly deformed geometry.
Similarly, choose Filters > Common > Warp By Vector from the menu and select first "fluct(f).pos" to also see the fluctuations resulting from the solution of static mechanical equilibrium.

Further Exercices

A shear test using the corresponding loadcase file in the example folder

A tensile test in z-direction using a modified tensionX.load loadcase from the example folder

Generate a vtk file with all 9 components of the Cauchy stress

Use the higher resolved examples (20grains32x32x32.geom and 20grains64x64x64.geom)

Generate a geometry file with 48 grid points in each direction using the file 20grains.seeds in the example directory