Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2014-04-15 13:58:54

lelorrain
Member
Registered: 2012-05-30
Posts: 154

[SOLVED] Post-pro / deformed shaped options

Hi all,

I performed a modal analysis and I need to find some modes. The computation gave me more than 300 modes... I would like to know 2 things :

1) is it possible to plot every deformed shapes in one time ? (when I select every modes and right click it's impossible to plot mode shape)

2) is there an option somewhere to automatically fix the scale factor and magnitude coloring check box (instead of doing it manually for each mode...)

Thanks for your help !!

Last edited by lelorrain (2014-04-15 16:06:48)

Offline

#2 2014-04-15 16:06:34

lelorrain
Member
Registered: 2012-05-30
Posts: 154

Re: [SOLVED] Post-pro / deformed shaped options

Ok, I finnaly fund...

Right click on MODES__DEPL -> successive animation -> Setup animation -> Generate frames

so usefull when you know it exist...

big_smile

Offline

#3 2014-04-15 19:52:31

Claws
Member
From: Denmark
Registered: 2009-03-23
Posts: 374

Re: [SOLVED] Post-pro / deformed shaped options

Could you attach a screen shot ?

/C


Opensuse 15
http://www.caelinux.org/wiki/index.php/Contrib:Claws/Code_Aster

Offline

#4 2014-04-16 09:15:22

lelorrain
Member
Registered: 2012-05-30
Posts: 154

Re: [SOLVED] Post-pro / deformed shaped options

Hi, enclosed a picture. This process is usable in Post-pro module, but I don't know how to do it in using paravis. Even doing one mode animation, it's still a faillure for me. If you have any help on that topic...

Regards,

Lelorrain


Attachments:
Capture du 2014-04-16 10:08:07.png, Size: 73.99 KiB, Downloads: 340

Offline

#5 2014-04-16 15:04:18

Claws
Member
From: Denmark
Registered: 2009-03-23
Posts: 374

Re: [SOLVED] Post-pro / deformed shaped options

Ah okay. I thought you'd found a non-ridiculous way to animate in Paravis.

For my own Paraview outside of SaloméMECA, I have stolen the macro that comes with the PARAVIS module in 'MECA.

If you read through the macro, you can figure out how to do it with buttons + mouse, or just create a new macro and copy/paste this.

# Copyright (C) 2010-2012  CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#

import sys

source = GetActiveSource()
representation = GetDisplayProperties(source)
representation.Visibility = 0

oldmode = None

if source.SMProxy.GetVTKClassName() == 'vtkMedReader' :
  oldmode = source.AnimationMode
  source.AnimationMode = 'Modes'

ExtractSurface1 = ExtractSurface()
ScaleVector1 = ScaleVector()
WarpByVector1 = WarpByVector()

# first, find the first point-centered vector array.
ExtractSurface1.UpdatePipeline()
info = ExtractSurface1.GetDataInformation()
pinfo = info.DataInformation.GetPointDataInformation()
arrayinfo = None
vectorname = None
rootname = None
for arrayid in range(0, pinfo.GetNumberOfArrays()) :
  arrayinfo = pinfo.GetArrayInformation(arrayid)
  if arrayinfo.GetNumberOfComponents() == 3 : 
    vectorname = arrayinfo.GetName()
    rootpos = vectorname.rfind("[")
    if rootpos == -1 :     
      rootname = vectorname
    else :
      rootname = vectorname[0:rootpos-1]
    ScaleVector1.VectorField = ['POINTS', vectorname]
    WarpByVector1.Vectors = ['POINTS', rootname]
    break

if vectorname == None :
  source.AnimationMode = oldmode
  sys.exit(0)

ScaleVector1.ScaleFactor = 0
ScaleVector1.UpdatePipeline()
bounds = info.DataInformation.GetBounds()
side = [bounds[1] - bounds[0], bounds[3] - bounds[2], bounds[5] - bounds[4]]
length = side[0]
if side[1] > length : length = side[1] 
if side[2] > length : length = side[2] 

scale = length / 20
if vectorname != None :
  arrayrange = arrayinfo.GetComponentRange(-1)
  if arrayrange[1] > 0 :
    scale = scale / arrayrange[1]

WarpByVector1.ScaleFactor = scale

AnimationScene1 = GetAnimationScene()

TimeAnimationCue1 = GetTimeTrack()
TimeAnimationCue1.Enabled = 0

KeyFrameAnimationCue1 = GetAnimationTrack( ScaleVector1.GetProperty('ScaleFactor'))
KeyFrame0 = CompositeKeyFrame( KeyValues=[1.0], Interpolation='Sinusoid' )
KeyFrame1 = CompositeKeyFrame( KeyTime=1.000000001, KeyValues=[1.0] )

KeyFrameAnimationCue1.KeyFrames = [ KeyFrame0, KeyFrame1 ]

AnimationScene1.Cues.append(KeyFrameAnimationCue1)
AnimationScene1.Loop = 1
AnimationScene1.PlayMode = 'Sequence'
AnimationScene1.NumberOfFrames = 21

WarpByVectorDataRepresentation = Show(WarpByVector1)
if rootname != None :
  pvLookupTable = GetLookupTableForArray( rootname, 3, VectorMode='Magnitude' )
  WarpByVectorDataRepresentation.ColorArrayName = rootname
  WarpByVectorDataRepresentation.LookupTable = pvLookupTable

AnimationScene1.Play()

/C


Opensuse 15
http://www.caelinux.org/wiki/index.php/Contrib:Claws/Code_Aster

Offline