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

Help using FLUENT in batch mode: script in the Journal file

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2012, 09:27
Default Help using FLUENT in batch mode: script in the Journal file
  #1
New Member
 
Daniele Obiso
Join Date: Apr 2012
Location: Germany
Posts: 10
Rep Power: 14
danobis is on a distinguished road
Good morning,
i'm starting to use Fluent 12 in batch mode, and i have some problems.
I use an interactive window to submit the batch command, so i think that is right working; anyway i post it here:

bsub -n (number of cores) -q (queue name) -R (resource name) -R rusage[aa_r=1:aa_r_hpc=1:duration=1] -e ./errorfile_%J -o ./outputfile_%J fluent12.sh -ar 3ddp -g -i script_input_jou.txt

I think the problem could be with the journal file; i wrote this command lines:

file read-case-data name_of_case.cas
solve iterate 1500
exit

Is this script right? Another doubt i have is about the journal file extension: .jou or .txt?

Thank you very much!
danobis is offline   Reply With Quote

Old   April 14, 2012, 10:36
Default
  #2
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
danobis, here is a working example of a journal files (.jou), when you see a ";", it means i'm asking fluent to skip that command:

/file/read-case-data /home/maghazlani/Analysis/intake_test_3-1-23000.cas
;/define/operating-conditions/operating-pressure 0
;/define/models/solver/density-based yes
;/define/models/energy yes
;/define/models/viscous/kw yes
;/define/boundary-conditions/modify-zones/zone-type 11 pressure-inlet
;/define/materials/change-create air air yes ideal-gas no no no no no no
;/define/boundary-conditions/pressure-inlet inlet yes no 101325 no 27357 no 300 no yes no no no yes 01 0.05268
;/define/boundary-conditions/modify-zones/zone-type 10 pressure-outlet
;/define/operating-conditions/operating-pressure 0
;/adapt/adapt-to-gradients pressure curvature 0 0.7 0.3 yes 100
;/adapt/set/max-number-cells 2000
;/solve/initialize/compute-defaults/pressure-inlet 11
;/solve/initialize/repair-wall-distance yes
;/solve/initialize/initialize-flow
;/adapt/mark-inout-hex yes no 0.000515079 0.205496 0.0156082 0.0451296 -0.000208354 -0.0265887
;/file/auto-save/data-frequency 20000
;/mesh/polyhedra/convert-domain yes yes
;/solve/set/under-relaxation/k 0.5
;/solve/set/under-relaxation/epsilon 0.5
;/solve/set/under-relaxation/turb-viscosity 0.7
;/solve/set/under-relaxation/solid 0.7
;/solve/set/limits 1 5e10 1 5000 1e-14 1e-20 100000 0.05
/solve/iterate 24000
;/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
;/solve/monitors/surface/set-monitor mass-flow "Mass Flow Rate" 0 () no no yes massf 1000
;/display/views/restore-view left
;/display/views/auto-scale
;/display/views/camera/zoom-camera 2
;/display/save-picture /home/maghazlani/Analysis/screenshot-mach-extended_5-4000.jpeg
/file/write-case-data /home/maghazlani/Analysis/intake_test_3-1-47000.cas
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   April 14, 2012, 10:50
Default
  #3
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
If this doesn't work, problem is from that script that you're using to submit the job. come back to me later to let me know if it works or not
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   April 15, 2012, 04:03
Default
  #4
New Member
 
Daniele Obiso
Join Date: Apr 2012
Location: Germany
Posts: 10
Rep Power: 14
danobis is on a distinguished road
Thanks very much, Ali.
I tried that script you send me, but it doesn't work.
The script i used is:

/file/read-case-data /afs/private/k120mixDDA_SG0lambda21.cas
/solve/iterate 1500
/file/write-case-data /afs/private/k120mixDDA_SG0lambda21.cas
exit

and it gives this errorfile:

