How To Run A Steady Case On A Creeper



Similar documents
OpenFOAM open source CFD on ANSELM

Open Source CFD Solver - OpenFOAM

OpenFOAM Workshop. Yağmur Gülkanat Res.Assist.

CFD: What is it good for?

OpenFOAM Opensource and CFD

Open Source Computational Fluid Dynamics

Hodor and Bran - Job Scheduling and PBS Scripts

Draft Version. For personal use. c Copyright Máté Márton LOHÁSZ. Tutorial for Channel Flow by LES using Open Source CFD

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM and OpenCFD trade marks.

A simplefoam tutorial

O.F.Wind Wind Site Assessment Simulation in complex terrain based on OpenFOAM. Darmstadt,

Grid 101. Grid 101. Josh Hegie.

Self Financed One Week Training

Getting started with CFD packages. OpenFOAM R and FLUENT R

Pre-processing in openfoam, mesh generation. OpenFOAM kurs 2013 Håkan Nilsson Olivier Petit

How To Run A Cdef Simulation

Tutorial: Using WestGrid. Drew Leske Compute Canada/WestGrid Site Lead University of Victoria

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM

CFD Simulation of Subcooled Flow Boiling using OpenFOAM

Incorporation of OpenFOAM software into Computational Fluid Dynamics process in Volvo Technology

bluecape s Official Website

CastNet: Modelling platform for open source solver technology

OpenFOAM postprocessing and advanced running options

Model of a flow in intersecting microchannels. Denis Semyonov

Marine CFD applications using OpenFOAM

ME6130 An introduction to CFD 1-1

Customer Training Material. Lecture 2. Introduction to. Methodology ANSYS FLUENT. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved.

THE CFD SIMULATION OF THE FLOW AROUND THE AIRCRAFT USING OPENFOAM AND ANSA

Steady Flow: Laminar and Turbulent in an S-Bend

PBS Tutorial. Fangrui Ma Universit of Nebraska-Lincoln. October 26th, 2007

CastNet: GUI environment for OpenFOAM

HPC at IU Overview. Abhinav Thota Research Technologies Indiana University

Using WestGrid. Patrick Mann, Manager, Technical Operations Jan.15, 2014

Work Environment. David Tur HPC Expert. HPC Users Training September, 18th 2015

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM and OpenCFD trade marks.

Multiphase Flow - Appendices

Open source Computational Fluid Dynamics using OpenFOAM

Introduction to CFD Analysis

HPC Deployment of OpenFOAM in an Industrial Setting

OpenFOAM Tutorial. 4. Units

TVM 4155 Numerical modelling and hydraulics 10. March OpenFOAM homework

High Performance Computing

Introduction to Sun Grid Engine (SGE)

CFD with OpenSource software

Using Parallel Computing to Run Multiple Jobs

NEC HPC-Linux-Cluster

OPEN-SOURCE CFD ANALYSIS OF MULTI-DOMAIN UNSTEADY HEATING WITH NATURAL CONVECTION

STUDY OF MESH DEFORMATION FEATURES OF AN OPEN SOURCE CFD PACKAGE AND APPLICATION TO A GEAR PUMP SIMULATION

Linux für bwgrid. Sabine Richling, Heinz Kredel. Universitätsrechenzentrum Heidelberg Rechenzentrum Universität Mannheim. 27.

Auxiliary Processing swak4foam and PyFoam

Accelerating CFD using OpenFOAM with GPUs

Streamline Computing Linux Cluster User Training. ( Nottingham University)

Simple beginning 3D OpenFOAM Tutorial

Martinos Center Compute Clusters

Computational Modeling of Wind Turbines in OpenFOAM

User s Manual

Aerodynamic Department Institute of Aviation. Adam Dziubiński CFD group FLUENT

Visualization and Post Processing of OpenFOAM results a Brie. a Brief Introduction to VTK

Miami University RedHawk Cluster Working with batch jobs on the Cluster

