ME 582 Handout 11 1D Unsteady Code and Sample Input File

Size: px
Start display at page:

Download "ME 582 Handout 11 1D Unsteady Code and Sample Input File"

Transcription

1 METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. Sert) Handout 11 1D Unsteady Code and a Sample Input File Download the complete code and the sample input files from the course web site. Explanations given below focus on the parts that are different compared to the steady code. % unsteady1d.m % % Middle East Technical University % % Department of Mechanical Engineering % % ME 582 Finite Element Analysis in Thermofluids % % % % Author : Dr. Cuneyt Sert PDE that we solve % is % csert@metu.edu.tr % % u % % Last Update : 17/04/2018 t u u %(a ) + b + cu = f x x x Important: a, b, c and f are assumed to be % functions of x only, % not time. % FEATURES and LIMITATIONS % Warning: There is already a minus sign in % This code % % - is written for educational purposes. front of the first % term. So be careful in proving % - solves the following model ODE in a 1D domain. the function a. % % du/dt - d/dx [a(x) du/dx] + b(x) du/dx + c(x) * u = f(x) % % with a(x), b(x), c(x) and f(x) being known functions and u(x) being % % the unknown. Note that none of the functions dep on time. % % - uses Galerkin Finite Element Method (GFEM). % % - uses linear or quadratic Lagrange type elements. % % - uses theta-family schemes (1st order forward Euler, 1st order % % backward Euler or Crank-Nicolson % % - uses uniform mesh, i.e. all elements have the same length. % % - does not support time depent boundary condtions. % % - uses 3 point Gauss Quadrature integration. % % - stores [M] and [K] as full matrices. % % HOW TO USE? % % Change the initialcond function. % % Prepare an input file with the extension.inp and provide the name of % % the file (without the extension) when asked for. % % VARIABLES % % xmin : Minimum x value of the problem domain % % xmax : Maximum x value of the problem domain % % NE : Number of elements % % NN : Number of nodes % % NEN : Number of element nodes (2 or 3) % % coord : Coordinates of mesh nodes. Array of length NN % % LtoG : Local to global node mapping matrix NExNEN % % NGQP : Number of GQ integration points (= 3 in this code) % 11-1

2 % GQksi : Coordinates of GQ points. Array of size NGQP % % GQW : Weights of GQ points. Array of size NGQP % % prob : Structure that holds a(x), b(x), c(x) and d(x) functions % % of the DE. % % S : Shape functions evaluated at GQ points. Matrix of size % % NENxNGQP % % ds : Derivatives of shape functions wrt to ksi evaluated at % % GQ points. Matrix of size NENxNGP % % BC : Structure for boundary conditions % % - leftbc : BC type at the left boundary. 1:EBC, 2:NBC, 3:MBC % % - leftpv : PV at the left boundary, if known % % - leftsv : SV at the left boundary, if known % % - leftbeta : Beta value at the left boundary, if known % % - leftgamma : Gamma value at the left boundary, if known % % - rightbc : BC type at the right boundary. 1:EBC, 2:NBC, 3:MBC % % - rightpv : PV at the right boundary, if known % % - rightsv : SV at the right boundary, if known % % - rightbeta : Beta value at the right boundary, if known % % - rightgamma: Gamma value at the right boundary, if known % % elem : Structure for elements % % - M : Elemental mass matrix of size NENxNEN % % - K : Elemental stiffness matrix of size NENxNEN % % - F : Elemental force vector of size NENx1 % % - h : Element's length % % - J : Element's Jacobian = h/2 % % time : Structure for time integration % A new structure called time, % - s : Current time level % % - t : Current time holds % time related variables. % - dt : Time step (constant) % % - initial : Initial time % % - final : Final time % % - theta : Parameter used to select a time integration scheme % % 0.0: 1st order forward Euler % % 0.5: Crank Nicolson % % 1.0: 1st order backward Euler % % - nupdate : Solution plot will be refreshed at every nupdate steps % % - pause : Amount in seconds that the animation pauses between % % updates % % M : Global mass matrix of size NNxNN % % K : Global stiffness matrix of size NNxNN % % F : Global force vector of size NNx1 % % U : Global unknown vector of size NNx1 % % FUNCTIONS % % unsteady1d : Main function % % readinputfile : Reads the input file % % generatemesh : Generates the 1D mesh % % setupgq : Generates variables for GQ points and weights % % calcshape : Evaluates shape functions and their derivatives at % % GQ points % % calcglobalsys : Calculates global M, K and F by the assembly of % % elemental ones % % calcelemsys : Calculates elemental M, K and F % % applybc : Applies BCs to the global system of equations % % initialcond : Initializes the solution with the specified initial initialcond % is a new function. % condition. This part is problem depent % % solve : Solves the global system in a time loop % 11-2

3 function [] = unsteady1d clc; % Clear MATLAB's command window clear all; % Clear variables and functions in the memory close all; % Close figure windows disp('**********************************************************'); disp('** Middle East Technical University **'); disp('** Department of Mechanical Engineering **'); disp('** ME 582 Finite Element Analysis in Thermofluids **'); disp('** **'); disp('** **'); disp('** 1D, Unsteady Solver **'); disp('**********************************************************'); readinputfile(); generatemesh(); setupgq(); calcshape(); calcglobalsys(); solve(); fprintf('\nprogram finished successfully.\n'); % End of function unsteady1d() Warning: [M], [K] and {F} are assumed to be time indepent and they are calculated once outside the time loop. solve function has the main time loop in it. It calls the initialcond and applybc functions. function readinputfile % Asks for the problem name and reads the input file. % Variables defined as global can be used in other functions too. time.dt = fscanf(inputfile, 'dt :%f'); fgets(inputfile); time.initial = fscanf(inputfile, 't0 :%f'); fgets(inputfile); time.final = fscanf(inputfile, 'tfinal :%f'); fgets(inputfile); time.theta = fscanf(inputfile, 'theta :%f'); fgets(inputfile); time.nupdate = fscanf(inputfile, 'nupdate :%d'); fgets(inputfile); time.pause = fscanf(inputfile, 'pause :%f'); fgets(inputfile); Time related new inputs. Other lines are the same as the steady code. % End of function readinputfile() function generatemesh % Coordinates of mesh nodes are calculated. LtoG matrix is formed. Exactly the same as the steady code. % End of function generatemesh() 11-3

4 function setupgq % Sets up coordinates and weights of GQ points Exactly the same as the steady code. % End of function setupgq() function calcshape() % Calculates the values of the shape functions and their derivatives with % respect to ksi coordinate at GQ points. Exactly the same as the steady code. % End of function calcshape() function calcglobalsys() % Calculates the global mass matrix [K], stiffness matrix [K] and the % force vector {F}. All these are assumed to be time indepent. global NE NN M K F LtoG elem; M = zeros(nn,nn); K = zeros(nn,nn); F = zeros(nn,1); for e = 1:NE calcelemsys(e); % M and K are NNxNN square matrices. In this 1D code they % are stored as a full matrices without memory concerns. % F is a NNx1 vector % Calculate elemental M, K and F New mass matrix % Assemble Me into M, Ke into K and Fe into F. M(LtoG(e,:), LtoG(e,:)) = M(LtoG(e,:), LtoG(e,:)) + elem(e).m(:,:); K(LtoG(e,:), LtoG(e,:)) = K(LtoG(e,:), LtoG(e,:)) + elem(e).k(:,:); F(LtoG(e,:)) = F(LtoG(e,:)) + elem(e).f(:); Assembly of the mass matrix % End of function calcglobalsys() function calcelemsys(e) % Calculates the element level mass matrix, stiffness matrix and force vector. global prob elem NEN LtoG NGQP GQksi GQW coord S ds; elem(e).f = zeros(nen,1); elem(e).m = zeros(nen,nen); elem(e).k = zeros(nen,nen); Elemental mass matrix 11-4

5 for i = 1:NEN for j = 1:NEN elem(e).m(i,j) = elem(e).m(i,j) + S(i,k) * S(j,k) * elem(e).j * GQW(k); elem(e).k(i,j) = elem(e).k(i,j) + (avalue * ds(i,k)/elem(e).j * ds(j,k)/elem(e).j + bvalue * S(i,k) * ds(j,k)/elem(e).j + cvalue * S(i,k) * S(j,k) ) * elem(e).j * GQW(k); Calculate the elemental mass matrix. for i = 1:NEN elem(e).f(i) = elem(e).f(i) + fvalue * S(i,k) * elem(e).j * GQW(k); % End of GQ loop % End of function calcelemsys() function [] = solve() % Main time loop of the solution. global M K F U Kcap Fcap NN time; New function % Initialize the solution using the specified initial condition. time.t = time.initial; time.s = 0; initialcond(); updateplot(); %hold on; Uncomment this to see the results of intermediate time steps. Set the initial condition. Important: For each problem the correct I.C. needs to be defined inside this Kcap = zeros(nn,nn); Mbar = zeros(nn,nn); Fcap = zeros(nn,1); Fbar = zeros(nn,1); Warning: Excessive memory allocation. Kcap = M + time.theta * time.dt * K; Mbar = M - (1 - time.theta) * time.dt * K; Fbar = F; At each time step we solve the following system where [K] = [M] + θ t[k]s+1 [K] {φ} s+1 = {F}, {F} = [M] {φ} s + t{f} [M] = [M] (1 θ) t[k]s while (time.final - time.t > 1e-10) time.s = time.s + 1; time.t = time.t + time.dt; Fcap = Mbar * U + time.dt * Fbar; Time loop {F} = θ{f}s+1 + (1 θ){f} s Warning: In this code we assumed that [K] and {F} are time indepent. applybc(); % Calculate the solution at the new time step. U = Kcap \ Fcap; {F} deps on {φ} s, therefore it is updated inside the time loop. if mod(time.s, time.nupdate) == 0 updateplot(); time.t % End of function timeloop() Update the solution plotat every nupdate time steps. Boundary conditions need to be applied inside the time loop at each time step. 11-5

6 function applybc() % K and F are modified according to the given BCs global NN Kcap Fcap BC; Important: Very similar to the steady code, but instead of modifying [K] and {F}, we modify [K] and {F} % End of function applybc() function [] = updateplot() global NN coord U time; plot(transpose(coord(1:nn)), U, 'black', 'LineWidth', 2); axis([coord(1) coord(nn) ]); Warning: Change the axis limits properly if these default values are not suitable for your problem. grid on; title(['s = ' num2str(time.s), ', pause(time.pause); drawnow; % End of function updateplot() t = ' num2str(time.t)]); Show the current time and time step on the title of the function [] = initialcond() % Apply initial condition. This function is problem depent. global NN coord U; U = zeros(nn,1); Important: Change this I.C. function for each problem. for i = 1:NN x = coord(i); U(i) = 0; %U(i) = 1-x^2; % Heated bar example % Cooling bar example I.C. of Example 6 of Handout 9. I.C. of Example 1 of Handout 9. %if (x < 0.4) % U(i) = 0.5 * (1 + cos(5*pi*(x-0.2))); % Cosine hill example %else % U(i) = 0.0; % This inactive part is the initial condition of Example 7 of Handout 9. % End of function initialcond() This initial condition is for Example 1 of Handout 9. function [f] = heating(x) if x >= -0.1 && x <= 0.1 f = 4; else f = 0; % End of function heating() This function provides the special f(x) of Example 6 of Handout

7 Sample input file for the problem solved in Example 1 of Handout 9 Warning: The format of input files is very strict. Only change the entries after the colons. Do not change the variables names that appear before the colons. Do not change the places of the colons. Do not remove the dummy lines that are used for clarity. Example 1 of Handout 9 (Spring 2018) ================================================ NE : 5 NEN : 2 xmin : -1 xmax : 1 dt : 0.01 t0 : 0 tfinal : 1 theta : 1.0 nupdate : 1 pause : 0 afunc : 1 bfunc : 0 cfunc : 0 ffunc : 0 New time related inputs. ================================================ leftbctype : 1 leftpv : 0.0 leftsv : 0.0 leftbeta : 0.0 leftgamma : 0.0 ================================================ rightbctype : 1 rightpv : 0.0 rightsv : 0.0 rightbeta : 0.0 rightgamma : 0.0 When you download unsteady1d.m code it comes with two more sample input files corresponding to problems of Handout

Download the complete code and the sample input files from the course web site. DE that we solve is

Download the complete code and the sample input files from the course web site. DE that we solve is METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. Sert) Handout 4 1D FEM Code and a Sample Input File Download the complete code and the sample input

