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

journal file with variable in a while loop?

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2010, 19:14
Default
  #21
New Member
 
Hollande
Join Date: Dec 2009
Posts: 1
Rep Power: 0
hollande is on a distinguished road
Quote:
Originally Posted by mAx
;131434
hi guys, I have such a file. It is pretty good for large unsteady calculations. If you want this file, please write me a mail, I will mail it you back. Regards mAx
Hi, mAx: Is it still possible to have that file? Thanks in advance.
Best regards, Hollande (email: saabqcon@yahoo.ca )
hollande is offline   Reply With Quote

Old   March 10, 2010, 16:16
Default
  #22
New Member
 
Nariz Kerim
Join Date: Mar 2010
Posts: 2
Rep Power: 0
Nariz is on a distinguished road
Hello mAx,

I am also very interested with your postprocessing code.

Could you email it to me
to nafizkerim@yahoo.com?

Thanks,

Nariz
Nariz is offline   Reply With Quote

Old   March 10, 2010, 16:18
Default
  #23
New Member
 
Nariz Kerim
Join Date: Mar 2010
Posts: 2
Rep Power: 0
Nariz is on a distinguished road
I will also appreciate if any of the previous recipients of the code can forward me the email mAx send? (I need to do some urgent postpro).

Thank you, Nariz
Nariz is offline   Reply With Quote

Old   March 12, 2010, 03:01
Default
  #24
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 192
Rep Power: 20
jsm is on a distinguished road
Hi Volker Pawlik,

Quote:
Originally Posted by Volker P. View Post
Hi,

the task is to do some postprocessing with a number of files whose names might not contain sequences of numbers, hence a "for to"- loop with an intenger as a counter is not possible.
One easy way ist to use a scheme "for each" loop. Scheme is a programming language. Fluent 's GUI is written in scheme. Here comes a simple example for reading a list of case+dat files, displaying a contour-plot of temperature on the zones wall, inlet, and outlet, finally generating a hard-copy with the case-filename included in the imagefile-name.

