top of page
quibusvidotshardne

Windows Franco Loops: A Workaround for Opening Paraview Files in Windows 10



In this tutorial some helpful tips for the setting up of a Windows 10 machine will be given. This steps are not essential for the use of OF in Windows but rather an improvement in usability and a speed improvement for the case setups. This tutorial will not touch the installation of OF in windows but rather steps to follow after its installation, for installation of OF in windows please refer to Installing OpenFOAM in Windows 10


Frequently in linux base system, the default text editors are more powerful than the windows default app, notepad, being able to automatically detect the language that the file is and highlighting the keywords. This utility can be quiet helpful for the modification of dictionary files as it allow us to see comments, vectors, loops, conditionals highlighted. The default windows app, is rather featureless, while it does the job, there are better suited free options out there. Notepad ++ ( -plus-plus.org/) is an excellent tool for an windows 10 OF user, it give us some life improvents when editing scripts and dictionaries, such as:




windows franco loops




Some last tips about Notepad++, by default it, the software "saves" the session, this meaning when we close the window and we re open it, it will open all the files that were previously opened. To change this behavior, we need to go to Settings>Preferences>Backup and turn it off. One last tip in setting up Notepad++, is to turn on the auto update file option, this will update the files each X minutes if it has been modified by and external source, to turn on this option we need to go to settings>preferences>MISC. and turn on "Update silently", "Scroll to last line after update". While we are here you can turn on Document switcher (Ctrl+Tab), with this we can add the Alt+Tab windows behavior but for the different files opened inside Notepad++.


Something quiet annoying in Windows is that, if the file does not have any extension or that it has an unknown extension, windows will ask with which program we want to open the file. In the later case, when the file has an unknown extension we can set up a default app, but when the file does not have any extension it is not possible (by GUI) to set up a default app. Nevertheless, we can set up this with some command lines in the windows terminal to set up a default app for extensionless files:


At the moment (WSL2) the use of GUI linux apps can be quiet annoying. Therefore in case we miss the paraFOAM command that created an .FOAM file and opened directly in paraview, a workaround for this can be made. By installing paraview for windows and we can create an alias to it in the bashrc file.


Sometimes we can use the trace tool in paraview to automatize the post processing of our case, and this can be quiet helpful in an annoying boring tasks. The trace tool will create automatically a python script that then can be run it with pvpython application from paraview and it will do all the tasks for us. As in case of paraFoam if the script will use the GUI of paraview, the command: > will not work. An easy way around to be able to use the trace scripts in our bash scripts that will work in either windows and linux is to create a conditional that will detect it the script is being run in windows (and therefore it will use the pvpython installed in paraview for windows) or run the pvpython installed in the linux computer. When we are working in WSL over a windows folder we have /mnt/ before the windows path. 2ff7e9595c


1 view0 comments

Recent Posts

See All

Comments


bottom of page