CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   journal file with variable in a while loop? (https://www.cfd-online.com/Forums/fluent/40648-journal-file-variable-while-loop.html)

hollande March 8, 2010 18:14

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 )

Nariz March 10, 2010 15:16

Hello mAx,

I am also very interested with your postprocessing code.

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

Thanks,

Nariz

Nariz March 10, 2010 15:18

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

jsm March 12, 2010 02:01

Hi Volker Pawlik,

Quote:

Originally Posted by Volker P. (Post 235851)
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.:D:)

crazyrin March 30, 2010 11:13

Quote:

Originally Posted by Volker P. (Post 235851)
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?

Joven March 31, 2010 09:18

about the journal
 
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

Volker P. April 9, 2010 06:43

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

gandesk October 17, 2010 19:48

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!!

sbaffini October 18, 2010 04:42

1 Attachment(s)
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.

aamer April 25, 2011 15:15

Hi Max....

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

xiaoyefeiyang February 20, 2012 02:23

file
 
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

Musa February 20, 2012 02:40

Hi MaX my email is musango.lungu@gmail.com. I would like a copy of the file too!

Guava Wang April 20, 2012 02:35

Hi mAx, would you please email your jou file for me?
wliu611@163.com

thanks!
Guava

syavash July 9, 2012 10:40

dear Max,

I will appreciate it if you send me the code,

syavash_azna@yahoo.com

lcg44 November 19, 2012 16:20

Quote:

Originally Posted by -mAx- (Post 235823)
I send it to you right now

Hi,Max. Can you send me that file please? lcg444@gmail.com

hityangsir December 21, 2012 03:12

Dear MaX,
I like the file you mentioned,would u send to yunch.young@gmail.com?
Thank you

uri April 10, 2013 05:35

Max

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

Thanks for your time.

Oriol

lorenz September 12, 2013 04:35

could you send me the code as well: lorenz@td.mw.tum.de
thank you a lot

chandrasekhar February 27, 2014 01:06

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 (Post 451285)
could you send me the code as well: lorenz@td.mw.tum.de
thank you a lot


eneja June 26, 2014 04:24

Max is it still possible to get the code? It yes, could you send it to me: eneja.osterman@fs.uni-lj.si

Thanks


All times are GMT -4. The time now is 04:53.