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

Tcl code for view position

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2015, 15:12
Default Tcl code for view position
  #1
Senior Member
 
Join Date: Mar 2010
Posts: 173
Rep Power: 17
Jonathan is on a distinguished road
Dear all,

I am not a frequent CFX/CFD-Post user, but need to do some post-processing with CFD-Post at this stage.

I was wondering whether someone could explain how to / whether it is possible to set up 'camera views' via Tcl in order to allow me to produce a series of identical results plots for a series of simulations with slightly perturbed geometries

i.e. i need to be able to set up exactly the same view to output results to compare slight changes in my geometry.

This can be done in Fluent using the TUI using save/restore-view, but i had a go in CFD-Post without much luck.

I do not need something complex, just to be able to cycle through my case files and produce the same plots for each of them.

many thanks and best wishes in advance
regards
jonathan

ps i hope this is the correct forum for CFD-post, otherwise hoperfully one of the mods will move this post
Jonathan is offline   Reply With Quote

Old   March 28, 2015, 04:00
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, you have the correct forum and there is no need for this post to be approved.

Camera views can be set up many ways:
* The easiest is by state files. This saves the state of CFD-Post, and then you can load a different results file and apply this state to it.
* An alternative is using a session file. This is similar to Fluent's TUI, sort of. Record a session file to do the post processing you want to do and open it in a text file editor and change the results file or add looping or whatever
* CFD-Post can also be driven by CCL but you would have to be keen to use this approach.
ghorrocks is offline   Reply With Quote

Old   March 29, 2015, 06:55
Default thanks
  #3
Senior Member
 
Join Date: Mar 2010
Posts: 173
Rep Power: 17
Jonathan is on a distinguished road
Dear Glenn,

Thanks very much for the reply

Quote:
Camera views can be set up many ways:
Thanks very much for this info:

Quote:
* The easiest is by state files. This saves the state of CFD-Post, and then you can load a different results file and apply this state to it.
Ok, i see. I have a state file already - i know i can set up various graphics (contour plots, streamlines etc), but didnt realise you could set up specific 'views'. I have in the past, gotten the view i wanted onscreen, and then loaded each results file, exported to hardcopy, and repeated, but this means the view cannot be 'touched' between exports, and so this is an issue. I would also like to export several different views from the same results file and then move onto the next one.

A further issue is that, if i need to come back and repeat the export with fine tuned results, i cannot recreate the view exactly as it was previously.

Quote:
* An alternative is using a session file. This is similar to Fluent's TUI, sort of. Record a session file to do the post processing you want to do and open it in a text file editor and change the results file or add looping or whatever
Ok, i didnt know this - so effectively this would be like a journal file - sounds very promising if you could set up views in the state file, and then use this to automate the postprocessing process - thanks very much.

So: is it possible to set up the camera views in the state file or using Tcl in the command editor. I didnt see this in the UG so far ...

Quote:
* CFD-Post can also be driven by CCL but you would have to be keen to use this approach.
Not really at this point, i am still getting through c++

PS good luck for the CWC2015 final - if you are watching

EDIT:
OK, i realise i am probably mixing up Tcl and CCL - i guess what i am actually after is a set of CCL expressions to set up camera views ...
Jonathan is offline   Reply With Quote

Old   March 29, 2015, 07:10
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If your post processing has various graphics and various views then consider a report. Then you can set them all up and easily change the results file to reproduce them all.

The easiest way to find out what a session file can do is to record a session file and do some stuff like move the view around, add a graphics item, change to a new result time step and see what the session file generated looks like.

No, I am not watching the cricket but as long as we beat the kiwis I will be happy anyway
ghorrocks is offline   Reply With Quote

Old   March 29, 2015, 07:16
Default
  #5
Senior Member
 
Join Date: Mar 2010
Posts: 173
Rep Power: 17
Jonathan is on a distinguished road
Thanks Glenn,

Ok - so its for my PhD thesis ...

So you would recommend the easiest method is to set up a report and then extract the images from there, rather than looking into CCL and session files?

As you know (i read your thesis a year or two ago), while i am not looking for a free pass in the post processing, given the other efforts for the project, i am looking for the most effective / time-economic approach to get out the sets of images i need.

I am happy to learn CCL, but not really if its overkill ...

what would you recommend?

1) predefined views using CCL / session files
OR
2) setting up a report

Many thanks in advance
cheers
jon

PS - you guys just did win - dont you get tired of just winning everything?
Jonathan is offline   Reply With Quote

Old   March 29, 2015, 07:27
Default
  #6
Senior Member
 
Join Date: Mar 2010
Posts: 173
Rep Power: 17
Jonathan is on a distinguished road
Ok,

so - session files look to be the bomb and can be edited nice and easily - this (hopefully i am not being prematurely optimistic) is exactly what i need.

thanks very much, now hopefully they can be run from the command line so i can write a batch file, and 'set and forget'.

thanks a lot for your help,
take care
cheers
jonathan
Jonathan is offline   Reply With Quote

Old   March 29, 2015, 07:40
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, you can run session files from the command line. So this gives you a method of generating a number of output results from a single command line.

Aussies never get tired of annoying kiwis.
ghorrocks is offline   Reply With Quote

Old   March 29, 2015, 07:47
Default
  #8
Senior Member
 
Join Date: Mar 2010
Posts: 173
Rep Power: 17
Jonathan is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Aussies never get tired of annoying kiwis.
haha, yes, i know i went to school (uni) in Auckland.

take care,
cheers
jon
Jonathan is offline   Reply With Quote

Reply

Tags
camera view, cfd-post, contour plots, tcl


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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 12:30
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 04:47
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 11:02
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 10:11
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59


All times are GMT -4. The time now is 23:41.