More information

ME 582 Handout 15 Steady N-S Code and Sample Input File

ME 582 Handout 15 Steady N-S Code and Sample Input File METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 218 (Dr. Sert) Handout 15 Steady N-S Code and a Sample Input File Download the complete code and the sample

More information

Chapter 8. Computer Implementation of 2D, Incompressible N-S Solver

Chapter 8. Computer Implementation of 2D, Incompressible N-S Solver Chapter 8 Computer Implementation of 2D, Incompressible N-S Solver 8.1 MATLAB Code for 2D, Incompressible N-S Solver (steadynavierstokes2d.m) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

More information

METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3

METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3 METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3 In this third COMSOL tutorial we ll solve Example 6 of Handout

More information

Chapter 6. Petrov-Galerkin Formulations for Advection Diffusion Equation

Chapter 6. Petrov-Galerkin Formulations for Advection Diffusion Equation Chapter 6 Petrov-Galerkin Formulations for Advection Diffusion Equation In this chapter we ll demonstrate the difficulties that arise when GFEM is used for advection (convection) dominated problems. Several

More information

ME 582 Handout 7 2D FEM Code and Sample Input File

ME 582 Handout 7 2D FEM Code and Sample Input File METU Mchanical Enginring Dpartmnt ME 582 Finit Elmnt Analysis in Thrmofluids Spring 2018 (Dr. Srt) Handout 7 2D FEM Cod and a Sampl Input Fil ME 582 Handout 7 2D FEM Cod and Sampl Input Fil Download th

