Page 1 of 1

Animation

Posted: 29 Jan 2010, 09:08
by kimsongoik
Dear Elmer group
Hello
Is it possible to animate the results obtained from Elmer simulations and save this animation?
Best wishes,
KimSongOik

Re: Animation

Posted: 30 Jan 2010, 19:13
by raback
Hi Kim

Copy-paste from the old discussion forum:
"There are different variants for animating and making animations. This assumes that you use the Windows installer with savempg plugin for ElmerPost.

1) open ElmerPost
2) read the results in ReadModelFile menu selecting all the relevant timesteps
3) In Edit / Timestep Control Loop all the timesteps and check that your animation is working

To make an animation into a file
4) In r.h.s. corner choose Modules / savempg
5) In the Savempg control pop-up window choose the packing and parameters, and pres Start
6) In Edit / Timestep Control write the following string in the "Do after frame" box
savempg append
and pres "Loop"
7) In Savempg control pres Stop and you're done.

In the VTK widget the animation is more or less similar, except there is no built-in plugin for doing the animations. However, you can compose the animation from a frequence of frames with some auxiliary program. Also in ElmerPost if you happen to miss the plugin you can create a set of files with setting in the "Do after frame" box something like

$ xwd -name "ELMER POST GRAPHICS" -out pic$t.xwd

where xwd is the system level call for crabbing the window.

You should note that the coding algorithms prefer multiples of 16. Hence you may tune the window size for best performance by saying in the ElmerPost command line something like

winsize 1024 768

Or whatever your preferred size of animation is."

-Peter

Re: Animation

Posted: 30 Jan 2010, 21:34
by kimsongoik
Thanks Peter, it worked. my case study was a beam that is under some body force like gravity. I copied "math nodes=n+Displacement(0:2,time($t)); savempg append" in the "Do after frame" box which enabled me to capture the beam deflection against time. But I still have two problems:
first: The animation is too fast. I tried many possibilities to make it slower but they didn't work. Some other options are for example decreasing the time step size which is not practical in many cases or using slower playback in the multimedia player which is not available in some softwares like Power-Points.
Second: The beam is a cantilever one (i.e. one end fixed one end free) but animation looks like both ends of the beam are moving.
And as I understood the animation is not possible for steady state problems
Best Wishes, KimSongOik

Re: Animation

Posted: 31 Jan 2010, 18:33
by raback
1) I guess the rate of movie should be in the player. It's not in the .mpg file. Somebody may correct me though.

2) There is a "Freeze Scaling" button in ElmerPost which will solve this problem.

Re: Animation

Posted: 11 Feb 2010, 17:32
by kimsongoik
Hello
How is it possible to increase the quality of the resulted video? It's too vague now.

Best wishes, KimSongOik

Re: Animation

Posted: 12 Feb 2010, 19:04
by raback
Increase the maximum bitrate that may be consumed by the animation in:
In ElmerPost -> Modules -> Savempg -> Savempg Control -> Bitrate

Re: Animation

Posted: 12 Feb 2010, 19:29
by kimsongoik
Hello
I did it before (to the maximum allowed i.e. 100 times more than the default setting) but the quality didn't change.
best Wishes, KimSonOik