CFD modelling of floating body response to regular waves

Express Introductory Training in ANSYS Fluent Lecture 1 Introduction to the CFD Methodology

Quick Tutorial for Portable Batch System (PBS)

1.0. User Manual For HPC Cluster at GIKI. Volume. Ghulam Ishaq Khan Institute of Engineering Sciences & Technology

2013 Code_Saturne User Group Meeting. EDF R&D Chatou, France. 9 th April 2013

Ra - Batch Scripts. Timothy H. Kaiser, Ph.D. tkaiser@mines.edu

An Introduction to High Performance Computing in the Department

CFD Lab Department of Engineering The University of Liverpool

Solver Development in OpenFOAM

CCTech TM. ICEM-CFD & FLUENT Software Training. Course Brochure. Simulation is The Future

Adaptation and validation of OpenFOAM CFD-solvers for nuclear safety related flow simulations

NUMERICAL SIMULATION OF REGULAR WAVES RUN-UP OVER SLOPPING BEACH BY OPEN FOAM

Grid Engine Basics. Table of Contents. Grid Engine Basics Version 1. (Formerly: Sun Grid Engine)

Using the Yale HPC Clusters

Abaqus/CFD Sample Problems. Abaqus 6.10

Parallel Debugging with DDT

Summary. Load and Open GaussView to start example

Beyond Windows: Using the Linux Servers and the Grid

NUMERICAL ANALYSIS OF THE EFFECTS OF WIND ON BUILDING STRUCTURES

A Guide to the free mesh program Discretizer with OpenFOAM for CFD (Computational Fluid Dynamics)

Batch Scripts for RA & Mio

Job Scheduling with Moab Cluster Suite

Introduction to ANSYS Academic Research

OpenFOAM. The Open Source CFD Toolbox. User Guide

Running applications on the Cray XC30 4/12/2015

STCE. Outline. Introduction. Applications. Ongoing work. Summary. STCE RWTH-Aachen, Industrial Applications of discrete adjoint OpenFOAM, EuroAD 2014

MECH 479: Computational Fluid Dynamics

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

Installing and running COMSOL on a Linux cluster

Getting Started with HPC

Computational Fluid Dynamics in Automotive Applications

High Performance Computing Facility Specifications, Policies and Usage. Supercomputer Project. Bibliotheca Alexandrina

Grid Engine Users Guide p1 Edition

SGE Roll: Users Guide. Version Edition

The influence of mesh characteristics on OpenFOAM simulations of the DrivAer model

Lecture 11 Boundary Layers and Separation. Applied Computational Fluid Dynamics

Dimensional Analysis

High-Performance Reservoir Risk Assessment (Jacta Cluster)

Introduction to CFD Analysis

The Asterope compute cluster

Transcription:

Crash Course Introduction to OpenFOAM Artur Lidtke University of Southampton akl1g09@soton.ac.uk November 4, 2014 Artur Lidtke Crash Course Introduction to OpenFOAM 1 / 32

What is OpenFOAM? Using OpenFOAM Practice - Cylinder in uniform flow Summary Content What is OpenFOAM? The Idea Overview of the libraries Using OpenFOAM Cavity tutorial overview Creating own simulations Practice - cylinder in uniform flow A look at the test case Summary Artur Lidtke Crash Course Introduction to OpenFOAM 2 / 32

What is OpenFOAM? Artur Lidtke Crash Course Introduction to OpenFOAM 3 / 32

The Idea In a nutshell Free, open source set of libraries used to solve differential equations Primarily focused on Computational Fluid Dynamics (CFD), but may also be applied to other problems Uses finite volume approach to discretise and solve the governing equations Distributed by the OpenFOAM Foundation and developed by OpenCFD Ltd. Diclaimer: This series of presentations and tutorials is unofficial and is not supported or endorsed by the owners of OpenFOAM Artur Lidtke Crash Course Introduction to OpenFOAM 4 / 32

