CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Animating a solution - help badly needed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2007, 09:39
Default Animating a solution - help badly needed
  #1
Dave
Guest
 
Posts: n/a
Hi everyone

I have created a tidal turbine model in GAMBIT which i have imported into fluent. I have solved it in the unsteady state, with it rotating, and would like to now animate the flow over the turbine. I am aware you have to write a file for every step and then put them all together.

Could someone send me a link to some instructions or even start me off so I can muck about within FLUENT?

Im doing a presentation on my work and think this would be a great way of allowing people to visualise what is going on

Cheers in advance
  Reply With Quote

Old   August 15, 2007, 11:13
Default Re: Animating a solution - help badly needed
  #2
jasond
Guest
 
Posts: n/a
Well, this comes up often enough that it probably needs to be added to the FAQ - so I'll try to do that in the near term. If you search the forum for "animation" you'll find quite a lot of results. Perhaps too many. Fluent's built-in animation stuff (Solve->Animate->Define...) is pretty straightforward, but I (and others who post here) have found it to be safer to generate a hardcopy of each animation frame (I usually use the PPM format, which is overly large if not compressed) and then use an external program to actually build the animation (I use mpeg_encode, which comes with Fluent). There are a couple of ways to generate a hardcopy - the safest way is probably to use a recorded macro that sets up your scene - and then hook that in through Solve->Execute Commands... If you have a large number of frames, it can get inconvenient, but I have had the built-in stuff fail (and I was stupid about saving intermediate data files), and had to rerun the entire thing. Actually, it is also a good idea to save intermediate steps (in any case).

If anyone else has any thoughts to share, I hope that they'll respond in this thread and we can collect up enough to add it to the FAQ.

Jason D.
  Reply With Quote

Old   August 16, 2007, 01:43
Default Re: Animating a solution - help badly needed
  #3
carno
Guest
 
Posts: n/a
I use Fluent journal, MS excel and windows movie maker.MS

1. Firstly I dump the data (case file also if dynamic mesh is used) files at each required timestep. Then there will be large number of data (and case) files in the working directory. Names of the data (and case) files are succeeded by the timestep number. (e.g. case1_001.dat) Then generate a journal file to post process all the files in one shot. Let us say there are 1000 data files for 1000 time steps.

Excel: To generate the journal file for fluent. Excel is required for incrementing the data file suffixes. ('001' in 'case1_001'). Use excel functions data sort and create a journal file which has 1000 steps. -----Note: I do this because I am unable to create a loop in journal file. It will be great if somebody tell me how to input loop in journal file. If this is possible MS excel is not required. The journal file may look like as below, ------------- rc case1_0100.cas y rd case1_0100.dat display set contours filled y display contour velocity-magnitude display set hard-copy color color display set hard-copy driver jpeg display hard-copy case1_0100.jpg

rd case1_002.dat display set contours filled y display contour velocity-magnitude display set hard-copy color color display set hard-copy driver jpeg display hard-copy case1_002.jpg . . . and hence till 1000th data file. ------------------------------------------

You will get the 1000 jpeg pictures in the working directory. Then use windows movie maker to create high quality movies. (Windows movie maker comes inbuilt in XP)

  Reply With Quote

Old   August 16, 2007, 06:08
Default Re: Animating a solution - help badly needed
  #4
Dave
Guest
 
Posts: n/a
Ok so let me just confirm.

To collect images at the end of each time step I go to Solution Animation and define what I want animated. Now, i want to see the particles flowing over my turbine so do I hit particle tracks?

Once the solution has converged my frames are stored as ".dat" files. These files can be imported into Windows Movie Maker (for example). How do I convert a ".dat" file into an image?

I did a search on the forum for this info but the threads were all for specific problems at a higher level than just instructions for creating a basic movie.

Anyway let me know your thoughts, cheers

Dave
  Reply With Quote

Old   August 16, 2007, 08:09
Default Re: Animating a solution - help badly needed
  #5
carno
Guest
 
Posts: n/a
Frames are not stored as dat files. Dat files are data files and contains much more data. use below journal to create velocity mag contours at particula section.

get the desired image on the screen for one particular dat file, and run the below file with loop or many times. This will dump the image (velocity mag) files in the working directory. ------------------ rc case1_0100.cas

y

rd case1_0100.dat

display set contours filled

y

display contour velocity-magnitude

display set hard-copy color color

display set hard-copy driver jpeg

display hard-copy case1_0100.jpg
  Reply With Quote

Old   August 16, 2007, 08:58
Default Re: Animating a solution - help badly needed
  #6
Dave
Guest
 
Posts: n/a
Carno

Where do i input these commands?
  Reply With Quote

Old   August 16, 2007, 10:00
Default Re: Animating a solution - help badly needed
  #7
Dave
Guest
 
Posts: n/a
Actually forget i asked that! I have 80 sequences in '.ppm' format - how do i convert those into frames?
  Reply With Quote

Old   August 16, 2007, 11:22
Default Re: Animating a solution - help badly needed
  #8
jasond
Guest
 
Posts: n/a
There are several different ways to loop in a journal file - all that I know of require using Scheme. For example, a "do" loop looks like:


> (do ((x 1 (+ x 1))) ((> x 10)) (format "~d\n" x))
1
2
3
4
5
6
7
8
9
10
#f



More info on this is available in any Scheme book. The "for-each" looping construct is pretty useful when you have a list of names or something like that.
  Reply With Quote

Old   August 16, 2007, 23:57
Default Re: Animating a solution - help badly needed
  #9
carno
Guest
 
Posts: n/a
Take a guidance from above link. This explains how tto create goodvideo from frames. Thanks to that bloger.
  Reply With Quote

Old   August 17, 2007, 00:00
Default Re: Animating a solution - help badly needed
  #10
carno
Guest
 
Posts: n/a
Take a guidance from above link. This explains how tto create goodvideo from frames. Thanks to that bloger.

Sorry the link was edited by moderator. Search on google fluent 6.4. first link is the link I am refering. 'Dr. Flow squad's world.'
  Reply With Quote

Old   August 17, 2007, 03:34
Default Re: Animating a solution - help badly needed
  #11
Dave
Guest
 
Posts: n/a
Thankyou guys the Dr Flow link was very helpfull
  Reply With Quote

Old   August 20, 2007, 05:00
Default Re: Animating a solution - help badly needed
  #12
Dave
Guest
 
Posts: n/a
Hi again

I have followed the instructions as per Dr Flow's website and created an isosurface which i wish to observe the changing velocity contours on. Unfortunatley when I observe my images for every timestep I do not see the iso-surface - just the rotar i have defined as the wall.

I am setting up the animation as follows;

Solution Animation/Define/Animation sequence(PPM Image)/Contours/Velocity Magnitude (select iso-surface and rotor)

When i run the solution why is this not giving me the images i want?

One other quick thing while im here...what i really want to do is to animate the pathlines in 3D over the turbine...is there a trick do doing this or do i simply just select "pathlines in animation sequence?

Thankyou all

David

  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
grid dependancy gueynard a. Main CFD Forum 19 June 27, 2014 21:22
Exact solution of Burgers equation mcaro Main CFD Forum 3 January 25, 2011 06:46
How to get the solution of last time step? lzgwhy Fluent UDF and Scheme Programming 0 September 15, 2010 22:23
Integration along a line during solution DaRumpel CFX 16 September 2, 2010 11:17
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 01:16


All times are GMT -4. The time now is 19:10.