More information

Lecture 23: Starting to put it all together #2... More 2-Point Boundary value problems

Lecture 23: Starting to put it all together #2... More 2-Point Boundary value problems Lecture 23: Starting to put it all together #2... More 2-Point Boundary value problems Outline 1) Our basic example again: -u'' + u = f(x); u(0)=α, u(l)=β 2) Solution of 2-point Boundary value problems

More information

AMS527: Numerical Analysis II

AMS527: Numerical Analysis II AMS527: Numerical Analysis II A Brief Overview of Finite Element Methods Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao SUNY Stony Brook AMS527: Numerical Analysis II 1 / 25 Overview Basic concepts Mathematical

More information

Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr.

Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr. Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr. Sert) COMSOL 1 Tutorial 2 Problem Definition Hot combustion gases of a

More information

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36 Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras Lecture - 36 In last class, we have derived element equations for two d elasticity problems

More information

1 Programs for phase portrait plotting

1 Programs for phase portrait plotting . 1 Programs for phase portrait plotting We are here looking at how to use our octave programs to make phase portraits of two dimensional systems of ODE, adding automatically or halfautomatically arrows

More information

CIVL 8/7111 ODE2 Computer Program 1/6

CIVL 8/7111 ODE2 Computer Program 1/6 CIVL 8/7111 ODE2 Computer Program 1/6 Rem FINITE ELEMENT METHOD (FEM) * Rem PROGRAM ODE2 * Rem A FINITE ELEMENT PROGRAM FOR THE SOLUTION OF THE LINEAR * Rem SECOND ORDER DIFFERENTIAL EQUATION * Rem D(

More information

The report problem for which the FEA code was written is shown below. The Matlab code written to solve this problem is shown on the following pages.

The report problem for which the FEA code was written is shown below. The Matlab code written to solve this problem is shown on the following pages. The report problem for which the FEA code was written is shown below. The Matlab code written to solve this problem is shown on the following pages. %TrussGEP Script %Solves the Generalized Eigenvalue

More information

Numerical Methods for PDEs : Video 11: 1D FiniteFebruary Difference 15, Mappings Theory / 15

Numerical Methods for PDEs : Video 11: 1D FiniteFebruary Difference 15, Mappings Theory / 15 22.520 Numerical Methods for PDEs : Video 11: 1D Finite Difference Mappings Theory and Matlab February 15, 2015 22.520 Numerical Methods for PDEs : Video 11: 1D FiniteFebruary Difference 15, Mappings 2015

More information

Finite element method, Matlab implementation

Finite element method, Matlab implementation TIES594 PDE-solvers Lecture 6, 2016 Olli Mali Finite element method, Matlab implementation Main program The main program is the actual finite element solver for the Poisson problem. In general, a finite

More information

Isoparametric Constant Strain Triangle, CST

Isoparametric Constant Strain Triangle, CST function Plane_Stress_T3_RS %... % Plane stress displacements for constant strain triangle, T3 % ISOPARAMETRIC VERSION %... % Set given constants n_g = 2 ; % number of DOF per node n_n = 3 ; % number of

More information

Contents. I The Basic Framework for Stationary Problems 1

Contents. I The Basic Framework for Stationary Problems 1 page v Preface xiii I The Basic Framework for Stationary Problems 1 1 Some model PDEs 3 1.1 Laplace s equation; elliptic BVPs... 3 1.1.1 Physical experiments modeled by Laplace s equation... 5 1.2 Other

More information

CE366/ME380 Finite Elements in Applied Mechanics I Fall 2007

CE366/ME380 Finite Elements in Applied Mechanics I Fall 2007 CE366/ME380 Finite Elements in Applied Mechanics I Fall 2007 FE Project 1: 2D Plane Stress Analysis of acantilever Beam (Due date =TBD) Figure 1 shows a cantilever beam that is subjected to a concentrated

More information

1.2 Numerical Solutions of Flow Problems

1.2 Numerical Solutions of Flow Problems 1.2 Numerical Solutions of Flow Problems DIFFERENTIAL EQUATIONS OF MOTION FOR A SIMPLIFIED FLOW PROBLEM Continuity equation for incompressible flow: 0 Momentum (Navier-Stokes) equations for a Newtonian

More information

Matrix Transformations The position of the corners of this triangle are described by the vectors: 0 1 ] 0 1 ] Transformation:

