Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Accessing Previous Work

  • Accessing Previous Work

    Posted by Adityan on January 28, 2022 at 3:39 pm

    Recently I was doing the blockMesh assignment.
    I first compiled the mesh of Block 1. and saved it as foam.foam .
    And viewed it on ParaView.

    After a while I compiled the mesh of Block 2.
    and saved the .foam file with a different name, foam2.foam
    and viewed the mesh of Block 2.

    But when i checked foam.foam it showed the mesh of Block 2 instead of Block 1.
    Moreover i wasn’t able to retrieve the blockMeshDict file of Block 1.

    Because of this,
    I redid the Block 1, and copied just the blockMeshDict file to a separate folder within the HOME folder.
    But again I wasn’t able to open it.

    So i copied the 0, constant and system folders onto a separate folder.
    I did the same with Block 2.

    After which i was able to use both the files.
    I was able to edit the code as well as compile the mesh, and save it for future reference.

    But I want to know any better methods to save the files we have worked on. Because the way I followed takes some time.

    Barış Bicer replied 2 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Barış Bicer

    Moderator
    January 30, 2022 at 11:53 am

    Hi Rajesh,

    First thank you for your question.

    First thing : If you use several blockMesh command with different blockMeshDict’s, inside a same test case, you will always visualize the latest generation. Because you make change inside same dictionary.

    second thing : *.foam file is only an extension which can be visualized by paraview. So, creation foam.foam, foam2.foam will not change anything inside same case. You can try it easily. Just create both file such foam.foam, foam2.foam inside cavity case and open both file in paraview which will bring you same thing. Becase .foam extensions only let you visualize and upload info inside case. I hope that it is clear now.

    There is a way of course. blockMesh is related to mesh info only which is stored inside /constant/polyMesh folder. If you wanna visualize your mesh one by one inside same case, my suggestion is copy your blockMeshDict file as blockMeshDict1 inside system folder. Inside test case first run “blockMesh” and if you visualize it inside paraview you will see first mesh whose info given inside blockMeshDict file. Then to see second version of mesh which is defined inside “blockMeshDict1” file you can use “blockMesh -dict system/blockMesh1” inside same test and then refresh your paraview which will show you second created mesh.

    However, my suggestion is for a real CFD problem cases to copy your case (which includes 0, constant, system) with different name and then make chance whatever you want which may be take a bit time but you will be sure not to make any mistake.

    I hope these info address your question.

    Best.

    Barış

  • Adityan

    Member
    January 30, 2022 at 4:37 pm

    Thanks Alot Sir,
    These two aspects raised some doubts initially because I am a beginner to Linux and I am using OpenFOAM using a WSL, rather than Virtual Box.

  • Barış Bicer

    Moderator
    February 13, 2022 at 5:15 am

    You are welcome, Adityan.

    Dont hesitate to ask when you have questions.

    Best.

    Barış.

Log in to reply.

error: Content is protected !!