Table of Contents
- 1. TUI
- 1.1. Examples
- 1.2. discretization schemes
- 1.3. Turbulence model
- 1.4. Reference
- 1.5. Save residual
- 1.6. Journal
- 1.7. define
- 1.8. change rotational velocity of moving reference frame
- 1.9. set background color
- 1.10. syntax
- 1.11. Batch model
- 1.12. Boundary condition
- 1.13. Animation/residual/monitor on cluster
- 1.14. Solver
- 1.15. Change pressure-velocity-coupling model in batch mode
- 1.16. time step size
- 1.17. Modifying the View
- 1.18. initialization
- 1.19. discretization schemes
- 1.20. Set under relaxation
- 1.21. log of execute makefile
1 TUI
keywords: Background Execution on Linux Systems, journal file Programming language : Scheme, as a Lisp dialect
1.1 Examples
1.1.1 Steady
rc t-mrf-4.9.cas.gz
rd t-4000.dat.gz
it 4000
wd t-8000.dat.gz
/write-data
exit
yes
1.1.2 Unsteady
rc ts4.9.cas.gz rd ts4.9.dat.gz solve/dual-time-iterate 360 30 solve/set/time-step 0.00083 wc ts4.9360.cas.gz ;file/write-data example.dat wd ts4.9360.dat.gz exit yes
1.2 discretization schemes
Use the following text commands as appropriate followed by the appropriate number from the list below.
/solve/set/discretization-scheme/pressure /solve/set/discretization-scheme/flow /solve/set/discretization-scheme/mom /solve/set/discretization-scheme/k /solve/set/discretization-scheme/epsilon /solve/set/discretization-scheme/temperature
Basic discretization schemes: ("First Order Upwind" . 0) ("Second Order Upwind" . 1) ("Power Law" . 2) ("Central Differencing" . 3) ("QUICK" . 4) Pressure Discretization: ("Standard" . 10) ("Linear" . 11) ("Second Order" . 12) ("Body Force Weighted" . 13) ("PRESTO!" . 14) ("Continuity Based" . 15) Pressure-Velocity-Coupling: ("SIMPLE" . 20) ("SIMPLEC" . 21) ("PISO" . 22)
Example 1: To set pressure-velocity coupling to PISO use the TUI
/solve/set/discretization-scheme/flow 22
Example 2: To set pressure discretization to Body-Force Weighted use the TUI
/solve/set/discretization-scheme/pressure 13
1.3 Turbulence model
define/models/viscous/inviscid yes /define/models/viscous/ke-standard yes /define/models/viscous/kw-sst yes #Enable/disable the SST - turbulence model. /define/models/viscous/kw-standard yes
1.4 Reference
4.2. Running ANSYS Fluent in Batch Mode, getting start guide https://web.stanford.edu/class/me469b/download/scheme.pdf Scripted-CFD-simulations-and-postprocessing-in-Fluent-and-ParaVIEW.pdf Schemefluentprogrammingreference.pdf Chapter 2:Text User Interface (TUI), user guide, fluent text command list, fluent, file:///c:/akmkemin/Backup/ANSYS/FLUENT/TUI/Text-Command-List-Fluent.pdf
1.5 Save residual
;save residuals (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_2000_e387_udf.dat"))) (writefile output-port) (close-output-port output-port))
1.6 Journal
- journal file
- a sequence of ANSYS Fluent commands
- (no term)
- The purpose of a journal file is to automate a series of commands instead of entering them repeatedly
on the command line.
- the journal file does not contain any response to the confirmation request, ANSYS Fluent cannot
continue to follow the instructions of the journal file.
for more information, refer to Scheme notes file:///c:/Users/Dropbox/Emacs/Scheme.html
The list of instructions can be written within a text editor.
1.6.1 record journal GUI
Fluent can also record all what is done during the interactive setup through File > Write > Start Journal.
The setup is saved with GUI language in the journal file. But it is recommended to create journal file with the TUI
(using TUI commands or scheme commands) and not through de GUI, as GUI structure may changes from one version to another one. Note that in this recorded file, all the lines will start with (cx-gui-do ….) which represents all the click on the GUI.
- note
Be careful not to change the directory while recording a journal file.
- reference
>> 4.9 Creating and Reading Journal Files, https://www.sharcnet.ca/Software/Fluent6/html/ug/node94.htm#JournalFile
1.6.2 The interactive TUI inside Fluent helps:
type commands in the console window of fluent GUI
>
#command prompt
q
#quit, back up a level
Enter
# generate a listing of the submenus and commands in the current menu
- In batch mode:
[usual fluent starting command] -i journalfile.jou & For example:
fluent 3ddp -t4 -i example.jou -g >> transcript.out
This command will run Fluent in 3d double precision (dp), in parallel on 4 procs (-t4) using the example.jou journal file (-i), in batch (-g) and save the output to the transcript.out file (>>). dual-time-iterate ; Perform unsteady iterations for a specified number of time steps. #/solve/dual-time-iterate [number-of-timesteps] [max-number-of-iterations-per-time-step]; Read case file rc example.cas ; Initialize the solution /solve/initialize/initialize-flow ; Calculate 50 iterations it 50 ; Write data file wd example50.dat ; Calculate another 50 iterations it 50 ; Write another data file wd example100.dat ; Exit Fluentt exit yes
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/intaketest3-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 ;Initialize the flow field with the current default values. /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
; example.jou ; starting command : fluent 3ddp -i example.jou -g >> output.txt & /file/read-case-data "tank-flush.gz" ; read the case and data files /solve/initialize/hyb-initialization ; initialization /solve/dual-time-iterate 10 10 ; iterate with the transient solver /file/write-case-data "final.gz" ok exit yes
click on the keyboard Enter button to see all the available menus, click on letter "q" to come back to the previous menu. This can lead to this kind of journal file
an example note: (the semicolon (;) is used to include comments):
; example.jou ; starting command : fluent 3ddp -i example.jou -g >> output.txt & /file/read-case-data "tank-flush.gz" ; read the case and data files /solve/initialize/hyb-initialization ; initialization /solve/dual-time-iterate 10 10 ; iterate with the transient solver /file/write-case-data "final.gz" ok exit yes
1.7 define
1.7.1 boundary-conditions
define/boundary-conditions bc-settings set/ copy-bc symmetry fluid target-mass-flow-rate-settings/ list-zones velocity-inlet modify-zones/ wall non-reflecting-bc/ zone-name periodic zone-type pressure-outlet
1.8 change rotational velocity of moving reference frame
1.8.1 batch model
; fluid zone, 2; axis, 0 0 1; rotational speed, -10 rad/s /define/boundary-conditions/fluid 2 no no no yes -1 no -10 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 0 no 1 none no no no no no
1.8.2 interactive console TUI
/define/boundary-conditions> fluid (fluid) zone id/name [fluid] 2 material-name [water-liquid]: Change current value? [no] no Specify source terms? [no] no Specify fixed values? [no] no Frame Motion? [yes] yes ; relative to inertial frame Relative To Cell Zone [-1] Use Profile for Reference Frame Rotation Speed? [no] Reference Frame Rotation Speed (rad/s) [-8] -10
Use Profile for Reference Frame X-Velocity Of Zone? [no] no Reference Frame X-Velocity Of Zone (m/s) [0] 0 Use Profile for Reference Frame Y-Velocity Of Zone? [no] no Reference Frame Y-Velocity Of Zone (m/s) [0] 0 Use Profile for Reference Frame Z-Velocity Of Zone? [no] no Reference Frame Z-Velocity Of Zone (m/s) [0]
Use Profile for Reference Frame X-Origin of Rotation-Axis? [no] Reference Frame X-Origin of Rotation-Axis (m) [0] Use Profile for Reference Frame Y-Origin of Rotation-Axis? [no] Reference Frame Y-Origin of Rotation-Axis (m) [0] Use Profile for Reference Frame Z-Origin of Rotation-Axis? [no] Reference Frame Z-Origin of Rotation-Axis (m) [0]
Use Profile for Reference Frame X-Component of Rotation-Axis? [no] Reference Frame X-Component of Rotation-Axis [0] Use Profile for Reference Frame Y-Component of Rotation-Axis? [no] Reference Frame Y-Component of Rotation-Axis [0] Use Profile for Reference Frame Z-Component of Rotation-Axis? [no] Reference Frame Z-Component of Rotation-Axis [1]
Reference Frame User Defined Zone Motion Function ["none"] Mesh Motion? [no] Deactivated Thread [no] Laminar zone? [no] Porous zone? [no] 3D Fan Zone? [no]
1.9 set background color
display/set/colors/background "white"
> display/set/colors/background "white" invalid command [background]
1.9.1 invalid command [background]
The commands to have a white background are:
/display/set/colors/color-scheme classic /display/set/colors/background "white"
By default color scheme is set to "workbench" with the blue screen which is common to almost all workbench tools. And background option is not available with "workbench" option.
1.10 syntax
command 1 argument 1 argument 2
1.11 Batch model
;
#don't execute the command, comment
- Save the case settings
/file/write-settings copy_settings.set
- Save Data can be saved using the file interpolate option
/file/interpolate/write-data copy_data.ip yes yes
- read case settings and interpolated data
/file/read-settings copy_settings.set
/file/interpolate/read-data copy_data.ip
define/user-defined compiled-functions function-hooks execute-on-demand Execute UDFs on demand. Answer:
1.12 Boundary condition
use UDF for inlet velocity for k-omega turbulence model Turbulent Kinetic Energy,1, (m2/s2) Specific Dissipation Rate,1, (1/s)
1.12.1 Inlet BC
- sine velocity inlet
> define
/define> boundary-conditions
/define/boundary-conditions> velocity-inlet (inlet)
zone id/name [inlet] inlet Velocity Specification Method: Magnitude and Direction [no] no Velocity Specification Method: Components [yes] yes Reference Frame: Absolute [yes] yes Use Profile for Supersonic/Initial Gauge Pressure? [no] no
Supersonic/Initial Gauge Pressure (pascal) [0] 0 Coordinate System: Cartesian (X, Y, Z) [yes] yes Use Profile for X-Velocity? [no] no X-Velocity (m/s) [0] 0
Use Profile for Y-Velocity? [yes] yes Use UDF Profile for Y-Velocity? [yes] yes profile names list: ("udf") profile name ["udf"] data names list: ("xvel::libudf") data name ["xvel::libudf"] Use Profile for Z-Velocity? [no] no Z-Velocity (m/s) [0] 0 Turbulent Specification Method: K and Omega [no] no Turbulent Specification Method: Intensity and Length Scale [no] no Turbulent Specification Method: Intensity and Viscosity Ratio [yes] yes Turbulent Intensity (%) [4.999999888241291] 5 Turbulent Viscosity Ratio [5] define/boundary-conditions/velocity-inlet/inlet no yes yes no 0 yes no 0 yes yes "udf" "xvel::libudf" no 0 no no yes 5 5
- 2d case
set "inletxveloocity" to x-component of velocity and "inletyveloocity" to y-component of velocity
- console interactive
Console TUI /define boundary-conditions velocity-inlet (inlet) zone id/name [inlet] inlet Velocity Specification Method: Magnitude and Direction [no] no Velocity Specification Method: Components [yes] yes Reference Frame: Absolute [yes] yes Use Profile for Supersonic/Initial Gauge Pressure? [yes] no Supersonic/Initial Gauge Pressure (pascal) [0] 0 Use Profile for X-Velocity? [yes] yes Use UDF Profile for X-Velocity? [yes] yes profile names list: ("udf" "udf") profile name ["udf"] "udf" data names list: ("inletyvelocity::libudf" "inletxvelocity::libudf") data name ["inletxvelocity::libudf"] "inletxvelocity::libudf" Use Profile for Y-Velocity? [yes] yes Use UDF Profile for Y-Velocity? [yes] yes profile names list: ("udf" "udf") profile name ["udf"] "udf" data names list: ("inletyvelocity::libudf" "inletxvelocity::libudf") data name ["inletyvelocity::libudf"] "inletyvelocity::libudf" Turbulent Specification Method: K and Omega [no] yes Use Profile for Turbulent Kinetic Energy? [no] no Turbulent Kinetic Energy (m2/s2) [1] 1 Use Profile for Specific Dissipation Rate? [no] no Specific Dissipation Rate (1/s) [1] 1
- journal script
/define/boundary-conditions/velocity-inlet inlet no yes yes yes no 0 yes yes "udf" "inletxvelocity::libudf" yes yes "udf" "inletyvelocity::libudf" yes no 1 no 1
console information
(inlet) Please answer y[es] or n[o]. profile names list: ("udf" "udf") data names list: ("inletyvelocity::libudf" "inletxvelocity::libudf") profile names list: ("udf" "udf") data names list: ("inletyvelocity::libudf" "inletxvelocity::libudf")
- 3d case
- interactive commands
/define boundary-conditions velocity-inlet (inlet) zone id/name [inlet] inlet Velocity Specification Method: Magnitude and Direction [no] no Velocity Specification Method: Components [no] yes Reference Frame: Absolute [yes] yes Use Profile for Supersonic/Initial Gauge Pressure? [no] no Supersonic/Initial Gauge Pressure (pascal) [0] 0 Coordinate System: Cartesian (X, Y, Z) [yes] yes Use Profile for X-Velocity? [no] no X-Velocity (m/s) [0] 0 Use Profile for Y-Velocity? [no] yes Use UDF Profile for Y-Velocity? [no] yes profile names list: ("udf" "udf") profile name ["udf"] "udf" data names list: ("yvelocity::libudf" "zvelocity::libudf") data name ["yvelocity::libudf"] "yvelocity::libudf" Use Profile for Z-Velocity? [no] yes Use UDF Profile for Z-Velocity? [no] yes profile names list: ("udf" "udf") profile name ["udf"] "udf" data names list: ("yvelocity::libudf" "zvelocity::libudf") data name ["yvelocity::libudf"] "zvelocity::lubudf" ``zvelocity::lubudf'' unknown – enter choice again. data names list: ("yvelocity::libudf" "zvelocity::libudf") data name ["yvelocity::libudf"] "zvelocity::libudf"
- journal script
/define boundary-conditions velocity-inlet inlet no yes yes no 0 yes no 0 yes yes "udf" "yvelocity::libudf" yes yes "udf" "zvelocity::libudf"
define/boundary-conditions/velocity-inlet/inlet no yes yes no 0 yes no 0 yes yes "udf" "xvel::libudf" no 0 no no yes 5 5
1.13 Animation/residual/monitor on cluster
The cluster cannot run any graphics, so don’t try to plot any figures. If you do, errors transpire and you’ll have to delete the job (see Section 3.3). This includes animations, residuals and monitors. If you want to make animations, write the data files and use TecPlot on your PC. Your output file is where you will monitor the convergence of your simulation. From: http://web2.clarkson.edu/projects/cluster/FLUENT_cluster.pdf Here is a sample journal file for a 2D simulation I ran in batch mode.
;read case and data file/read-case single-48cm-2D-batchtest.cas ; ;initialize domain with air /solve/initialize/initialize-flow ; ;patch water to raceway depth of 3.5 cm /adapt/mark-inout-rectangle yes no 0 0.62875 -0.48 0.035 /solve/patch water () (0) mp 1 ; ;set up image output /display/set/contours/filled-contours yes /display/set/picture/driver png /display/set/picture/landscape yes /display/set/picture/x-resolution 960 /display/set/picture/y-resolution 720 /display/set/picture/color-mode color /views/restore-view front ; ;print front view of phases and velocity magnitude at t=0 /display/contour air vof 0 1 /display/save-picture airvof%t.png /display/contour mixture velocity-magnitude 0 0.5 /display/save-picture velmag%t.png ; ;set up display commands to print front view of phases and velocity magnitude every 20 time steps /solve/execute-commands/add-edit command-2 20 "time-step" "/display/contour air vof 0 1" /solve/execute-commands/add-edit command-3 20 "time-step" "/display/save-picture airvof%t.png" /solve/execute-commands/add-edit command-4 20 "time-step" "/display/contour mixture velocity-magnitude 0 0.5" /solve/execute-commands/add-edit command-5 20 "time-step" "/display/save-picture velmag%t.png" ; ;set up auto-save /file/auto-save data-frequency 500 /file/auto-save append-file-name-with time-step 6 ; ;iterate over 5000 time steps solve/set/time-step 0.001 solve/dual-time-iterate 5000 50 file/write-data single-48cm-2D-batchtest.dat
From http://www.cfd-online.com/Forums/fluent/90579-creating-animation-through-tui.html
Solution Animation File If you selected Metafile or PPM Image under Storage Type in the Animation Sequence panel, then FLUENT will save the solution animation file for you automatically. It will be saved in the specified Storage Directory, and its name will be the Name you specified for the sequence, with a .cxa extension (e.g., pressure-contour.cxa). In addition to the .cxa file, FLUENT will also save a metafile with a .hmf extension for each frame (e.g., pressure-contour0002.hmf). The .cxa file contains a list of the associated .hmf files, and tells FLUENT the order in which to display them.
1.14 Solver
/define/models/solver/density-based yes
1.15 Change pressure-velocity-coupling model in batch mode
index | model |
20 | SIMPLE |
21 | SIMPLEC |
22 | PISO |
24 | Coupled |
/define/models/solver/pressure-based yes
#pressure based solver
solve / set p-v-coupling 20
#SIMPLE
solve / set p-v-coupling 21
#SIMPLEC
solve / set p-v-coupling 22
#PISO
;Coupled solver, Coupled with Volume Fractions [no]
/solve/set p-v-coupling 24 no
;change courant number
;/solve/set/p-v-controls [courant-number] [explicit momentum] [explicit pressure]
/solve/set/p-v-controls 1 0.5 0.5
- where everything in the brackets including the brackets has to be replaced by a number.
an wrong example
;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/p-v-controls 1 Error: eval: unbound variable Error Object: courant-number
1.16 time step size
syntax:
/solve/dual-time-iterate [number-of-timesteps] [max-number-of-iterations-per-time-step]
- where everything in the brackets including the brackets has to be replaced by a number.
> ANSYS Fluent as a Server Users Guide
A command name consists of phrases separated by hyphens. A command is matched by matching an initial sequence of its phrases. Matching of hyphens is optional
2.2.Text Prompt System The following shows some examples of prompts: filled-mesh? [no] Enter shrink-factor [0.1] Enter line-weight [1] Enter title [""]Enter The default value for a prompt is accepted by pressing Enter on the keyboard or typing a , (comma).
Ctrl+c.#abort a prompt sequence, simply press ’() or () #empty list terminate the process with an empty list "~a" stands for random variable, like % in C language. "()" means that we simply press "enter" and do not specify any names. "x" at the end of line is the same loop variable and two of "x" correspond to two of "~a". q, take one level above windows/ XY plot window options. For a description of the items in this menu, see display/set/windows/xy. Sf
1.17 Modifying the View
Select and control the view of the scene that is displayed in the graphics window.
all defined views will be saved in the case file when you write one.
If you plan to use your views with another case file, you can write a “view file” containing just the views.
“/fi/rc” # abbreviations of “/file/read-case”
/solve/dual-time-iterate 500 20 iterate 500 timesteps, 20 iterations/timestep
1.18 initialization
;Initialize the flow field with the current default values.
/solve/initialize/initialize-flow
/solve/initialize/hyb-initialization ; hybrid initialization
; initialize from the velocity inlet
/solve/initialize/compute-defaults/pressure-inlet 11
#11 : id of pressure inlet
/solve/initialize/compute-defaults/velocity-inlet 147
;open channel initialize
/solve/initialize/compute-defaults/pressure-inlet 162 mixture
solve/initialize/open-channel-auto-init 162 yes
solve/initialize
1.19 discretization schemes
Use the following text commands as appropriate followed by the appropriate number from the list below.
/solve/set/discretization-scheme/pressure /solve/set/discretization-scheme/flow /solve/set/discretization-scheme/mom /solve/set/discretization-scheme/k /solve/set/discretization-scheme/epsilon /solve/set/discretization-scheme/temperature
Basic discretization schemes: ("First Order Upwind" . 0) ("Second Order Upwind" . 1) ("Power Law" . 2) ("Central Differencing" . 3) ("QUICK" . 4) Pressure Discretization: ("Standard" . 10) ("Linear" . 11) ("Second Order" . 12) ("Body Force Weighted" . 13) ("PRESTO!" . 14) ("Continuity Based" . 15) Pressure-Velocity-Coupling: ("SIMPLE" . 20) ("SIMPLEC" . 21) ("PISO" . 22)
Example 1: To set pressure-velocity coupling to PISO use the TUI
/solve/set/discretization-scheme/flow 22
Example 2: To set pressure discretization to Body-Force Weighted use the TUI
/solve/set/discretization-scheme/pressure 13
1.20 Set under relaxation
/solve/set/under-relaxation/density 0.5 ;turbulent kinetic energy /solve/set/under-relaxation/k 0.5 /solve/set/under-relaxation/epsilon 0.5 ;specific dissipation rate /solve/set/under-relaxation/omega 0.5 /solve/set/under-relaxation/turb-viscosity 0.5
/solve/set/under-relaxation/solid 0.7 /solve/set/under-relaxation/mom 0.5 # momentum /solve/set/under-relaxation/epsilon 0.5 ; dissipation rate
;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
1.21 log of execute makefile
#+BEMINEXAMPLE
[@frontend11 ~]$ cd UDF/libudf [@frontend11 libudf]$ make "FLUENTARCH=lnamd64" for d in lnamd64/[23]*; do \ ( \ cd $d; \ rm -rf .{c,h,cpp,hpp}; \ for f in ../../src/.{c,h,cpp,hpp} ../../src/makefile ../../src/user.udf; do \ if [ -f $f -a ! -f `basename $f` ]; then \ echo "# linking to" $f "in" $d; \ ln -s $f .; \ fi; \ done; \ echo ""; \ echo "# building library in" $d; \ if [ "" = "1" ]; then \ echo "# using gcc64"; \ make ARCHC=gcc64 -k>makelog 2>&1; \ else \ if [ "" = "1" ]; then \ echo "# using gcc"; \ make ARCHC=gcc -k>makelog 2>&1; \ else \ make -k>makelog 2>&1; \ fi; \ fi;\ cat makelog; \ ) \ done
make[1]: Entering directory `/data1/home/UDF/libudf/lnamd64/3ddphost'
make[2]: Entering directory `/data1/home/UDF/libudf/lnamd64/3ddphost' make libudf.so "CFLAGS=-Dlnamd64 -DGNUSOURCE -fpic -shared -ansi -Wall -O -DPTRRESTRICT= " "LDFLAGS=-shared -lm" make[3]: Entering directory `/data1/home/UDF/libudf/lnamd64/3ddphost'
cc -Dlnamd64 -DGNUSOURCE -fpic -shared -ansi -Wall -O -DPTRRESTRICT= -I/share/apps/ansys/18.0.0/v180/fluentluent18.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0/src/main -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/addon-wrapper -I/share/apps/ansys/18.0.0/v180/fluentluent18.0.0/src/io -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/species -I/share/apps/ansys/18.0.0/v180/flue/fluent18.0.0/src/pbns -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/numerics -I/share/apps/ansys/18.0.0/v180luent/fluent18.0.0/src/sphysics -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/storage -I/share/apps/ansys/18.0/v180/fluent/fluent18.0.0/src/mphase -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/bc -I/share/apps/ansys/18.0/v180/fluent/fluent18.0.0/src/models -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/material -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/amg -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/util -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/mesh -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/udf -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/ht -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dx -I/share/apps/ansy18.0.0/v180/fluent/fluent18.0.0/src/turbulence -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/parallel -I/sharapps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/etc -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/ue -I/share/ps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dpm -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dbns -I/share/ps/ansys/18.0.0/v180/fluent/fluent18.0.0/cortex/src -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/client/src -I/sre/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/tgrid/src -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/multiport/s -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/multiport/mpiwrapper/include -I/share/apps/ansys/18.0.0/v180/flue/fluent18.0.0/multiport/mpiwrapper/src -I. -c udfnames.c
cc -shared -lm udfnames.o verticalcomponent2ndstokeswave.o xcomponent2ndstokeswave.o -o libudf.so make[3]: Leaving directory `/data1/home/UDF/libudf/lnamd64/3ddphost' make[2]: Leaving directory `/data1/home/UDF/libudf/lnamd64/3ddphost' make[1]: Leaving directory `/data1/home/UDF/libudf/lnamd64/3ddphost'
make[1]: Entering directory `/data1/home/UDF/libudf/lnamd64/3ddpnode'
make[2]: Entering directory `/data1/home/exw692/UDF/libudf/lnamd64/3ddpnode' make libudf.so "CFLAGS=-Dlnamd64 -DGNUSOURCE -fpic -shared -ansi -Wall -O -DPTRRESTRICT= " "LDFLAGS=-shared -lm" make[3]: Entering directory `/data1/home/exw692/UDF/libudf/lnamd64/3ddpnode'
cc -Dlnamd64 -DGNUSOURCE -fpic -shared -ansi -Wall -O -DPTRRESTRICT= -I/share/apps/ansys/18.0.0/v180/fluentluent18.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0/src/main -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/addon-wrapper -I/share/apps/ansys/18.0.0/v180/fluentluent18.0.0/src/io -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/species -I/share/apps/ansys/18.0.0/v180/flue/fluent18.0.0/src/pbns -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/numerics -I/share/apps/ansys/18.0.0/v180luent/fluent18.0.0/src/sphysics -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/storage -I/share/apps/ansys/18.0/v180/fluent/fluent18.0.0/src/mphase -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/bc -I/share/apps/ansys/18.0/v180/fluent/fluent18.0.0/src/models -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/material -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/amg -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/util -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/mesh -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/udf -I/share/apps/ays/18.0.0/v180/fluent/fluent18.0.0/src/ht -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dx -I/share/apps/ansy18.0.0/v180/fluent/fluent18.0.0/src/turbulence -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/parallel -I/sharapps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/etc -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/ue -I/share/ps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dpm -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/src/dbns -I/share/ps/ansys/18.0.0/v180/fluent/fluent18.0.0/cortex/src -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/client/src -I/sre/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/tgrid/src -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/multiport/s -I/share/apps/ansys/18.0.0/v180/fluent/fluent18.0.0/multiport/mpiwrapper/include -I/share/apps/ansys/18.0.0/v180/flue/fluent18.0.0/multiport/mpiwrapper/src -I. -c udfnames.c
cc -shared -lm udfnames.o verticalcomponent2ndstokeswave.o xcomponent2ndstokeswave.o -o libudf.so make[3]: Leaving directory `/data1/home/exw692/UDF/libudf/lnamd64/3ddpnode' make[2]: Leaving directory `/data1/home/exw692/UDF/libudf/lnamd64/3ddpnode' make[1]: Leaving directory `/data1/home/exw692/UDF/libudf/lnamd64/3ddpnode' #+end-example
Created: 2018-05-28 Mon 11:33
Would you know how to execute that type of command from a complicated UDF (C code) instead of doing it by hand or from a journal?
ReplyDelete