Posts

Featured Post

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 useful links about ANSYS-Fluent [Always update]

Tutorials Cornell University Learning Modules List of the tutorials in this resource: 1.    What's Under the CFD Blackbox? 2.    Big Ideas: Fluid Dynamics 3.    Computational Fluid Dynamics 4.    Laminar Pipe Flow 5.    Turbulent Pipe Flow 6.    Flat Plate Boundary Layer 7.    Supersonic Flow Over a Wedge 8.    Compressible Flow in a Nozzle 9.    Turbulent Forced Convection 10.   Laminar Convection: Nusselt Problem 11.   Steady Flow Past a Cylinder 12.   Unsteady Flow Past a Cylinder 13.   Flow over an Airfoil 14.   3D Transonic Flow over a Wing 15.   Bifurcating Artery 16.   3D Bifurcating Artery 17.   Wind Turbine Blade FSI (Part 1) (Advanced) 18....

Parallel run with Fluent on a HPC cluster

Fluent Fluent is used for computational fluid dynamics (CFD). Fluent Journal Script A Fluent journal script (e.g. " journalfile.jou ") might look like this: file/read-case-data aircraft.cas it 1000 wd "aircraft.dat" Submitting a Batch Fluent Job to Slurm With the correct journal file set up, the final step is to submit this to the Slurm queuing system. #!/bin/sh #SBATCH -n 1 # 1 core #SBATCH -t 1-03:00:00 # 1 day and 3 hours #SBATCH -p compute # parition name #SBATCH -J fluent_batch # sensible name for the job # load the relevant module files. NB: if unsure about # what you need, please contact ops source /etc/profile.d/modules.sh module load apps fluent # run slurm in batch on the allocated node(s) # the '-t4' specifies 4 cores (academic licensing) fluent 2d -g -t4 -i journalfile.jou > outputfile.out The fluent options in the above Slurm script are: 2d the fluent version used -g no graphical environment -i journ...

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