CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Help using FLUENT in batch mode: script in the Journal file (https://www.cfd-online.com/Forums/fluent/99879-help-using-fluent-batch-mode-script-journal-file.html)

danobis April 14, 2012 09:27

Help using FLUENT in batch mode: script in the Journal file
 
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!

diamondx April 14, 2012 10:36

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

diamondx April 14, 2012 10:50

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

danobis April 15, 2012 04:03

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*

diamondx April 16, 2012 09:58

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

j01234 June 10, 2012 12:39

Quote:

Originally Posted by diamondx (Post 354692)
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

thess June 11, 2012 05:55

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.

diamondx June 11, 2012 15:36

Quote:

Originally Posted by j01234 (Post 365685)
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.

j01234 June 11, 2012 17:50

Quote:

Originally Posted by diamondx (Post 365870)
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

diamondx June 11, 2012 18:36

you just press enter and start typing in the console command in the bottom right

ksgr August 10, 2016 12:12

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


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