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

Creating animation through TUI

Register Blogs Community New Posts Updated Threads Search

Like Tree28Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2011, 09:18
Default Creating animation through TUI
  #1
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
Hi all

I need to create an animation sequence using TUI.

When I try to define an animation using the TUI (/solve/animate/define/define-monitor), FLUENT says:
"First display the post processing results and then define the animation sequence. Also, for all type of monitors(surface,residuals....etc), first set the monitor parameters and then define the animation monitor"

However when I create a surface monitor with the appropriate parameters to be recorded, and define the animation monitor, nothing is actually produced.

Can somebody help ?
WaWa
niazgdc likes this.
wawa is offline   Reply With Quote

Old   February 9, 2012, 11:12
Default
  #2
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Same problem with me. Can somebody help us.

Many thanks in advance.
Deside is offline   Reply With Quote

Old   February 9, 2012, 12:10
Default
  #3
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
Deside

If you want to create animation, the way I'm doing it is to save a picture (.jpeg for e.g.) for each timestep and then use Windows movie maker to create the animation.

I'm not aware of any other way to do it with TUI..

Wawa
wawa is offline   Reply With Quote

Old   February 9, 2012, 13:04
Default
  #4
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Many thanks Wawa, are you doing this using GUI or TUI as doing an animation with GUI under Calculation activities->Solution Animation is straight forward. I want to compile a command in a journal file so that the command is executed at a remote cluster machine (HPC).

I guess if i found the command to "First display the post processing results", my problem will be solved.
Deside is offline   Reply With Quote

Old   February 9, 2012, 15:55
Default
  #5
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
Deside

I'm Using TUI, doing something similar to simulating clusters..

I first set the windows using: "/display/set-window/" ;
set the image properly using different color, camera schemes;
then select the contours to be displayed;
and finally use the command " /display/hard " to save the picture for each timestep/iteration ..

Hope this helps
wawa is offline   Reply With Quote

Old   February 10, 2012, 02:41
Default
  #6
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Many thanks Wawa, am on it and will let you know my progress.
Deside is offline   Reply With Quote

Old   February 10, 2012, 11:27
Default
  #7
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 29
diamondx will become famous soon enough
Please consider how i use the cluster to take a screenshot, it may help you set the image:

/display/set/contours/surfaces 0 ()
/display/set/picture/color-mode color
/display/set/picture/driver jpeg
/display/set/contours/n-contour 99
/display/set/contours/filled-contours yes
/display/contour mach-number
/display/views/restore-view left
/display/views/auto-scale
/display/views/camera/zoom-camera 2
/display/save-picture /home/maghazlani/Analysis/screenshot.jpeg

cheers,
Ali
diamondx is offline   Reply With Quote

Old   February 10, 2012, 12:15
Default
  #8
New Member
 
John Bush
Join Date: Mar 2011
Posts: 4
Rep Power: 15
zippyhybrid is on a distinguished road
I am working on some transient simulations with water and air using the volume of fluid model and use a similar technique to create animations. Currently I am running on a local machine so use the GUI to set up a contour plot of phase volume fraction, then use the following 2 commands under "calculation activities."

display set-window 2 contour air vof 0 1
display hard-copy airvof%t.jpg

The first sets the display to the contour plot and defines its properties, the second saves the image as a jpg and includes the timestep in the name. I haven't run these particular simulations remotely so I'm not sure what additional commands I'd need if solely using the TUI, but hopefully this helps.

After completing the run I put the images together into a video...I've tried a few different Windows programs to do this (Monkeyjam, Photolapse, Virtualdub) and haven't really settled on one I really like. They do get the job done as long as there aren't too many frames to process.
axton88 and hfalleiro like this.
zippyhybrid is offline   Reply With Quote

Old   February 11, 2012, 13:58
Default
  #9
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Mohamed and John, many thanks for the input and I have managed to set up my animations. I really appreciate your contributions.

Cheers!!!
Deside is offline   Reply With Quote

Old   February 23, 2012, 09:02
Smile
  #10
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Quote:
Originally Posted by Deside View Post
Mohamed and John, many thanks for the input and I have managed to set up my animations. I really appreciate your contributions.

Cheers!!!
I set up my commands in the case file to display the contours and then saved the images to a .jpeg file then used a 3rd part tool linking the images into a movie.
Deside is offline   Reply With Quote

Old   March 7, 2012, 01:18
Default animating waves
  #11
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
Hi my friends my problem is 2- phase flow in a river bed ( open channel flow) i need to capture animation of wavy nature which ocurs at the interface between air and water. mine is unsteady flow, so i got few results which vary with time. how can i animate this phenomenon using fluent or tec plot . please help
niravtm007 is offline   Reply With Quote

