Fluids

Fluids

Journal file for Dynamic mesh update

    • shaheen wahab
      Subscriber

      Hello Everyone,


      I am trying to do a Dynamic Mesh that reads a CSV file with coordinates and Wall shear X and Wall shear Y. I want to write a Journal File that makes Fluent read the CSV file (with the help of UDF) and adjusts the mesh (Dynamic Mesh).


      I have a steady state case.


      The steps I did:


      1. Open .cas file from the previous simulation. 


      2. Compile the UDF


      3. Turn ON Dynamic Mesh and select "Smoothing"


      4. Initialize?? (Not sure)


      5. Read the Journal file


      "/file/start-transcript Log_02.txt


      /file/read-case HumpMesh7_200m_ofd_v3-1-00350.cas


      /solve/initialize/initialize-flow


      /solve/iterate 10


      /file/write-case-data HumpMesh7_200m_ofd_v3-output


      exit


      yes


      "


      With the help of this Journal File, I want Fluent to read the CSV (through the UDF) and adjust the new coordinates so that I can see in the dynamic mesh. 


       How can I see/do the change in the mesh? (With the help of a Journal File)


      I couldn't find much help in the Manual. I would be really grateful if anyone could help me in this regard.


      Thank you 


      With regards


      Shaheen 


       

    • Karthik R
      Administrator

      Hello Shaheen,


      Are you looking for journal file commands to read, compile, and load a UDF capable of reading a .csv file? Is this what you are looking for?


      Thank you.


      Best,


      Karthik

    • shaheen wahab
      Subscriber

      Hello Karthik,


      Thank you for your response. 


      I am looking for Journal file commands to do the iterations and update the dynamic mesh after reading the csv. 


      Reading, Compiling and Loading the UDF was done in the GUI itself. The Dynamic mesh was also turned ON and Smoothing method was selected(GUI). 


      I want to write a Journal file that just reads the CSV and adjusts the mesh (which is the dynamic mesh).


      Thank you 


      With regards


      Shaheen 

    • DrAmine
      Ansys Employee

      The best way to do that is to keep track of your TUI commands you use whenever you want to setup the case. Go to File>Write> Start Journal then start setting up the case from the console. That would be somewhat more time consuming but once done you can use it every time. To see the list of available commands just check the Text Command Manual and please make use of the new Quick Search feature in R19.2 for TUI command inside Fluent

    • shaheen wahab
      Subscriber

      Thank you Amine. I am working on it now the way you mentioned. I will let you know once I have some results.


      With regards


      Shaheen 

    • DrAmine
      Ansys Employee

      You are welcome Shaheen.

    • shaheen wahab
      Subscriber

      Thank you

    • Karthik R
      Administrator

      Hello,


      We are glad that the solution worked for you, and you are able to learn and move forward. It would be really helpful if you could mark Amine's answer as "Reply". This would be extremely useful if someone else has a similar question and is trying to find an answer on the community.


      Here are the guidelines for posting on the student community.


      Thank you.


      Best Regards,


      Karthik

    • shaheen wahab
      Subscriber

      Hello Karthik,


      Thank you for your response.


      Yes, I have always made sure to post the solution in the past once I solved my problem. But with this problem, I am still working on it. I haven't got the answer yet. Once I do, I will surely post my approach/ solution.


      Thank you 


      With regards


      Shaheen  


       

    • Karthik R
      Administrator

      Thank you.

    • shaheen wahab
      Subscriber

      Update:


      This is what I did.


      1. Read .cas & dat file that already has already converged. 


      2. Compile the UDF that reads the csv file. 


      3. Update the dynamic mesh. 


      4. Check the contours. 


      There are two ways to write the Journal file.


      1. From GUI (Start Journal -> Stop Journal)


      2. In TUI 


      /file/start-transcript Log_01.txt


      /file/read-case TestReadWrite.cas


      /file/read-data TestReadWrite.dat


      /solve/initialize/initialize-flow


      /solve/iterate 2


      /file/write-case-data DM-output


      /file/auto-save/root-name /mnt/data/swa/fluent


      exit


      yes


      Thank you 


      With regards


      Shaheen 


       


       

    • DrAmine
      Ansys Employee

      Thanks Shaheen for posting the way to record a journal. But I need to correct here: In order to record a journal from TUI: 


       


      /file> start-journal


      journal file name [] win.jou


      Opening input journal to file "win.jou".


      /file> (display "Hello World")


      Hello World


      /file> stop-journal


      Journal closed.


      /file>

    • shaheen wahab
      Subscriber

      Thank you Amine. I will keep that in mind


      With regards


      Shaheen 

Viewing 12 reply threads
  • You must be logged in to reply to this topic.