ansys-journal_and_batch_file-run_simulation
DESCRIPTION
Ansys Journal and batch file run simulationTRANSCRIPT
C:\Users\u1dc_tg\Documents\Ansys\Journal_and_batch_file\run_simulation.jou Mittwoch, 9. Oktober 2013 10:10
1 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 ;;; This Journal reads, solves, write
3 ;;; solution and monitor images
4 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 rcd tryXX_CASE_NAME.cas
6 ;;; Read case and data files
7 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 ;;; Define viscous, k-epsilon turbulence model and non equil. wall funtion
9 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 ;;;/define/models/viscous/ke-realizable? yes
11 ;;;/define/models/viscous/near-wall-treatment/non-equilibrium-wall-fn? yes
12 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 ;;; Define boundary conditions
14 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15 ;;; inlet : /type, zoneID, yyy m/s, SupersonicPres=0 TurbInten=10%, HydDia=100mm,
With energy equation
16 ;;;/define boundary-conditions velocity-inlet inlet no no yes yes no 0.937 no 0 no
353 no no no yes 10 0.015
17 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18 ;;; Define reference temperature
19 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 ;;;/report/reference-values/temperature 288.15
21 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 ;;; Define Solution methods
23 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24 ;;;/solve/set/discretization-scheme/pressure 10 ;;; Pressure : standard spatial
discretization
25 ;;;/solve/set/discretization-scheme/mom 1 ;;; Momentum : Second Order Upwind
26 ;;;/solve/set/discretization-scheme/k 1 ;;; Turbulence Kinetic Energy : Second
Order Upwind
27 ;;;/solve/set/discretization-scheme/epsilon 1 ;;; Turbulence Dissipation rate :
Second Order Upwind
28 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 ;;; Define Solution controls
31 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 /solve/set/equations/temperature no ;;; Energy equation
33 /solve/set/equations/flow yes ;;; Flow equation
34 /solve/set/equations/ke yes ;;; Turbulence equation
35 ;;; Covergence criteria : continuity, x, y, z, k, epsilon
36 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 ;;;/solve/monitors/residual/convergence-criteria 1e-04 1e-04 1e-04 1e-04 1e-04 1e-04
38 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 ;;; Create monitors : name, "type", variable, (surfaceID), plot, window No., print
on screen, save file, frequency
40 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 ;;;/solve/monitors/surface/clear-monitors ;;; Clear the old monitors
42 ;;;/solve/monitors/surface/set-monitor pressure-at-inlet "Mass-Weighted Average"
pressure (4) yes 2 yes no 1
43 ;;;yes
44 ;;;/solve/monitors/surface/set-monitor velocity-at-outlet "Mass-Weighted Average"
velocity-magnitude (3) yes 3 yes no 1
45 ;;;yes
46 ;;;/solve/monitors/surface/set-monitor yplus-on-walls "Facet Maximum" y-plus (1) yes
4 yes no 1
47 ;;;yes
48 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-1-
C:\Users\u1dc_tg\Documents\Ansys\Journal_and_batch_file\run_simulation.jou Mittwoch, 9. Oktober 2013 10:10
49 /file/auto-save/data-frequency 100 ;;; Save data file every 500 iterations
50 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 /it 2 ;;; Run Calculation for xxxxx iterations
52 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 ;;; Saves hard copy of the Residuals
54 ;;; and convergence plots
55 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 /display/set/picture/color-mode/color
57 /display/set/picture/y-res/800
58 /display/set/picture/x-res/1400
59 /display/set/picture/inv/yes
60 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 display/set-window/1
62 display/hc/tryXX_CASE_NAME_Residuals.png ;;; name of the image file
63 yes
64 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65 display/set-window/2
66 display/hc/tryXX_CASE_NAME_monitor2.png
67 yes
68 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69 display/set-window/3
70 display/hc/tryXX_CASE_NAME_monitor3.png
71 yes
72 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 display/set-window/4
74 display/hc/tryXX_CASE_NAME_monitor4.png
75 yes
76 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77 ;;; Define Solution controls
78 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79 ;;;/solve/set/equations/temperature yes ;;; Energy equation
80 ;;;/solve/set/equations/flow no ;;; Flow equation
81 ;;;/solve/set/equations/ke no ;;; Turbulence equation
82 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 ;;; Covergence criteria : energy equation
84 ;;;/solve/monitors/residual/convergence-criteria 1e-06
85 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86 ;;; Create monitors : name, "type", variable, (surfaceID), plot?, window No., print
on screen?, save file?, filename, frequency
87 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88 ;;;/solve/monitors/surface/clear-monitors ;;; Clear the old monitors
89 ;;;/solve/monitors/surface/set-monitor Temperature-at-outlet "Mass-Weighted Average"
temperature (0) yes 5 yes yes tryXX_CASE_NAME_T_at_outlet02.plot 1
90 ;;;yes
91 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92 ;;;/it 150 ;;; Run Calculation for xxxxx iterations
93 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
94 ;;; Saves hard copy of the Residuals
95 ;;; and convergence plots
96 ;;;display/set-window/1
97 ;;;display/hc/tryXX_CASE_NAME_Residuals02.png ;;; name of the image file
98 ;;;yes
99 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 ;;;display/set-window/5
101 ;;;display/hc/tryXX_CASE_NAME_T_at_outlet02.png
102 ;;;yes
103 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-2-
C:\Users\u1dc_tg\Documents\Ansys\Journal_and_batch_file\run_simulation.jou Mittwoch, 9. Oktober 2013 10:10
104 ;;; Write output back to data file
105 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106 wcd tryXX_CASE_NAME.cas ;;; Overwrite case and data files
107 yes
108 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 ;;; Write the summary of the case
110 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111 /report/summary yes tryXX_CASE_NAME_report.sum
112 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 ;;; Exit FLUENT
114 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
115 exit ;;; Exit Fluent
116 yes
117 exit
118 yes
119 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
120 ;;; End of Journal
121 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122
123
124 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
125 If energy equation is included, following would be the inlet BC
126 ;;;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 ;;;/define/boundary-conditions/velocity-inlet
128 ;;;(inlet)
129 ;;;zone id/name [inlet] inlet
130 ;;;Velocity Specification Method: Magnitude and Direction [no] no
131 ;;;Velocity Specification Method: Components [no] no
132 ;;;Velocity Specification Method: Magnitude, Normal to Boundary [yes] yes
133 ;;;Reference Frame: Absolute [yes] yes
134 ;;;Use Profile for Velocity Magnitude? [no] no
135 ;;;Velocity Magnitude (m/s) [0.9370000000000001] 0.937
136 ;;;Use Profile for Supersonic/Initial Gauge Pressure? [no] no
137 ;;;Supersonic/Initial Gauge Pressure (pascal) [0] 0
138 ;;;Use Profile for Temperature? [no] no
139 ;;;Temperature (k) [10] 353
140 ;;;Turbulent Specification Method: K and Epsilon [yes] no
141 ;;;Turbulent Specification Method: Intensity and Length Scale [no] no
142 ;;;Turbulent Specification Method: Intensity and Viscosity Ratio [no] no
143 ;;;Turbulent Specification Method: Intensity and Hydraulic Diameter [no] yes
144 ;;;Turbulent Intensity (%) [9.999999776482582] 10
145 ;;;Hydraulic Diameter (m) [0.015] 0.015
-3-