Old   March 7, 2012, 03:21
Default
  #12
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Quote:
Originally Posted by niravtm007 View Post
Hi my friends my problem is 2- phase flow in a river bed ( open channel flow) i need to capture animation of wavy nature which ocurs at the interface between air and water. mine is unsteady flow, so i got few results which vary with time. how can i animate this phenomenon using fluent or tec plot . please help
Hi Niravtm007, in Fluent you can go to Solution>Calculation Activities>Solution Animation>Create/Edit>Activate a Animation Sequences>Specify frequency of data collection>Define> and in your case i guess you want contours of density since you want to see water-air interface>then specify storage directory

When your simulation is completed, you will find that in the storage directory, there will be .hmf files. Go to Results>Graphics and animations>Solution Animation Playback>Set Up>Write/Record Format (Specify mpeg)>Write, then you will see your .mpeg animation in your specified directory for storage.

I hope this helps!!!
Deside is offline   Reply With Quote

Old   March 7, 2012, 04:03
Default
  #13
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
Thanks Deside. is it possible to generate animation with out having to simulate , as i allready have simulated results, as its an unsteady problem it will take long time to generate new results.
niravtm007 is offline   Reply With Quote

Old   March 7, 2012, 04:24
Default
  #14
New Member
 
Deside
Join Date: Aug 2009
Posts: 17
Rep Power: 17
Deside is on a distinguished road
Hi Niravtm007, yes its possible but i am not sure of the easy way. Since your simulation was transient, i guess you have your data files at your predetermine time-steps. Save pictures at your predetermined data intervals as .jpeg files and use a 3rd part tool thereafter to link the images into a movie. You can try this 3rd part software http://www.easytornado.com/software/p2avi-setup.exe
Deside is offline   Reply With Quote

Old   March 7, 2012, 17:27
Default TUI commands for animating air/water interface
  #15
New Member
 
John Bush
Join Date: Mar 2011
Posts: 4
Rep Power: 15
zippyhybrid is on a distinguished road
I'm not sure of a way to do that without having data files saved at previous time steps. I haven't used Fluent's tools to create animation, I've always saved contour plots as .png or .jpg images then used 3rd party tools to create animations. I create similar animations however since I am investigating air-lift driven flow and am interested in the behavior of bubbles in the airlift column. I'd suggest visualizing the interface using contours of phase and plot the contours of air ranging from 0 (water) to 1 (air).

Here is a sample journal file for a 2D simulation I ran in batch mode.

;read case and data
file/read-case single-48cm-2D-batchtest.cas
;
;initialize domain with air
/solve/initialize/initialize-flow
;
;patch water to raceway depth of 3.5 cm
/adapt/mark-inout-rectangle yes no 0 0.62875 -0.48 0.035
/solve/patch water () (0) mp 1
;
;set up image output
/display/set/contours/filled-contours yes
/display/set/picture/driver png
/display/set/picture/landscape yes
/display/set/picture/x-resolution 960
/display/set/picture/y-resolution 720
/display/set/picture/color-mode color
/views/restore-view front
;
;print front view of phases and velocity magnitude at t=0
/display/contour air vof 0 1
/display/save-picture airvof%t.png
/display/contour mixture velocity-magnitude 0 0.5
/display/save-picture velmag%t.png
;
;set up display commands to print front view of phases and velocity magnitude every 20 time steps
/solve/execute-commands/add-edit command-2 20 "time-step" "/display/contour air vof 0 1"
/solve/execute-commands/add-edit command-3 20 "time-step" "/display/save-picture airvof%t.png"
/solve/execute-commands/add-edit command-4 20 "time-step" "/display/contour mixture velocity-magnitude 0 0.5"
/solve/execute-commands/add-edit command-5 20 "time-step" "/display/save-picture velmag%t.png"
;
;set up auto-save
/file/auto-save data-frequency 500
/file/auto-save append-file-name-with time-step 6
;
;iterate over 5000 time steps
solve/set/time-step 0.001
solve/dual-time-iterate 5000 50
file/write-data single-48cm-2D-batchtest.dat
sfotovati, MKuhn, OzMantle and 6 others like this.
zippyhybrid is offline   Reply With Quote

Old   March 13, 2013, 13:35
Default Animation sequence when using remote solver
  #16
New Member
 
Daniel
Join Date: Dec 2011
Posts: 14
Rep Power: 14
fadiga is on a distinguished road
Hi all,

A related question. I am running transient FLUENT simulations on a remote machine using ansys' RSM.

