CE A Mathematical Approach for Discretization In the previous set of notes we saw how we could numerically solve With boundary conditions Using a control Volume Method P N EW S w n e s That physically balances the net heat flow by diffusion into a control volume This physical approach that only requires an integral form of the governing equ Is the one preferred in this class ---BUT we can also take a more mathematical apporach and develop a discrtization directly from our point from eq
A Finite Difference Solution In this case our discretization is with a structured grid (mesh) of square elements With node points at each vertex P E N S W Taylor Series Expansions about P in x-direction Forward Backward Add So (1) On sub in (1) and neglecting terms at and smaller than 2
Essential Ingredients of a Numerical method We have seen two ways of moving from a continuous PDE to a set of algebraic equations in approximate values of the unknown filed at discrete node points What have been the key ingredients 1.The discretization--Placing the node points in the domain i i row1 row2 row3 row4 col1 col2 col3 col4 a. Grid b. Mesh c. Cloud Examples A structured grid--the location of a node is uniquely specified by a row and a column index—hence it has a build in data struture An Un-structured grid—A mesh of Elements with nodes placed at Strategic points e.g., element vertices (requires a data structure to Locate nodes, identify neigbours nodes And elements) Clouds– simply populate domain with nodes with no formal background mesh. Simple data structure—list of nodes and location. Neighboring nodes defined by All nodes that fall within a given radius Of give node 2. Data Structure– a means to navigate and construct geometric entities associated with a node and it neighbors 3. Combine the discretization and the data structure with the math/physics of the Problem at hand to arrive at an algebraic relationship for the unknown at a node point i in terms of the unknown values at neighboring points (nb) coefficients Accounts for source terms Transients and boundary conditions
An EXAMPLE discretization and Data structure for our test problem Node Centered Control volumes Here I will introduce a data structure That is awkward for the current case which has a clear structured grid BUT Can be generalized for the case of Unstructured grids Data Struture a. Number nodes consecutively from 1—n (121) For each node i identify its region of support The nodes that are “connected” to the node of interest The number of nodes in the support is denoted The support nodes are listed in COUNTER CLOCKWISE ORDER And stored in In example shown At internal node always Include one more To close loop Indicates boundary Note counter clockwise order Arranged to stay inside domain
We also need to account for the boundaries First we number the boundary segments according to –In current problem we use four Each segment hasnodesStored in The vector MATLAB CODE %control_ex clear all data coefficient solve Down Load from Web Page