Some useful resources for understanding fvSchemes within OpenFOAM for tetrahedral meshes from Salome
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