Having set-up an animation sequence via GUI, FLUENT seems not to keep this in the case setup when closed and submitted to the remote solver.

Anyone have any tips? Should I construct a command file instructing it what to do every time step?

Thanks alot!
okinugraha likes this.
fadiga is offline   Reply With Quote

Old   March 13, 2013, 16:03
Default
  #17
New Member
 
Bill Wangard
Join Date: Jan 2011
Posts: 21
Rep Power: 0
billwangard is on a distinguished road
For most of my animations for my clients, I will create a journal file of the tui commands, along the lines of what zyppyhybrid has done.

I prefer to create graphics images (tiff) or (png) format, numbered sequentially. When you save a picture:

/file sp fig_my_picture_%t.png

will replace %t with the time step. %f is the flow time, and %i is the iteration number (for steady-state calculations.

Once you have a series of png files, use Imagemagick to convert the files to an animated GIF.

> convert -adjoin -delay 10 -format gif fig_myfig_*.png animation.gif

I also recommend increasing the resolution of images to something like 2400 x 1800. It is a bit high, but you can always use convert to resize the final product using resize option:

> convert -adjoin -resize 50% -delay 10 -format gif fig_myfig_*.png animation.gif

To read a large number of data sets, I use a SCHEME file which performs a loop, and then calls the journal file.

I hope this helps.
billwangard is offline   Reply With Quote

Old   March 13, 2013, 19:14
Default
  #18
New Member
 
Daniel
Join Date: Dec 2011
Posts: 14
Rep Power: 14
fadiga is on a distinguished road
Thank you for your reply.
I grasp the idea of compiling commands to create the animation sequence in a Journal file. I think I'm not quite getting the whole execution procedure though. To elaborate a bit more, I am launching my calculations from workbench 14.5. I have a remote solver which I send calculations to, having setup the case in fluent on my local machine.

I have used journal files before, by manually going to File>Read>Journal Files... and selecting the journal I wanted to read in.

So assuming I have the journal to create the animation sequence, how do I instruct FLUENT to set up sequence by reading the journal file when running on the remote machine?

Hope I've clarified my position. I would imagine that anyone working in industry/academia using a cluster or remote machine, encounters this needs relatively often.

Thanks again for your help...
fadiga is offline   Reply With Quote

Old   June 26, 2014, 14:02
Default
  #19
New Member
 
AZ
Join Date: Jan 2014
Posts: 17
Rep Power: 12
mjthomp3 is on a distinguished road
Quote:
Originally Posted by zippyhybrid View Post
I'm not sure of a way to do that without having data files saved at previous time steps. I haven't used Fluent's tools to create animation, I've always saved contour plots as .png or .jpg images then used 3rd party tools to create animations. I create similar animations however since I am investigating air-lift driven flow and am interested in the behavior of bubbles in the airlift column. I'd suggest visualizing the interface using contours of phase and plot the contours of air ranging from 0 (water) to 1 (air).

Here is a sample journal file for a 2D simulation I ran in batch mode.

;read case and data
file/read-case single-48cm-2D-batchtest.cas
;
;initialize domain with air
/solve/initialize/initialize-flow
;
;patch water to raceway depth of 3.5 cm
/adapt/mark-inout-rectangle yes no 0 0.62875 -0.48 0.035
/solve/patch water () (0) mp 1
;
;set up image output
/display/set/contours/filled-contours yes
/display/set/picture/driver png
/display/set/picture/landscape yes
/display/set/picture/x-resolution 960
/display/set/picture/y-resolution 720
/display/set/picture/color-mode color
/views/restore-view front
;
;print front view of phases and velocity magnitude at t=0
/display/contour air vof 0 1
/display/save-picture airvof%t.png
/display/contour mixture velocity-magnitude 0 0.5
/display/save-picture velmag%t.png
;
;set up display commands to print front view of phases and velocity magnitude every 20 time steps
/solve/execute-commands/add-edit command-2 20 "time-step" "/display/contour air vof 0 1"
/solve/execute-commands/add-edit command-3 20 "time-step" "/display/save-picture airvof%t.png"
/solve/execute-commands/add-edit command-4 20 "time-step" "/display/contour mixture velocity-magnitude 0 0.5"
/solve/execute-commands/add-edit command-5 20 "time-step" "/display/save-picture velmag%t.png"
;
;set up auto-save
/file/auto-save data-frequency 500
/file/auto-save append-file-name-with time-step 6
;
;iterate over 5000 time steps
solve/set/time-step 0.001
solve/dual-time-iterate 5000 50
file/write-data single-48cm-2D-batchtest.dat



This was pretty helpful.



It helped me to advance my code:



;Developing a set of CFD simulations to investigate pressure on the sheet metal
; surface
file read-case Transient_Fender_No_holes.cas
;-------------------------------------------------------------
;-------------------------------------------------------------
;---Defining the length units in mm, the wall length is 50mm --
;-------------------------------------------------------------
;-------------------------------------------------------------
/define/units
; it asks for quantity?
length
; it asks for units name?
mm
;-------------------------------------------------------------
;-------------------------------------------------------------
;---Defining the Pressure units in atm,the inlet is 1atm------
;-------------------------------------------------------------
;-------------------------------------------------------------
/define/units
; it asks for quantity?
pressure
; it asks for units name?
atm

;---------------TO INITIALIZE---------------------------
/solve/initialize/set-defaults pressure 0.1
/solve/initialize/set-defaults x-velocity 0.01
/solve/initialize/set-defaults y-velocity 0.01
/solve/initialize/set-defaults z-velocity 0.01
/solve/initialize/set-defaults k 0.1
/solve/initialize/set-defaults epsilon 0.01
;units for turbulent dissipation rate is m2/s3

/solve/initialize/initialize-flow
;set up image output
/display/set/contours/filled-contours yes
/display/set/picture/driver png
/display/set/picture/landscape yes
/display/set/picture/x-resolution 960
/display/set/picture/y-resolution 720
/display/set/picture/color-mode color
/views/restore-view front
;
;print front view of phases and velocity magnitude at t=0
/display/contour s-2-part pressure -1.8e-09 0.10
/display/save-picture airpof%t.png
/display/contour s-2-part velocity-magnitude 0 1
/display/save-picture velmag%t.png
;
;set up display commands to print front view of phases and velocity magnitude every 20 time steps
/solve/execute-commands/add-edit command-2 1 "time-step" "/display/contour s-2-part pressure 0 1"
/solve/execute-commands/add-edit command-3 1 "time-step" "/display/save-picture airpof%t.png"
/solve/execute-commands/add-edit command-4 1 "time-step" "/display/contour s-2-part velocity-magnitude 0 1"
/solve/execute-commands/add-edit command-5 1 "time-step" "/display/save-picture velmag%t.png"
;
;set up auto-save
/file/auto-save data-frequency 1
/file/auto-save append-file-name-with time-step 6
;---------------------TRANSIENT SOLUTION--------------------
;
;iterate over 5000 time steps
solve/set/time-step 0.05
solve/dual-time-iterate 100 1
;--write the new case and data for this setup----------------
wc --transientP1.cas.gz
wd --transientP1.dat.gz

;--------------CALCULATIONS ACTIVITIES-----------------
;------------------------------------------------------
;-----------AUTOMATIC EXPORT TO PARAVIEW----------
; FOR GETTING THE ENSIGHT
;
; DATA INSTEAD
; OF THE .DAT DATA WHICH IS THE STANDARD
; OUTPUT THAT FLUENT GIVES
;
;------------------------------------------------------
/file/export
ensight-gold
;EnSight-Gold output file name
transientencas_gold
;EnSight-Gold scalar(1)>
pressure
; EnSight-Gold scalar(2)>
velocity-magnitude
; EnSight-Gold scalar(3)
()
; write in binary format?
y
; cell zone id/name(1)
*
; cell zone id/name(2)
()
; Interior Zone Surfaces(1)
()
; Cell-Centered
n
; Writing "d.geo"...
; Writing "d.vel"...
; "d.scl1"...
; Static Pressure
; Writing "d.scl2"...
; Velocity Magnitude
; "d.encas"...



;-------------------------END-------------------------------
MKuhn likes this.
mjthomp3 is offline   Reply With Quote

Old   June 26, 2014, 16:58
Default
  #20
New Member
 
AZ
Join Date: Jan 2014
Posts: 17
Rep Power: 12
mjthomp3 is on a distinguished road
Quote:
Originally Posted by diamondx View Post
Please consider how i use the cluster to take a screenshot, it may help you set the image:

/display/set/contours/surfaces 0 ()
/display/set/picture/color-mode color
/display/set/picture/driver jpeg
/display/set/contours/n-contour 99
/display/set/contours/filled-contours yes
/display/contour mach-number
/display/views/restore-view left
/display/views/auto-scale
/display/views/camera/zoom-camera 2
/display/save-picture /home/maghazlani/Analysis/screenshot.jpeg

cheers,
Ali


Thanks a lot!! I was getting an error and this helped me to exapnad my
journal file as I will share mines:




;Developing a set of CFD simulations to investigate pressure on the sheet metal
; surface
file read-case Transient_Fender_No_holes.cas
;-------------------------------------------------------------
;-------------------------------------------------------------
;---Defining the length units in mm, the wall length is 50mm --
;-------------------------------------------------------------
;-------------------------------------------------------------
/define/units
; it asks for quantity?
length
; it asks for units name?
mm
;-------------------------------------------------------------
;-------------------------------------------------------------
;---Defining the Pressure units in atm,the inlet is 1atm------
;-------------------------------------------------------------
;-------------------------------------------------------------
/define/units
; it asks for quantity?
pressure
; it asks for units name?
atm

;---------------TO INITIALIZE---------------------------
/solve/initialize/set-defaults pressure 0.1
/solve/initialize/set-defaults x-velocity 0.01
/solve/initialize/set-defaults y-velocity 0.01
/solve/initialize/set-defaults z-velocity 0.01
/solve/initialize/set-defaults k 0.1
/solve/initialize/set-defaults epsilon 0.01
;units for turbulent dissipation rate is m2/s3

/solve/initialize/initialize-flow
;set up image output
/display/set/contours/filled-contours yes
/display/set/picture/driver png
/display/set/picture/landscape yes
/display/set/picture/x-resolution 960
/display/set/picture/y-resolution 720
/display/set/picture/color-mode color
/views/restore-view front

;take a screenshot, it may help you set the image:
/display/set/contours/surfaces s-2-part ()
/display/set/picture/color-mode color
/display/set/picture/driver jpeg
/display/set/contours/n-contour 99
/display/set/contours/filled-contours yes
/display/contour pressure 0 1
/display/views/restore-view left
/display/views/auto-scale
/display/views/camera/zoom-camera 2
/display/save-picture screenshot.jpeg
;print front view of phases and velocity magnitude at t=0
/display/contour front pressure -1.8e-09 0.10
/display/save-picture airpof%t.png
/display/contour front velocity-magnitude 0 1
/display/save-picture velmag%t.png
;
;set up display commands to print front view of phases and velocity magnitude every 20 time steps
/solve/execute-commands/add-edit command-1 1 "time-step" "/display/set-window 5"
/solve/execute-commands/add-edit command-2 1 "time-step" "/display/views restore-view auto-scale"
/solve/execute-commands/add-edit command-3 1 "time-step" "/display/contour front pressure 0 1"
/solve/execute-commands/add-edit command-4 1 "time-step" "/display/save-picture airpof%t.png"
/solve/execute-commands/add-edit command-5 1 "time-step" "/display/contour front velocity-magnitude 0 1"
/solve/execute-commands/add-edit command-6 1 "time-step" "/display/save-picture velmag%t.png"
;
;set up auto-save
/file/auto-save data-frequency 1
/file/auto-save append-file-name-with time-step 6
;---------------------TRANSIENT SOLUTION--------------------
;
;iterate over 5000 time steps
solve/set/time-step 0.05
solve/dual-time-iterate 100 1
;--write the new case and data for this setup----------------
wc --transientP1.cas.gz
wd --transientP1.dat.gz

;--------------CALCULATIONS ACTIVITIES-----------------
;------------------------------------------------------
;-----------AUTOMATIC EXPORT TO PARAVIEW----------
; FOR GETTING THE ENSIGHT
;
; DATA INSTEAD
; OF THE .DAT DATA WHICH IS THE STANDARD
; OUTPUT THAT FLUENT GIVES
;
;------------------------------------------------------
/file/export
ensight-gold
;EnSight-Gold output file name
transientencas_gold
;EnSight-Gold scalar(1)>
pressure
; EnSight-Gold scalar(2)>
velocity-magnitude
; EnSight-Gold scalar(3)
()
; write in binary format?
y
; cell zone id/name(1)
*
; cell zone id/name(2)
()
; Interior Zone Surfaces(1)
()
; Cell-Centered
n
; Writing "d.geo"...
; Writing "d.vel"...
; "d.scl1"...
; Static Pressure
; Writing "d.scl2"...
; Velocity Magnitude
; "d.encas"...



;-------------------------END-------------------------------
mjthomp3 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
how to make hardcopy only while creating an animation yubaibai88 FLUENT 0 May 31, 2010 11:35
Creating Animation Umm... FLUENT 0 January 16, 2008 04:23
!Error creating animation sequence file Brian FLUENT 1 October 21, 2005 05:35
Creating an animation Jason FLUENT 3 May 18, 2005 06:13
error in creating animation hadi FLUENT 6 January 19, 2004 19:13


All times are GMT -4. The time now is 12:42.