CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] ParaFoam how to create a movie

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2008, 20:20
Default ParaFoam how to create a movie
  #1
New Member
 
Klaus
Join Date: Mar 2009
Posts: 3
Rep Power: 17
klausjuergen is on a distinguished road
Dear OpenFOAM user,

I am new to OpenFOAM (using version 1.5) and I have a question:
How can I create a movie (.avi or .mp2) from paraFoam? The save animation dialog box allows only to save images.

Thank you for your help.

Klaus
klausjuergen is offline   Reply With Quote

Old   November 27, 2008, 23:27
Default Perhaps you should open multip
  #2
New Member
 
liu yang
Join Date: Mar 2009
Posts: 7
Rep Power: 17
liuyang is on a distinguished road
Perhaps you should open multiple data file at one time.
liuyang is offline   Reply With Quote

Old   November 27, 2008, 23:33
Default I got the same problem. Could
  #3
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
I got the same problem. Could you please let me know how to open multiple data file at one time? thanks

Regards

Su Xiaohui
sxhdhi is offline   Reply With Quote

Old   November 28, 2008, 01:59
Default Hi, I dont know what your ver
  #4
New Member
 
MR Amiralaei
Join Date: Mar 2009
Posts: 20
Rep Power: 17
reza is on a distinguished road
Hi,
I dont know what your version of paraview is.
but to make a movie first select all the times you want in the first dialog box, meaning start time, e.g zero and also end time like 2 s and click accept then go to view menu and select key frame then another dialog opens at which you should switch off cashe and keeping property button and select the last button from the right which is the reocd button and in the dialog box appearing type the name of the movie which may be yourmovie.mpg. It takes some time to generate it.
reza is offline   Reply With Quote

Old   November 28, 2008, 03:59
Default Hi, have a look to here: Po
  #5
Senior Member
 
tian's Avatar
 
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17
tian is on a distinguished road
Hi,

have a look to here: Point 6.1.10

http://www.opencfd.co.uk/openfoam/doc/paraFoam.html

Bye
Tian
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance.
tian is offline   Reply With Quote

Old   November 28, 2008, 04:12
Default Many thanks, Tian. Xiaohui
  #6
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Many thanks, Tian.

Xiaohui
sxhdhi is offline   Reply With Quote

Old   December 5, 2008, 10:59
Default Dear colleagues How do you s
  #7
New Member
 
Martin Romagnoli
Join Date: Mar 2009
Location: Rosario, Santa Fe, Argentina
Posts: 22
Rep Power: 17
martinr is on a distinguished road
Dear colleagues
How do you save a movie in real time??
I have saved movies but its duration is lower than the real.
Any clue?

thank you in advance
Martín.
martinr is offline   Reply With Quote

Old   December 5, 2008, 12:27
Default dear martin, first you need
  #8
Member
 
sradl's Avatar
 
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 18
sradl is on a distinguished road
dear martin,

first you need to know the number of frames per second that you have saved. E.g. if you have dT = 0.05 [s], you have 20 fps.

Then export images (e.g. in jpgs format), use what ever you like to generate the raw movie (I use ImageJ which works nicely). Then I use virtual dub 1.8.6 under windows to set the frame rate and to compress the stuff.

br
Stefan
sradl is offline   Reply With Quote

Old   December 5, 2008, 12:47
Default martin, you could also save
  #9
erik023
Guest
 
Posts: n/a
martin,
you could also save as .png, from what i understand this is better for figures that are not photos (short of a better way to explain) and then use animate.
in parafoam you have three different option on how to save the pictures: timestep, sequence and something more.
takes a bit of time but the movies look nice!

good luck!
Erik
  Reply With Quote

Old   December 8, 2008, 17:17
Default Hi, thank you for your answ
  #10
New Member
 
Klaus
Join Date: Mar 2009
Posts: 3
Rep Power: 17
klausjuergen is on a distinguished road
Hi,

thank you for your answers.
I could create the desired movie.

First I used convert (as recommended from tian, thanks).
But now I use ffmpeg (under linux) with the following options
-r (here you can specify the number of frames per second, e.g. 20)
-b (here you can specify the bitrate in bit/s, e.g. 2500000)
-i (here you have to specify the input files, e.g. frame.%04d.jpg)
moviefile (the name of the movie file. It specifies the format of the movie, e.g. movie.mov).

Regards

Klaus
klausjuergen is offline   Reply With Quote

Old   December 8, 2008, 21:16
Default Hi Klaus I have tried the f
  #11
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Hi Klaus

