Export modules
Export modules allow to export computed data into external software for
post-processing. The number of export module records is specified in
analysis record using nmodules parameter (see the initial part of section 6). The general format
is the following:
| *EntType |
[tstep_all] |
| |
[tstep_step(in) #] |
| |
[tsteps_out(rl) #] |
| |
[domain_all] |
| |
[domain_mask(in) #] |
To select all solution steps, in which output will be performed, use
tstep_all. To select each tstep_step-nth step, use
tstep_step parameter. In order to select only specific
solution steps, the tsteps_out list can be specified,
supplying solution step number list in which output will be done.
To select output for all domain of the problem the domain_all
keyword can be used. To select only specific domains,
domain_mask array can be used, where the values of the array
specify the domain numbers to be exported.
Currently, the supported export modules are following
- VTK export
| vtk |
[vars(ia) #] |
| |
[primvars(ia) #] |
| |
[cellvars(ia) #] |
| |
[stype(in) #] |
| |
[regionstoskip(ia) #] |
| vtkxml |
[vars(ia) #] |
| |
[primvars(ia) #] |
| |
[cellvars(ia) #] |
| |
[stype(in) #] |
| |
[regionstoskip(ia) #] |
| |
[nvr(in) #] |
| |
[vrmap(ia) #] |
- The vtk module is obsolete, use vtkxml instead. It allows to export results recovered on region by region basis and has more features.
- The array vars contains identifiers for those internal
variables which are to be exported. The id values are defined by
InternalStateType enumeration, which is defined in include file
``src/oofemlib/internalstatetype.h''.
- The array primvars
contains identifiers of primary variables to be exported.
The possible values correspond to the values of enumerated type
UnknownType, which is again defined in ``src/oofemlib/unknowntype.h''.
Please note, that the values corresponding to enumerated type values
start from zero, if not specified directly and that not all values are
supported by particular material model or analysis type.
- The array cellvars contains identifiers of constant variables defined
on an element (cell), e.g. a material number. Identifier numbers are specified in
``src/oofemlib/internalstatetype.h''.
- The parameter stype allows to select smoothing procedure for
internal variables, which is used to compute nodal values from values
in integration points.
- The parameter nvr allows to set number of virual regions. The internal (state) variables defined in integration poits need to be transfered into nodal values. This process is called nodal recovery. VTKXML module allows to perform recovery not only over the whole domain, but also over so called virtual regions. This allows to exactly match discontinuity along region boundary instead of smoothing it. The concept of virtual regions allows to map several true regions onto single virtual region and then perform recovery over virtual regions instead of true ones. If nvr is set to zero (default), the recovery is performed over whole domain (single virtual region), when positive, it should be equal to number of virtual regions and vrmap should be provided. If negative, then recovery over real regions is used.
- The array vrmap defines the mapping from real (true) regions to virtual regions. The size of this array
should equal to number of true regions and values should be in range <1, nvr>. When nvr is zero or negative, this parameter
is ignored. The i-th value defines mapping of true region number to virtual region number. Zero or nagative value causes
region to be ignored.
By default vtk and vtkxml modules perform recovery over the whole domain. The VTKXML module can operate in region-by-region mode (see nvr and vrmap parameters). In this case, the smoothing is performed only over particular virtual region, where only elements in this virtual region participate.
- Homogenization of stresses and strains in the global coordinate system. Corresponding stress and strain components are summed and averaged over the volume. It is possible to select material numbers from which the averaging occurs. The averaging works for 3D domains with an extension to trusses. A truss is considered as a volume element with oriented stress and strain components along the truss axis. The transformation to global components occurs before averaging.
| hom |
[scale(rn) #] |
| |
[MatNum(ia) #] |
- The parameter scale multiplies all averaged stresses and strains. scale=1 by default.
- An integer array MatNum specifies which material numbers are taken into account. All material numbers are averaged by default.
- Gauss point export is useful if one needs to plot a certain variable
(such as damage) as a function of a spatial coordinate using tools like
gnuplot. It generates files with data organized in columns, each row
representing one Gauss point. In this way, one can plot e.g. the damage
distribution along a one-dimensional bar.
| gpexportmodule |
[vars(ia) #] |
| |
[ncoords(in) #] |
- The array vars contains identifiers for those internal
variables which are to be exported. The id values are defined by
InternalStateType enumeration, which is defined in include file
``src/oofemlib/internalstatetype.h''.
- Parameter ncoords specifies the number of spatial coordinates to be exported at each Gauss point. Depending on the spatial dimension of the
domain, the points can have one, two or three coordinates. If ncoords
is set to -1, only those coordinates that are actually used are exported.
If ncoords is set to 0, no coordinates are exported.
If ncoords
is set to a positive integer, exactly ncoords coordinates are exported.
If ncoords exceeds the actual number of coordinates, the actual
coordinates are supplemented by zeros. For instance, if we deal with a 2D
problem, the actual number of coordinates is 2. For ncoords=3,
the two actual coordinates followed by 0 will be exported.
For ncoords=1, only the first coordinate will be exported.
The Gauss point export module creates a file with extension ``gp''
after each step for which the output is performed. This file contains
a header with lines starting by the symbol #, followed by the actual data
section.
Each data line corresponds to one Gauss point and contains the following
data:
- element number,
- material number,
- Gauss point number,
- contributing volume around Gauss point,
- Gauss point global coordinates (written as a real array of length ncoords),
- internal variables according to the specification in vars (each written as a real array of the corresponding length).
Example:
``GPExportModule 1 tstep_step 100 domain_all ncoords 2 vars 5 4 13 31 64 65''
means that the *.gp file will be written after each 100 steps and will contain
for each of the Gauss points in the entire domain its 2 coordinates and also internal
variables of type 4, 13, 31, 64 and 65, which are the strain tensor, damage tensor, maximum equivalent strain level, stress work density and dissipated work density. Of course, the material model must be able to deliver such variables.
The size of the strain tensor depends on the spatial dimension, and the size
of the damage tensor depends on the spatial dimension and type of model
(e.g., for a simple isotropic damage model it will have just 1 component
while for an anisotropic damage model it may have more). The other variables
in this example are scalars, but they will be written as arrays of length 1,
so the actual value will always be preceded by ``1'' as the length of the array. Since certain internal variables have the meaning of densities (per unit volume
or area, again depending on the spatial dimension), it is useful to have
access to the contributing volume of the Gauss point. The product of this
contributing volume and the density gives an additive contribution to the
total value of the corresponding variable. This can be exploited e.g. to
evaluate the total dissipated energy over the entire domain.
Borek Patzak
2011-12-29