two files: code.sh, code.jou
code.sh
#!/bin/bash#$ -cwd#$ -j y#$ -m bea#$ -M k.ai@qmul.ac.uk#$ -pe smp 4#$ -l h_rt=24:0:0#$ -l h_vmem=4Gmodule load ansysfluent 3ddp $FLUENT_OPTS -g -t4 -rsh -i code.jou
code.jou
rc e387_wave.cas.gzrd e387_2550.dat.gzsolve/dual-time-iterate 600 20solve/set/time-step 0.01wd e387_3000.dat.gzexityes
More advanced,
rc st_e387_w_hy-14M_open_invisid.cas.gzrd st_e387_w_hy-14M_open_invisid.dat.gz;set drag moment and monitor in y coordinate on "blades" surfacesolve/monitors/force/unscaled? yessolve/monitors/force/set-drag-monitor cd yes blades () no yes thrust-history no no 0 1 0solve/monitors/force/set-moment-monitor moment yes blades () no yes moment-history no no 0 0 0 0 1 0 ;Coupled solver, Coupled with Volume Fractions [no] ;/solve/set p-v-coupling 24 no ;/solve/set/p-v-controls [courant-number] [explicit momentum] [explicit pressure] ;/solve/set/p-v-controls 1 0.5 0.5 ;/solve/set/under-relaxation/k 0.5 ;/solve/set/under-relaxation/epsilon 0.5 ;/solve/set/under-relaxation/turb-viscosity 0.5(display "Save the residual in a file") (newline) (let ((writefile (lambda (p) (define np (length (residual-history "iteration"))) (let loop ((i 0)) (if (not (= i np)) (begin (define j (+ i 1)) (display (list-ref (residual-history "iteration") (- np j)) p) (display " " p) (display (list-ref (residual-history "continuity") (- np j)) p) (display " " p) (display (list-ref (residual-history "x-velocity") (- np j)) p) (display " " p) (display (list-ref (residual-history "y-velocity") (- np j)) p) (display " " p) (display (list-ref (residual-history "z-velocity") (- np j)) p) (display " " p) (display (list-ref (residual-history "k") (- np j)) p) (display " " p) (display (list-ref (residual-history "omega") (- np j)) p) (newline p) (loop (+ i 1)) ) ) ) ) ) (output-port (open-output-file "residual_1000_e387_udf.dat"))) (writefile output-port) (close-output-port output-port))solve/iterate 3000wd e387_st_hy_14M_open_channel_3k.dat.gzexityes