1 (edited by SaeidM 14-01-2021 11:13:20)

Topic: 2D/3D Beam VTK export issues

I have been tweaking with the 2D beam example (here).


I have tried to use vtkxml export module using the following ISTs:

IST_StressTensor = 1
IST_PrincipalStressTensor = 2
IST_StrainTensor = 4
IST_PrincipalStrainTensor = 5
IST_BeamForceMomentTensor = 7
IST_BeamStrainCurvatureTensor = 8
IST_DisplacementVector = 12

using this line in the input file:
vtkxml tstep_all domain_all vars 7 1 2 4 5 7 8 12 stype 0

For 2D beam element, the generated VTK files, all vector values except for IST_DisplacementVector are zeros.

here is the VTK output for step 3:

<PointData Scalars="" Vectors="IST_PrincipalStressTensor IST_PrincipalStrainTensor IST_BeamForceMomentTensor IST_BeamStrainCurvatureTensor IST_DisplacementVector " Tensors="IST_StressTensor IST_StrainTensor " >
 <DataArray type="Float64" Name="IST_StressTensor" NumberOfComponents="9" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_PrincipalStressTensor" NumberOfComponents="3" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_StrainTensor" NumberOfComponents="9" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_PrincipalStrainTensor" NumberOfComponents="3" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_BeamForceMomentTensor" NumberOfComponents="6" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_BeamStrainCurvatureTensor" NumberOfComponents="3" format="ascii"> 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
 <DataArray type="Float64" Name="IST_DisplacementVector" NumberOfComponents="3" format="ascii"> -8.639939e-04 0.000000e+00 0.000000e+00 6.095592e-09 0.000000e+00 9.542737e-20 5.040061e-04 0.000000e+00 1.182223e-03 9.473413e-04 0.000000e+00 5.911099e-04 1.390674e-03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 </DataArray>
</PointData>

_______________________

Update:
For 3D Beam element however on the other hand only IST_BeamForceMomentTensor was exported into VTK file.

I was thinking that we can develop the VTK Export module for a more reliable VTK export?

Post's attachments

beam2d_1.in 1.48 kb, 3 downloads since 2020-12-20 

You don't have the permssions to download the attachments of this post.

2 (edited by nitramkaroh 03-01-2021 21:46:50)

Re: 2D/3D Beam VTK export issues

Hi, I am not sure where the problem is, but it seems that the beam elements do not support nodal recovery. Instead, you can use keyword cellvars as

vtkxml tstep_all domain_all primvars 1 1 cellvars 2 7 8


which means that the variables are exported element by element.

Re: 2D/3D Beam VTK export issues

nitramkaroh wrote:

you can use keyword cellvars

Dear Nitramkaroh, Thanks; that's very helpful.
I will give it a try..

4 (edited by SaeidM 15-01-2021 13:52:00)

Re: 2D/3D Beam VTK export issues

nitramkaroh wrote:

...you can use keyword cellvars as

vtkxml tstep_all domain_all primvars 1 1 cellvars 2 7 8


...

Dear Nitramkaroh,

I tried this method it will cause a memory access violation with this error:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

This error is cause by vtkxmlexportmodule.h on line 135:

FloatArray &giveCellVar(int field, int cellNum) { return this->elVars [ field - 1 ] [ cellNum - 1 ]; }

Here is the input file I used:

beam3d.out
Simple Beam Structure - nonlinear analysis
StaticStructural nsteps 10 nmodules 1
vtkxml tstep_all domain_all cellvars 2 7 8
domain 3d
OutputManager tstep_all dofman_all element_all
ndofman 3 nelem 1 ncrosssect 1 nmat 1 nbc 2 nic 0 nset 3 nltf 1
node 1 coords 3 0.  0.  0.
node 2 coords 3 100. 0.  0.
node 3 coords 3 0. 0. 1.
#
#element
Beam3d 1 nodes 2 1 2 refAngle 0 nip 3
#
#Section
FiberedCS 1 fibermaterials 1 1 thicks 1 1.0 widths 1 1.0 fiberycentrecoords 1 0.0 fiberzcentrecoords 1 0.0 thick 1.0 width 1.0 set 1
#
#Material
tutorialmaterial 1 d 1. E 3.e4 n 0.2 tAlpha 1.2e-5 sigy 120.0 H 0.
#
BoundaryCondition 1 loadTimeFunction 1  dofs 6  1 2 3 4 5 6  values 6  0. 0. 0. 0. 0. 0.  set 2
BoundaryCondition 2 loadTimeFunction 1  dofs 6  1 2 3 4 5 6  values 6  1. 0. 0. 0. 0. 0.  set 3
PiecewiseLinFunction 1 nPoints 2 t 2 0. 10. f(t) 2 0. 1.
Set 1 elements 1 1
Set 2 nodes 2 1 3
Set 3 nodes 1 2

Is this a bug?

Re: 2D/3D Beam VTK export issues

Yes, it is a bug. You can simply correct it by changing

 Element_Geometry_Type giveGeometryType() const override { return EGT_Composite; }

to

Element_Geometry_Type giveGeometryType() const override { return EGT_line_1; }

in beam3d.h

6 (edited by SaeidM 17-01-2021 11:29:07)

Re: 2D/3D Beam VTK export issues

Thanks Nitramkaroh; that seems to resolve the issue..