• CFD,  Development,  OpenFOAM

    Dynamic Smagorinsky model updated

    Almost eleven years ago, I implemented a version of the dynamic Smagorinsky model of Lilly (1992) into OpenFOAM® and I still receive many requests of a reference where this code has been used, which is quite interesting because I have not implemented the model to do any specific research work, but because back then OpenFOAM used to have a quite strange implementation of the dynamic Smagorinsky model, whose coefficient was averaged on the entire domain volume.  This implementation was stuck until now to OpenFOAM 2.x until now. Today I have ported it to OpenFOAM v2012, and the code is available on GitHub. As soon as it is better tested, a…

  • CFD,  Education,  OpenFOAM

    P. 3. The structure of dictionaries (Ep. 2)

    In the last post of this series the general structure of a dictionary was introduced. We will now see the basic structure of entries. The first point to make is that entries in OpenFOAM® dictionaries can be of several types but they all follow the key/value format, at least in a broad sense.

  • CFD,  General,  OpenFOAM,  Research,  Science

    Contributing research work to open-source projects

    As the main developer of OpenQBMM, an add-on for OpenFOAM which implements quadrature-based moment methods for the solution of generalized population balance equations, I have been recently involved in the transfer of the copyright on the OpenQBMM code base to the OpenFOAM Foundation, to be able to contribute the corresponding source code to them. I summarize here some motivations, lessons learned and some advice that may be useful to others who want to follow the same path. Why contribute? This is a question several have asked. Why contribute a code base that took four years of work to be build (and quite some nights, holiday, weekends too), including research, overcoming…

  • CFD,  General,  Linux,  OpenFOAM,  Windows

    Developing for OpenFOAM on Windows 10 – Part 3

    Enabling support for graphical applications in WSL with Xming The Windows Subsystem for Linux does not officially support GUI applications. However, it is possible to successfully run several of them using a Windows-based X server as Xming. The steps to follow are simple: Download Xming (please, consider a donation to support the developer!) for your version of Windows Install it accepting the default settings Open the Ubuntu bash terminal and type echo "export DISPLAY=:0" >> .bashrc Load the settings with the command: source ~/.bashrc Test the setup as follows: Start the Xming server on Windows. An icon will appear in the notification areas Type paraview in the Ubuntu bash terminal.…

  • CFD,  Linux,  OpenFOAM,  Windows

    Developing for OpenFOAM on Windows 10 – Part 2

    Installing OpenFOAM on WSL – Ubuntu The installation steps for OpenFOAM on Ubuntu are straightforward because the OpenFOAM Foundation provides packages for Ubuntu which can be directly used in WSL. The following steps summarize how to rapidly set OpenFOAM-dev up on WSL. Open the Ubuntu bash terminal on Windows 10, and add the OpenFOAM repository and the corresponding signatures with the commands: sudo add-apt-repository "http://dl.openfoam.org/ubuntu dev" sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository "http://dl.openfoam.org/ubuntu" Refresh the repository with the command: sudo apt-get update Install OpenFOAM-dev with: sudo apt-get install openfoam-dev Add the configuration file for OpenFOAM to bashrc with the command: echo "source /opt/openfoam5/etc/bashrc" >>…

  • CFD,  Linux,  OpenFOAM,  Windows

    Developing for OpenFOAM on Windows 10 – Introduction

    Windows 10 comes with the Windows Subsystem for Linux (WSL), which allows different Linux distributions to run under Windows. Currently Ubuntu, openSUSE and SUSE Linux Enterprise Server are available in the Microsoft Store, with Fedora expected to become available soon. When I started considering the option of ceasing the development of GeekoCFD, I have started exploring the possibility of using WSL for my development work. I am still testing this, and my virtual machine with openSUSE is still there. However, WSL looks promising. Thus, I thought of sharing the steps I have followed to set up my test environment, with a few tweaks to improve the experience. I have divided…