B. Un-structured Triangular Nodal Mesh Polygon Control Volumes a. Structured Rectangular Nodal Mesh Rectangular Control Volumes Control Volume Finite Elements.

Slides:



Advertisements
Similar presentations
Steady-state heat conduction on triangulated planar domain May, 2002
Advertisements

Element Loads Strain and Stress 2D Analyses Structural Mechanics Displacement-based Formulations.
Finite Element Method (FEM) Different from the finite difference method (FDM) described earlier, the FEM introduces approximated solutions of the variables.
Lectures on CFD Fundamental Equations
MECH593 Introduction to Finite Element Methods
By S Ziaei-Rad Mechanical Engineering Department, IUT.
ME 595M J.Murthy1 ME 595M: Computational Methods for Nanoscale Thermal Transport Lecture 9: Introduction to the Finite Volume Method for the Gray BTE J.
Chapter 3 Steady-State Conduction Multiple Dimensions
% SET CVFEM COEFICIENTS %zero out coefficient for i=1:n %loop on nodes %zero out coefficient ap(i)=0.0; %node point coefficient V(i)=0.0;
Homework 3: Use the Fixed Grid --Volume of Fluid Method with Structured Cartesian CVFEM mesh To track Filling Front h=1 h = 0 2 r = 1 3 Hand in 1. Code.
CHE/ME 109 Heat Transfer in Electronics LECTURE 12 – MULTI- DIMENSIONAL NUMERICAL MODELS.
CE An Intro Problem—will lead to first homework Fluid is contained in along square duct, see cross section below, three faces of the duct are kept.
CE A Mathematical Approach for Discretization In the previous set of notes we saw how we could numerically solve With boundary conditions Using.
Hints for Deforming Grid 1.Set up grid assuming a small initial radius r = 1.1 say, set  say  %definitial delt=0.005; St=1; for i=1:nodes.
MECH300H Introduction to Finite Element Methods
T=1 T=0 At an internal node Heat Balance gives Grid advection Note sign And volume continuity gives Deforming 2-D grid for One-Phase Stefan Problem—Compare.
With Derivation Heat balance on arbitrary FIXED area in domain Net rate of heat in = rate of increase in area  density c specific heat divergence = Fixed.
H=1 h=0 At an internal node vol. Balance gives vel of volume sides And continuity gives hence i.e., At each point in time we solve A steady state problem.
4/17/2017 Numerical Methods 1.
Geothermal Application 1 Summer School Heat extraction from a sloped sandstone aquifer Vertical cross section of the model domain.
ME 595M J.Murthy1 ME 595M: Computational Methods for Nanoscale Thermal Transport Lecture 9: Boundary Conditions, BTE Code J. Murthy Purdue University.
An example moving boundary problem Dry porous media Saturated porous media x = 0 x = s(t) h(0) = L Fixed Head If water head remains at fixed value L at.
I i row1 row2 row3 row4 col1 col2 col3 col4 a. Grid b. Mesh c. Cloud A control volume solution based on an unstructured mesh (Linear Triangular Elements)
CHAPTER 8 APPROXIMATE SOLUTIONS THE INTEGRAL METHOD
Two-Dimensional Heat Analysis Finite Element Method 20 November 2002 Michelle Blunt Brian Coldwell.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
1 Finite-Volume Formulation. 2 Review of the Integral Equation The integral equation for the conservation statement is: Equation applies for a control.
Finite element method 1 Finite Elements  Basic formulation  Basis functions  Stiffness matrix  Poisson‘s equation  Regular grid  Boundary conditions.
FIRST ORDER TRANSIENT CIRCUITS
MA/CS471 Lecture 8 Fall 2003 Prof. Tim Warburton
Finite Element Method.
Mesh Generation 58:110 Computer-Aided Engineering Reference: Lecture Notes on Delaunay Mesh Generation, J. Shewchuk (1999)
Partial Differential Equations Finite Difference Approximation.
Discontinuous Galerkin Methods and Strand Mesh Generation
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 21.
Lecture Objectives: Analyze the unsteady-state heat transfer Conduction Introduce numerical calculation methods Explicit – Implicit methods.
The Geometry of Biomolecular Solvation 2. Electrostatics Patrice Koehl Computer Science and Genome Center
Two-Dimensional Conduction: Finite-Difference Equations and Solutions
Discontinuous Galerkin Methods for Solving Euler Equations Andrey Andreyev Advisor: James Baeder Mid.
Chapter 5: Numerical Methods in Heat Transfer
11/11/20151 Trusses. 11/11/20152 Element Formulation by Virtual Work u Use virtual work to derive element stiffness matrix based on assumed displacements.
© Fluent Inc. 11/24/2015J1 Fluids Review TRN Overview of CFD Solution Methodologies.
HW2 Due date Next Tuesday (October 14). Lecture Objectives: Unsteady-state heat transfer - conduction Solve unsteady state heat transfer equation for.
HEAT TRANSFER FINITE ELEMENT FORMULATION
Engineering Analysis – Computational Fluid Dynamics –
FALL 2015 Esra Sorgüven Öner
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Lecture Objectives: Continue with linearization of radiation and convection Example problem Modeling steps.
MULTIDIMENSIONAL HEAT TRANSFER  This equation governs the Cartesian, temperature distribution for a three-dimensional unsteady, heat transfer problem.
Evan Selin & Terrance Hess.  Find temperature at points throughout a square plate subject to several types of boundary conditions  Boundary Conditions:
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 25.
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
Programming assignment # 3 Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Lecture Objectives: - Numerics. Finite Volume Method - Conservation of  for the finite volume w e w e l h n s P E W xx xx xx - Finite volume.
Implementing Finite Volume Methods 1.  Continue on Finite Volume Methods for Elliptic Equations  Finite Volumes in Two-Dimensions  Poisson’s Equation.
An Introduction to Computational Fluids Dynamics Prapared by: Chudasama Gulambhai H ( ) Azhar Damani ( ) Dave Aman ( )
Model Anything. Quantity Conserved c  advect  diffuse S ConservationConstitutiveGoverning Mass, M  q -- M Momentum fluid, Mv -- F Momentum fluid.
1 Variational and Weighted Residual Methods. 2 Introduction The Finite Element method can be used to solve various problems, including: Steady-state field.
FINITE DIFFERENCE In numerical analysis, two different approaches are commonly used: The finite difference and the finite element methods. In heat transfer.
Example application – Finite Volume Discretization Numerical Methods for PDEs Spring 2007 Jim E. Jones.
The Finite Element Approach to Thermal Analysis Appendix A.
A Mesh-less method for solutions of the Stefan Problem
Implementing Finite Volume Methods
Objective Numerical methods.
Solution Methods Steady State Diffusion Equation Lecture 04 1.
Finite Volume Method for Unsteady Flows
ME/AE 339 Computational Fluid Dynamics K. M. Isaac Topic2_PDE
Objective Numerical methods Finite volume.
Steady-State Heat Transfer (Initial notes are designed by Dr
4 3 Object write down a discrte equation in the form
Presentation transcript:

b. Un-structured Triangular Nodal Mesh Polygon Control Volumes a. Structured Rectangular Nodal Mesh Rectangular Control Volumes Control Volume Finite Elements CVFE for Steady State Heat Conduction Point Form Integral Form, V a Fixed sub Volume in  The first step in generating a numerical solution is to cover the domain  with a grid of nodes. The dashed lines in Fig 1 show two (of many) possibilities for a two-dimensional Cartesian domain, (i) a uniform structured grid that forms rectangular elements and control volumes, and (ii) an unstructured grid that forms triangle elements and polygonal control volumes. The node points in these domains will be used to store approximate values of the dependent variables. In transient problems, in addition to the space discretization, a time discretization is also required. The essence of the numerical discretization is to use space and time nodal approximations of the governing conservation to arrive at a system of algebraic equations which relate the current dependent variable at node point P to values at “neighboring” nodes in space, I = 1, 2,--,nb, and time, see Fig 2. Regardless of the form of the discretization or the nature of the approximation of the governing equation, all field based numerical schemes will generate an algebraic equation for the nodal unknowns with the general form Where the a’s are coefficients and b P accounts for contributions from transient terms and boundary conditions; in general the a’s and b can be functions of the unknown nodal values. P nb = 4 Fig 2 Fig 1 (1)

P element control volume support [1] [2] [3] f1 f2 In Linear CVFE Three Basic Concepts are used to derive Equ 1 2.The Contol Volume: A polygon Control Volume is constructed around node P by joining the mid points of elements See dashed limes in Fig 1b. 1.The Discretization: The domain is covered by Triangular elements—see Fig 1 b. Node points are located at the vertices In this arrangement A. The nodes connected to node P by element sides—The Region Of Support are labeled 1,2, 3, 4 – counter clockwise around node P B. The nodes in one triangular element In the support of node P are labeled [1], [2], [3]. Th label [1] is assigned to node P and then move counter clockwise Around the element THE KEY the CVFE eq is to apply the balance Over ALL the faces of the control Volume Note This is 1/3 of element area

3. The Shape Function 1 shape function I J K X(x) In An Element of the support we use the Continuous approximation Nodal values Shape function--= 1 at node Vanishes on opposite side With tri. Elements we can use the geometric c construction Note (2)

Some Observations P I n Element-1 Element-2 Objective Use balance on volume to calculate coefficients in For a given coefficent I in the Pth node support we only need to consider Two elements and Four faces On each face we need to approx 1.With (2) gradients are constant in each element and (3) 2. The product of a face area with its outward unit normal can be calculated as Where for face 1 in element 1 The Direction is Important 3. For now we will assume a constant K in each elemnt

P I n Element-1 Element-2 On a General face Expanding for elements 1 and 1 and extracting Contributions that involve Node I In this way we can find the a’s for all nodes in the support and construct the discrete equation at node P Note contribution to Node P But by (3) easier to write (4) We can develop a (4) for each node—For nodes on the boundary we will have to set and appropriate b P But once done we will have an Ax=b system that we can solve—simple iteration works.

P nb = 4 Example Problem: T=0 T=1 insulated Solve in x, y Cartesian Compare with Radial Solution Get Equ. In this form

The Code– all bookkeeping needs a Data Structure sup(p,j) --- jth node in support of node P sup(57,1)=102 sup(57,2)= sup(57,Nsup(57)=84 sup(57,Nsup(57)+1)=102 Number node 1—n (done automatically by mesh generation Nsup(p) =4 --- number of nodes in support of Node P =57 used to iden. internal nodes NumBound = 4 ---Boundaries of domain identified by Boundary condition NBound(1) = 11 nodes on boundary 1 Always Count ANTICLOCKWISE NBound(2) =9 sup(4,1)=30 sup(4,2)=55 sup(4,Nsup(4)=31 sup(4,Nsup(4)+1)=0 Ids boundary node Note contiguous numbering bound(3,1)=2 bound(3,2)=14 bound(3,3)= bound(3,NBound(3))=1 bound(k,j)—jth node on kth boundary

%CVFEM meshgen coeficient boundary solve plotout The Main Code Generates mesh Generates coefficients the a’s in Imposes boundary conditions –sets B’s in Solves for T –iterative solution of Plots out results Meshgen--snippets %This code will generate a Delaunay Mesh and CVFE data structure via the geometric spec. of the boundary %The user needs to visualize the domain boundary and be able to clearly assoc distinct boundaries to specific boundary conditions %The points for a given boundary are entered moving counter clockwise around the domain. % set up grid in 1/4 annulus %Number of boundaries NumBound=4; % %boundary 1 %Number of Segments on boundary 1 Nseg(1)=1; %code for points for i=1:Nseg(1)+1 xb(1,i)=1+(i-1)/Nseg(1); yp(1,i)=0; end %boundary 2 %Number of Segments on boundary 2 Nseg(2)=20; %code for points for i=1:Nseg(2)+1 the=(i-1)*2*atan(1)/Nseg(2); xb(2,i)=2*cos(the); yb(2,i)=2*sin(the); end %Level of refinement reflev=1; % 0, 1, 2, 3 etc The higher the integer the finer the grid Note meshgen also includes a call to the code data_struc.m. This code converts the user input into a mesh and obtains the correct data structure. It uses MATLAB functions and unless you know MATLAB well the code is best LEFT ALONE

Coefficient Snippets for i=1:nodes %zero out coefficient ap(i)=0.0; %ap= T coefficient Volp(i)=0.0; %volume of CV for k=1:Nsup(i) a(i,k)=0.0; end loopcount=Nsup(i); %treatment for boundaries or internal if sup(i,Nsup(i)+1)==0 loopcount=Nsup(i)-1; end for k=1:loopcount k1=sup(i,k); k2=sup(i,k+1); xL(1) = x(i); %xL=local x-coordinate of a node within a element xL(2) = x(k1); xL(3) = x(k2); yL(1) = y(i); %yL=local y-coordinate of a node within a element yL(2) = y(k1); yL(3) = y(k2); %v=element volume v=xL(2)*yL(3)-xL(3)*yL(2)- xL(1)*yL(3)+xL(1)*yL(2)+yL(1)*xL(3)-yL(1)*xL(2); Volp(i)=Volp(i)+v/6; Nx(1)=(yL(2)-yL(3))/v; %Nx=shape function Nx(2)=(yL(3)-yL(1))/v; Nx(3)=(yL(1)-yL(2))/v; Ny(1)=-(xL(2)-xL(3))/v; %Ny=shape function Ny(2)=-(xL(3)-xL(1))/v; Ny(3)=-(xL(1)-xL(2))/v; %Face 1 delx= [(xL(1)+xL(2)+xL(3))/3]-[(xL(1)+xL(2))/2]; dely= [(yL(1)+yL(2)+yL(3))/3]-[(yL(1)+yL(2))/2]; ap(i) = ap(i) - Nx(1) * dely + Ny(1) * delx; a(i,k) = a(i,k) + Nx(2) * dely - Ny(2) * delx; if k <Nsup(i) a(i,k+1) = a(i,k+1) + Nx(3) * dely - Ny(3) * delx; else a(i,1)=a(i,1)+ Nx(3) * dely - Ny(3) * delx; end %Face 2 delx= [(xL(1)+xL(3))/2]-[(xL(1)+xL(2)+xL(3))/3]; dely= [(yL(1)+yL(3))/2]-[(yL(1)+yL(2)+yL(3))/3]; ap(i) = ap(i) - Nx(1) * dely + Ny(1) * delx; a(i,k) = a(i,k) + Nx(2) * dely - Ny(2) * delx; if k <Nsup(i) a(i,k+1) = a(i,k+1) + Nx(3) * dely - Ny(3) * delx; else a(i,1)=a(i,1)+ Nx(3) * dely - Ny(3) * delx; end end %loop around elements end %loop on nodes

Treatment of Boundary Conditions The Form of the temperture Equation to be Solved at each step is The a’s include contributions from diffusion and grid advection fluxed The B’s account for boundary conditions On Insulated boundaries both B’s are set to the value B = 0 On Boundary 1 (The heated boundary) B T = B C = On Boundary 3 (The front) B C = and B T = 0 (WHY) %Boundary for i=1:nodes BC(i)=0; %coeficient part BT(i)=0; %constant part end for k=1:NBound(4) BC(Bound(4,k))=1e18; BT(Bound(4,k))=1e18; end for k=1:NBound(2) BC(Bound(2,k))=1e18; end

%solve %Crude Solver %voller, U of M, for i=1:nodes T(i)=0; end for iter=1:650 for i= 1:nodes RHS=BT(i); for k=1:Nsup(i) RHS=RHS+a(i,k)*T(sup(i,k)); end T(i)=RHS/(ap(i)+BC(i)); end Solve for T using a very crude iterative solver %plotout %User makes plots for i=1:nodes rad(i)=sqrt(x(i).^2+y(i).^2); end for i=1:20 rana(i)=1+(i-1)/19; Tana(i)=1-log(rana(i))/log(2); end figure (2) plot(rad,T,'.'); hold on plot(rana,Tana); hold off Then plot out results Reality Check—The code is posted on line Down Load it And modify code to: 1: solve problem where T(r=1)=2 2: solve problem in rectangle (x=1—2, y=1—1.5, T(x=1), T(x=2)= 0) analytical sol is