Example:
--------------------------------------------------------------
; Start of the loop (this is a comment!)
(for-each
(lambda (filename)
(ti-menu-load-string (format #f "file read-case-data ~a.cas yes" filename))
(ti-menu-load-string (format #f " /display/set/contours/surfaces (wall inlet outlet)
/display/contour temperature 25 2000
/display/hc ~a-temp.ps " filename ))
)
; list of the filenames here: without extension but one is not obliged to do so
'(
filename_A
filename02
file_XYA
hidden_tank
lost_water
)
; closing the loop:
)

--------------------------------------------------------------

The "~a" is a variable which is replaced by the content of the loop variable "filename". "filename" takes the values from the list at the bottom of the example above: filename_A, filename02, file_XYA as input. You are free to use any fiilname you like without the need to number them in a correct way.

The scheme file can be red into fluent via /file/read/scheme (GUI) or /file/read-macro (TUI).

In contrast to a script-loop the scheme-loop is carried out here inside one Fluent session.

For more details for the use of scheme together with fluent have a look to http://fluid.jku.at/personen/javurek/pdf/scheme.pdf (in German!!).
Thanks for your scheme file example and PDF file. This is much useful and reduces the postprocessing time for unsteady cases.
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Old   March 30, 2010, 12:13
Default
  #25
New Member
 
sam jia
Join Date: Jun 2009
Posts: 1
Rep Power: 0
crazyrin is on a distinguished road
Quote:
Originally Posted by Volker P. View Post
Hi,

the task is to do some postprocessing with a number of files whose names might not contain sequences of numbers, hence a "for to"- loop with an intenger as a counter is not possible.
One easy way ist to use a scheme "for each" loop. Scheme is a programming language. Fluent 's GUI is written in scheme. Here comes a simple example for reading a list of case+dat files, displaying a contour-plot of temperature on the zones wall, inlet, and outlet, finally generating a hard-copy with the case-filename included in the imagefile-name.

Example:
--------------------------------------------------------------
; Start of the loop (this is a comment!)
(for-each
(lambda (filename)
(ti-menu-load-string (format #f "file read-case-data ~a.cas yes" filename))
(ti-menu-load-string (format #f " /display/set/contours/surfaces (wall inlet outlet)
/display/contour temperature 25 2000
/display/hc ~a-temp.ps " filename ))
)
; list of the filenames here: without extension but one is not obliged to do so
'(
filename_A
filename02
file_XYA
hidden_tank
lost_water
)
; closing the loop:
)

--------------------------------------------------------------

The "~a" is a variable which is replaced by the content of the loop variable "filename". "filename" takes the values from the list at the bottom of the example above: filename_A, filename02, file_XYA as input. You are free to use any fiilname you like without the need to number them in a correct way.

The scheme file can be red into fluent via /file/read/scheme (GUI) or /file/read-macro (TUI).

In contrast to a script-loop the scheme-loop is carried out here inside one Fluent session.

For more details for the use of scheme together with fluent have a look to http://fluid.jku.at/personen/javurek/pdf/scheme.pdf (in German!!).

I just try this scheme, but i got a problem which is the filename can not be capital one or contain a capital letter. What wrong with this?
crazyrin is offline   Reply With Quote

Old   March 31, 2010, 10:18
Default about the journal
  #26
New Member
 
Chérif
Join Date: Mar 2010
Posts: 3
Rep Power: 16
Joven is on a distinguished road
Hi,
I don't khow if you have to change few constants in your simulation, but I would like to ask you if you have to modify the turbulente constants models using the journal.
My probleme that I use also a journal to make all the simulation ready and to start them, but I don't khow how to do for changing the turbulence model constants. We can do that directly in the interface when using in windows, but doing that in script i don't know. If you have sommes ideas, it will be gerat for me.
Thanks you,
Joven
Joven is offline   Reply With Quote

Old   April 9, 2010, 07:43
Default
  #27
New Member
 
Volker Pawlik
Join Date: Mar 2009
Location: Germany
Posts: 25
Rep Power: 17
Volker P. is on a distinguished road
Yes, unforntunately you cannot use capital letters or in a more correct way they are interpreted as lowercase which are then are not found by the OS.

A workaround on linux sytems is to link the files with capitals in to the same without by e.g. a symbolic link like:
ln -s Existing.dat existing.dat

(no additional disk space is used. It works like a pointer!)

Hint: does not work on ntfs filesystems mounted via samba to linux.
Volker
Volker P. is offline   Reply With Quote

Old   October 17, 2010, 20:48
Default
  #28
Member
 
Sandeep
Join Date: Jul 2010
Posts: 48
Rep Power: 16
gandesk is on a distinguished road
Quote:
Originally Posted by mAx
;131434
hi guys, I have such a file. It is pretty good for large unsteady calculations. If you want this file, please write me a mail, I will mail it you back. Regards mAx

Hi max can u send me the code for me........please send it to coolsandeepg@gmail.com

thanks a ton!!
gandesk is offline   Reply With Quote

Old   October 18, 2010, 05:42
Default
  #29
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Hi,

i also wrote such a kind of matlab routine. It may be a little cumbersome at first, but i added several comments and this should help.
Attached Files
File Type: txt scriptflu.txt (4.5 KB, 149 views)
sbaffini is offline   Reply With Quote

Old   April 25, 2011, 16:15
Default
  #30
Member
 
Aamer Shahzad
Join Date: Mar 2010
Posts: 58
Rep Power: 16
aamer is on a distinguished road
Hi Max....

will you be kind enough to send me the file too... i will be thankful. my email is aamer58@gmail.com.
aamer is offline   Reply With Quote

Old   February 20, 2012, 03:23
Default file
  #31
New Member
 
wanghaiyan
Join Date: Feb 2012
Posts: 1
Rep Power: 0
xiaoyefeiyang is on a distinguished road
Quote:
Originally Posted by mAx
;131434
hi guys, I have such a file. It is pretty good for large unsteady calculations. If you want this file, please write me a mail, I will mail it you back. Regards mAx
Hi, mAx,

Would you please share me the file? My mail is "longyanxia2@163.com". I need it and your help. Thanks a lot.

Best Wishes,
Alice
xiaoyefeiyang is offline   Reply With Quote

Old   February 20, 2012, 03:40
Default
  #32
Member
 
Musango Lungu
Join Date: Dec 2011
Location: China
Posts: 73
Rep Power: 14
Musa is on a distinguished road
Hi MaX my email is musango.lungu@gmail.com. I would like a copy of the file too!
Musa is offline   Reply With Quote

Old   April 20, 2012, 03:35
Default
  #33
New Member
 
Join Date: Apr 2012
Posts: 20
Blog Entries: 3
Rep Power: 14
Guava Wang is on a distinguished road
Hi mAx, would you please email your jou file for me?
wliu611@163.com

thanks!
Guava
Guava Wang is offline   Reply With Quote

Old   July 9, 2012, 11:40
Default
  #34
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
dear Max,

I will appreciate it if you send me the code,

syavash_azna@yahoo.com
syavash is offline   Reply With Quote

Old   November 19, 2012, 17:20
Default
  #35
New Member
 
Chenguang Li
Join Date: Sep 2011
Posts: 15
Rep Power: 15
lcg44 is on a distinguished road
Quote:
Originally Posted by -mAx- View Post
I send it to you right now
Hi,Max. Can you send me that file please? lcg444@gmail.com
lcg44 is offline   Reply With Quote

Old   December 21, 2012, 04:12
Default
  #36
New Member
 
hityangsir's Avatar
 
Y. Yang
Join Date: Mar 2010
Location: Miami, United States
Posts: 28
Rep Power: 16
hityangsir is on a distinguished road
Dear MaX,
I like the file you mentioned,would u send to yunch.young@gmail.com?
Thank you
hityangsir is offline   Reply With Quote

Old   April 10, 2013, 06:35
Default
  #37
uri
New Member
 
Oriol
Join Date: Apr 2013
Posts: 1
Rep Power: 0
uri is on a distinguished road
Max

I would be very interested in seeing your file. Please send to uri_bcn_@hotmail.com.

Thanks for your time.

Oriol
uri is offline   Reply With Quote

Old   September 12, 2013, 05:35
Default
  #38
New Member
 
Manuel Lorenz
Join Date: Jul 2011
Posts: 5
Rep Power: 15
lorenz is on a distinguished road
could you send me the code as well: lorenz@td.mw.tum.de
thank you a lot
lorenz is offline   Reply With Quote

Old   February 27, 2014, 02:06
Default
  #39
New Member
 
Chandrasekhar
Join Date: Oct 2013
Location: new jersey
Posts: 24
Rep Power: 13
chandrasekhar is on a distinguished road
hi
if u have the code could you please email it to me. My email id is schandrasekhar_05@yahoo.com. Many thanks for replying.

with regards

Quote:
Originally Posted by lorenz View Post
could you send me the code as well: lorenz@td.mw.tum.de
thank you a lot
chandrasekhar is offline   Reply With Quote

Old   June 26, 2014, 05:24
Default
  #40
New Member
 
Select One...
Join Date: Apr 2012
Posts: 21
Rep Power: 14
eneja is on a distinguished road
Max is it still possible to get the code? It yes, could you send it to me: eneja.osterman@fs.uni-lj.si

Thanks
eneja 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
do loop in Fluent journal file. caterchen FLUENT 12 November 14, 2016 23:57
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 18:33


All times are GMT -4. The time now is 15:01.