Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Why isn’t patch working in batch mode (Fluent)

    • miratip
      Subscriber

      I am setting up a simulation of a falling water droplet and air and attempting to run the simulation in batch mode via a journal file. The process I am using is to define the VOF multiphase model, add the second phase (water), define a cell register containing the cells in the droplet, initialize, and then patch the volume fraction to the cell register. For some reason the patch is not happening, although the commands get through the patch menu with no errors. When I run the same patch command in the Fluent TUI, it works with no problems. Also, when I run the patch command to patch the entire domain in batch mode that works. So it seems specifically like an issue with patching a cell register in batch command. Any ideas why this is happening?

    • Rob
      Forum Moderator
      If you open the file that's failed in batch does the cell register exist? For batch runs it's often safer to initialise all cases and save their data files. The batch run then simplifies to reading in the case & data and running some iterations/time steps. Writing long batch journals can be more efficient but also adds in a risk of something not working.
    • miratip
      Subscriber
      Yes, when I open the file, the cell register exists. My journal file has a list cell registers command which lists the droplet register. I can try reading in a case and data file with the setup and just running via the journal file. Is there a way to initialize and patch and then read that info into the journal file? Right now I am only reading in a case file.
    • ai0013
      Subscriber
      Double check and navigate through TUI commands, step-by-step and try to find the error. I attach an extract of a journal file that I once employed to patch pressure for two cell-registers during a batch run. It worked fine for me.

      ;READ-CASE
      file/read-case "myFluentCase.cas"

      ;INITIALIZE_FLOW
      solve/initialize/compute-defaults all-zones
      solve/initialize/set-defaults pressure 101325
      solve/initialize/initialize-flow

      ;PATCH CANISTER AND SPHERE AT PRESCRIBED PRESSURES
      ;cylinder for FLUID_CANISTER
      adapt/mark-inout-cylinder yes no 0.20500 0.20500 -0.094500 -0.015130 0.06495190 0.20242480 0.040
      solve/patch () 0 () pressure 21e5
      ;sphere for FLUID_SPHERE
      adapt/mark-inout-sphere yes no 0 0.126389 0 0.168389
      solve/patch () 1 () pressure 4e4
    • Rob
      Forum Moderator
      Thanks Just a note, always use / at the start of the command, ie

      /adapt/mark-inout-cylinder yes no 0.20500 0.20500 -0.094500 -0.015130 0.06495190 0.20242480 0.040

      To force Fluent to use the full command path from the root menu. Otherwise if the command is triggered from /display it'll fail as it's looking for "adapt" in the display menu tree.
    • ai0013
      Subscriber
      Thank you for the clarification ! I'll consider it for future reference
    • miratip
      Subscriber
      Thanks y'all! The adapt/mark-inout-sphere command ended up working for me. I was previously defining the cell register in a different way that worked for me in the TUI but was not working in batch.
    • Amine Ben Hadj Ali
      Ansys Employee
      Always better to use the search command helper in Fluent and write journal while trying TUI commands.
Viewing 7 reply threads
  • The topic ‘Why isn’t patch working in batch mode (Fluent)’ is closed to new replies.