I have tried the ffmpeg you mentioned. but I got some errors:
user@ubuntu:~/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/turbFoam/cavity$ ffmpeg -i turbFoam_cavity_animation.002*.jpg out.avi
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Oct 3 2008 22:40:31, gcc: 4.3.2
Input #0, image2, from 'turbFoam_cavity_animation.0020.jpg':
Duration: 00:00:00.0, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 1048x636 [PAR 1:1 DAR 262:159], 25.00 tb(r)
Unable to find a suitable output format for 'turbFoam_cavity_animation.0021.jpg'

Have you met these before? How to solve them? Thanks

Xiaohui
sxhdhi is offline   Reply With Quote

Old   December 9, 2008, 21:01
Default Hi Xiaohui, you should spec
  #12
New Member
 
Klaus
Join Date: Mar 2009
Posts: 3
Rep Power: 17
klausjuergen is on a distinguished road
Hi Xiaohui,

you should specify the input files in the way I did in my previous post. Here "%04d" is a format like the format string of a printf() statement of the C programming language. "%04d" matches an integer with 4 digits.
I hope this will work!

Klaus
klausjuergen is offline   Reply With Quote

Old   December 9, 2008, 22:10
Default Hi Klaus, Many thanks for y
  #13
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Hi Klaus,

Many thanks for your reply.
I tried following your instruction. But I got the error like this

user@ubuntu:~/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/interFoam/damBreak$ ffmpeg -r 20 -b 2500000 -i VOFDamBreaking.%04d.jpg damBreakingVOF.mov
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Oct 3 2008 22:40:31, gcc: 4.3.2
Input #0, image2, from 'VOFDamBreaking.%04d.jpg':
Duration: 00:00:03.0, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 860x632 [PAR 1:1 DAR 215:158], 20.00 tb(r)
File 'damBreakingVOF.mov' already exists. Overwrite ? [y/N] y
Output #0, mov, to 'damBreakingVOF.mov':
Stream #0.0: Video: 0x0000, yuvj420p, 860x632 [PAR 1:1 DAR 215:158], q=2-31, 2500 kb/s, 20.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

Have you met this error before? Thanks a lot.

Regards,

Xiaohui
sxhdhi is offline   Reply With Quote

Old   December 10, 2008, 08:26
Default Dear friends Thank you for
  #14
New Member
 
Martin Romagnoli
Join Date: Mar 2009
Location: Rosario, Santa Fe, Argentina
Posts: 22
Rep Power: 17
martinr is on a distinguished road
Dear friends

Thank you for your answers. I could create movies in real time using ffmpeg as Klaus posted.

Greetings
Martin
martinr is offline   Reply With Quote

Old   January 26, 2009, 02:56
Default Hello. I would like to crea
  #15
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello.

I would like to create a movie as well.
At my home-computer I have ffmpeg which works well, but at the university I only have access to the 'convert'-tool (like they said in the user guide).

Unfortunately I could not get it to work.
Maybe it's because the output images from ParaView are created with dots (.) and not underscores (_)?
This is how an images lookes like:
blahblah.00000.jpg

If I run 'convert *.jpg movie.mpg' I get the errormessage that there are too many input arguments. The same for 'convert blahblah* movie.mpg'

What am I doing wrong?
Have a nice day!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 27, 2009, 10:16
Default Hello, I followed the i
  #16
Member
 
Maruthamuthu Venkatraman
Join Date: Mar 2009
Location: Norway
Posts: 80
Rep Power: 17
maruthamuthu_venkatraman is on a distinguished road
Hello,
I followed the instructions given in OPENFOAM userguide to make movies. But the frames appear in Black colour and there is no data saved on it. If anyone knows how to make the movie, let me hear from you...

Thanks
maruthamuthu_venkatraman is offline   Reply With Quote

Old   April 7, 2010, 17:37
Default error disappears with update
  #17
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 45
Rep Power: 17
lth is on a distinguished road
Install the libavcodec-unstripped-51 package. This will enable ffmpeg support for
mpeg4 encoding
found at
http://ubuntuforums.org/showthread.php?t=1037286

after I followed klausjuergen's suggestion with
ffmpeg -r 4 -b 800 -i %03d.jpg test.mov or
ffmpeg -r 4 -b 800 -i %03d.jpg test.avi

before then I kept getting and error with noData movies.

Thanks for the thread, lth
lth is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] How can I create prism mesh for a 3D domain surrounded by a torus? lzgwhy ANSYS Meshing & Geometry 5 May 18, 2017 18:10
[OpenFOAM] How do I Create Smooth Contours in ParaFoam? m_ridzon ParaView 2 January 10, 2016 10:24
Actuator disk model audrich FLUENT 0 September 21, 2009 08:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 02:07
Create a high quality movie from multiple files Dr. Flow Squad FLUENT 2 June 13, 2007 18:35


All times are GMT -4. The time now is 17:27.