Posts

wallShearStress in OpenFOAM

Image
The wall shear stress,  , is given by: Where   is the dynamic viscosity,   is the flow velocity parallel to the wall and   is the distance to the wall. The SI unit of wall shear stress is pascal ( ), which is identical to  . The skin friction coefficient,  , is defined by: Where   is the local  wall shear stress ,   is the fluid density and   is the free-stream velocity (usually taken ouside of the boundary layer or at the inlet). Incompressible Flow Laminar In OpenFOAM, wallShearStress usually is in "kinematic pressure", namely in "m2/s2". It doesn't take into account the density of the fluid. So, you should multiply by rho to reach tau. tau = (wallShearStress) * rho or with wallGradU utility   tau = (wallGradU) * mu You can use the Calculator filter in ParaView to multiply the "wallShearStress" field by the density value. Turbulence Compressible Flo...

Turbulence properties and boundary conditions in OpenFOAM

Image
To know turbulence models in OpenFOAM, please look at OpenFOAM User Guide 7.2 Reynolds-averaged Navier–Stokes (RANS) NASA's Turbulence Modeling Resource  Boundary Conditions: INLET 1.     turbulentIntensityKineticEnergyInlet for k in the inlet (under that you make the description of the intensity and the value) 2.     turbulentMixingLengthFrequencyInlet for omega in the inlet (then description mixing length, k and value) 3.     turbulentMixingLengthDissipationRateInlet for epsilon in the inlet (then description mixing length and value) 4.     fixedValue EXAMPLE: inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.02; value uniform 0.0006; } To calculate the initial values of k, epsilon and w, read   Turbulence free-stream boundary conditions WALL With Wall Function (y+ > 1) 1.       kqRWallFunction for k 2.   ...

yPlus utility in OpenFOAM

Image
This post is about how to calculate yPlus in OpenFOAM. For RANS Note that yPlusRAS calculates y* and not y+ 1.      With wall function;   ·         type ‘yPlusRAS’ for incompressible flow ·         type ‘yPlusRAS’ –compressible for compressible flow 2.      Without wall function; ·         type wallShearStress if it is incompressible. If not, add " -compressible " flag ·         calculate manually: sqrt(wallShearStress/rho) * y/nu y = the distance to first cell from the wall nu = kinematic viscosity Be careful: You should use the cell center (height of the cell devided by two) for y For LES type ‘ yPlusLES’ Note: Y-star = rho*Cmu^0.25*sqrt(k)*y/mu y-plus = rho*sqrt(tau_w/rho_w)*y/mu Y-star is related to the turbulent kinetic energy and y-plus to the wall shear ...

SSH Remote Host Error

Remote Host Error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is 51:82:11:11:7e:6f:ac:ac:de:f1:53:08:1c:7d:55:68. Please contact your system administrator. Add correct host key in /../.ssh/known_hosts to get rid of this message. Offending RSA key in /../.ssh/known_hosts:12 RSA host key for 111.11.11.111 has changed and you have requested strict checking. Host key verification failed. Solution: Only type: ssh-keygen -R "you server hostname or ip"

Cmake upgrading error on Ubuntu 14.04

I've installed CMake 3.7.1 package from CMake's website for Linux 64-bit. When I type cmake, I get the following error: CMake Error: Could not find CMAKE_ROOT !!! CMake has most likely not been installed correctly. Modules directory not found in   SOLUTION: cd cmake-3.7.1 ./bootstrap --prefix=/usr make sudo make install Upgrading process:   tar -zxvf cmake-3.7.1.tar.gz (in /opt) cd cmake-3.7.1 sudo apt install openssl libssl-dev cmake_options="-DCMAKE_BOOTSTRAP=1" cmake_options="-DCMAKE_BOOTSTRAP=1 -DCMAKE_USE_OPENSSL=ON" ./configure make -j2 sudo make install

Some useful links about OpenFOAM [Always update]

OpenFOAM Beginner: OpenFOAM website [ 1 ] [ 2 ] Installation OpenFOAM OpenFOAM user guide OpenFOAM Wiki main page List of main OpenFOAM Utilities  Turbulence free-stream boundary conditions Best practice guidelines for turbomachinery CFD Comparison of OpenFOAM versions, official and community driven versions  (What is what and who is who in the OpenFOAM environment? - Foam-Extend, OpenFOAM+, Wikki Ltd, OpenCFD Ltd, OpenFOAM Foundation)  Advanced: Advanced tips for working with the OpenFOAM shell environment PhD course in CFD with OpenSource software, Quarter 2, 2008   Implement a new turbulence model [ 1 ] [ 2 ] [ 3  - the original paper of Mentor from where SSS k-omega model is implemented in OpenFOAM] Mathematics, Numerics, Derivations and OpenFOAM ,  Tobias Holzmann Online Tools: Scripts/blockMesh grading calculation     Y+ Compute Grid Spacing for a Given Y+ (Pointwise) Viscous Grid Spacing Calculator (...

Some problems and its solutions in OpenFOAM

Installation: Compilation with gcc instead of system compiler in OpenFOAM installation ( OpenFOAM -1 . 6 -ext on Centos 5 . 5 64 -bit) Errors 1.      The problem of OF versions relation:  If you have when you typed source etc/bashrc in foam folder, bash: /opt/foam-extend-3.1/bin/foamGetSystemInfo: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-3.1/etc/settings.sh: No such file or directory bash: /opt/foam-extend-3.1/etc/aliases.sh: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-3.1/bin/foamCleanPath: No such file or directory   Solution: ·  ...