Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
This document provides a tutorial for setting up a case for the OpenFOAM solver chtMultiRegionFoam. It describes dividing the computational domain into multiple regions with different material properties, defining the regions by selecting cells, splitting the mesh according to the defined regions, and the necessary files and folders for a chtMultiRegionFoam case. Key steps include declaring the regions and their properties, defining cell sets and zones to divide the domain, running utilities to split the mesh and modify files for each region.
This slide is describing how to set up the OpenFOAM simulations including rotating geometries.
The SRF (Single Rotating Frame) is covered and MRF (Multiple Reference Frame).will be covered in it.
CFD for Rotating Machinery using OpenFOAMFumiya Nozaki
This document discusses setting up CFD simulations for rotating machinery using OpenFOAM. It describes the Single Rotating Frame (SRF) and Multiple Reference Frame (MRF) methods. The SRF method computes the flow in a single rotating frame of reference attached to the rotating machinery, allowing for steady-state or transient solutions without mesh motion. The MRF method computes the flow using both rotating and stationary frames, with the rotating zone solved in the rotating frame and stationary zones in the stationary frame. Tutorial cases for the SRF solvers SRFSimpleFoam and SRFPimpleFoam are presented to demonstrate implementing rotating boundary conditions and calculating additional force terms.
The document discusses dynamic mesh functionality in OpenFOAM. It describes how OpenFOAM handles mesh motions and topology changes using the Dynamic Mesh functionality. Settings for Dynamic Mesh are specified in the dynamicMeshDict file located in the constant directory. Solvers that can handle mesh changes have names containing "DyM", standing for Dynamic Mesh. Examples include pimpleDyMFoam and interDyMFoam. Various types of dynamic meshes are described, including those handling only motion and those enabling topological changes.
Spatial Interpolation Schemes in OpenFOAMFumiya Nozaki
The document discusses spatial interpolation schemes in OpenFOAM. It begins by explaining how spatial derivative terms in the finite volume method (FVM) are discretized by integrating over cell volumes and surfaces. It then describes how values at face centers are obtained by interpolating from cell center values using algebraic relationships and weighting factors. Common interpolation schemes in OpenFOAM include upwind, linearUpwind, linear, and limitedLinear. The specification of interpolation schemes on a term-by-term basis is demonstrated. Code examples show how schemes such as upwind, linearUpwind and midPoint calculate interpolated face values and weighting factors differently.
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
This document provides a tutorial for setting up a case for the OpenFOAM solver chtMultiRegionFoam. It describes dividing the computational domain into multiple regions with different material properties, defining the regions by selecting cells, splitting the mesh according to the defined regions, and the necessary files and folders for a chtMultiRegionFoam case. Key steps include declaring the regions and their properties, defining cell sets and zones to divide the domain, running utilities to split the mesh and modify files for each region.
This slide is describing how to set up the OpenFOAM simulations including rotating geometries.
The SRF (Single Rotating Frame) is covered and MRF (Multiple Reference Frame).will be covered in it.
CFD for Rotating Machinery using OpenFOAMFumiya Nozaki
This document discusses setting up CFD simulations for rotating machinery using OpenFOAM. It describes the Single Rotating Frame (SRF) and Multiple Reference Frame (MRF) methods. The SRF method computes the flow in a single rotating frame of reference attached to the rotating machinery, allowing for steady-state or transient solutions without mesh motion. The MRF method computes the flow using both rotating and stationary frames, with the rotating zone solved in the rotating frame and stationary zones in the stationary frame. Tutorial cases for the SRF solvers SRFSimpleFoam and SRFPimpleFoam are presented to demonstrate implementing rotating boundary conditions and calculating additional force terms.
The document discusses dynamic mesh functionality in OpenFOAM. It describes how OpenFOAM handles mesh motions and topology changes using the Dynamic Mesh functionality. Settings for Dynamic Mesh are specified in the dynamicMeshDict file located in the constant directory. Solvers that can handle mesh changes have names containing "DyM", standing for Dynamic Mesh. Examples include pimpleDyMFoam and interDyMFoam. Various types of dynamic meshes are described, including those handling only motion and those enabling topological changes.
Spatial Interpolation Schemes in OpenFOAMFumiya Nozaki
The document discusses spatial interpolation schemes in OpenFOAM. It begins by explaining how spatial derivative terms in the finite volume method (FVM) are discretized by integrating over cell volumes and surfaces. It then describes how values at face centers are obtained by interpolating from cell center values using algebraic relationships and weighting factors. Common interpolation schemes in OpenFOAM include upwind, linearUpwind, linear, and limitedLinear. The specification of interpolation schemes on a term-by-term basis is demonstrated. Code examples show how schemes such as upwind, linearUpwind and midPoint calculate interpolated face values and weighting factors differently.
OpenFOAM for beginners: Hands-on trainingJibran Haider
NOTE: A NEW VERSION OF THIS PRESENTATION IS AVAILABLE ON MY RESEARCH GATE ACCOUNT
(https://www.researchgate.net/publication/327594760_OpenFOAM_course_for_beginners_Hands-on_training)
OpenFOAM is an open source Computational Fluid Dynamics software package based on C++ programming language within the context of cell centred Finite Volume Method. It is developed primarily by OpenCFD Ltd and distributed by OpenCFD Ltd and the OpenFOAM Foundation.
Disclaimer:
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. "
This document provides instructions for setting up a basic case for the OpenFOAM solver chtMultiRegionFoam, which simulates heat transfer between solid and fluid regions. The case consists of two solid regions and two air regions in a step geometry. Setting up the case requires creating region-specific subfolders for parameters, properties and solver configuration files, and defining the different regions and their connections using a setSet file. The document outlines the necessary directory structure and file content for running a simulation with chtMultiRegionFoam.
Full tutorial to start with OpenFOAM: run tutorials, adapt tutorials, single phase flow, immiscible two-phase flow, grid complex geometries, program equations.
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)takuyayamamoto1800
The S-CLSVOF solver in OpenFOAM uses a coupled volume of fluid (VOF) and level set method to simulate multiphase flows. It uses a level set function to track the interface and reinitialize it, improving on the standard VOF method. The solver has been implemented in OpenFOAM versions 2.0.x and higher but boundary conditions for the level set function have not been fully developed. The document provides information on setting up and running a dam break tutorial case using the S-CLSVOF solver by modifying an existing interFoam case.
This document describes OpenFOAM's cellLimited gradient scheme for limiting gradients. The scheme provides four types of limiters that can be applied to gradient calculations: cellLimited, cellMDLimited, faceLimited, and faceMDLimited. The cellLimited scheme calculates maximum and minimum values of the variable of interest in neighboring cells and faces, then uses these values to limit the gradient calculation through a limiter parameter between 0 and 1. Lower values of the parameter result in stronger limiting and more stable but less accurate solutions.
The document provides information about various components of an operating system including:
- The kernel acts as an interface between hardware and software, allocating resources and managing tasks.
- Operating systems support single/multi-user and single/multi-tasking capabilities.
- Linux is an open source, multi-user operating system based on the Unix kernel that is used widely today.
OpenFOAM for beginners: Hands-on trainingJibran Haider
NOTE: A NEW VERSION OF THIS PRESENTATION IS AVAILABLE ON MY RESEARCH GATE ACCOUNT
(https://www.researchgate.net/publication/327594760_OpenFOAM_course_for_beginners_Hands-on_training)
OpenFOAM is an open source Computational Fluid Dynamics software package based on C++ programming language within the context of cell centred Finite Volume Method. It is developed primarily by OpenCFD Ltd and distributed by OpenCFD Ltd and the OpenFOAM Foundation.
Disclaimer:
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. "
This document provides instructions for setting up a basic case for the OpenFOAM solver chtMultiRegionFoam, which simulates heat transfer between solid and fluid regions. The case consists of two solid regions and two air regions in a step geometry. Setting up the case requires creating region-specific subfolders for parameters, properties and solver configuration files, and defining the different regions and their connections using a setSet file. The document outlines the necessary directory structure and file content for running a simulation with chtMultiRegionFoam.
Full tutorial to start with OpenFOAM: run tutorials, adapt tutorials, single phase flow, immiscible two-phase flow, grid complex geometries, program equations.
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)takuyayamamoto1800
The S-CLSVOF solver in OpenFOAM uses a coupled volume of fluid (VOF) and level set method to simulate multiphase flows. It uses a level set function to track the interface and reinitialize it, improving on the standard VOF method. The solver has been implemented in OpenFOAM versions 2.0.x and higher but boundary conditions for the level set function have not been fully developed. The document provides information on setting up and running a dam break tutorial case using the S-CLSVOF solver by modifying an existing interFoam case.
This document describes OpenFOAM's cellLimited gradient scheme for limiting gradients. The scheme provides four types of limiters that can be applied to gradient calculations: cellLimited, cellMDLimited, faceLimited, and faceMDLimited. The cellLimited scheme calculates maximum and minimum values of the variable of interest in neighboring cells and faces, then uses these values to limit the gradient calculation through a limiter parameter between 0 and 1. Lower values of the parameter result in stronger limiting and more stable but less accurate solutions.
The document provides information about various components of an operating system including:
- The kernel acts as an interface between hardware and software, allocating resources and managing tasks.
- Operating systems support single/multi-user and single/multi-tasking capabilities.
- Linux is an open source, multi-user operating system based on the Unix kernel that is used widely today.
Algoritmi e Calcolo Parallelo 2012/2013 - OpenMPPier Luca Lanzi
This document provides an introduction to OpenMP, which is an application programming interface (API) used for shared memory multiprocessing programming in C, C++, and Fortran. It discusses key OpenMP concepts like parallel regions, work sharing constructs, data scope clauses, and runtime library routines. The document begins with an overview of OpenMP and its history, goals, programming model and basic elements. It then covers specific OpenMP constructs like parallel, for, sections and single, as well as data scope attributes like private, shared, default and reduction. Runtime functions for querying thread numbers and setting thread counts are also summarized.
- OpenMP provides compiler directives and library calls to incrementally parallelize applications for shared memory multiprocessor systems. It works by allowing the master thread to spawn worker threads to perform work concurrently using directives like parallel and parallel do.
- Variables in OpenMP can be shared, private, or reduction. Shared variables are accessible by all threads while private variables have a separate copy for each thread. Reduction variables are used to combine values across threads.
- Synchronization is needed to coordinate thread access and ensure correct results. The barrier directive synchronizes threads at the end of parallel regions.
This document provides an introduction to the Linux operating system. It discusses that Linux is an open-source operating system based on Unix, and is commonly used over other operating systems due to its low cost, visible source code, and support for open-sourcing applications. The document then covers basic Linux commands for getting system information, navigating directories, manipulating files and getting command help. It also discusses techniques like autocompletion, command history, and wildcards to help users work more efficiently in the Linux terminal.
Desktop as a Service supporting Environmental ‘omicsDavid Wallom
Within the Environmental 'omics community Bio-Linux is a widely used tool. This has the advantage of providing in a single deliverable package all necessary software and tools to support common analyses. With the growth in data volumes within the community and increasing
constraints on user access and control over their own desktops an alternative delivery method of Bio-Linux and, in future, the Docker container environment is necessary.
Within the EOS Cloud project we have constructed a Desktop as a Service system to centrally host virtual machines with these tools preconfigured and maintained. To enable efficient use of the resources we have enabled user controlled resource scaling so that users are able to utilise small scale VMs for task configuration and data manipulation and boost to a larger scale to run analysis applications all the while
maintaining the user environment in a consistent manner. Alongside this within the project we have been developed tools to simplify the increasingly popular Docker software usage model. This includes ensure uniformity of behaviour between the host system and the running Docker container.
Within the invitation only trial user community we identify two different exemplars groups and explain their usage and how the products and services developed within the project are useful for them. We conclude discussing the useful nature of Desktop as a Service, how it is of great benefit to the bioinformatics community but could also be of great use elsewhere, where the need for a stable user environment with applications already available that do not rely on local ICT
support.
Presentation by Willem Ottevanger, Deltares, at the Delft3D - User Days (Day 3a: River morphodynamics), during Delft Software Days - Edition 2019. Wednesday, 13 November 2019, Delft.
The document provides an overview of Linux operating system concepts including:
- Linux is an open source operating system that interacts with hardware and allocates resources.
- It supports multi-tasking and multi-user environments. Common types include Debian, Ubuntu, and Redhat.
- Key components include the kernel, shell programs, file management commands, text editors, browsers, and programming tools.
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...Linaro
Session ID: HKG18-411
Session Name: HKG18-411 - Introduction to OpenAMP which is an open source solution for heterogeneous system orchestration and communication
Speaker: Wendy Liang
Track: IoT, Embedded
★ Session Summary ★
Introduction to OpenAMP which is an open source solution for heterogeneous system orchestration and communication
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/hkg18/hkg18-411/
Presentation: http://connect.linaro.org.s3.amazonaws.com/hkg18/presentations/hkg18-411.pdf
Video: http://connect.linaro.org.s3.amazonaws.com/hkg18/videos/hkg18-411.mp4
---------------------------------------------------
★ Event Details ★
Linaro Connect Hong Kong 2018 (HKG18)
19-23 March 2018
Regal Airport Hotel Hong Kong
---------------------------------------------------
Keyword: IoT, Embedded
'http://www.linaro.org'
'http://connect.linaro.org'
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961
The document provides an overview of operating systems and UNIX/Linux specifically. It discusses how operating systems manage resources and tasks. It then covers the history and development of UNIX, its multi-user and multi-tasking capabilities, and common flavors including Linux. The rest of the document details key aspects of UNIX including processes and process management, memory management, file management, and starting processes.
The document provides an introduction to parallel programming concepts including shared memory and distributed memory architectures. It discusses multi-threading for shared memory systems where threads within a process share the same memory address space. The document also outlines Foster's methodology for designing parallel programs which includes partitioning work, determining communication needs, aggregating tasks, and mapping tasks to processes. OpenMP pragmas and directives are introduced for writing multi-threaded parallel programs in C using shared memory. Key concepts around scope and data access in OpenMP programs are also summarized.
The document provides information about Linux OS and shell programming. It discusses the history and evolution of Linux from being a student project to a robust OS. Key people involved in its development like Richard Stallman, Linus Torvalds, and Andy Tanenbaum are mentioned. The architecture of Linux including kernel, system libraries, system utilities etc. is explained. Important commands, file system structure, file permissions and text editors in Linux are also summarized.
The document discusses SDN and the RUNOS OpenFlow controller. It provides an overview of SDN principles and benefits. It then describes the RUNOS controller, including its in-kernel, fusion, and userspace versions. The userspace version aims to be high performance while also making application development easy. It discusses RUNOS' architecture, applications, and goals of improving on other controllers.
The document provides an outline on operating systems memory storage and management. It discusses how the OS must manage memory to ensure each process has enough space to execute without interfering with other processes. It describes different types of memory like cache, RAM, and disk and how the OS uses these properly. Specific topics covered include cache memory, RAM, virtual memory using swap files, the kernel, kernel types, shells, types of shells, shell scripting, and the four freedoms of open source software.
This document discusses how to write shared libraries. It begins with a brief history of shared libraries, noting that they allow code to be reused across processes by loading it into memory once. It then discusses some of the challenges with early binary formats not being designed for shared libraries, and how Linux initially used a.out but later switched to ELF to address limitations. The document will cover rules for properly using shared libraries to optimize resource usage and structure programs.
The document outlines the key steps in the Linux boot process:
1. When the computer is powered on, the BIOS initializes hardware and runs diagnostics.
2. The boot loader, either stored in the MBR or EFI partition, takes over and loads the Linux kernel into memory.
3. The kernel initializes drivers, mounts filesystems, and launches init which starts essential system processes and the login prompt.
The document discusses operating systems and provides information on various topics related to operating systems including:
- What an operating system is and its main functions
- Types of operating systems such as single-user/multi-user, real-time, distributed, and mobile operating systems
- Components of an operating system including the kernel, shell, interrupts, and processes
- Concepts such as booting, memory management, virtual memory, and process scheduling
- Additional topics like threads, cloud computing, computer storage, and advantages of cloud computing
UPDATED OCTOBER 2015: Unikernels are small, fast, easily deployable, and very secure application stacks. Lacking a traditional operating system layer, they provide a new way of looking at the cloud which goes beyond the methodologies used by Docker and other container technologies.
This is an update of the deck as delivered by Russell Pavlicek. This includes some ground-breaking work done in the Rump Kernel project to bring web servers, database, and scripting language into the world of Unikernels.
Deck result of the Ohio Linuxfest 2015 in Columbus, OH.
Unikernel User Summit 2015: The Next Generation Cloud: Unleashing the Power o...The Linux Foundation
Russell Pavlicek discusses the potential of unikernels to improve cloud computing efficiency and security. Unikernels are specialized virtual machines containing just enough software to run an application, making them much smaller and faster than traditional virtual machines. Several prominent unikernel projects are profiled, including MirageOS, HaLVM, LING, ClickOS, OSv, and Rumprun. Unikernels could enable thousands of lightweight virtual machines per server and transient microservices with lifetimes measured in fractions of a second. Open source projects are leading the development of unikernels and their supporting ecosystems to realize this next generation of cloud computing architecture.
Xen Project Evangelist Russell Pavlicek talks about how the growing area of hypervisor-leveraging unikernels will help redefine the cloud.
MAJOR UPDATE: Deck is now the result of 2015 Ohio Linuxfest, about a year after the initial talk. Deck now contains almost twice as much information as the original talk.
Similar to Introdcution to Openfoam--working with free software (20)
artificial intelligence and data science contents.pptxGauravCar
What is artificial intelligence? Artificial intelligence is the ability of a computer or computer-controlled robot to perform tasks that are commonly associated with the intellectual processes characteristic of humans, such as the ability to reason.
› ...
Artificial intelligence (AI) | Definitio
Applications of artificial Intelligence in Mechanical Engineering.pdfAtif Razi
Historically, mechanical engineering has relied heavily on human expertise and empirical methods to solve complex problems. With the introduction of computer-aided design (CAD) and finite element analysis (FEA), the field took its first steps towards digitization. These tools allowed engineers to simulate and analyze mechanical systems with greater accuracy and efficiency. However, the sheer volume of data generated by modern engineering systems and the increasing complexity of these systems have necessitated more advanced analytical tools, paving the way for AI.
AI offers the capability to process vast amounts of data, identify patterns, and make predictions with a level of speed and accuracy unattainable by traditional methods. This has profound implications for mechanical engineering, enabling more efficient design processes, predictive maintenance strategies, and optimized manufacturing operations. AI-driven tools can learn from historical data, adapt to new information, and continuously improve their performance, making them invaluable in tackling the multifaceted challenges of modern mechanical engineering.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Rainfall intensity duration frequency curve statistical analysis and modeling...bijceesjournal
Using data from 41 years in Patna’ India’ the study’s goal is to analyze the trends of how often it rains on a weekly, seasonal, and annual basis (1981−2020). First, utilizing the intensity-duration-frequency (IDF) curve and the relationship by statistically analyzing rainfall’ the historical rainfall data set for Patna’ India’ during a 41 year period (1981−2020), was evaluated for its quality. Changes in the hydrologic cycle as a result of increased greenhouse gas emissions are expected to induce variations in the intensity, length, and frequency of precipitation events. One strategy to lessen vulnerability is to quantify probable changes and adapt to them. Techniques such as log-normal, normal, and Gumbel are used (EV-I). Distributions were created with durations of 1, 2, 3, 6, and 24 h and return times of 2, 5, 10, 25, and 100 years. There were also mathematical correlations discovered between rainfall and recurrence interval.
Findings: Based on findings, the Gumbel approach produced the highest intensity values, whereas the other approaches produced values that were close to each other. The data indicates that 461.9 mm of rain fell during the monsoon season’s 301st week. However, it was found that the 29th week had the greatest average rainfall, 92.6 mm. With 952.6 mm on average, the monsoon season saw the highest rainfall. Calculations revealed that the yearly rainfall averaged 1171.1 mm. Using Weibull’s method, the study was subsequently expanded to examine rainfall distribution at different recurrence intervals of 2, 5, 10, and 25 years. Rainfall and recurrence interval mathematical correlations were also developed. Further regression analysis revealed that short wave irrigation, wind direction, wind speed, pressure, relative humidity, and temperature all had a substantial influence on rainfall.
Originality and value: The results of the rainfall IDF curves can provide useful information to policymakers in making appropriate decisions in managing and minimizing floods in the study area.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
2. Disclaimer
This offering is not approved or endorsed by OpenCFD Limited, produc
er and distributor of the OpenFOAM software and owner of the OPEN
FOAM and OpenCFD trade marks.
3. Objectives
• FVM in general coordinate system
• Have an overview of the OpenFOAM® capabilities
• Installation and Be able to find help and documentation
• Know how to start and post-treat a simulation from existing tutorials
• Start your own simulation by modifying existing tutorials
• Understand what is behind solvers to identify the most suitable
solver for your specific problem
• Program your own solver by modifying an existing solver
4. What is OpenFOAM® ?
• An open source software package
• Developed by OpenCFD Ltd at ESI Group
• Released under the GNU General Public License [link]
• Abbreviation of Open Field Operation And Manipulation
• An efficient library of C++ modules
• Based on the cell centered Finite Volume Method
• Extensive CFD and Multi-physics capabilities
• Under active development [OpenFOAM Extend Project]
5. What is OpenFOAM® ?
• Can be freely download at www.openfoam.com
• Designed as a toolbox easily customisable
• Parallel computation implemented
• Cross-platform installation (Linux preferred)
8. OpenFOAM Multi-physics capabilities:
• Computational fluid dynamics (incompressible and compressible flows).
• Computational heat transfer and conjugate heat transfer.
• Combustion and chemical reactions.
• Multiphase flows and mass transfer.
• Particle methods (DEM, DSMC, MD) and lagrangian particles tracking.
• Stress analysis and fluid-structure interaction.
• Rotating frames of reference, arbitrary mesh interface, dynamic mesh
handling, and adaptive mesh refinement.
• 6 DOF solvers, ODE solvers, computational aero-acoustics,
computational electromagnetics, computational solid mechanics, MHD
9. OpenFOAM Physical modeling library
• Extensive turbulence modeling capabilities (RANS, DES and LES).
• Transport/rheology models. Newtonian and non-Newtonian viscosity
models.
• Thermophysical models and physical properties for liquids and gases.
• Source terms models.
• Lagrangian particle models.
• Interphase momentum transfer models for multiphase flows.
• Combustion, flame speed, chemical reactions, porous media, radiation,
phase change.
10. OpenFOAM Under the hood
• Finite Volume Method (FVM) based solver.
• Collocated polyhedral unstructured meshes.
• Second order accuracy in space and time. Many discretization schemes
available (including high order methods).
• Steady and transient solvers available.
• Pressure-velocity coupling via segregated methods (SIMPLE and PISO).
• But coupled solvers are under active development.
• Massive parallelism through domain decomposition.
• It comes with its own mesh generation tools.
• It also comes with many mesh manipulation and conversion utilities.
• It comes with many post-processing utilities.
• All components implemented in library form for easy re-use.
14. Getting started with OpenFOAM
Installation:
• OpenFOAM website [http://www.openfoam.org/download/]
• OpenFOAM wiki [https://openfoamwiki.net/index.php/Installation]
References:
• OpenFOAM user guide [http://www.openfoam.org/docs/]
• OpenFOAM programmer’s guide [http://www.openfoam.org/docs/]
• Source code [http://www.openfoam.org/docs/cpp/]
• Book [The OpenFOAM technology primer]
Actions:
Ubuntu64, OpenFoam64, Vmware,Win10.
15. Introduction to Linux
It is a UNIX-like operating system (OS).
So, now you might be wondering what is UNIX?
UNIX is a family of multitasking, multiuser, stable, and portable computer op
eratingsystems that derive from the original AT&T UNIX, developed in the 19
70s at the BellLabs.
• You will find UNIX/Linux in laptops, desktop PCs, servers, and super computers.
• UNIX/Linux systems: the kernel, the shell, and the programs.
• The kernel is the hub of the OS.
• The shell (or the terminal), acts as an interface between the user and the kernel.
• Programs are the different applications that the user uses.
16. Some Linux facts
• Originally developed by Linus Torvalds in 1991.
• Free and Open Source (the kernel).
• A wide range of Linux applications are free and Open Source.
• It can be installed in a great variety of hardware (laptops, desktop PCs, servers, su
percomputers, mobile phones, embedded microchips, and so on).
• It is stable, fast-performing, and highly configurable.
• It is the ideal OS for developing applications. It comes with many compilers,
interpreters, and libraries.
• Most modern Linux versions come with a GUI (similar to Windows or MacOSX).
• Knowledge of the terminal is required.
17. Linux distributions
There are many Linux distributions available (free and commercial)
• Red Hat.
• CentOS.
• Fedora.
• OpenSUSE.
• Slackware.
• Debian.
• Ubuntu.
• Mint.
• Arch.
During this course we will use Ubuntu.
18. What is the Linux terminal or shell?
• The terminal emulator or the shell acts as an interface between the user
and the OS.
• The shell, is a program that reads commands in the terminal (from the keyboa
rd) and send results back to the terminal (to the screen).
• It acts as a command line interpreter.
19. Where is the terminal in my Linux
distribution?
In most Linux distributions, finding the shell is pretty easy.
Just look for the terminal or console application in the applications menu
20. Basic shell interaction
Try input the following three commands , what is the feed
back .
whoami
date (date "+DATE: %m/%d/%y%nTIME: %H:%M:%S")
man
tab
arrow(up down)
history
23. command: ls(List Files)
1. List Files using ls with no option
2. List Files With option –l
3. View Hidden Files –a
4. List Files with Human Readable Format with option -lh
5. List Files in Reverse Order –r
6. Recursively list Sub-Directories -R
7. Sort Files by File Size -lS
24. command: ls(List Files)
1. List Files using ls with no option
2. List Files With option –l
3. View Hidden Files –la
4. List Files with Human Readable Format with option -lh
5. List Files in Reverse Order –lr
6. Recursively list Sub-Directories -R
7. Sort Files by File Size -ls
25. command: cd (Change Directory)
1. Switch back to previous directory where you working earlier “ cd –”
2. Change Current directory to parent directory “cd ..”
3. Show last working directory from where we moved “cd –”
4. Move two directory up from where you are now. “cd ../../”
5. Move to users home directory from anywhere “cd ~”
6. using “TAB”.
33. OpenFOAM environment
Load OpenFOAM module:
source /????/openfoam/etc/bashrc
Alternatively for regular OpenFOAM use, edit your
bashrc file:
Open bashrc file:
nano ∼/.bashrc
Add the following at the end of the file:
source /????/openfoam/etc/bashrc
34. OpenFOAM environment
To list all the environment variables related to
OpenFOAM®, type in the terminal:
env | grep “OpenFOAM”
36. Looking for information in OpenFOAM®
source code
locate a directory inside $WM_PROJECT_DIR that co
ntains the string fvPatch in its name
locate a file inside $WM_PROJECT_DIR that contains
the string fvPatch in its name
37. Looking for information in OpenFOAM®
source code
find the string LES inside all the files within the direc
tory$FOAM_SOLVERS
-r recurisive
-n print out line number
39. Let run----- Heat diffusion
Solver : laplacianFoam
1. Check the path of working directory:
echo $WM_PROJECT_USER_DIR
2. cp -r $FOAM_TUTORIALS/basic/laplacianFoam/flange/ .
3. cd flang
4. ls
5. ./Allrun
51. An simple example of FVM
Step II: Domain Discretization
discrete non-overlapping cells
52. An simple example of FVM
Mesh Topology
include element to element relations, face to elements relations, geom
etric information of the surfaces, element centroid and volume, face ce
ntroid, area and normal direction, etc.
56. An simple example of FVM
Step III: Equation Discretization
governing partial differential equations, are transformed into a set of al
gebraic equations, one for each element in the computational domain.
62. An simple example of FVM
Step IV: Solution of the Discretized Equations
Direct Methods
only good for small A<1000, are rarely used in computational fluid dynamics
Iterative Methods
Gauss-Seidel
Jacobi
Krylov
Multigrid
………………………………………………
very popular
63. An simple example of FVM
Step Last: Post-Processing
Data processing?................
Beautiful results doesn’t mean correct.
Make conclusion for your study.
64. Introduction to FVM
The general transport equation
• This is a second order equation. For good accuracy, it is necessary that the
order of the discretization is equal or higher than the order of the equation tha
t is being discretized (in space and time).
• By the way, starting from this equation we can write down the Navier-Stokes
equations (NSE). So everything we are going to address also applies to
the NSE.
66. Introduction to FVM
• The control volumes can be of any shape (e.g., tetrahedrons, hexes, prisms,
pyramids,and so on). The only requirement is that the faces that made up the
control volume need to be planar.
82. Introduction to FVM
When the grid is skewed the line does not necessarily pass throu
gh the centroid of the face, Thus a correction for the interpolated
value at f′ is needed in order to get the value at f.
83. Introduction to FVM
Gradient computation at cell centroids and faces is fundamental t
o constructing the discretized sets of diffusion equations and con
vection.
Green-Gauss Gradient Method
84. Introduction to FVM
Gradient computation at cell centroids and faces is fundamental t
o constructing the discretized sets of diffusion equations and con
vection.
Green-Gauss Gradient Method
86. Introduction to FVM
In the least square methods, a gradient is computed by an optimi
zation procedure that finds the minimum of the function. w is so
me weighting factor
87. Introduction to FVM
In the least square methods, a gradient is computed by an optimi
zation procedure that finds the minimum of the function. w is so
me weighting factor
99. Where do we set all the discretization
schemes in OpenFOAM
100. Time discretization schemes
• There are many time discretization schemes available in OpenFOAM.
• You will find the source code in the following directory:
$WM_PROJECT_DIR/src/finiteVolume/finiteVolume/ddtSchemes
• These are the time discretization schemes that you will use most of the ti
mes:
• steadyState: for steady state simulations (implicit/explicit).
• Euler: time dependent first order (implicit/explicit), bounded.
• backward: time dependent second order (implicit), bounded/unb
ounded.
• CrankNicolson: time dependent second order (implicit), bounded
/unbounded.
• First order methods are bounded and stable, but diffusive.
• Second order methods are accurate, but they might become oscillatory.
• we always want a second order accurate solution.
• If you keep the CFL less than one when using the Euler method, numeric
al diffusion is not
101. Convective discretization schemes
• You will find the source code in the following directory:
$WM_PROJECT_DIR/src/finiteVolume/interpolation/surfaceInterpolati
on
• These are the convective discretization schemes that you will use most of
the times:
• upwind: first order accurate.
• linearUpwind: second order accurate, bounded.
• linear: second order accurate, unbounded.
• A good TVD scheme (vanLeer or Minmod): TVD, second or
der accurate, bounded.
• limitedLinear: second order accurate, unbounded, but mor
e stable than pure linear.
Recommended for LES simulations (kind of similar to the Fr
omm method).
• First order methods are bounded and stable but diffusive.
• Second order methods are accurate, but they might become oscillatory.
102. Numerical Playground---pure convection
Solver used: scalarTransportFoam
Mission: Comparison of different convection discretization schemes
boundness and overshoot
familiar with gnuplot
103. Numerical Playground---pure convection
Mission:
• Test convection schemes, which one is more accurate?
• Are all time discretization schemes bounded?
• If you are using the Crank-Nicolson scheme, how will you avoid oscillations?
• Does the solution improve if you reduce the time-step?
• Use the upwind scheme and a really fine mesh. Do the accuracy of the solution
improve?
• Pure convection problems have analytical solutions. You are asked to design
your own tutorial with an analytical solution in 2D or 3D.
• Try to break the solver using a time step less than 0.005 seconds. You are allow
to modify the original mesh and use any combination of discretization schemes.
104. Convective discretization schemes
• When you use linearUpwind for div(phi,U), you need to tell OpenFOAM® how to
compute the
velocity gradient or grad(U)
105. Gradient discretization schemes
• You will find the source code in the following directory:
$WM_PROJECT_DIR/src/finiteVolume/finiteVolume/gradSchemes
• These are the gradient discretization schemes that you will use most of the times:
• Gauss
• leastSquares
• To avoid overshoots or undershoots when computing the gradients, you can use gra
dient limiters.
• Gradient limiters increase the stability of the method but add diffusion due to clippi
ng.
• You will find the source code in the following directory:
$WM_PROJECT_DIR/src/finiteVolume/finiteVolume/gradSchemes/limitedG
chemes
• These are the most important gradient limiter schemes available in OpenFOAM®:
106. Gradient discretization schemes
• These are the most important gradient limiter schemes available in OpenFOAM®:
cellLimited, cellMDLimited, faceLimited, faceMDLimited
• Cell limiters will limit cell-to-cell values.
• Face limiters will limit face-to-cell values.
• The multi-directional (dimensional) limiters (cellMDLimited and faceMDLimited), will
apply the limiter in each face direction separately.
• The standard limiters (cellLimited and faceLimited), will apply the limiter to all comp
onents of
107. Gradient discretization schemes
• The gradient limiter implementation in OpenFOAM®, uses a blending factor .
• Setting to 0 is equivalent to turning off the gradient limiter. You gain accuracy but t
he solution
might become unbounded.
• By setting the blending factor equal to 1 the limiter is always on. You gain stability b
ut you give
up accuracy (due to gradient clipping).
• If you set the blending factor to 0.5, you get the best of both worlds.
108. Laplacian terms discretization schemes
• You will find the source code in the following directory:
$WM_PROJECT_DIR/src/finiteVolume/finiteVolume/snGradSchemes
• These are the Laplacian terms discretization schemes that you will use most of the ti
mes:
• orthogonal: mainly limited for hexahedral meshes with no grading (a perfect mesh).
Second order accurate, bounded on perfect meshes, without non-orthogonal correction
s.
• corrected: for meshes with grading and non-orthogonality. Second order accurate,
bounded depending on the quality of the mesh, with non-orthogonal corrections.
• limited: for meshes with grading and non-orthogonality. Second order accurate,
bounded depending on the quality of the mesh, with non-orthogonal corrections.
• uncorrected: usually used on bad quality meshes with grading and non-orthogonality.
Second order accurate, without non-orthogonal corrections. Stable but more diffusive
than the limited and corrected methods
109. Laplacian terms discretization schemes
• The limited method uses a blending factor :
• Setting to 1 is equivalent to using the corrected method. You gain accuracy, but the
solution might
become unbounded.
• By setting the blending factor equal to 0 is equivalent to using the uncorrected met
hod. You give up accuracybut gain stability.
• If you set the blending factor to 0.5, you get the best of both worlds. In this case, the
non-orthogonal
112. What method should I use?
• It is equivalent to the default method you will
find
In commercial solvers.
• In overall, this setup is second order accurate
and
fully bounded.
• According to the quality of your mesh, you wi
ll
needto change the blending factor of the
laplacianSchemes and snGradSchemes keywor
ds.
• To keep temporal diffusion to a minimum, us
e a CFL
number less than 2.
• If during the simulation the turbulence quanti
ties
113. A very stable but too diffusive numerics
• If you are looking for extra stability, you can use thi
s method.
• This setup is very stable but too diffusive.
• This setup is first order in space and time.
• You can use this setup to start the solution in the
presence of bad quality meshes or strong discontin
uities.
• Remember, you can start using a first order method
and then switch to a second order method.
• Start robustly, end with accuracy.
122. Introduction to FVM
• As you can see, when it comes to linear solvers there are many options and comb
inations available in OpenFOAM.
• When it comes to choosing the linear solver, there is no written theory.
• Most of the times using the GAMG method (geometric-algebraic multi-grid), is th
e best choice for symmetric matrices (e.g., pressure).
• The GAMG method should converge fast (less than 20 iterations). If it’s taking m
ore iterations, try to change the smoother.
• And if it is taking too long or it is unstable, use the PCG solver.
123. Introduction to FVM
• When running with many cores (more than 1000), using the PCG might be a b
etter choice.
• For asymmetric matrices, the PBiCGStab method with DILU preconditioner is a
good choice.
• The smoothSolver solver with smoother GaussSeidel, also performs very well.
• If the PBiCGStab method with DILU preconditioner mysteriously crashed with a
n error related to the preconditioner, use the smoothSolver or change the preco
nditioner.
• But in general the PBiCGStab solver should be faster than the smoothSolver so
lver.
• Usually, computing the velocity and the transported quantities is inexpensive a
nd fast, so it is a good idea to use a tight tolerance (1e-8) for these fields.
124. On the CFL number
• The CFL number is a measure of how much information ( ) traverses a com
putational grid cell ( ) in a given time-step ( ).
• The CFL number is not a magical number.
• The CFL number is a necessary condition to guarantee the stability of the
numerical scheme.
• But not all numerical schemes have the same stability requirements.
125. On the CFL number
• The CFD solvers can be explicit and implicit.
• Explicit and implicit solvers have different stability requirements.
• Implicit numerical methods are unconditionally stable. they are not constrained to t
he CFL
number condition.
• However, unconditionally stable, does not mean that you can choose a time step of
any size.
• The time-step must be chosen in such a way that it resolves the time-dependent fe
atures, and it maintains the solver stability.
• When we use implicit solvers, we need to assemble a large system of equations.
• But as we are often interested in the unsteadiness of the solution, we usually use a
CFL number in the order of 1.0
126. How to control the CFL number
• You can control the CFL number by changing th
e mesh
cell size or changing the time-step size.
• The easiest way is by changing the time-step siz
e.
• If you refine the mesh, and you would like to ha
ve the same CFL number as the base mesh, you w
ill need to decrease the time-step size.
• On the other side, if you coarse the mesh and y
ou would like to have the same CFL number as th
e base mesh, you will need to increase the time-st
ep size.
• The keyword deltaT controls the time-step size
of the simulation (0.0001 seconds in this generic c
ase).
149. How to work with multiple blocks
face matching(treated automatically):
the set of faces that comprise a patch from one block are formed from the same set of
vertices as a set of faces patch that comprise a patch from another block;
face merging(must specify interfaces):
a group of faces from a patch from one block are connected to another group of faces from a
patch from another block, to create a new set of internal faces connecting the two blocks.
164. OpenFoam Mesh Generation-SnappyHexMesh
◮ SHM is a fully automatic, parallel, octree-refinement-based mesh generati
on app for OpenFOAM.
◮ Mesh generation is based on four steps:
167. import a third-party software mesh into
OpenFOAM
The list of currently available mesh conversion utilities can be found in:
ls $FOAM_UTILITIES/mesh/conversion
168. panacea of meshing? ---polyhedral mesh
• In polyhedral meshes the cells have more neighbors than in tetrahedr
al and/or hexahedral meshes, hence the gradients are approximated be
tter on polyhedral meshes.
• Another interesting property of polyhedral meshes is that they reduce
the cell count. But there is a catch, they increase the number of faces
so you need to compute more fluxes (diffusive and convective).
• Polyhedral meshes are not easy to generate, most of the times you ne
ed to start from tetrahedral meshes.
• polyhedral meshes inhered the same quality problems of the starting
tetrahedral mesh, sometimes they made things worst.
• Are polyhedral meshes better than hex or tet meshes? You need to co
nduct your own numerical experiments.
169. About the Mesh
• Remember, garbage in - garbage out.
• Use hexahedral meshes whenever is possible, specially if high accurac
y in predicting forces is your goal.(does not mean that tetra mesh are
no good).
• Increasing the cells count will likely improve the solution accuracy
when you refine your mesh (specially when it is done automatically),
the overall quality of the mesh is reduced.
• The mesh density should be high enough to capture all relevant flow
features.
187. Stopping the simulation
Your simulation will automatically stop at the time value you set using the k
eyword endTime in the controlDict dictionary.
188. Stopping the simulation
If you want to stop the simulation and save the solution, in the controlDict
dictionary made the following modification,
stopAt writeNow;
189. Stopping the simulation
The previous modifications can be done on-the-fly, but you will need to se
t the keyword runTimeModifiable to true in the controlDict dictionary.
190. Cleaning the case folder
• If you want to erase the mesh and the solution in the current case folder, you can
type in the terminal,
$> foamCleanTutorials
• If you are running in parallel, this will also erase the processorN directories. We wi
ll talk about running in parallel later.
• If you are looking to only erase the mesh, you can type in the terminal,
$> foamCleanPolyMesh
• If you are only interested in erasing the saved solutions, in the terminal type,
$> foamListTimes -rm
• If you are running in parallel and you want to erase the solution saved in the proc
essor directories, type in the terminal,
$> foamListTimes –rm -processor
191. A deeper view to the case setup
• The time step directories contain the values of all the variables at those ti
me steps (the solution). The 0 directory is thus the initial condition and bo
undary conditions.
• The constant directory contains the mesh and dictionaries for thermophy
sical, turbulence models and advanced physical models.
• The system directory contains settings for the run, discretization schemes
and solution procedures.
• The postProcessing directory contains the information related to the
functionObjects (we are going to address functionObjects later).
192. The constant directory
• The transportProperties file is a dictionary for the dimensioned scalar nu,
or the kinematic viscosity.
200. Running in parallel
The method of parallel computing used by OpenFOAM is known as domain
decomposition, in which the geometry and associated fields are broken into
pieces and distributed among different processors.
The parallel programming implementation is hidden from the user.
Do not ask about scalability, that is problem/hardware specific.
201. Running in parallel
Summarizing to run in parallel we proceed in the following way:
$> decomposePar
$> mpirun –np <NPROCS> <application/utility> –parallel
$> reconstructPar
202. Running in parallel
• The mesh and fields are decomposed using the decomposePar utility.
• They are broken up according to a set of parameters specified in a diction
ary named decomposeParDict that is located in the system directory of the
case.
203. My simulation is always exploding
If after choosing the numerical scheme, linear solvers, and time step, your simulation always crash, you
can try this.
• Set the discretization scheme of the convectiveterms to upwind.
• Set the discretization scheme of the diffusive terms to Gauss linear limited 0.5
• Set the discretization scheme of the gradient terms to cellLimited Gauss linear 1.0
• Set the temporal discretization scheme to euler.
• Use the PISO method, and set nCorrectors 3, and nNonOrthogonalCorrectors 2.
• Do not use adaptive time-stepping.
• Use a CFL number of the order of 0.5 and set deltaT to a low value in order to avoid jumps
during the first iteration.
• This is one of a hell stable numerical scheme. However it is first order accurate.
• If this does not work, you should check your boundary conditions, initial conditions, physical
properties and model properties.
• You should also know the limitations of the solver you are trying to use, maybe the solver is
not compatible or can not solve the physics involve.
204. Some kind of conclusion
• Good mesh – good results.
• Start robustly and end with accuracy.
• Stability, accuracy and boundedness, play by these
terms and you will succeed.
• Select wisely the boundary conditions.
205. That was only the tip of the iceberg
Now the rest is on you