nk = 8: Process affinity not being set. Machine is already loaded.
Note: Rank = 6: Process affinity not being set. Machine is already loaded.
Note: Rank = 0: Process affinity not being set. Machine is already loaded.
Note: Rank = 5: Process affinity not being set. Machine is already loaded.

Error: eval: unbound variable
Error Object: 1500

Error: eval: unbound variable
Error Object: /file/write-case-data

Error: eval: unbound variable
Error Object: k120mixdda_sg0lambda21.cas

Error: eval: unbound variable
Error Object: *eof*
danobis is offline   Reply With Quote

Old   April 16, 2012, 09:58
Default
  #5
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
so at that point, you could run fluent right ? usually when i run fluent in parallel i get the error "machine is already loaded" when i try to run fluent in a pc where fluent is already loaded . also for the process affinity problem that comes from your nodes. check the setting in your cluster, make sure the file is not too big too handle, add more nodes if you can. this is what i use to launch fluent :

./fluent 3ddp -gu -i -t42 -ssh < /home/maghazlani/Analysis/test.jou > /home/maghazlani/Analysis/outputfile-test
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   June 10, 2012, 12:39
Default
  #6
New Member
 
Join Date: Apr 2012
Posts: 7
Rep Power: 14
j01234 is on a distinguished road
Quote:
Originally Posted by diamondx View Post
danobis, here is a working example of a journal files (.jou), when you see a ";", it means i'm asking fluent to skip that command:

/file/read-case-data /home/maghazlani/Analysis/intake_test_3-1-23000.cas
;/define/operating-conditions/operating-pressure 0
;/define/models/solver/density-based yes
;/define/models/energy yes
;/define/models/viscous/kw yes
;/define/boundary-conditions/modify-zones/zone-type 11 pressure-inlet
;/define/materials/change-create air air yes ideal-gas no no no no no no
;/define/boundary-conditions/pressure-inlet inlet yes no 101325 no 27357 no 300 no yes no no no yes 01 0.05268
;/define/boundary-conditions/modify-zones/zone-type 10 pressure-outlet
;/define/operating-conditions/operating-pressure 0
;/adapt/adapt-to-gradients pressure curvature 0 0.7 0.3 yes 100
;/adapt/set/max-number-cells 2000
;/solve/initialize/compute-defaults/pressure-inlet 11
;/solve/initialize/repair-wall-distance yes
;/solve/initialize/initialize-flow
;/adapt/mark-inout-hex yes no 0.000515079 0.205496 0.0156082 0.0451296 -0.000208354 -0.0265887
;/file/auto-save/data-frequency 20000
;/mesh/polyhedra/convert-domain yes yes
;/solve/set/under-relaxation/k 0.5
;/solve/set/under-relaxation/epsilon 0.5
;/solve/set/under-relaxation/turb-viscosity 0.7
;/solve/set/under-relaxation/solid 0.7
;/solve/set/limits 1 5e10 1 5000 1e-14 1e-20 100000 0.05
/solve/iterate 24000
;/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
;/solve/monitors/surface/set-monitor mass-flow "Mass Flow Rate" 0 () no no yes massf 1000
;/display/views/restore-view left
;/display/views/auto-scale
;/display/views/camera/zoom-camera 2
;/display/save-picture /home/maghazlani/Analysis/screenshot-mach-extended_5-4000.jpeg
/file/write-case-data /home/maghazlani/Analysis/intake_test_3-1-47000.cas
Hi diamondx,
I also have some problems with my journal file.
I want to save hardcopys of the contour plot of the phases, (water and air), with 10 levels.
The following is what I have so far. Can you tell me whats wrong?

/display/set/contours/water 0 1
/display/set/picture/color-mode color
/display/set/picture/driver jpeg
/display/set/contours/n-contour 10
/display/set/contours/filled-contours yes
/display/save-picture /xxx/xxx/xxx/xxx/case10_2.jpeg

Thanks!
/Jen
j01234 is offline   Reply With Quote

Old   June 11, 2012, 05:55
Default
  #7
New Member
 
