Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Inlet/Outlet Will not set when using a journal file

    • Ali Bachar
      Subscriber

      So Im running a simulation on a wing with wash out, when loading the journal file and checking the boundary conditions, inlet and outlet are not set as per the journal file. However, when I directly copy the journal file into the fluent console (Ctrl + C/V) then enter, the boundaries are set. leading me to believe it is not an error with the code line itself, as it works in the console.

      Why does it not registered from the journal file?

      ; READING MESH FILE

      ; Read mesh file (change the name according to your case)
      /rc w02-559976.msh

      ; ENERGY MODEL

      ; Enable energy model and viscous heating
      /define/models/energy y n n n y

      ; TURBULENCE MODEL
      ; Enable kw-SST turbulence model

      /define/models/viscous/kw-sst y

      ; MATERIALS PROPERTIES

      ; Define air properties
      /define/materials/change-create/air/air y incompressible-ideal-gas n n n n n n

      ; CELL ZONE CONDITIONS

      ; Set operating pressure to 86884 Pa
      /define/operating-conditions/operating-pressure 86884.9682 q q

      ; BOUNDARY CONDITIONS

      ; Set temperature to 275.65K for pressure outlets
      /define/boundary-conditions/set/pressure-outlet/farfield outlet () t0 n 275.65 q q q

      ; Set the temperature to 275.65K, the velocity to 113 m/s and the corresponding angles of attack in the velocity inlet 
      ; WARNING: be careful to the axis of the model mesh and change the velocity components (x,y,z) accordingly
      /define/boundary-conditions/velocity-inlet/inlet y y n 113.17 n 0 y n 0.99993 n 0.01220 n 0 n 275.65 n n y 5 10

      ; MONITORS

      ; Remove the residuals plot
      /solve/monitors/residual/plot n q

      ; Set convergence criteria to 1e-03
      /solve/monitors/residual/convergence-criteria 1e-03 1e-03 1e-03 1e-03 1e-03 1e-03 1e-03

      ; CALCULATIONS

      ; Run simulations for each speed and write the data file
      ; Adapt the number of iterations and the name of the written data file to your case
      /solve/init/init
      /solve/iter/500

       

      but if i copy this line and hit enter it accepts it>

       

      /define/boundary-conditions/velocity-inlet/inlet y y n 113.17 n 0 y n 0.99993 n 0.01220 n 0 n 275.65 n n y 5 10
    • Federico
      Ansys Employee

      Hello Ali, 

      I do not see any problem with your journal commands. I suggest you inspect your transcript file .trn for this session to check that there were no errors.

      • Ali Bachar
        Subscriber

        in the trm, it seems to have executed fine, showing {inlet} after the command is run. however when plotting a velocity magnitude contour, after loading the journal file, produces a different result then when loading it in the console. it also shows 0 when you click boundary conditions - inlet after loading in the journal

    • Federico
      Ansys Employee

      Do you save the .cas and .dat files after running the journal?

      • Ali Bachar
        Subscriber

        I do, I am running it on a HPC, so i extract the .cas and .dat when the job execution finishes

    • Rob
      Forum Moderator

      What does the velocity GUI panel look like before & after running the journal line? It's always wise testing journals on smaller models to check the syntax. Additionally, the TUI string will vary depending on what models are set, and what options are used; they can also change when run a second time as "something" has been set that requires an extra y/n in the command. It's one of the reasons PyFluent is being developed as that should mean you can interact with specific values only without needing to worry about the rest of the boundary settings. 

      • Ali Bachar
        Subscriber

        So the boundary conditions for inlet are set to the default values 0 magnitude 0 XYZ components etc 

        the journal file are run on both first time run! So I'll open fluent on the local machine. Copy/paste the journal file into to TUI, everything works, boundary conditions set. (Confirmed by velocity magnitude contour) and the BC panel will say magnitude 113 x component 0.99993 y component 0.0122 z component 0, and have the thermal set to 275 

        However, on the HPC if I load a submission file with my journal file (the exact same one I used before) and run it. The resulting .dat file will show that the boundary conditions for inlet/outlet are set at their defaults (this confirmed by looking at the velocity contour and seeing a region of 0ms at the inlet.

        at first I thought they're musr be a rogue character or something, so I opened fluent locally and recorded a journal file with Writw -> Start Journal 

        and recorded what I typed into the TUI, and repeated the test with that new journal file, again same issue. When run off the journal file BC not set. When copied/paste boundaries set. 

         

    • Rob
      Forum Moderator

      What does the transcript return when you run the journal? Try 

      /define/boundary-conditions/velocity-inlet/inlet () y y n 113.17 n 0 y n 0.99993 n 0.01220 n 0 n 275.65 n n y 5 10
      • Ali Bachar
        Subscriber

         

         

         

         

         

        So when using 22.1 on the HPC with the above journal file (with the insertion of the ‘()’, this is the output, it seems as if everything executes, but the values say otherwise with the insertion of the brackets I get an even worse output!!

        This is with () running on HPC ^

        This is original journal file running on HPC  ^

         

        This is the expected results, which occurs when you Ctrl + A, Ctrl + C, Ctrl + V the exact journal file into the TUI locally ^

         

         









        Auto-Transcript Start Time:  12:21:48, 05 May 2023 
        Current Directory: “/scratch/s381963″
        /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/bin/fluent -r22.1.0 3ddp -pinfiniband -host -t64 -mpi=intel -cnf=/var/spool/pbs/aux/243792.crescentpbs -path/apps/software/ANSYS/2022R1/v221/fluent -ssh -cx ccn011.cluster:44585:34804
        Starting /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/lnamd64/3ddp_host/fluent.22.1.0 host -cx ccn011.cluster:44585:34804 “(list (rpsetvar (QUOTE parallel/function) “fluent 3ddp -flux -node -r22.1.0 -t64 -pinfiniband -mpi=intel -cnf=/var/spool/pbs/aux/243792.crescentpbs -ssh”) (rpsetvar (QUOTE parallel/rhost) “”) (rpsetvar (QUOTE parallel/ruser) “”) (rpsetvar (QUOTE parallel/nprocs_string) “64”) (rpsetvar (QUOTE parallel/auto-spawn?) #t) (rpsetvar (QUOTE parallel/trace-level) 0) (rpsetvar (QUOTE parallel/remote-shell) 1) (rpsetvar (QUOTE parallel/path) “/apps/software/ANSYS/2022R1/v221/fluent”) (rpsetvar (QUOTE parallel/hostsfile) “/var/spool/pbs/aux/243792.crescentpbs”) (rpsetvar (QUOTE gpuapp/devices) “”))”

                      Welcome to ANSYS Fluent 2022 R1

                      Copyright 1987-2022 ANSYS, Inc. All Rights Reserved.
                      Unauthorized use, distribution or duplication is prohibited.
                      This product is subject to U.S. laws governing export and re-export.
                      For full Legal Notice, see documentation.

        Build Time: Nov 29 2021 12:13:18 EST  Build Id: 10213  
         
        Connected License Server List:    1055@cclic-2

             ————————————————————–
             This is an academic version of ANSYS FLUENT. Usage of this product
             license is limited to the terms and conditions specified in your ANSYS
             license form, additional terms section.
             ————————————————————–
        Host spawning Node 0 on machine “ccn011.cluster” (unix).
        /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/bin/fluent -r22.1.0 3ddp -flux -node -t64 -pinfiniband -mpi=intel -cnf=/var/spool/pbs/aux/243792.crescentpbs -ssh -mport 10.0.1.11:10.0.1.11:37950:0
        Starting /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/multiport/mpi/lnamd64/intel/bin/mpirun -f /tmp/fluent-appfile.s381963.80608 –rsh=ssh -genv I_MPI_FABRICS shm:dapl -genv I_MPI_DAPL_UD enable -genv I_MPI_FALLBACK_DEVICE disable -genv FLUENT_ARCH lnamd64 -genv I_MPI_DEBUG 0 -genv I_MPI_ADJUST_REDUCE 2 -genv I_MPI_ADJUST_ALLREDUCE 2 -genv I_MPI_ADJUST_BCAST 8 -genv I_MPI_ADJUST_BARRIER 2 -genv I_MPI_ADJUST_ALLGATHER 2 -genv I_MPI_ADJUST_GATHER 2 -genv I_MPI_ADJUST_ALLTOALL 1 -genv I_MPI_ADJUST_SCATTER 2 -genv I_MPI_ADJUST_SCATTERV 2 -genv I_MPI_ADJUST_ALLGATHERV 2 -genv I_MPI_ADJUST_GATHERV 2 -genv I_MPI_PLATFORM auto -genv I_MPI_DAPL_SCALABLE_PROGRESS 1 -genv PYTHONHOME /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/../../commonfiles/CPython/3_7/linx64/Release/python -genv FLUENT_PROD_DIR /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0 -genv FLUENT_AFFINITY 0 -genv I_MPI_PIN enable -genv KMP_AFFINITY disabled -genv LD_PRELOAD /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/multiport/mpi/lnamd64/intel/lib/libstrtok.so -genv TMI_CONFIG /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/multiport/mpi/lnamd64/intel/etc/tmi.conf -machinefile /tmp/fluent-appfile.s381963.80608 -np 64 /apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/lnamd64/3ddp_node/fluent_mpi.22.1.0 node -mpiw intel -pic infiniband -mport 10.0.1.11:10.0.1.11:37950:0

        ————————————————————————————
        ID      Hostname        Core   O.S.      PID            Vendor                     
        ————————————————————————————
        n48-63  ccn014.cluster  16/16  Linux-64  39557-39572    Intel(R) Xeon(R) E5-2660 0 
        n32-47  ccn012.cluster  16/16  Linux-64  115260-115275  Intel(R) Xeon(R) E5-2660 0 
        n16-31  ccn013.cluster  16/16  Linux-64  89482-89497    Intel(R) Xeon(R) E5-2660 0 
        n0-15   ccn011.cluster  16/16  Linux-64  82260-82275    Intel(R) Xeon(R) E5-2660 0 
        host    ccn011.cluster         Linux-64  80412          Intel(R) Xeon(R) E5-2660 0 

        MPI Option Selected: intel
        Selected system interconnect: InfiniBand
        ————————————————————————————

        Cleanup script file is /scratch/s381963/cleanup-fluent-ccn011.cluster-80412.sh

        Posting ANSYS Product Improvement Program startup data
        Done.

        > /file/set-tui-version “22.1”

        > /file/read-case “w02-559976.msh”
        Reading “w02-559976.msh”…

        Buffering for file scan…

          103882 nodes, binary.
            6722 nodes, binary.
         1133582 mixed interior faces, zone  1, binary.
             537 triangular velocity-inlet faces, zone  5, binary.
             713 triangular pressure-outlet faces, zone  6, binary.
            3878 mixed symmetry faces, zone  7, binary.
            8097 triangular wall faces, zone  8, binary.
          559976 mixed cells, zone  2, binary.

        Building…
             mesh
            auto partitioning mesh by Metis (fast),
            distributing mesh
                parts…………………………………………..,
                faces…………………………………………..,
                nodes…………………………………………..,
                cells…………………………………………..,
                inter-node communication reduction using architecture-aware remapping: 59%
                bandwidth reduction using Reverse Cuthill-McKee: 8892/462 = 19.2468
             materials,
             interface,
             domains,
             zones,
            wall
            symmetry
            outlet
            inlet
            fluiddomain
            interior-fluiddomain
             parallel,
        Done.
         

        > /define/models/energy? y n n n y 

        > /define/models/viscous/kw-sst? y 

        > /define/materials/change-create air air air is a fluid

        Density
        incompressible-ideal-gas no data required.

        n n n n n n 

        > /define/operating-conditions/operating-pressure 86884.9682 

        > /define/boundary-conditions/set/pressure-outlet outlet () t0 n 275.65 quit 

        > /define/boundary-conditions/velocity-inlet (inlet)
        inlet ()Please answer y[es] or n[o].
         y y n 113.17 n 0 y n 0.99993 n 0.0122 n 0 n 275.65 n n y 5 10 

        > /solve/monitors/residual/plot? n 

        > /solve/monitors/residual/convergence-criteria 0.001 0.001 0.001 0.001 0.001 0.001 0.001 

        > /solve/initialize/compute-defaults/velocity-inlet (inlet)
        inlet 

        > /solve/initialize/initialize-flow 

        > /solve/iterate 10 
          iter  continuity  x-velocity  y-velocity  z-velocity      energy           k       omega     time/iter
             1  1.0000e+00  2.1661e-08  2.6245e-09  8.4171e-10  9.4372e-17  9.8517e-01  4.9594e-01  0:00:04    9

         Reversed flow on 92 faces (12.8% area) of pressure-outlet 6.
                Stabilizing pressure coupled to enhance linear solver robustness.
             2  1.0000e+00  7.8196e-07  6.0298e-07  1.6989e-05  1.3736e-16  9.7570e-01  4.9342e-01  0:00:06    8

         Reversed flow on 402 faces (50.5% area) of pressure-outlet 6.
             3  1.0000e+00  3.6056e-05  2.2458e-04  8.3966e-05  1.4572e-16  9.5851e-01  4.8956e-01  0:00:04    7

         Reversed flow on 287 faces (30.1% area) of pressure-outlet 6.
             4  1.0000e+00  2.8666e-05  5.3652e-05  3.8766e-05  1.5503e-16  9.2614e-01  4.8324e-01  0:00:03    6

         Reversed flow on 265 faces (33.8% area) of pressure-outlet 6.
             5  6.3999e-01  6.5669e-05  2.5260e-04  7.7242e-05  2.1236e-16  1.1216e+00  4.7279e-01  0:00:03    5

         Reversed flow on 250 faces (31.3% area) of pressure-outlet 6.
             6  7.8490e-01  4.5025e-05  7.4854e-05  4.8660e-05  1.1593e-15  8.3821e-01  4.5557e-01  0:00:02    4

         Reversed flow on 216 faces (25.3% area) of pressure-outlet 6.
             7  6.3548e-01  4.1996e-05  1.1698e-04  5.1480e-05  2.3377e-15  7.7233e-01  4.2520e-01  0:00:01    3

         Reversed flow on 244 faces (30.3% area) of pressure-outlet 6.
             8  6.7845e-01  3.9463e-05  5.0019e-05  3.5548e-05  1.1140e-14  1.3640e+00  3.8517e-01  0:00:01    2

         Reversed flow on 219 faces (26.7% area) of pressure-outlet 6.
             9  5.4719e-01  3.5438e-05  6.0341e-05  3.5188e-05  6.7081e-13  5.6467e-01  3.1867e-01  0:00:00    1

         Reversed flow on 212 faces (26.9% area) of pressure-outlet 6.
            10  4.9685e-01  3.1213e-05  3.2773e-05  2.6411e-05  6.1261e-13  4.8691e-01  2.5416e-01  0:00:00    0


        > /file/write-data “testing.dat.h5″Fast-loading “/apps/software/ANSYS/2022R1/v221/fluent/fluent22.1.0/addons/afd/lib/hdfio.bin”
        Done.

        Writing to ccn011.cluster:”/scratch/s381963/testing.dat.h5” in NODE0 mode and compression level 1 …
          Writing results.
        Done.
         

        > /exit 
        Posting ANSYS Product Improvement Program performance data 
        Done.
        ok Auto-Transcript Stop Time:  12:27:15, 05 May 2023 
        Total Transcript Time: 5 Minute 26 Second.


    • Rob
      Forum Moderator

      I think you have other problems further up the journal. Are you using Read>Journal when checking the model locally? 

       

      > /define/materials/change-create air air air is a fluid

      Density
      incompressible-ideal-gas no data required.

      n n n n n n 

      > /define/operating-conditions/operating-pressure 86884.9682 

      > /define/boundary-conditions/set/pressure-outlet outlet () t0 n 275.65 quit 
      • Ali Bachar
        Subscriber

        No, i am entering line by line, using Read>Journal I believe causes the same error.

        I cannot see what is wrong with that? that is the correct number of values

        /define> materials

        /define/materials> 
        change-create           data-base/              list-properties
        copy                    delete
        copy-by-formula         list-materials

        /define/materials> change-create

        material-name> air
        material name [air] air
        air is a fluid
        change Density? [no] y

        Density
        methods: (constant ideal-gas incompressible-ideal-gas rgp-table real-gas-soave-redlich-kwong real-gas-peng-robinson real-gas-aungier-redlich-kwong real-gas-redlich-kwong boussinesq piecewise-linear piecewise-polynomial polynomial expression compressible-liquid user-defined)
        new method [constant] incompressible-ideal-gas
        no data required.

        change Cp (Specific Heat)? [no] n
        change Thermal Conductivity? [no] n
        change Viscosity? [no] n
        change Molecular Weight? [no] n
        change Thermal Expansion Coefficient? [no] n
        change Speed of Sound? [no] n


    • Rob
      Forum Moderator

      It's the "no data required" that isn't clear. 

      • Ali Bachar
        Subscriber

        I think that is because when you select incompressible-ideal-gas the density variable greys out instead of when its set at constant asks me to insert a value, - hence no data required

Viewing 6 reply threads
  • The topic ‘Inlet/Outlet Will not set when using a journal file’ is closed to new replies.