The Idea Open source Significant amount of development done by the users. See for instance: swak4foam pyfoam OpenFOAM Extend (e.g. OF-1.7.x) Individual contributions (solvers, utilities) uploaded by single users Written in C++ - efficient, versatile and well structured code Difficult to get started with development unless a proficient C++ user with experience Artur Lidtke Crash Course Introduction to OpenFOAM 5 / 32

The Idea Perfect? Little official support - training sessions organised but not free Not much coherent training materials - typically need to go through many presentations, reports and forum posts to find the answer to a particular problem User has full control over most of the parameters of any operation - overwhelming at the beginning Artur Lidtke Crash Course Introduction to OpenFOAM 6 / 32

The Idea Perfect? Little official support - training sessions organised but not free Not much coherent training materials - typically need to go through many presentations, reports and forum posts to find the answer to a particular problem User has full control over most of the parameters of any operation - overwhelming at the beginning BUT: Many tutorial cases prepared by the developers and users - demonstrate how different features of the code work (although without too much narration) Intensive unofficial support through the on-line user forum: http://www.cfd-online.com/forums/openfoam/ Wiki pages dedicated to OpenFOAM: http://openfoamwiki.net/index.php/main_page Artur Lidtke Crash Course Introduction to OpenFOAM 6 / 32

Overview of the libraries OpenFOAM capabilities See the official page for full info: http://www.openfoam.org/features/ What we are interested in: Incompressible, compressible and multiphase flows Reynold s Averaged Navier Stokes (RANS), Unsteady-RANS, and Large Eddy Simulation turbulence modelling Built-in meshing tools Easy to use (and modify) tools for extraction of data for post-processing Readilly available plugins to ParaView for flow visualisation Fully paralellised solvers (and some utilities) Artur Lidtke Crash Course Introduction to OpenFOAM 7 / 32

Using OpenFOAM Artur Lidtke Crash Course Introduction to OpenFOAM 8 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Use ssh -X $YOUR USERNAME@iridis4 a.soton.ac.uk Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Now your terminal is able to do things in Southampton Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Now your terminal is able to do things in Southampton All the files you will need are already here Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Now your terminal is able to do things in Southampton All the files you will need are already here As a reminder, in order to copy some directories to the supercomputer Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Connecting to the cluster We will work solely on Iridis to ensure everybody has access to what they need Connect to the cluster using ssh Now your terminal is able to do things in Southampton All the files you will need are already here As a reminder, in order to copy some directories to the supercomputer Use scp -r $SOURCE FOLDER \ $YOUR USERNAME@iridis4 a.soton.ac.uk:/home/\ $TARGET PATH Artur Lidtke Crash Course Introduction to OpenFOAM 9 / 32

Cavity tutorial overview Let s have a look at how to make OpenFOAM work Cavity tutorial - covered as one of the three cases in the official user guide: http://openfoam.org/docs/user/cavity.php Very simple, lid-driven cavity flow - basic CFD validation test case, much like the Hello World! code for programming Worth going through the official tutorial as well as these slides not to miss anything Artur Lidtke Crash Course Introduction to OpenFOAM 10 / 32

Cavity tutorial overview Let s have a look at how to make OpenFOAM work Cavity tutorial - covered as one of the three cases in the official user guide: http://openfoam.org/docs/user/cavity.php Very simple, lid-driven cavity flow - basic CFD validation test case, much like the Hello World! code for programming Worth going through the official tutorial as well as these slides not to miss anything Go to cd $FOAM RUN/tutorials/incompressible/icoFoam/cavity Artur Lidtke Crash Course Introduction to OpenFOAM 10 / 32

Cavity tutorial overview Let s have a look at how to make OpenFOAM work Cavity tutorial - covered as one of the three cases in the official user guide: http://openfoam.org/docs/user/cavity.php Very simple, lid-driven cavity flow - basic CFD validation test case, much like the Hello World! code for programming Worth going through the official tutorial as well as these slides not to miss anything Each OpenFOAM case is defined by a particular file structure in a separate folder Artur Lidtke Crash Course Introduction to OpenFOAM 10 / 32