Krzysztof
Join Date: May 2012
Posts: 7
Rep Power: 13
thess is on a distinguished road
Hello,

About journal file I think the extension doesn't really matter. But I'm not sure about end of your script.
I for example used fluent_journal.jou like that:
/file/read-case-data/
name_of_case.cas
/solve/iterate
1000
/file/write-case-data
name_of_case_end.cas
exit
yes
exit
I used it yesterday ant it worked perfectly fine. However I put submission and journal scripts in the root folder so had no issue with filepath.
thess is offline   Reply With Quote

Old   June 11, 2012, 15:36
Default
  #8
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
Quote:
Originally Posted by j01234 View Post
Hi diamondx,
I also have some problems with my journal file.
I want to save hardcopys of the contour plot of the phases, (water and air), with 10 levels.
The following is what I have so far. Can you tell me whats wrong?

/display/set/contours/water 0 1
/display/set/picture/color-mode color
/display/set/picture/driver jpeg
/display/set/contours/n-contour 10
/display/set/contours/filled-contours yes
/display/save-picture /xxx/xxx/xxx/xxx/case10_2.jpeg

Thanks!
/Jen
If you made a copy paste of commands. they have to work without any problem. if not, make sure you are using the right surface number, it's where the issue can lie. when you set up your case on the your pc, check the commands before sending it to the cluster.
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   June 11, 2012, 17:50
Default
  #9
New Member
 
Join Date: Apr 2012
Posts: 7
Rep Power: 14
j01234 is on a distinguished road
Quote:
Originally Posted by diamondx View Post
If you made a copy paste of commands. they have to work without any problem. if not, make sure you are using the right surface number, it's where the issue can lie. when you set up your case on the your pc, check the commands before sending it to the cluster.
Thank you for the tip. I will try. But how can I check the commands in advance?

/Jen
j01234 is offline   Reply With Quote

Old   June 11, 2012, 18:36
Default
  #10
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
you just press enter and start typing in the console command in the bottom right
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   August 10, 2016, 12:12
Default
  #11
New Member
 
Sagar
Join Date: Apr 2016
Posts: 23
Rep Power: 10
ksgr is on a distinguished road
Hello everyone!

I am submitting a job to a cluster and thus I am creating a journal file for this. I have created a journal file which reads the case and data file. But one problem is that the case file has a CHEMKIN mechanism which has been imported from my local workstation. So when I submit the journal file to the cluster, the cluster will not be able to recognize the file path from where the chemkin mechanism was read. So I want to re-import the mechanism file to mitigate the above problem. My question is what is the command line to import CHEMKIN mechanism file? I tried: file import chemkin-mechanism and then the absolute path to the mechanism files in the TUI for testing, but it doesn't recognize the command.
Can anyone tell how this can be done?

EDIT: I found the solution. It was simple.
file import chemkin-mechanism "decane" "/PATH/Mechanism_decane.che" "/PATH/thermo_decane.db" n n

Regards

Last edited by ksgr; August 16, 2016 at 04:14. Reason: Found the solution.
ksgr is offline   Reply With Quote

Old   April 24, 2018, 07:57
Default
  #12
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 9
skumar112 is on a distinguished road
Hello

Could I have a look at your journal file as I am having the same issue
skumar112 is offline   Reply With Quote

Old   May 7, 2018, 02:46
Default
  #13
New Member
 
anonymous
Join Date: Dec 2015
Posts: 14
Rep Power: 10
chris_aut is on a distinguished road
Hello

I would like to know when do I have to use only "/" at the beginning of a line and when do I need ";/"? What is the difference?

I'm also not sure why some of the parameters are changed and others not.
Like if I use /solve/dual-time-iterate 2 50 the Number of Time Steps is not visable changed to 2 and same for Max Iterations which should be 50.
While if I use /define/models/multiphase/model eulerian the model is changed to eulerian. How come?

Thanks for help or advice

Chris
chris_aut is offline   Reply With Quote

Old   January 6, 2019, 22:09
Default
  #14
