So, I was able to compile the udf, although I have an issue in one of those adapt/cell-registers command mentioned above.
It works fine on the windows testing phase, but, fails on the batch submission. Could you help?
This is the console output on the batch submission,
same command on the windows run, is
So I know this thing works there, but not on the cluster. Could you help?
Example is example 24 of fluent 22 manual.
/file/read-case /scratch/aus1n19/for_davidB/udfexample/fluid-bed.msh
/mesh/check
/define/operating-conditions/gravity yes 0 -9.81
/define/models/unsteady-1st-order yes
q
/define/models/multiphase/model eulerian
/define/models/energy? yes no no no no
/define/models/viscous laminar yes
;=============================== UDF step =======================================;
;================================================================================;
; insert .c file name inplace of conduct.c file
; If you have multiple udf files, just add them next to each other so they all are compiled in one libudf folder
; e.g. /define/user-defined/compiled-functions/compile libudf yes yes file1.c file2.c file3.c , ,
;/define/user-defined/use-built-in-compiler? yes
/define/user-defined/compiled-functions/compile libudf yes conduct.c , ,
/define/user-defined/compiled-functions/load libudf
;================================================================================;
;; Now use the compiled udf
;; in this case in materials
;======================= Using UDF to assign a property================================;
;======================================================================================;
; the comma immediately after "user-defined" in the command below takes the default thermal conductivity available from udf
; Insert your own keyword from your udf, whichever method you used.
/define/materials/change-create air air yes constant 1.2 yes constant 994 yes user-defined , , , , , , ,
; Here immediately after "user-defined" a word needs to be input, otherwise, the default may be used if a comma is not replaced with the routine.
/define/materials/change-create aluminum solids yes constant 2660 yes constant 737 yes user-defined conduct_solid::libudf yes
/define/models/multiphase/number-of-phases 2
/define/models/multiphase/eulerian no yes explicit , ,
/define/phases/set-domain-properties change-phases-name solids air
/define/phases/set-domain-properties phase-domains air material no
/define/phases/set-domain-properties phase-domains solids diam constant 0.0005
/define/phases/set-domain-properties phase-domains solids granular yes
/define/phases/set-domain-properties phase-domains solids granular-properties viscosity syamlal-obrien
/define/phases/set-domain-properties phase-domains solids granular-properties bulk-viscosity lun-et-al
/define/phases/set-domain-properties phase-domains solids granular-properties granular-temperature constant 1e-5
;/define/phases/set-domain-properties/interaction-domain/forces drag yes syamlal-obrien
/define/phases/set-domain-properties/interaction-domain/forces drag yes symmetric yes none
/define/phases/set-domain-properties/interaction-domain/heat-mass-reactions heat-coeff yes gunn
/define/boundary-conditions velo-in v_uniform air yes yes no 0.25 no , , , , 293
/define/boundary-conditions velo-in v_uniform solids no no yes yes no 0 no 293 no ,
/define/boundary-conditions velo-in v_jet air no no yes yes no 0.25 no 293
/define/boundary-conditions velo-in v_jet solids no no yes yes no , , , , ,
/define/boundary-condition p-outlet poutlet air no 293
/define/boundary-conditions p-outlet poutlet solids no 293 yes no 0
/define/boundary-conditions wall wall_hot solids , no , no yes temperature no 373 no no ,
/define/boundary-conditions wall wall_hot air 0 no , no no no , no no ,
;24=coupled 20=simple 21=simplec 22=piso
solve/set/p-v-coupling 24 no
; turbulent dissipation rate, 0=first order upwind, 1=second order upwind 2=power law 4=quick 6=muscl
; for volume fraction 5=Modified Hric, 28=Compressive, 8=CICSAM, 16=Geo-Reconstruct
;/solve/set/discretization-scheme epsilon 1
;/solve/set/discretization-scheme k 1
/solve/set/discretization-scheme pressure 1
/solve/set/discretization-scheme mom 1
/solve/set/discretization-scheme temperature 4
/solve/set/discretization-scheme mp 16 ;quick unavailable for fluent 22.2
/solve/set/p-v-controls 200 0.2 0.5
/define/custom-field-functions/define "t_mix" air_temperature * air_vof + solids_temperature * solids_vof
/define/custom-field-functions/define "k_mix" air_thermal_conductivity_lam * air_vof + solids_thermal_conductivity_lam * solids_vof
/define/custom-field-functions/define "avg_htc" -k_mix * (t_mix-373)/(58.5*10^(-6))/80
/surface/point-surface y=0.24 0.28494 0.24
/solve/report-definitions add surf-mon-1 surface-facetavg field mixture avg_htc surface-names y=0.24 , report-type surface-facetavg
q
/solve/report-files/add surf-mon-1-rfile file-name htc-024.out itr-index 1 name surf-mon-1-rfile report-defs surf-mon-1 , frequency 1
q
/mesh/adapt/cell-registers/add region_0 type hex inside yes max 0.3 0.5 min 0 0
q
q
/solve/initialize/initialize-flow
/solve/patch/solids , region_0 , mp no 0.598
q
/solve/set/transient-controls/number-of-time-steps 300
q
/solve/set/transient-controls/time-step-size 0.00015
/solve/set/transient-controls/max-iterations-per-time-step 50
q
it 300
/file/write-case-data ,
;/display/objects/create contour press-contour surfaces-list default-interior , field mixture pressure coloring banded
;/report/surface-integrals/area-weighted-avg wall_hot , solids temperature yes temp_wall_hot.srp
;/display/set/contours/filled-contours yes
;/display/set/picture/driver png
;/display/set/picture/landscape yes
;/display/set/picture/use-window-resolution? no
;/display/set/picture/x-resolution 1240
;/display/set/picture/y-resolution 780
;
;/plot/residuals yes yes yes yes yes yes yes
;/display/save-picture residuals%i.jpg
;/display/set/lights/headlight-on? no
;/display/set/lights/lights-on? no
/display/objects/create contour press-contour surfaces-list default-interior , field mixture pressure coloring banded
q
q
q
;/display/objects/add-to-graphics/ press-contour
;q
/display/objects/edit press-contour color-map size 30 format "%0.4f"
q
q
;/display/set/windows/scale/format "%0.4f"
;/display/views/restore-view front
;/display/views/auto-scale
;/display/views/camera/zoom-camera 0.9
/display save-picture press-contoursave%i.jpg
;/report/system/time-stats
;/report/system/proc-stats
exit
OK