Matrix Transformations The position of the corners of this triangle are described by the vectors: 0 1 ] 0 1 ] Transformation: Matrix Transformations The position of the corners of this triangle are described by the vectors: [ 2 1 ] & [4 1 ] & [3 3 ] Use each of the matrices below to transform these corners. In each case, draw

More information

1 Exercise: Heat equation in 2-D with FE

1 Exercise: Heat equation in 2-D with FE 1 Exercise: Heat equation in 2-D with FE Reading Hughes (2000, sec. 2.3-2.6 Dabrowski et al. (2008, sec. 1-3, 4.1.1, 4.1.3, 4.2.1 This FE exercise and most of the following ones are based on the MILAMIN

More information

2 T. x + 2 T. , T( x, y = 0) = T 1

2 T. x + 2 T. , T( x, y = 0) = T 1 LAB 2: Conduction with Finite Difference Method Objective: The objective of this laboratory is to introduce the basic steps needed to numerically solve a steady state two-dimensional conduction problem

More information

Semester Final Report

Semester Final Report CSUMS SemesterFinalReport InLaTex AnnKimball 5/20/2009 ThisreportisageneralsummaryoftheaccumulationofknowledgethatIhavegatheredthroughoutthis semester. I was able to get a birds eye view of many different

More information

AMS 27L LAB #2 Winter 2009

AMS 27L LAB #2 Winter 2009 AMS 27L LAB #2 Winter 2009 Plots and Matrix Algebra in MATLAB Objectives: 1. To practice basic display methods 2. To learn how to program loops 3. To learn how to write m-files 1 Vectors Matlab handles

More information

Program ODE2 2/7 clc. gpts(1) = ; gpts(2) = ; gpts(3) = ; gpts(4) = -gpts(3); gpts(5) = -gpts(2); gpts(6) = -gpts(1);

Program ODE2 2/7 clc. gpts(1) = ; gpts(2) = ; gpts(3) = ; gpts(4) = -gpts(3); gpts(5) = -gpts(2); gpts(6) = -gpts(1); Program ODE2 1/7 function ode2q % FINITE ELEMENT METHOD (FEM) * % PROGRAM ODE2 * % A FINITE ELEMENT PROGRAM FOR THE SOLUTION OF THE LINEAR * % SECOND ORDER DIFFERENTIAL EQUATION * % D( A DU/DX)/DX + B

More information

Introduction to Finite Element Analysis using ANSYS

Introduction to Finite Element Analysis using ANSYS Introduction to Finite Element Analysis using ANSYS Sasi Kumar Tippabhotla PhD Candidate Xtreme Photovoltaics (XPV) Lab EPD, SUTD Disclaimer: The material and simulations (using Ansys student version)

More information

Quasilinear First-Order PDEs

Quasilinear First-Order PDEs MODULE 2: FIRST-ORDER PARTIAL DIFFERENTIAL EQUATIONS 16 Lecture 3 Quasilinear First-Order PDEs A first order quasilinear PDE is of the form a(x, y, z) + b(x, y, z) x y = c(x, y, z). (1) Such equations

More information

Foundations of Math II

Foundations of Math II Foundations of Math II Unit 6b: Toolkit Functions Academics High School Mathematics 6.6 Warm Up: Review Graphing Linear, Exponential, and Quadratic Functions 2 6.6 Lesson Handout: Linear, Exponential,

More information

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Finite Math - J-term Homework. Section Inverse of a Square Matrix Section.5-77, 78, 79, 80 Finite Math - J-term 017 Lecture Notes - 1/19/017 Homework Section.6-9, 1, 1, 15, 17, 18, 1, 6, 9, 3, 37, 39, 1,, 5, 6, 55 Section 5.1-9, 11, 1, 13, 1, 17, 9, 30 Section.5 - Inverse

More information

WK # Given: f(x) = ax2 + bx + c

WK # Given: f(x) = ax2 + bx + c Alg2H Chapter 5 Review 1. Given: f(x) = ax2 + bx + c Date or y = ax2 + bx + c Related Formulas: y-intercept: ( 0, ) Equation of Axis of Symmetry: x = Vertex: (x,y) = (, ) Discriminant = x-intercepts: When

More information

What is Dan++ Work Flow Examples and Demo. Dan++: A Quick Look. Daniel Driver. April 16, 2015

What is Dan++ Work Flow Examples and Demo. Dan++: A Quick Look. Daniel Driver. April 16, 2015 Dan++: A Quick Look Daniel Driver April 16, 2015 What now 1 What is Dan++ 2 Work Flow 3 Examples and Demo What is Dan++ What is Dan++ Bread And Butter We Need F(x) : R n R m Particle Dynamics Example:

More information

Finite Element Analysis Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology Madras. Module - 01 Lecture - 15

Finite Element Analysis Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology Madras. Module - 01 Lecture - 15 Finite Element Analysis Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology Madras Module - 01 Lecture - 15 In the last class we were looking at this 3-D space frames; let me summarize

More information

Finite difference methods

Finite difference methods Finite difference methods Siltanen/Railo/Kaarnioja Spring 8 Applications of matrix computations Applications of matrix computations Finite difference methods Spring 8 / Introduction Finite difference methods

More information

Linear, Quadratic, Exponential, and Absolute Value Functions

Linear, Quadratic, Exponential, and Absolute Value Functions Linear, Quadratic, Exponential, and Absolute Value Functions Linear Quadratic Exponential Absolute Value Y = mx + b y = ax 2 + bx + c y = a b x y = x 1 What type of graph am I? 2 What can you tell me about

More information

Computational Fluid Dynamics (CFD) using Graphics Processing Units

Computational Fluid Dynamics (CFD) using Graphics Processing Units Computational Fluid Dynamics (CFD) using Graphics Processing Units Aaron F. Shinn Mechanical Science and Engineering Dept., UIUC Accelerators for Science and Engineering Applications: GPUs and Multicores

More information

Finite Element Solvers: Examples using MATLAB and FEniCS

Finite Element Solvers: Examples using MATLAB and FEniCS Finite Element Solvers: Examples using MATLAB and FEniCS Dallas Foster February 7, 2017 In this paper, I present a comparison between two different methods for posing and solving Finite Element Softwares.

More information

Adaptive numerical methods

Adaptive numerical methods METRO MEtallurgical TRaining On-line Adaptive numerical methods Arkadiusz Nagórka CzUT Education and Culture Introduction Common steps of finite element computations consists of preprocessing - definition

More information

UNIT 5 QUADRATIC FUNCTIONS Lesson 6: Analyzing Quadratic Functions Instruction

UNIT 5 QUADRATIC FUNCTIONS Lesson 6: Analyzing Quadratic Functions Instruction Prerequisite Skills This lesson requires the use of the following skills: factoring quadratic expressions finding the vertex of a quadratic function Introduction We have studied the key features of the

More information

Post-Processing Radial Basis Function Approximations: A Hybrid Method

Post-Processing Radial Basis Function Approximations: A Hybrid Method Post-Processing Radial Basis Function Approximations: A Hybrid Method Muhammad Shams Dept. of Mathematics UMass Dartmouth Dartmouth MA 02747 Email: mshams@umassd.edu August 4th 2011 Abstract With the use

More information

Cloth Simulation. COMP 768 Presentation Zhen Wei

Cloth Simulation. COMP 768 Presentation Zhen Wei Cloth Simulation COMP 768 Presentation Zhen Wei Outline Motivation and Application Cloth Simulation Methods Physically-based Cloth Simulation Overview Development References 2 Motivation Movies Games VR

More information

Name: Chapter 7 Review: Graphing Quadratic Functions

Name: Chapter 7 Review: Graphing Quadratic Functions Name: Chapter Review: Graphing Quadratic Functions A. Intro to Graphs of Quadratic Equations: = ax + bx+ c A is a function that can be written in the form = ax + bx+ c where a, b, and c are real numbers

More information

SIAM WORKSHOP: XPP. Software for Simulating Differential Equations. Ian Price 18 October, 2009

SIAM WORKSHOP: XPP. Software for Simulating Differential Equations. Ian Price 18 October, 2009 SIAM WORKSHOP: XPP Software for Simulating Differential Equations Ian Price peccavo@gmail.com 18 October, 2009 Introduction XPP came into existence for the analysis of phase planes when studying differential

More information

Today. Motivation. Motivation. Image gradient. Image gradient. Computational Photography

Today. Motivation. Motivation. Image gradient. Image gradient. Computational Photography Computational Photography Matthias Zwicker University of Bern Fall 009 Today Gradient domain image manipulation Introduction Gradient cut & paste Tone mapping Color-to-gray conversion Motivation Cut &

More information

1 2 (3 + x 3) x 2 = 1 3 (3 + x 1 2x 3 ) 1. 3 ( 1 x 2) (3 + x(0) 3 ) = 1 2 (3 + 0) = 3. 2 (3 + x(0) 1 2x (0) ( ) = 1 ( 1 x(0) 2 ) = 1 3 ) = 1 3

1 2 (3 + x 3) x 2 = 1 3 (3 + x 1 2x 3 ) 1. 3 ( 1 x 2) (3 + x(0) 3 ) = 1 2 (3 + 0) = 3. 2 (3 + x(0) 1 2x (0) ( ) = 1 ( 1 x(0) 2 ) = 1 3 ) = 1 3 6 Iterative Solvers Lab Objective: Many real-world problems of the form Ax = b have tens of thousands of parameters Solving such systems with Gaussian elimination or matrix factorizations could require

More information

Geometric Modeling Assignment 3: Discrete Differential Quantities

Geometric Modeling Assignment 3: Discrete Differential Quantities Geometric Modeling Assignment : Discrete Differential Quantities Acknowledgements: Julian Panetta, Olga Diamanti Assignment (Optional) Topic: Discrete Differential Quantities with libigl Vertex Normals,

More information

Index. C m (Ω), 141 L 2 (Ω) space, 143 p-th order, 17

Index. C m (Ω), 141 L 2 (Ω) space, 143 p-th order, 17 Bibliography [1] J. Adams, P. Swarztrauber, and R. Sweet. Fishpack: Efficient Fortran subprograms for the solution of separable elliptic partial differential equations. http://www.netlib.org/fishpack/.

More information

Basic Graphs of the Sine and Cosine Functions

Basic Graphs of the Sine and Cosine Functions Chapter 4: Graphs of the Circular Functions 1 TRIG-Fall 2011-Jordan Trigonometry, 9 th edition, Lial/Hornsby/Schneider, Pearson, 2009 Section 4.1 Graphs of the Sine and Cosine Functions Basic Graphs of

More information

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 24

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 24 Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras Lecture - 24 So in today s class, we will look at quadrilateral elements; and we will

More information

2D Model For Steady State Temperature Distribution

2D Model For Steady State Temperature Distribution 2D Model For Steady State Temperature Distribution Finite Element Method Vinh University of Massachusetts Dartmouth December 14, 21 Introduction Advisor Dr. Nima Rahbar: Civil Engineering Project Objective

More information

Unit #3: Quadratic Functions Lesson #13: The Almighty Parabola. Day #1

Unit #3: Quadratic Functions Lesson #13: The Almighty Parabola. Day #1 Algebra I Unit #3: Quadratic Functions Lesson #13: The Almighty Parabola Name Period Date Day #1 There are some important features about the graphs of quadratic functions we are going to explore over the

More information

Real-Time Shape Editing using Radial Basis Functions

Real-Time Shape Editing using Radial Basis Functions Real-Time Shape Editing using Radial Basis Functions, Leif Kobbelt RWTH Aachen Boundary Constraint Modeling Prescribe irregular constraints Vertex positions Constrained energy minimization Optimal fairness

More information

Matlab Plane Stress Example

Matlab Plane Stress Example Matlab Plane Stress Example (Draft 2, April 9, 2007) Introduction Here the Matlab closed form element matrices for the T3 element (3 node triangle, constant stress) is illustrated for a square plate, 2

More information

Puffin User Manual. March 1, Johan Hoffman and Anders Logg.

Puffin User Manual. March 1, Johan Hoffman and Anders Logg. Puffin User Manual March 1, 2006 Johan Hoffman and Anders Logg www.fenics.org Visit http://www.fenics.org/ for the latest version of this manual. Send comments and suggestions to puffin-dev@fenics.org.

More information

Numerical Methods for PDEs : Video 9: 2D Finite Difference February 14, Equations / 29

Numerical Methods for PDEs : Video 9: 2D Finite Difference February 14, Equations / 29 22.520 Numerical Methods for PDEs Video 9 2D Finite Difference Equations February 4, 205 22.520 Numerical Methods for PDEs Video 9 2D Finite Difference February 4, Equations 205 / 29 Thought Experiment

More information

Basic Programming with Elmer Mikko Lyly Spring 2010

Basic Programming with Elmer Mikko Lyly Spring 2010 Basic Programming with Elmer Mikko Lyly Spring 2010 1 User defined functions 1.1 Calling convention User defined functions (udf) can be used to compute complicated material parameters, body forces, boundary

More information

Set No. 1 IV B.Tech. I Semester Regular Examinations, November 2010 FINITE ELEMENT METHODS (Mechanical Engineering) Time: 3 Hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks

More information

Verification of Moving Mesh Discretizations

Verification of Moving Mesh Discretizations Verification of Moving Mesh Discretizations Krzysztof J. Fidkowski High Order CFD Workshop Kissimmee, Florida January 6, 2018 How can we verify moving mesh results? Goal: Demonstrate accuracy of flow solutions

More information

When implementing FEM for solving two-dimensional partial differential equations, integrals of the form

When implementing FEM for solving two-dimensional partial differential equations, integrals of the form Quadrature Formulas in Two Dimensions Math 57 - Finite Element Method Section, Spring Shaozhong Deng, PhD (shaodeng@unccedu Dept of Mathematics and Statistics, UNC at Charlotte When implementing FEM for

More information

TAU mesh deformation. Thomas Gerhold

TAU mesh deformation. Thomas Gerhold TAU mesh deformation Thomas Gerhold The parallel mesh deformation of the DLR TAU-Code Introduction Mesh deformation method & Parallelization Results & Applications Conclusion & Outlook Introduction CFD

More information

The Application of EXCEL in Teaching Finite Element Analysis to Final Year Engineering Students.

The Application of EXCEL in Teaching Finite Element Analysis to Final Year Engineering Students. The Application of EXCEL in Teaching Finite Element Analysis to Final Year Engineering Students. Kian Teh and Laurie Morgan Curtin University of Technology Abstract. Many commercial programs exist for

More information

Exploration Assignment #1. (Linear Systems)

Exploration Assignment #1. (Linear Systems) Math 0280 Introduction to Matrices and Linear Algebra Exploration Assignment #1 (Linear Systems) Acknowledgment The MATLAB assignments for Math 0280 were developed by Jonathan Rubin with the help of Matthew

More information

A Semi-Lagrangian Discontinuous Galerkin (SLDG) Conservative Transport Scheme on the Cubed-Sphere

A Semi-Lagrangian Discontinuous Galerkin (SLDG) Conservative Transport Scheme on the Cubed-Sphere A Semi-Lagrangian Discontinuous Galerkin (SLDG) Conservative Transport Scheme on the Cubed-Sphere Ram Nair Computational and Information Systems Laboratory (CISL) National Center for Atmospheric Research

More information

Reduction of Finite Element Models for Explicit Car Crash Simulations

Reduction of Finite Element Models for Explicit Car Crash Simulations Reduction of Finite Element Models for Explicit Car Crash Simulations K. Flídrová a,b), D. Lenoir a), N. Vasseur b), L. Jézéquel a) a) Laboratory of Tribology and System Dynamics UMR-CNRS 5513, Centrale

