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

Journal for fluent: Scheme programming

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 2 Post By vaibhavsingal
  • 1 Post By vaibhavsingal
  • 2 Post By syavash
  • 1 Post By FluidWarrior

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2010, 01:32
Default Journal for fluent: Scheme programming
  #1
New Member
 
Annon
Join Date: Apr 2010
Posts: 18
Rep Power: 16
beguxa is on a distinguished road
I am writing a journal file to take images at a large no of iso-surface planes. The planes are named as "X_0.5", "X_0.6", and so on. I want to automate the process by writing a journal file i.e. write a loop (do or for) and in each loop I want to specify the name of the iso-surface at which image has to be taken. But the main problem is I do not know how to pass on the name of the iso-surface as a string to the fluent text-command. Any ideas how to do that in a loop in scheme program?
Algo would be like:

do (start at i=0, increment by 0.1, till 1)
S= "concatenation of ("x_0." and "i") ;;; How to do it in fluent
/display/set/contours/surfaces
"S" ;;; How to do it in fluent
/display/hard-copy
"S".jpg ;;; How to do it in fluent
end
Thanks in advance.
beguxa is offline   Reply With Quote

Old   November 3, 2010, 15:38
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Fluent implements a scripting language called scheme. There are some examples on the wiki (my favorite: http://www.cfd-online.com/Wiki/Fluen...environment.3F).
Please complete the examples with your own findings.
dmoroian is offline   Reply With Quote

Old   November 3, 2010, 15:39
Default Fluent Scheme
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Fluent implements a scripting language called scheme. There are some examples on the wiki (my favorite: http://www.cfd-online.com/Wiki/Fluen...environment.3F).
Please complete the examples with your own findings.
dmoroian is offline   Reply With Quote

Old   July 18, 2014, 02:01
Default Fluent scheme for automated iso surface creation & saving images of velocity contours
  #4
New Member
 
Vaibhav Singal
Join Date: Jul 2014
Posts: 2
Rep Power: 0
vaibhavsingal is on a distinguished road
(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
)

The above scheme will create iso-surfaces from z=0 to z=1 at an interval of 0.1. and the name of the planes will be z-plane-0.1, z plane-0.2,....and so on. you can modify the start, end and interval of the iso surfaces in the first line of the scheme.
Also, you can change the name of the plane in the 3rd line. And if you want the iso surface of x or y plane instead of z, you can do so by changing z-coordinate to x-coordinate or y-coordinate respectively. Remember x used in the above scheme is just a variable and not x plane.
lisa_china and jllamas like this.
vaibhavsingal is offline   Reply With Quote

Old   July 18, 2014, 02:08
Default Fluent scheme for automated iso surface creation & saving images of velocity contours
  #5
New Member
 
Vaibhav Singal
Join Date: Jul 2014
Posts: 2
Rep Power: 0
vaibhavsingal is on a distinguished road
And if you further want to save the contours images, here is the scheme for that..

(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
)

(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "display/set/contours surface z-plane-~a ()" x))

(Ti-menu-load-string (format #f "display/contour/velocity-magnitude 0 60"))

(Ti-menu-load-string (format #f "display/save-picture/cont-plane-%4n.jpg"))
)


This is an example of saving velocity contours at z plane 0, 0.1, 0.2,.....0.9 & 1 where min and max maginutde of velocity is 0 and 60 m/s.

jllamas likes this.
vaibhavsingal is offline   Reply With Quote

Old   August 26, 2014, 20:41
Default
  #6
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by vaibhavsingal View Post
And if you further want to save the contours images, here is the scheme for that..

(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
)

(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "display/set/contours surface z-plane-~a ()" x))

(Ti-menu-load-string (format #f "display/contour/velocity-magnitude 0 60"))

(Ti-menu-load-string (format #f "display/save-picture/cont-plane-%4n.jpg"))
)


This is an example of saving velocity contours at z plane 0, 0.1, 0.2,.....0.9 & 1 where min and max maginutde of velocity is 0 and 60 m/s.

Dear vaibhav

Would you give us further elaboration on the format in this statement:
"surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
I need to understand what ~a, (), (), and ~a stand for? Why you have specified two of "~a" and "x"??
Thank you.
syavash is offline   Reply With Quote

Old   August 26, 2014, 21:16
Default
  #7
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by syavash View Post
Dear vaibhav

Would you give us further elaboration on the format in this statement:
"surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
I need to understand what ~a, (), (), and ~a stand for? Why you have specified two of "~a" and "x"??
Thank you.
I examined it manually in Fluent!

"~a" stands for random variable, like % in C language.
"()" means that we simply press "enter" and do not specify any names.
"x" at the end of line is the same loop variable and two of "x" correspond to two of "~a".
crevoise and vaibhavsingal like this.
syavash is offline   Reply With Quote

Old   March 13, 2017, 14:48
Default scheme for iso surface/line creation
  #8
Member
 
NGP
Join Date: Mar 2016
Posts: 33
Rep Power: 10
ngonbadipoor@yahoo.com is on a distinguished road
Quote:
Originally Posted by vaibhavsingal View Post
(Do ((x 0 (+ x 0.1))) ((> x 1))
(Ti-menu-load-string (format #f "surface/iso-surface z-coordinate z-plane-~a () () ~a" x x))
)

The above scheme will create iso-surfaces from z=0 to z=1 at an interval of 0.1. and the name of the planes will be z-plane-0.1, z plane-0.2,....and so on. you can modify the start, end and interval of the iso surfaces in the first line of the scheme.
Also, you can change the name of the plane in the 3rd line. And if you want the iso surface of x or y plane instead of z, you can do so by changing z-coordinate to x-coordinate or y-coordinate respectively. Remember x used in the above scheme is just a variable and not x plane.
Hi
I want create lines which are intersection of some iso-surfaces(eg. what you created before) and wall boundary condition. is that possible with scheme you mentioned?
is there any scheme?
thanks
ngonbadipoor@yahoo.com is offline   Reply With Quote

Old   April 26, 2017, 03:38
Default Hi
  #9
New Member
 
Ramnath
Join Date: Nov 2016
Posts: 10
Rep Power: 10
aeroramji@gmail.com is on a distinguished road
I have read all your discussions. I think this is the correct platform where I can clarify my doubts.

I have created 150 iso-surfaces in fluent file using GUI command along x-coordinate.

I am supposed to use those 150 iso-surfaces in another fluent file without creating them once again where i have changed the Reynolds number.

Is there any way to do so using programming?

Please help me in this regard.
aeroramji@gmail.com is offline   Reply With Quote

Old   October 24, 2017, 02:13
Default Scripted CFD Simulations
  #10
New Member
 
Join Date: Jan 2017
Location: Austria
Posts: 20
Rep Power: 9
FluidWarrior is on a distinguished road
Hi,
the most powerful proceed is to use your own scripts, as you can see here, which includes also a Bibliography of useful sites:
https://www.researchgate.net/publica...t_and_ParaVIEW

Have a nice day!
ishan_ae likes this.
FluidWarrior 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
journal files and SCHEME Hugo FLUENT 2 October 26, 2017 10:25
Journal file for for NITA scheme using LES anindya FLUENT 5 August 6, 2006 12:54
Integrating Scheme with a FLUENT journal file Pete Willemsen FLUENT 0 May 19, 2006 18:00
help needed about phase change Yanhu Guo Main CFD Forum 4 January 24, 2001 00:16
Experimental Repository for UDFs, Journal Files and Scheme Scripts Jonas Larsson FLUENT 0 March 5, 2000 16:36


All times are GMT -4. The time now is 03:47.