Member
 
Join Date: Aug 2018
Posts: 85
Rep Power: 7
esha is on a distinguished road
Quote:
Originally Posted by thess View Post
Hello,

About journal file I think the extension doesn't really matter. But I'm not sure about end of your script.
I for example used fluent_journal.jou like that:
/file/read-case-data/
name_of_case.cas
/solve/iterate
1000
/file/write-case-data
name_of_case_end.cas
exit
yes
exit
I used it yesterday ant it worked perfectly fine. However I put submission and journal scripts in the root folder so had no issue with filepath.
Hi, I am trying to run .jou file for steady case by using your code but it is giving me error. I think I havre problem with .pbs file. Can you please telol me about it.
esha is offline   Reply With Quote

Old   January 28, 2019, 05:21
Default cluster
  #15
New Member
 
Kiran
Join Date: Oct 2017
Posts: 4
Rep Power: 8
kiranczende is on a distinguished road
how can i submit a fluent unsteady job to a cluster as i am new to this.
also what types of files are need to be uploaded
kiranczende is offline   Reply With Quote

Old   January 28, 2019, 09:57
Default
  #16
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by kiranczende View Post
how can i submit a fluent unsteady job to a cluster as i am new to this.
also what types of files are need to be uploaded

It's the same for unsteady as stead. You need the .cas (and usually also a .dat unless you initialize it in your journal) and a journal file (the .jou). There are examples of a .jou in this thread.


The way you submit the job to your cluster depends on the setup. Here you will need help from the cluster admin.
kiranczende likes this.
LuckyTran is offline   Reply With Quote

Old   March 15, 2019, 04:13
Default Hi,can you please tell me about these highlighted lines as I do not know about these
  #17
Member
 
Join Date: Aug 2018
Posts: 85
Rep Power: 7
esha is on a distinguished road
rc fluent.cas
rd fluent.dat
solve/set/ri 1
file/auto/data 10
solve/set/time-step 0.001
solve/set/cour 200
solve/dual 100000 30
file/write-case-data-path name-fluent.cas
exit
yes
esha is offline   Reply With Quote

Old   May 21, 2019, 09:29
Default
  #18
New Member
 
ho-con
Join Date: Jan 2014
Posts: 14
Rep Power: 12
hocon is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
It's the same for unsteady as stead. You need the .cas (and usually also a .dat unless you initialize it in your journal) and a journal file (the .jou). There are examples of a .jou in this thread.


The way you submit the job to your cluster depends on the setup. Here you will need help from the cluster admin.
Hi,
In GUI ANYSYS Fluent I run simulation shortly about 1 second to get the .dat file for in the Input file of batch mode. Is it write way to get the .dat file?

I confused that in the journal file where I can set up the running time (iteration: 2 weeks) on the batch mode? here is my journal file.

;fluent simulation input file
;read case file
rc input.cas
rc input.dat
;initialize the solution
solve initialize initialize-flow
;calculation the iteration
solve/set/time-step 0.01
;write data file
wd output.dat
wd output.cas
;exit fluent
exit
;confirm exit to prompt
yes
hocon is offline   Reply With Quote

Old   May 21, 2019, 23:53
Default hi hocon
  #19
New Member
 
Kiran
Join Date: Oct 2017
Posts: 4
Rep Power: 8
kiranczende is on a distinguished road
after command solve/set/time-step 0.01
/solve/dual-time-iterate 4400 300
where 4400 is number of time step which is nothing but total time (physical) and 300 is iterations per time step.
hocon likes this.
kiranczende is offline   Reply With Quote

Old   May 23, 2019, 01:37
Default
  #20
New Member
 
Kiran
Join Date: Oct 2017
Posts: 4
Rep Power: 8
kiranczende is on a distinguished road
Thank you very much
kiranczende 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
Changing the Max level of Refine in a journal file in batch mode (without GUI)? tohid FLUENT 0 April 18, 2011 20:24
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 09:50
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08


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