More information

UNIT 3 EXPRESSIONS AND EQUATIONS Lesson 3: Creating Quadratic Equations in Two or More Variables

UNIT 3 EXPRESSIONS AND EQUATIONS Lesson 3: Creating Quadratic Equations in Two or More Variables Guided Practice Example 1 Find the y-intercept and vertex of the function f(x) = 2x 2 + x + 3. Determine whether the vertex is a minimum or maximum point on the graph. 1. Determine the y-intercept. The

More information

SOLVING PARTIAL DIFFERENTIAL EQUATIONS ON POINT CLOUDS

SOLVING PARTIAL DIFFERENTIAL EQUATIONS ON POINT CLOUDS SOLVING PARTIAL DIFFERENTIAL EQUATIONS ON POINT CLOUDS JIAN LIANG AND HONGKAI ZHAO Abstract. In this paper we present a general framework for solving partial differential equations on manifolds represented

More information

Meshless Modeling, Animating, and Simulating Point-Based Geometry

Meshless Modeling, Animating, and Simulating Point-Based Geometry Meshless Modeling, Animating, and Simulating Point-Based Geometry Xiaohu Guo SUNY @ Stony Brook Email: xguo@cs.sunysb.edu http://www.cs.sunysb.edu/~xguo Graphics Primitives - Points The emergence of points

