3.3.1.8. PVD Recorder
This command is used to construct a PVD recorder, a whole model recorder that writes the mesh of the model and selected nodal and element responses in the VTK XML format, for visualization in ParaView. It writes a ParaView collection file, $baseName.pvd, and for each recorded step one or more .vtu files in the folder $baseName.
- recorder PVD $baseName <-precision $nSD> <-dT $deltaT> $respType1 $respType2 ... <eigen $numModes> <eleResponse $eleResp>
ops.recorder('PVD', baseName, '-precision', nSD, '-dT', deltaT, *respTypes, 'eigen', numModes, 'eleResponse', eleResp)
Argument |
Type |
Description |
|---|---|---|
$baseName |
string |
base name of the collection file ( |
$nSD |
integer |
number of significant digits written (optional: default = 10) |
$deltaT |
float |
record only when at least this much time has passed since the last record (optional: default = record every step) |
$respType |
string |
nodal response to record: disp, vel, accel, incrDisp, reaction, pressure, unbalancedLoad or mass |
$numModes |
integer |
record the first numModes mode shapes (after an eigen command) |
$eleResp |
string |
element response to record, e.g. stress (see note 3) |
Warning
The folder $baseName must exist before the recorder writes, as the recorder does not create it. If it does not exist, a warning Failed to open file ./$baseName/...vtu is printed at every step and no results are saved. Create it in the script, as shown in the example.
Note
Open
$baseName.pvdin ParaView to see the results, and to animate them over time.The
.vtufiles are named$baseName_T$time_P$part.vtu, where $time is the time of the step and $part numbers groups of elements in the model.eleResponse is followed by a single response, which is passed to the elements in the same way as for the Element Recorder. It must be supported by the elements of the model.
The type can also be given as pvd.
Example:
The following example creates the folder results and a PVD recorder that writes the displacements, reactions and element stresses to results.pvd and the folder results.
file mkdir results
recorder PVD results disp reaction eleResponse stress
import os
os.makedirs('results', exist_ok=True)
ops.recorder('PVD', 'results', 'disp', 'reaction', 'eleResponse', 'stress')
Code Developed by: Zhu Minjie