spiceSharpFluidFlowSolver 9 - Code Exploration VariableMaps are Modified using SimulationState Class

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



Duration: 34:30
88 views
0


Here i explore where variableMaps are constructed. TLDR, it's in the simulation state class.


------------------ Useful Links ------------------------------------
Circuit Class (Implements IEntityCollection)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Entities/Circuit.cs

Resistor Class (Inherits Component,Entity, it's a kind of Entity)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Components/RLC/Resistors/Resistor.cs

Component Class (contains connect method)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Components/Component.cs#L41

DC Class (you inject the Circuit object, IEntityCollection object here using run method)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Simulations/Implementations/DC/DC.cs

Getting Started Example
https://spicesharp.github.io/SpiceSharp/articles/tutorials/gettingstarted.html

VariableMap
https://github.com/SpiceSharp/SpiceSharp/blob/ea977448c74aaa1cd515678585529e707b29f655/SpiceSharp/Simulations/Variables/VariableMap.cs

Simulation State (nested class within Biasing Simulation)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Simulations/Base/Biasing/BiasingSimulation.SimulationState.cs#l459

BiasingSimulation partial class
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Simulations/Base/Biasing/BiasingSimulation.cs#L23

Simulation Class (contains run method)
https://github.com/SpiceSharp/SpiceSharp/blob/4d118c3458a1f4921ebab4c8ed9e9ec3f08dd5f9/SpiceSharp/Simulations/Simulation.cs#L18

------------------ Video Sections --------------------------------
Chapters:
0:00 Circuit class doesn't deal with variableMap
8:07 Resistor Class (Components in general) don't create variable maps
16:33 DC Constructors don't create variable maps
21:05 BiasingSimulation contains methods within SimulationState which create and add to the variable map
27:32 SimulationState Constructor adds the ground variable to the variableMap
30:52 SimulationState CreatePrivateVariableMethod adds variables to the variableMap
33:41 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-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
2022-05-26spiceSharpFluidFlowSolver 7 - Code Exploration OnePort Class and Nodal Analysis Eg with Resistor
2022-05-25spiceSharpFluidFlowSolver 6 - code exploration: Biasing Class in current SRC for IBiasingBehaviour
2022-05-25spiceSharpFluidFlowSolver 5 - setting up a sandbox in Xunit for matrix tests
2022-05-25spiceSharpFluidFlowSolver 4 - Code Exploration: how spicesharp code that solves matrices works
2022-05-23spiceSharpFluidFlowSolver 3 - exploring code: equation solvers and where Jacobians are constructed
2022-05-23spiceSharpFluidFlowSolver 2 - Newton Raphson Method for Multiple Equations
2022-05-23spiceSharpFluidFlowSolver 1 - Analogy between pipe networks and circuits
2022-05-12vim tricks - my current manjaro vimrc setup may 2022
2022-05-11windows vim - my setup in May 2022 setting up gruvbox theme and NERDTree



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