More information

Introduction: Objectives:

Introduction: Objectives: Peter Cottle SID 19264824 ME 280A 9/13/2011 Homework Assignment #2 Introduction: Since Homework #1 dealt with the overall procedure of the Finite Element Method, this homework instead deals with the analysis

More information

ME 345: Modeling & Simulation. Introduction to Finite Element Method

ME 345: Modeling & Simulation. Introduction to Finite Element Method ME 345: Modeling & Simulation Introduction to Finite Element Method Examples Aircraft 2D plate Crashworthiness 2 Human Heart Gears Structure Human Spine 3 F.T. Fisher, PhD Dissertation, 2002 Fluid Flow

More information

Properties of Quadratic functions

Properties of Quadratic functions Name Today s Learning Goals: #1 How do we determine the axis of symmetry and vertex of a quadratic function? Properties of Quadratic functions Date 5-1 Properties of a Quadratic Function A quadratic equation

More information

Introduction to Matlab

Introduction to Matlab Technische Universität München WT 21/11 Institut für Informatik Prof Dr H-J Bungartz Dipl-Tech Math S Schraufstetter Benjamin Peherstorfer, MSc October 22nd, 21 Introduction to Matlab Engineering Informatics

More information

Introduction to Programming for Engineers Spring Final Examination. May 10, Questions, 170 minutes

