Animation

Post processing utility for Elmer
Post Reply
kimsongoik
Posts: 35
Joined: 14 Oct 2009, 18:55

Animation

Post by kimsongoik » 29 Jan 2010, 09:08

Dear Elmer group
Hello
Is it possible to animate the results obtained from Elmer simulations and save this animation?
Best wishes,
KimSongOik

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

Re: Animation

Post by raback » 30 Jan 2010, 19:13

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

kimsongoik
Posts: 35
Joined: 14 Oct 2009, 18:55

Re: Animation

Post by kimsongoik » 30 Jan 2010, 21:34

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

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

Re: Animation

Post by raback » 31 Jan 2010, 18:33

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.

kimsongoik
Posts: 35
Joined: 14 Oct 2009, 18:55

Re: Animation

Post by kimsongoik » 11 Feb 2010, 17:32

Hello
How is it possible to increase the quality of the resulted video? It's too vague now.

Best wishes, KimSongOik

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

Re: Animation

Post by raback » 12 Feb 2010, 19:04

Increase the maximum bitrate that may be consumed by the animation in:
In ElmerPost -> Modules -> Savempg -> Savempg Control -> Bitrate

kimsongoik
Posts: 35
Joined: 14 Oct 2009, 18:55

Re: Animation

Post by kimsongoik » 12 Feb 2010, 19:29

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

Post Reply