Cavity tutorial overview What defines a case The very basic elments of an OpenFOAM simulation are: Artur Lidtke Crash Course Introduction to OpenFOAM 11 / 32

Cavity tutorial overview What defines a case The very basic elments of an OpenFOAM simulation are: System directory - used for controlling the utilities and solvers controldict - main solution control: time step, start/end times, data extraction, additional library linking, etc. fvschemes - describes the discretisation adopted for all quantities solved fvsolution - provides information as to how each of the equations is solved, given its discretisation Artur Lidtke Crash Course Introduction to OpenFOAM 11 / 32

Cavity tutorial overview What defines a case The very basic elments of an OpenFOAM simulation are: System directory - used for controlling the utilities and solvers Constant directory - holds the information about the case which (usually) doesn t change over time polymesh - contains the files describing the mesh transportproperties - description of the fluid and other associated parameters (viscosity, density, phase change parameters, etc.) turbulenceproperties - how the turbulence is modelled (no surprise there!) Artur Lidtke Crash Course Introduction to OpenFOAM 11 / 32

Cavity tutorial overview What defines a case The very basic elments of an OpenFOAM simulation are: System directory - used for controlling the utilities and solvers Constant directory - holds the information about the case which (usually) doesn t change over time 0 folder - contains the boundary conditions (separate file for each field, or flow variable) Artur Lidtke Crash Course Introduction to OpenFOAM 11 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Use blockmesh Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved Use Typical command is: parafoam But we haven t compiled the reuired ParaView libraries Convert solution to ParaView format foamtovtk -usetimename Start ParaView and open the VTK file paraview Select Surface with edges appearance Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved The boundary conditions are already set, so are the solver parameters. Just run the relevant application: Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved The boundary conditions are already set, so are the solver parameters. Just run the relevant application: Use icofoam Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved The boundary conditions are already set, so are the solver parameters. Just run the relevant application: Now it s time to check the solution Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case First, we need to create the structure mesh using a ready dictionary file Let us see what we have achieved The boundary conditions are already set, so are the solver parameters. Just run the relevant application: Now it s time to check the solution Use foamtovtk -latesttime -usetimename paraview Load the data Select Surface appearance Colour by p Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Cavity tutorial overview Running the case Artur Lidtke Crash Course Introduction to OpenFOAM 12 / 32

Creating own simulations How to create a bespoke case Tutorial cases cover many different flows, configurations and variants - something for everyone! To make life easier: Copy and existing tutorial case similar to what you want to simulate Change the mesh Alter the flow parameters Add any post-processing Done! Artur Lidtke Crash Course Introduction to OpenFOAM 13 / 32

Practice - cylinder in uniform flow Artur Lidtke Crash Course Introduction to OpenFOAM 14 / 32

A look at the test case Oveview Cylinder in uniform flow - relevant to most engineering problems Very well covered in the literature, countless sets of validation data Very complex flow despite simple geometry Several regimes of the flow depending on the Reynolds number: laminar, sub-critical, transitional and fully turbulent For the purpose of this workshop, let s look at sub-ciritical regime - low-re but not low enough to be boring Artur Lidtke Crash Course Introduction to OpenFOAM 15 / 32

A look at the test case Oveview Reynolds number is the ratio of inertial to viscous forces Given by Re = UD ν Tells us how turbulent the flow is likely to be (the higher the more turbulence) Artur Lidtke Crash Course Introduction to OpenFOAM 15 / 32

A look at the test case Oveview Artur Lidtke Crash Course Introduction to OpenFOAM 15 / 32