Introduction to Programming for Engineers Spring Final Examination. May 10, Questions, 170 minutes Final Examination May 10, 2011 75 Questions, 170 minutes Notes: 1. Before you begin, please check that your exam has 28 pages (including this one). 2. Write your name and student ID number clearly on your

More information

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123 2.7 Cloth Animation 320491: Advanced Graphics - Chapter 2 123 Example: Cloth draping Image Michael Kass 320491: Advanced Graphics - Chapter 2 124 Cloth using mass-spring model Network of masses and springs

More information

Teresa S. Bailey (LLNL) Marvin L. Adams (Texas A&M University)

Teresa S. Bailey (LLNL) Marvin L. Adams (Texas A&M University) A Piecewise i Linear Discontinuous Finite it Element Spatial Discretization of the S N Transport Equation for Polyhedral Grids in 3D Cartesian Geometry International Conference on Transport Theory September

More information

ALF USER GUIDE. Date: September

ALF USER GUIDE. Date: September ALF USER GUIDE R. VERFÜRTH Contents 1. Introduction 1 2. User interface 2 3. Domain and initial grid 3 4. Differential equation 9 5. Discretization 12 6. Solver 12 7. Mesh refinement 14 8. Number of nodes

More information

2.2 Weighting function

2.2 Weighting function Annual Report (23) Kawahara Lab. On Shape Function of Element-Free Galerkin Method for Flow Analysis Daigo NAKAI and Mutsuto KAWAHARA Department of Civil Engineering, Chuo University, Kasuga 3 27, Bunkyo

More information

Unit: Quadratic Functions

Unit: Quadratic Functions Unit: Quadratic Functions Learning increases when you have a goal to work towards. Use this checklist as guide to track how well you are grasping the material. In the center column, rate your understand

More information

Documentation for Numerical Derivative on Discontinuous Galerkin Space

Documentation for Numerical Derivative on Discontinuous Galerkin Space Documentation for Numerical Derivative on Discontinuous Galerkin Space Stefan Schnake 204 Introduction This documentation gives a guide to the syntax and usage of the functions in this package as simply

More information

Partial Differential Equations

Partial Differential Equations Simulation in Computer Graphics Partial Differential Equations Matthias Teschner Computer Science Department University of Freiburg Motivation various dynamic effects and physical processes are described

More information

Introduction to XPPAUT Lab

Introduction to XPPAUT Lab Introduction to XPPAUT Lab Anna M. Barry March 10, 2011 Abstract In this lab, we will explore the Lorenz model from the xppall/ode file that was downloaded with XPPAUT. We will make a bifurcation diagram

More information

Shallow Water Equations

Shallow Water Equations SYRACUSE UNIVERSITY Shallow Water Equations PHY 307 Colin Richard Robinson 12/16/2011 Table of Contents Introduction... 3 Procedure... 3 Empirical Formulations... 3 The Bathtub Model... 5 Portals... 8

More information

MATH 2400: CALCULUS 3 MAY 9, 2007 FINAL EXAM

MATH 2400: CALCULUS 3 MAY 9, 2007 FINAL EXAM MATH 4: CALCULUS 3 MAY 9, 7 FINAL EXAM I have neither given nor received aid on this exam. Name: 1 E. Kim................ (9am) E. Angel.............(1am) 3 I. Mishev............ (11am) 4 M. Daniel...........

More information

