spiceSharpFluidFLowSolver 16 - pipe class documentation, my coding philosphy

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



Duration: 32:22
29 views
0


This video explains why i will use different coding patterns in different parts of my code.

Why I will not always choose a pure OOP way of structuring my code, and that I will use a mix of OOP, functional and procedural programming in my code.

------------------ Useful Links ------------------------------------
Colebrook Equation (used to generate reference values)
https://www.engineeringtoolbox.com/colebrook-equation-d_1031.html

Pipe documentation
https://github.com/theodoreOnzGit/spiceSharpFluidFlowSolver/tree/feature/documentation/documentation/pipesAndValves


------------------ Video Sections --------------------------------
Chapters:
0:00 Code Design Philosphy
1:42 Circuits and IEntityCollection (Entity is the parent class of components)
2:20 SOLID principles when using OOP
2:44 What is factory pattern?
4:02 If you use OOP and abstractions for everything, it can be overkill
8:28 Functional Programming - Same inputs give same outputs (pure functions)
9:25 Procedural Progrmaming
9:52 Strengths and Weaknesses of Each Programming Style
10:16 What are OOP strengths and weaknesses?
12:59 What are Procedural Programming strengths and weaknesses?
15:00 What Functional Programming strengths and weaknesses?
18:51 KISS: the ultimate principle
19:29 KISS part 1: use procedural programming by default
20:04 KISS part 2: use OOP when special bits of code need to be changed frequently
25:00 Pipe class will use CustomResistor as template, and use Component as the abstract class/interface
29:34 Pipe Factory class
32:10 Conclusion

---------------------[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

Basic Samba
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQuWJLufBUpNplitReZX0fB
https://github.com/theodoreOnzGit/sambaVideos

Manjaro Tips and Tricks
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQuyXBfJxAvzHJTl0UiWx3h

lammps and Discrete Element Modelling (DEM)
https://www.youtube.com/playlist?list=PLhPfNw4V4_YTdRlnLiu2OUXeTf5ZNVQ9E

playing with dotnet core
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQSTR8sqz0aRVzWlQBq3QUw
dotnet core github repo
https://github.com/theodoreOnzGit/dotnetCoreYoutube




Other Videos By Theo Ong Science and Engineering


2022-07-13extract data from graphs using software - graphreader Demonstration (2022)
2022-07-09install openfoam 2022 windows 10 part(3/3) - actually installing openfoam and paraview
2022-07-09install openfoam 2022 windows 10 part (2/3) - getting used to CLI, vim and turning off the bell
2022-07-09install openfoam 2022 windows 10 part(1/3) - WSL 2 ubuntu in powershell and beautifying the terminal
2022-07-08spiceSharpFluidFLowSolver 22 - BasePipe Class inner workings and test
2022-07-08spiceSharpFluidFLowSolver 21 - BasePipe Class Intro
2022-06-16spiceSharpFluidFLowSolver 20 - FrictionFactor classes and Derivative Classes
2022-06-16spiceSharpFluidFLowSolver 19 - source code for pipeFactory Classes
2022-06-16spiceSharpFluidFLowSolver 18 - test methodology for pipe Factory and churchill correlation
2022-06-15spiceSharpFluidFLowSolver 17 - MockPipe Class, changing base parameters
2022-06-15spiceSharpFluidFLowSolver 16 - pipe class documentation, my coding philosphy
2022-06-14spiceSharpFluidFLowSolver 15 - fluidPipeTheory Correction to last vid, tests, tidying documentation
2022-06-14spiceSharpFluidFLowSolver 14 - fluidPipeTheory documentation Bejan number, calc Jacobian
2022-06-14spiceSharpFluidFLowSolver 13 - fluidPipeTheory Getting Jacobians by manipulating variables
2022-06-13spiceSharpFluidFLowSolver 12 - fluidPipeTheory documentation (equation derivations)
2022-06-07vimium 2 - page up and down (u,d) tabs (t, x, X, gt, gT, J, K)
2022-06-07vimium 1 - installation and basic navigation (hjkl, HL, f, esc key)
2022-06-02spiceSharpFluidFlowSolver 11 - Code Exploration Simulation.cs too complex, use custom components
2022-06-01spiceSharpFluidFlowSolver 10 - Code Exploration CreateBehaviors creates Matrices frm Circuit Objects
2022-05-27spiceSharpFluidFlowSolver 9 - Code Exploration VariableMaps are Modified using SimulationState Class
2022-05-27spiceSharpFluidFlowSolver 8 - Code Exploration Positive Negative Conventions and Indexing Variables



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