Fluids

Fluids

changing directory in Fluent journal

    • mariannebassil
      Subscriber

      Hello


      I have several .dat files saved in different directories ( each .dat in a different directory). In each directory there is the .cas, .dat , a UDF and a .txt file supposed to be read by the UDF at each time step.I wrote a journal in order to run the calculation of all .dat files one after the other. I saved in in a directory different from the .dat files.  I was to execute the journal by opening Fluent File---read---journal. But here i specify which directory? since i have a different directory for each calculation ! and how to change the directory in the journal after each calculation . Because at each .dat file i want to have the working directory of the .dat  and the related UDF and .txt file

    • DrAmine
      Ansys Employee

      Does use global paths help you resolving the issue?

    • mariannebassil
      Subscriber

      this is an example of a journal i wrote for 2 calculations but it didn't work! the monitors .out are not saved in each related .dat file and the .txt file is not found because the working directory was not read as the one for the .dat file


      /file/read-case-data "C:variation_volume_membranehx_3_hy_3test_rununsteady.dat.gz"
      /solve/dual-time-iterate 80 20 ; iterate with the transient solver
      /file/write-case-data "C:variation_volume_membranehx_3_hy_3test_runfinal.dat.gz"

      /file/read-case-data "C:variation_volume_membranehx_5_hy_5test_runcalcul.dat.gz"
      /solve/dual-time-iterate 134 20 ; iterate with the transient solver
      /file/write-case-data "C:variation_volume_membranehx_5_hy_5test_runfinal.dat.gz"

      exit yes

    • DrAmine
      Ansys Employee
      Try using chdir or sync-chdir. Under windows you need the \ instead of
    • DrAmine
      Ansys Employee
      And please try recording journal from TUI when you want to read a case from other directory.
Viewing 4 reply threads
  • You must be logged in to reply to this topic.