A look at the test case Conditions Chosen to repeat the experiments by Parnaudeau et al. (2008) http://www.irisa.fr/fluminance/team/carlier/ publications/parnaudeaucarlierheitzlamballais_ 2008_POF.pdf Rich source of information, detailed and well presented data Re = 3900 Expect a largely laminar boundary layer separating approximately half-way around the cylinder This gives rise to vortices being shed and turbulent wake appearing Artur Lidtke Crash Course Introduction to OpenFOAM 16 / 32

A look at the test case What we want to capture ω = U = 10 s 1 Artur Lidtke Crash Course Introduction to OpenFOAM 17 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Let us do just that: Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Let us do just that: Go to cd $FOAM RUN/cylinder2D Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Let us do just that: Let us create and view the mesh Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Let us do just that: Let us create and view the mesh Use blockmesh Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Getting the initial state - mesh It is a good idea to get an approximate steady-state solution of the flow beforehand This tries to capture the mean flow without resolving the turbulence explicitly Let us do just that: Let us create and view the mesh Do Visualise the mesh as for the cavity Artur Lidtke Crash Course Introduction to OpenFOAM 18 / 32

Cylinder mesh Artur Lidtke Crash Course Introduction to OpenFOAM 19 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first For F. Herbert fans: Solutions, within solutions, within solutions... Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Use cp -r 0.org 0 Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver Use potentialfoam Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver In system/controldict uncomment functions part to enable run-time postprocessing Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver In system/controldict uncomment functions part to enable run-time postprocessing Decompose the case to run in parallel Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver In system/controldict uncomment functions part to enable run-time postprocessing Decompose the case to run in parallel Use decomposepar Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver In system/controldict uncomment functions part to enable run-time postprocessing Decompose the case to run in parallel Run the steady-state solver in parallel Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Getting the initial state - solution To run a steady case RANS it s also good to run potential flow first The boundary conditions are set but are protected from overwriting Now, run the potential flow solver In system/controldict uncomment functions part to enable run-time postprocessing Decompose the case to run in parallel Run the steady-state solver in parallel Use foamjob -s -p simplefoam Artur Lidtke Crash Course Introduction to OpenFOAM 20 / 32

Post-processing Reconstruct the parallel solution Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Post-processing Reconstruct the parallel solution Use reconstructpar -latesttime Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Post-processing Reconstruct the parallel solution Clean-up the decomposed directories Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Post-processing Reconstruct the parallel solution Clean-up the decomposed directories Use rm -r processor* Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Post-processing Reconstruct the parallel solution Clean-up the decomposed directories View the solution Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Post-processing Reconstruct the parallel solution Clean-up the decomposed directories View the solution Do Load the case to ParaView Visualise the x-component of the velocity field Artur Lidtke Crash Course Introduction to OpenFOAM 21 / 32

Steady state solution - really? Artur Lidtke Crash Course Introduction to OpenFOAM 22 / 32

Steady state solution - really? Artur Lidtke Crash Course Introduction to OpenFOAM 22 / 32

Steady state solution - really? This is NOT a steady state solution! We ran it for long enough to expect at least partial convergence So, what could be the problem? Artur Lidtke Crash Course Introduction to OpenFOAM 22 / 32

Steady state solution - really? This is NOT a steady state solution! We ran it for long enough to expect at least partial convergence So, what could be the problem? We applied a steady-state solver to an inherently unsteady problem - cannot get real convergence Artur Lidtke Crash Course Introduction to OpenFOAM 22 / 32

Steady state solution - really? This is NOT a steady state solution! We ran it for long enough to expect at least partial convergence So, what could be the problem? We applied a steady-state solver to an inherently unsteady problem - cannot get real convergence Still OK for a rough guess of initial condition but meaningless physically Artur Lidtke Crash Course Introduction to OpenFOAM 22 / 32

