How to visualize the results in OUTPUT_ELEME in 2D plot

Dears,

 

I would like to know if it it is possible to visualize the results obtained in OUTPUT_ELEME excel file  using toughio in 2D plot. 

Thanks in advance

12replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • The easiest way that does not require any Python scripting is to use the command line program (see https://toughio.readthedocs.io/en/latest/cli.html#export):

    In your terminal or console (not Python IDE such as Spyder), cd to your simulation directory where your OUTPUT_ELEME.csv is located, and run:

    toughio-export OUTPUT_ELEME.csv -t int

    where `int` stands for the time step number you want to export (by default the last time step `-1`). This command will create a VTK file that you can simply drag and drop to ParaView (https://www.paraview.org/) for visualization.

    If you want all the time steps in the same file and kind of animate your results, append the option `-f xdmf`:

    toughio-export OUTPUT_ELEME.csv -f xdmf

    You can open the XDMF file in ParaView too.

    Like
    • Keurfon Luu I followed your command lines and I can obtain the VTK file and open it using Paraview as shown below, however I find a problem while exporting the results to XDMF file. The following message appears.

      Like
    • Refaat G Hashish Can you update h5py?

      pip install -U h5py
      Like
    • Keurfon Luu I have updated it, however the problem persists.

      Like
    • Refaat G Hashish Not sure what's going on here... After a quick Google search, it seems that others also have issues with h5py with Python 3.8 on Windows, so there is not much I can do on my end...

      I would recommend you to downgrade your Anaconda distribution to Python 3.7 (the one I am using).

      Like
  • Keurfon Luu said:
    not Python IDE such as Spyder

     You said that Python IDE such as Spyder can not be used. So which IDE that I can use? Can I use Matlab or Visual studio?

    Like
    • Refaat G Hashish Not an IDE. I said a terminal or console such as Windows console, Anaconda Prompt...

      Like
    • Keurfon Luu I run the command line, however I find the following error message.

      Like
    • Refaat G Hashish Do not run the command in Python. `toughio-export` is a command line script that should be run in a console or terminal (e.g. Anaconda Prompt). Open Anaconda Prompt and run the command, it should work.

      Like
    • Keurfon Luu I used Anaconda Prompt as illustrated in the attached photo. The error message indicates that toughio-export is not recogonized.

      Like
    • Refaat G Hashish What happen if you install toughio again from Anaconda Prompt?

      pip install toughio --user
      Like
    • Keurfon Luu thank you Keurfon for sharing your tools, to answer this question i want to say that the same error rises 

      Like
Like Follow
  • 7 mths agoLast active
  • 12Replies
  • 117Views
  • 3 Following