ResultOutputSolver VTK screwed

Mesh generators, CAD programs, and other tools
Post Reply
lennart0901
Posts: 5
Joined: 24 Nov 2010, 13:41

ResultOutputSolver VTK screwed

Post by lennart0901 »

Hello everybody,
I did a Eigenanalysis of a Beam and used the ResultOutputSolver to create .vtk files.
When I don't enable Calculate Stresses all is fine but with it somehow the Points in the vtk-file get wrong.
I added the Solver like that

Code: Select all

Solver 2
  Exec Solver = String "after timestep"	
  exec interval = 1
  Equation = Result Output
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = case
  Output Format = Vtk
End
Equation 1
  Name = "Equation 1"
  Active Solvers(2) = 1 2
End
you can find the files to reproduce at:
Mesh: http://dl.dropbox.com/u/14298064/Mesh.zip
Sif-file and Results (log & vtk): http://dl.dropbox.com/u/14298064/SifandResults.zip

Do you have an idea what is going on?

Regards Lennart
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ResultOutputSolver VTK screwed

Post by raback »

Hi

There's definately a problem here since the vtk solver is programmed assuming that just either type of fields exists. In fact the numbering of VTK files is consumed in eigenmode analysis by the eigenmodes and otherwise by the time step / steady state iteration.

Also, in the case of the stress solver I wonder if it makes sense to compute the eigenmodes and stresses together since the stresses are certainly not computed from the eigenmodes.

So there is clearly some work to be done in the treatment of eigenmodes but currently I do not foresee any activity in this regard.

-Peter
lennart0901
Posts: 5
Joined: 24 Nov 2010, 13:41

Re: ResultOutputSolver VTK screwed

Post by lennart0901 »

Are you sure that the aren't computed from the eigenmodes?
I attach images to check.
The elmerpostfile is here:
http://dl.dropbox.com/u/14298064/case.ep
but it is 23MB.

Also each vtk file is one eigenmode just the geometry data inside is strange even the PointData like Displacement and the Stresses is fine (the same as in the ep).

Regards Lennart
Attachments
mode3.jpg
mode3.jpg (8.22 KiB) Viewed 8460 times
mode6.jpg
mode6.jpg (9.88 KiB) Viewed 8460 times
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ResultOutputSolver VTK screwed

Post by raback »

Ok, Sorry I need to take back. Looking at the code indeed the stresses are computed based on the eigenmodes. -Peter
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: ResultOutputSolver VTK screwed

Post by dvlierop »

The past few days I've been trying to solve a similar eigenmodes problem, and I have managed to produce useable results. I did use the VTU file format instead of the VTK fileformat though, but I am not sure if that makes a difference. Anyway, I noticed that for the linear elasticy equation (In Solver 1) I have to set

Code: Select all

Calculate Stresses = Logical True
If I don't do this then I'll only get zeros in the displacement vectors

Code: Select all

<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
  <UnstructuredGrid>
    <Piece NumberOfPoints="2328" NumberOfCells="10047">
      <PointData Vectors="displacement">
        <DataArray type="Float64" Name="displacement" NumberOfComponents="3" format="ascii">
  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  0.0000000E+000  ....
        </DataArray>
      </PointData>
This could either be intended behaviour or a bug, I don't know. But if it is by design then it would make more sense to call the parameter "Calculate Stresses AND DISPLACEMENTS".

While I was looking in the source code (ResultOutputSolve.src) for clues, I found a feature which I believe is yet undocumented: you can get an undeformed mesh shape, i.e. the original node coordinates without any displacement, if you add this parameter to the ResultOutputSolver

Code: Select all

Fixed Mesh = Logical True
This is very handy when doing an eigenmode analysis, because in my experience these always results in enormous deformations. What's even more, it even turned out to be indispensible in my case because when I calculated "coords - displacement" in Paraview to get the undeformed shape, the resulting surface looked pretty bad due to rounding errors. These rounding errors didn't occur when Elmer calculated the undeformed shape beforehand. Please note though that this feature is only available for VTU files. For some reason this has not been implemented for legacy VTK files (see line 2594 of ResultOutputSolve.src)

Kind regards,

Diederik
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: ResultOutputSolver VTK screwed

Post by Juha »

Hi,

just a note about the mesh deformation: you can also tell the displacement solver not to deform
the mesh in the first place, by "Displace Mesh=False" within the solver-section for the Displacement
solver. Might be sensible to switch it on automatically, at least for eigenmode problems ?!?

[Edit] Looking at the ResultOutputSolve, this won't interact well with the "Fixed Mesh" option,so
one can use either, but not both.

Juha
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: ResultOutputSolver VTK screwed

Post by dvlierop »

Wow, you started early today :o

Thanks for the excellent pointer, that will indeed work better. You must have had your first cup of coffee already?

A short question related to the discussion above: I believe that when using VTU the current implementation of the ResultOutputSolver does not output anything but the first eigenmode in a single VTU file, right? If I want to postprocess the other (higher) eigenmodes, then I will have to stick with VTK. Am I right about this? Or are there workarounds?

Thanks,

Diederik
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ResultOutputSolver VTK screwed

Post by raback »

Hi
dvlierop wrote:A short question related to the discussion above: I believe that when using VTU the current implementation of the ResultOutputSolver does not output anything but the first eigenmode in a single VTU file, right?
You're right. I've left the following warning in the code as I didn't implement the saving of eigenmodes in the first place.

Code: Select all

        IF( ASSOCIATED(Solution % EigenVectors)) THEN
          CALL Warn('WriteVtuXMLFile','Do the eigen values')
        END IF
It is on the long list of things to do...

-Peter
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: ResultOutputSolver VTK screwed

Post by dvlierop »

Well, that's a pitty then ;-). I will have to stick with VTK, but I can live with that.

Anyway, thanks for your feedback. Keep up the good work!
Post Reply