Some useful resources for understanding fvSchemes within OpenFOAM for tetrahedral meshes from Salome

Subscribers:
9,750
Published on ● Video Link: https://www.youtube.com/watch?v=zFvqpJb_ndY



Duration: 21:20
543 views
19


Disclaimer: i am NOT an openfoam professional and I don't represent openfoam officially in any capacity

TLDR for Tetrahedral Meshes, Example fvSchemes:

// gradient terms
gradSchemes
{
default leastSquares;
}

// divergence or convection (advection) terms
divSchemes
{
default none;

div(phi,alpha) Gauss upwind;
div(phir,alpha) Gauss upwind;

div(phi,alpha.liquid) Gauss upwind;
div(phir,alpha.vapour,alpha.liquid) Gauss upwind;
div(phir,alpha.structure,alpha.liquid) Gauss upwind;
div(phi,alpha.vapour) Gauss upwind;
div(phir,alpha.liquid,alpha.vapour) Gauss upwind;
div(phir,alpha.structure,alpha.vapour) Gauss upwind;

"div\(phi.*,U.*\)" Gauss upwind;
"div(alphaRhoPhi,U)" Gauss upwind;
"div(alphaRhoPhiNu,U)" Gauss linear;
"div(alphaRhoPhi,K)" Gauss upwind;

"div\(alphaRhoPhi.*,k.*\)" Gauss upwind;
"div\(alphaRhoPhi.*,epsilon.*\)" Gauss upwind;

"div\(alphaRhoPhi.*,(h|e).*\)" Gauss upwind;
}

// diffusion terms
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}

interpolationSchemes
{
default linear;
}

// surface normal interpolation terms
snGradSchemes
{
default limited corrected 0.5;
}


Links

Prof Jasak's very useful discretisation best practices:
https://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2015/HrvojeJasak/DiscretisationBestPractice.pdf

Who is Prof Jasak?
https://www.phy.cam.ac.uk/directory/hjasak
https://www.youtube.com/watch?v=7EvGirgpNn8

Gauss Divergence Theorem
https://en.wikipedia.org/wiki/Divergence_theorem
https://mathworld.wolfram.com/DivergenceTheorem.html

What are gradient, laplacian (diffusion) and convection terms?
https://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations
https://en.wikipedia.org/wiki/Thermal_conduction

Laplacian (Diffusion or Conduction) Term in OpenFoam
https://www.openfoam.com/documentation/guides/v2112/doc/guide-schemes-laplacian.html

Surface normal schemes (used in divergence or convection term)
https://www.openfoam.com/documentation/guides/v2112/doc/guide-schemes-sngrad.html

What is least squares scheme? Credit to Dr Aiden (Fluid Mechanics 101)
https://www.youtube.com/watch?v=7ymFkxx2R_k

More papers on least squares
http://www.hysafe.org/img/gradrart.pdf
https://ntrs.nasa.gov/api/citations/20200002366/downloads/20200002366.pdf

Upwinding
https://www.youtube.com/watch?v=JVE0fNkc540

Gradient (Flux) limiters (Aerodynamic CFD)
https://www.youtube.com/watch?v=kb6kOnzSOjk
https://www.youtube.com/watch?v=8wW-kFvaEWI

Misc Tips and Tricks
http://www.wolfdynamics.com/wiki/tipsandtricks.pdf

Old video, was fiddling around with controls to learn
https://www.youtube.com/watch?v=zbkX8-m8m-Y

Sections

Chapters:
0:00 Introduction
1:40 Prof Jasak's Best Practices Document
4:45 What exactly are gradient, convection and diffusion schemes?
9:25 Dr Aiden's videos on least squares
11:08 Gauss upwind Divergence Schemes OpenFOAM documentation
12:11 Understand Gauss Theorem first!
13:35 Laplacian (Diffusion) Scheme and Limiters OpenFOAM Documentation
17:10 Flux Limiter Scheme (used for snGrad or laplacian)
18:40 Summary of all resources available for understanding fvSchemes in context of tetrahedral meshing

Playlists and Relevant Github Repositories

Fluid Mechanics and Git Repos:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YSmdAXc6J0XOSQ1b27qsMGt
https://github.com/theodoreOnzGit/OpenFoam_heatTrf_YouTube