3.1 INTRODUCTION TO THE FAMILY OF QUADRATIC FUNCTIONS

3.1 INTRODUCTION TO THE FAMILY OF QUADRATIC FUNCTIONS 3.1 INTRODUCTION TO THE FAMILY OF QUADRATIC FUNCTIONS Finding the Zeros of a Quadratic Function Examples 1 and and more Find the zeros of f(x) = x x 6. Solution by Factoring f(x) = x x 6 = (x 3)(x + )

More information

Math Homework 3

Math Homework 3 Math 0 - Homework 3 Due: Friday Feb. in class. Write on your paper the lab section you have registered for.. Staple the sheets together.. Solve exercise 8. of the textbook : Consider the following data:

More information

Finite Element Analysis using ANSYS Mechanical APDL & ANSYS Workbench

Finite Element Analysis using ANSYS Mechanical APDL & ANSYS Workbench Finite Element Analysis using ANSYS Mechanical APDL & ANSYS Workbench Course Curriculum (Duration: 120 Hrs.) Section I: ANSYS Mechanical APDL Chapter 1: Before you start using ANSYS a. Introduction to

More information

Today is the last day to register for CU Succeed account AND claim your account. Tuesday is the last day to register for my class

Today is the last day to register for CU Succeed account AND claim your account. Tuesday is the last day to register for my class Today is the last day to register for CU Succeed account AND claim your account. Tuesday is the last day to register for my class Back board says your name if you are on my roster. I need parent financial

More information

2. Convex sets. x 1. x 2. affine set: contains the line through any two distinct points in the set

2. Convex sets. x 1. x 2. affine set: contains the line through any two distinct points in the set 2. Convex sets Convex Optimization Boyd & Vandenberghe affine and convex sets some important examples operations that preserve convexity generalized inequalities separating and supporting hyperplanes dual

More information

HiQ Analysis, Visualization, and Report Generation

HiQ Analysis, Visualization, and Report Generation Visually Organize Your Analysis Projects in an Interactive Notebook is an interactive problem-solving environment where you analyze, visualize, and document real-world science and engineering problems.

More information

Handout 4 - Interpolation Examples

Handout 4 - Interpolation Examples Handout 4 - Interpolation Examples Middle East Technical University Example 1: Obtaining the n th Degree Newton s Interpolating Polynomial Passing through (n+1) Data Points Obtain the 4 th degree Newton

More information

COMSOL Model Report. 1. Table of Contents. 2. Model Properties. 3. Constants

COMSOL Model Report. 1. Table of Contents. 2. Model Properties. 3. Constants COMSOL Model Report 1. Table of Contents Title - COMSOL Model Report Table of Contents Model Properties Constants Global Expressions Geometry Geom1 Integration Coupling Variables Solver Settings Postprocessing

More information

Convex Optimization. Convex Sets. ENSAE: Optimisation 1/24

Convex Optimization. Convex Sets. ENSAE: Optimisation 1/24 Convex Optimization Convex Sets ENSAE: Optimisation 1/24 Today affine and convex sets some important examples operations that preserve convexity generalized inequalities separating and supporting hyperplanes

More information

Simulation of Mechatronic Systems

Simulation of Mechatronic Systems Examination WS 2002/2003 Simulation of Mechatronic Systems Prof. Dr.-Ing. K. Wöllhaf Remarks: Check if the examination is complete (9 pages) Put your name and Matr.Nr. on any sheet of paper You must not

More information

2.2 Transformers: More Than Meets the y s

2.2 Transformers: More Than Meets the y s 10 SECONDARY MATH II // MODULE 2 STRUCTURES OF EXPRESSIONS 2.2 Transformers: More Than Meets the y s A Solidify Understanding Task Writetheequationforeachproblembelow.Useasecond representationtocheckyourequation.

More information

MAT 343 Laboratory 4 Plotting and computer animation in MATLAB

MAT 343 Laboratory 4 Plotting and computer animation in MATLAB MAT 4 Laboratory 4 Plotting and computer animation in MATLAB In this laboratory session we will learn how to. Plot in MATLAB. The geometric properties of special types of matrices (rotations, dilations,

More information

In Homework 1, you determined the inverse dynamics model of the spinbot robot to be

In Homework 1, you determined the inverse dynamics model of the spinbot robot to be Robot Learning Winter Semester 22/3, Homework 2 Prof. Dr. J. Peters, M.Eng. O. Kroemer, M. Sc. H. van Hoof Due date: Wed 6 Jan. 23 Note: Please fill in the solution on this sheet but add sheets for the

More information

Fall 2015 Math 337. Basic MatLab

Fall 2015 Math 337. Basic MatLab Fall 215 Math 337 Basic MatLab MatLab is a powerful software created by MathWorks, which is used extensively in mathematics, engineering, and the sciences. It has powerful numerical and graphic capabilities,

More information

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder Final Report Discontinuous Galerkin Compressible Euler Equation Solver May 14, 2013 Andrey Andreyev Adviser: Dr. James Baeder Abstract: In this work a Discontinuous Galerkin Method is developed for compressible

More information

Figure 6.1: Truss topology optimization diagram.

Figure 6.1: Truss topology optimization diagram. 6 Implementation 6.1 Outline This chapter shows the implementation details to optimize the truss, obtained in the ground structure approach, according to the formulation presented in previous chapters.

More information

2D/3D Geometric Transformations and Scene Graphs

2D/3D Geometric Transformations and Scene Graphs 2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background

More information

Warm-Up Exercises. Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; y = 2x + 7 ANSWER ; 7

Warm-Up Exercises. Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; y = 2x + 7 ANSWER ; 7 Warm-Up Exercises Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; 3 2. y = 2x + 7 7 2 ANSWER ; 7 Chapter 1.1 Graph Quadratic Functions in Standard Form A quadratic function is a function that

More information

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information