Fluids

Fluids

How to interpolate already obtained steady state solution to a domain using TUI in Virgo clusters.

    • KSD
      Subscriber

      Normally I use to read the case file and then set the commands for running the iterations in journal file.

      But now I want to interpolate a steady state solution for giving better initialization into the domain to get faster convergence for transient simulations.

      But how can I do that in TUI form after the reading the case file. Can you please tell me what command I should write after reading the case file.

      How to interpolate the dat file after reading the cas file.


      Can you also tell me a good reference where I can get to know how to write journal file.

      I am not using GUI type journal file generated by fluent because it will not work in Virgo Clusters.

    • Rob
      Ansys Employee
      The safest approach is to read the case file, initialise the model and then interpolate the data into the case.
      On the local machine, click into the TUI window and hit Enter. This brings up the menu list. Open the /file menu. Hit Enter in there. You'll see some options. Use q (Q) to move back up a level. The first part of the journal might be:
      /file/read-case myfile.cas.h5


    • KSD
      Subscriber
      Sir, do you mean first export the cas and dat file of steady state solution (here it is steady.cas.gz and steady.dat.gz) then in script do interpolation after initialization.

      This script is just for checking whether my interpolation has been done or not. Thats why it only contain it 2000 line for verification purpose.

      Journal Script
      ; Read case file
      /file/rc steady.cas.gz
      ; Initialize the solution
      /solve/init/hyb-init
      /solve/init/fmg-init yes
      ; Interpolate the steady state solution
      /file/rd steady.dat.gz
      it 1000
      ; Write data file
      wd 1000.cas.gz
      wd 1000.dat.gz
      ; Exit FLUENT
      exit
      yes

      Am I correct?
    • Rob
      Ansys Employee
      Ah, pedantry time. In the above you're reading the data back in, and that's a very good way of starting a transient run off,
      Journal Script
      ; Read case file
      /file/rc steady.cas.gz
      /file/rd steady.dat.gz
      it 1000
      ; Write data file
      wd 1000.cas.gz
      wd 1000.dat.gz
      ; Exit FLUENT
      exit
      yes

      Is the correct (but note wd is a very dangerous short cut, use /file/wd instead: always use the full command in journals) solution, but this is slightly more efficient.
      Journal Script
      ; Read case file
      /file/rcd steady.cas.gz
      it 1000
      ; Write data file
      /file/wcd transient_%t.gz
      ; Exit FLUENT
      exit
      yes

      Never start a file name, boundary label etc with a number. It's mostly OK on Win10 but asking for trouble on some of the UNIX builds. %t adds the time step to the file name, very useful when you want to then re-use a journal.

      And the pedantry. An interpolation file is what we can write out of Fluent to read onto a slightly different mesh. It means we can run a model with a very coarse mesh, extract the data and then use that result to start a new run on a finer mesh.




    • KSD
      Subscriber
      Sir, this method worked.
      Sir, could you also tell what commands I should write to see the live residuals in console.
      I tried using cat text.out in slurm work load manager but it only shows the iterations which it has already solved, not the running or live iterations one.
      And sir what text I should write in Journal in order to monitor drag coefficient on wall or finding mass imbalance on domain.
    • Rob
      Ansys Employee
      The solution monitors are best set up in the GUI and then written to a file. Their output should then trigger when the solver is started. Just make sure the file save path is .\\filename to ensure the file writes into the working folder. Check this is working shortly after the solver starts as Fluent sometimes transfers the full path when it's saved.
      Re the residual values, you can either alter the way you run Fluent (read the Launching the software bit of the manual) or just use "tail" on the transcript file. I use the latter when I run batch, but that's very rare as I'm usually watching for a problem in the solver (my main role in Ansys is support).
    • KSD
      Subscriber
      Sir, thanks a lot for the information. I got the tag word, now I will try to understand it. Thank you.
    • DrAmine
      Ansys Employee
      :)
    • KSD
      Subscriber
      Sir, I tried interpolation using (.ip) file instead of steady state cas.gz file as I need to use different solver settings for running transient simulations.
      But what I am observing is my solution converges using same case file and ip file in fluent through GUI (local machine).
      But diverges when I try to execute the same set of commands in clusters.
      I am using the following journal script. It is weird that using the same files in GUI mode (local machine) it is converging but in clusters it is diverging.
      Journal Script
      ; Read case file
      /file/rc before_init_solver_settings.cas
      /file/interpolate/rd steady_solution_for_interpolation.ip
      it 1000
      ; Write data file
      wd 1000.cas.gz
      wd 1000.dat.gz
      ; Exit FLUENT
      exit
      yes
      Sir, what might be the reason for it.
    • DrAmine
      Ansys Employee
      This might be due to partitioning not appropriate and/or convergence is not deep enough.

      Anyway even if you are using slightly different setup you still can read the data file as initialization data.
    • KSD
      Subscriber
      Sir, I don't think it is due deep convergence problem as my solution in GUI doesn't diverge till 1000 iterations but In clusters it diverges just after 70 iterations.
      Maybe it is due to partition issue, but does Ansys print out it as partition issue or something because error which I am seeing in out.txt file is something like divergence in AMG solver .
      Sir regarding reading data file do you mean like this I have to do
      ; Read case file
      ; Cas file for different setup
      /file/rc before_init_solver_settings.cas
      ; Reading dat file of already obtained steady solution
      /file/rd steady_solution.dat.gz
      it 1000
      ; Write data file
      wd 1000.cas.gz
      wd 1000.dat.gz
      ; Exit FLUENT
      exit
      yes

      I tried doing same thing as above in GUI first but it is showing following inconsistent message
      Is it fine to ignore this message and continue the calculations?

    • Rob
      Ansys Employee
      Did you write case and data at the same time for the files you're reading in? That looks like something changed so the results you're reading might be gibberish.
    • KSD
      Subscriber
      Sir, previously in journal file, I was reading transient solver settings as case file and reading steady state solution dat file on it which creates some inconsistent issues. (Means I exported the dat file of steady state solution, after that exported a cas file which was created in a new fluent file separately for transient setting using the same mesh and in journal script, I am reading cas file of transient setting and reading dat file of steady on it)
      But now I am doing both things at same fluent file then exporting as cas and dat file. Now it is working well.
      Thank You Sir
    • DrAmine
      Ansys Employee
      Good.
    • KSD
      Subscriber
      Sir, Thank You for the help.
Viewing 14 reply threads
  • You must be logged in to reply to this topic.