Petroleum Downstream Crash Course Playlist:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQ13CnhacUqEVk-tZlU4ISE

OpenFOAM for Windows 10 Beginner Playlist and some Git Repos
https://www.youtube.com/playlist?list=PLhPfNw4V4_YRhBU4IqSaToQ8_X543YQsZ
https://github.com/theodoreOnzGit/laminar_BL_OpenFOAM

OpenFOAM Intermediate Playlist and some Git Repos
https://www.youtube.com/playlist?list=PLhPfNw4V4_YSpWX6mSOlwWEOKVa6i_iuE
https://github.com/theodoreOnzGit/thin_pipeflow_snappyHexMesh

OpenFOAM Heat Transfer Playlist and GitHub Repo
https://www.youtube.com/playlist?list=PLhPfNw4V4_YR2Qa3Q9-AzNSF2J9Dc4_qT
https://github.com/theodoreOnzGit/OpenFoam_heatTrf_YouTube

Convection Boundary Layer and git Repos:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YR9pRBpp101Mkuds49vjQ63
https://github.com/theodoreOnzGit/heatTransferTheory_YouTube

Turbulence Modelling Playlist
https://www.youtube.com/watch?v=F_Rxv9uMM3g&list=PLhPfNw4V4_YSnbYkJIBQ1kRN06Mmxe2Be
https://github.com/theodoreOnzGit/turbulenceModelling

OpenFOAM C++
https://github.com/theodoreOnzGit/C-_YouTube_OpenFoam
https://www.youtube.com/playlist?list=PLhPfNw4V4_YT9OgqS7ZPlot_Ucxzc6pQJ

OpenFOAM Bash
https://github.com/theodoreOnzGit/Bash_OpenFOAM_YouTube
https://www.youtube.com/playlist?list=PLhPfNw4V4_YT5zjBhfj5Hj4r4D5eXilcU




Other Videos By Theo Ong Science and Engineering


2023-11-04rs simulation learning journal 7 - uom example 1 newton's law
2023-11-04rs simulation learning journal 8 - uom example 2 ideal gas equation
2023-10-29rs simulation learning journal 6 - demonstrating conveniences from rust analyzer
2023-10-29rs simulation learning journal 4 - newton's law of cooling example for loops and mutability
2023-10-29rs simulation learning journal 5 - newton's law of cooling example crates, strings and csv exports
2023-10-29rs simulation learning journal 3 - newton's law of cooling example file structure
2023-10-22rs simulation learning journal 2 - static typing, basic math and using compiler help
2023-10-22rs simulation learning journal 1 - hello world vscode
2023-10-05crate spotlight - custos for opencl based math operations
2023-09-22GNU octave installing control package transfer functions and step tests (2023)
2023-04-27Some useful resources for understanding fvSchemes within OpenFOAM for tetrahedral meshes from Salome
2023-03-04ssh into linux servers or Virtual Machines at home from windows, it is quite useful
2023-03-02Uncertainty Propagation Python Metrolopy - basics
2023-02-25Connect virtualbox samba share to windows using wsdd messy debug and walkthrough
2023-02-12add arrow to libreoffice calc chart
2023-01-13rust opcua - how the polling action timers work
2023-01-13rust opcua - use closures (polling actions) to modify opcua variable values
2023-01-13rust opcua - add read and write variables to opcua server
2023-01-13rust opcua print your endpoint periodically
2023-01-13rust opcua - build an anonymous user server and connect to it via a python GUI client
2023-01-12Connecting to OPCUA Rust Server in Linux PC via OPCUA python client GUI on Windows PC



Tags:
Engineering
Math
Science
Thermodynamics
Fluid Mechanics
Chemical
Nuclear
Chemical Potential
Fugacity
Enthalpy
Internal Energy
Entropy
First Law
Second law
Gibbs Free Energy
Hemholtz free energy
heat capacity
constant volume
constant pressure
tutorial
petroleum
oil
refinery
downstream
crude
jet
gasoline
gasoil
diesel
computational fluid dynamics
CFD
OpenFoam
Open
Foam
Fluid mechanics
heat transfer
turbulence
conduction
convection
radiation
Linux
Mint
Ubuntu
Manjaro