running Fluent on Apocrita Cluster

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=4G

module load ansys
fluent 3ddp $FLUENT_OPTS -g -t4 -rsh -i code.jou

 code.jou

rc e387_wave.cas.gz
rd e387_2550.dat.gz
solve/dual-time-iterate 600 20
solve/set/time-step 0.01
wd e387_3000.dat.gz
exit
yes

 

More advanced,

rc st_e387_w_hy-14M_open_invisid.cas.gz
rd st_e387_w_hy-14M_open_invisid.dat.gz
;set drag moment and monitor in y coordinate on "blades" surface
solve/monitors/force/unscaled? yes
solve/monitors/force/set-drag-monitor cd yes blades () no yes thrust-history no no 0 1 0
solve/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 3000
wd e387_st_hy_14M_open_channel_3k.dat.gz
exit
yes

 

posted @ 2019-06-13 20:53  kaiming_ai  阅读(222)  评论(0编辑  收藏  举报