Preparing to run the LES case Navigate to the case Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Go to cd $FOAM RUN/cylinder3D pimple LES Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Use blockmesh Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Copy the initial conditions Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Copy the initial conditions Use cp -r 0.org 0 Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Copy the initial conditions Map the steady-state solution onto the 3D grid Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Preparing to run the LES case Navigate to the case Create the mesh Copy the initial conditions Map the steady-state solution onto the 3D grid Use mapfields -sourcetime 2000../cylinder2D Artur Lidtke Crash Course Introduction to OpenFOAM 23 / 32

Basics of using a supercomputer In order to use the full potential of the cluster we need to submit a job Now we are using the login node, not the nodes that are acutally use computation What happens during the job execution is defined in a control script Artur Lidtke Crash Course Introduction to OpenFOAM 24 / 32

Basics of using a supercomputer In order to use the full potential of the cluster we need to submit a job Now we are using the login node, not the nodes that are acutally use computation What happens during the job execution is defined in a control script Let us see what that looks like Edit gedit Allrun Artur Lidtke Crash Course Introduction to OpenFOAM 24 / 32

Job control script - controlling the cluster #!/ bin / bash # PBS -S / bin / bash # Memory needed by the job # PBS -l mem =25 GB # Time allocated # PBS -l walltime =60:00:00 # Number of nodes and processors per node # PBS -l nodes =8: ppn =16 # Give the job a name # PBS -N Cyl_LES_smag # MPI_ BUFFER_ SIZE =120000000 Artur Lidtke Crash Course Introduction to OpenFOAM 25 / 32

Job control script - executing commands # Change to original working directory cd $PBS_ O_ WORKDIR # prepare to run in parallel decomposepar > log. decomposepar 2 >&1 # run the solver mpirun - np 128 pimplefoam - parallel > log. iridis_ run 2 >&1 Artur Lidtke Crash Course Introduction to OpenFOAM 26 / 32

Submitting and viewing the job Submit the job to the queue Artur Lidtke Crash Course Introduction to OpenFOAM 27 / 32

Submitting and viewing the job Submit the job to the queue Use qsub Allrun Artur Lidtke Crash Course Introduction to OpenFOAM 27 / 32

Submitting and viewing the job Submit the job to the queue To view the jobs currently queuing, running and recently cancelled Artur Lidtke Crash Course Introduction to OpenFOAM 27 / 32

Submitting and viewing the job Submit the job to the queue To view the jobs currently queuing, running and recently cancelled Use qstat -u $YOUR USERNAME Artur Lidtke Crash Course Introduction to OpenFOAM 27 / 32

Submitting and viewing the job Submit the job to the queue To view the jobs currently queuing, running and recently cancelled Now, all we need to do is wait and hope the simulation doesn t crash! Artur Lidtke Crash Course Introduction to OpenFOAM 27 / 32

Some useful commands qsub - submit a job to the queue (the script is stored in memory so any changes made to it after submission won t be applied) qstat - view your jobs, option -u is particularly useful showstart $JOB ID - get an estimated time required for a job to start showq - view the status of the queue, useful to redirect the output to a text file: showq > log.queue qdel $JOB ID - delete one of your jobs immediately Artur Lidtke Crash Course Introduction to OpenFOAM 28 / 32

Summary Artur Lidtke Crash Course Introduction to OpenFOAM 29 / 32

Conclusions We ve learned how OpenFOAM case is structured, how to mesh and run a simple case The idea of introducing an initial solution for a Large Eddy Simulation case has been discussed Brief introduction to using a supercomputer to do CFD has been delivered A potential pitfal of using an incorrect solver type for a particular problem has been indicated Artur Lidtke Crash Course Introduction to OpenFOAM 30 / 32

Further reading OpenFOAM User Guide: http://www.openfoam.org/docs/user/ Chalmers OpenFOAM course materials: http: //www.tfd.chalmers.se/~hani/kurser/os_cfd_2008/ OpenFOAM Wiki FAQ page: http://openfoamwiki.net/index.php/faqlong Artur Lidtke Crash Course Introduction to OpenFOAM 31 / 32

The End Artur Lidtke Crash Course Introduction to OpenFOAM 32 / 32