Ch 1 ComputationBase

Embed Size (px)

Citation preview

  • 7/25/2019 Ch 1 ComputationBase

    1/19

    PROGRAM ALIH TAHUN

    TEKNIK MESIN-PPS-UB

    MALANG-2014

    ACHMAD. A. SONIEF

    PPS-UB-PAT-TM-2010 1

  • 7/25/2019 Ch 1 ComputationBase

    2/19

    Requires understanding of engineering

    systems

    By observation and experiment

    Theoretical analysis and generalization

    Computers are great tools, however,

    without fundamental understanding of

    engineering problems, they will be useless.

    PPS-UB-PAT-TM-2010 2

  • 7/25/2019 Ch 1 ComputationBase

    3/19

    PPS-UB-PAT-TM-2010

    Mathematical Problem

    It has a solution.

    This solution is unique

    How do we find the solution ?

    How do we find approximate solution?

    Error estimates

    Algorithm

    Programming

    Computation with guaranteed accuracy

    3

  • 7/25/2019 Ch 1 ComputationBase

    4/19

    Fig. 1.1

    PPS-UB-PAT-TM-2010 4

  • 7/25/2019 Ch 1 ComputationBase

    5/19

    A mathematical model is represented as a functional

    relationship of the form

    Dependent independent forcing

    Variable =f variables, parameters, functions

    Dependent variable: Characteristic that usually reflects the stateof the system

    Independent variables: Dimensions such as time and spacealong which the systems behavior is being determined

    Parameters: reflect the systems properties or composition

    Forcing functions: external influences acting upon the system

    PPS-UB-PAT-TM-2010 5

  • 7/25/2019 Ch 1 ComputationBase

    6/19

    Newtons 2nd

    law of Motion States that the time rate change of momentum of a body

    is equal to the resulting force acting on it.

    The model is formulated asF = m a (1.2)

    F=net force acting on the body (N)

    m=mass of the object (kg)

    a=its acceleration (m/s2)

    PPS-UB-PAT-TM-2010 6

  • 7/25/2019 Ch 1 ComputationBase

    7/19

    Formulation of Newtons 2nd law has several

    characteristics that are typical of mathematical models of

    the physical world:

    It describes a natural process or system in mathematical

    terms

    It represents an idealization and simplification of reality

    Finally, it yields reproducible results, consequently, can be

    used for predictive purposes.

    PPS-UB-PAT-TM-2010 7

  • 7/25/2019 Ch 1 ComputationBase

    8/19

    Some mathematical models of physical phenomena

    may be much more complex.

    Complex models may not be solved exactly or require

    more sophisticated mathematical techniques than

    simple algebra for their solution

    Example, modeling of a falling parachutist:

    PPS-UB-PAT-TM-2010 8

  • 7/25/2019 Ch 1 ComputationBase

    9/19

    m

    cvmg

    dt

    dv

    cvF

    mgF

    FFF

    m

    F

    dt

    dv

    U

    D

    UD

    PPS-UB-PAT-TM-2010 9

  • 7/25/2019 Ch 1 ComputationBase

    10/19

    This is a differential equation and is written interms of the differential rate of change dv/dt ofthe variable that we are interested in predicting.

    If the parachutist is initially at rest (v=0 at t=0),using calculus

    tmcec

    gmtv

    )/(1)(

    PPS-UB-PAT-TM-2010 10

    vm

    cg

    dt

    dv

    Independent variable

    Dependent variable ParametersForcing function

  • 7/25/2019 Ch 1 ComputationBase

    11/19

    Conservation Laws and Engineering Conservation laws are the most important and

    fundamental laws that are used in engineering.

    Change = increasesdecreases (1.13) Change implies changes with time (transient). If the

    change is nonexistent (steady-state), Eq. 1.13becomes

    Increases =Decreases

    PPS-UB-PAT-TM-2010 11

  • 7/25/2019 Ch 1 ComputationBase

    12/19

    For steady-state incompressible fluid flow in pipes:

    Flow in = Flow outor

    100 + 80 = 120 + Flow4

    Flow4

    = 60PPS-UB-PAT-TM-2010 12

    Fig 1.6

  • 7/25/2019 Ch 1 ComputationBase

    13/19

    Numerical Computations

    Model of natural or

    Social phenomena

    Mathematical model

    Modeling

    algorithm

    programming

    Computing

    Analysis of Results

    Development of stable algorithm

    Flow chart, Language ( C,Visual C)

    Software ( Matlab, Mathematica )

    Error Estimates. Correctness.

    Exact solution.

    Approximation solution.

    Execution on a computer

    PPS-UB-PAT-TM-2010 13

  • 7/25/2019 Ch 1 ComputationBase

    14/19

    14

    Numerical MethodsNavier-Stokes equations analytically solvable only in

    special cases

    approximate the solution numerically

    use a discretization method to approximate thedifferential equations by a system of algebraicequations which can be solved on a computer

    Finite Differences (FD) Finite Volume Method (FVM)

    Finite Element Method (FEM)

    Boundary Element Method (BEM)PPS-UB-PAT-TM-2010

  • 7/25/2019 Ch 1 ComputationBase

    15/19

    15

    Numerical methods, gridsGrids

    Structured grid

    all nodes have the same number

    of elements around it only for simple domains

    Unstructured grid

    for all geometries

    irregular data structure

    Block-structured grid

    PPS-UB-PAT-TM-2010

  • 7/25/2019 Ch 1 ComputationBase

    16/19

    16

    Numerical methods, properties

    ConsistencyTruncation error : difference between discrete eq and the exact one

    Truncation error becomes zero when the mesh is

    refined. Method order n if the truncation error is proportional

    to or

    Stability

    Errors are not magnified Bounded numerical solution

    nx)(

    nt)(

    PPS-UB-PAT-TM-2010

  • 7/25/2019 Ch 1 ComputationBase

    17/19

    17

    Numerical methods, properties (2)

    Convergence

    Discrete solution tends to the exact one as the gridspacing tends to zero.

    Lax equivalence theorem (for linear problems):

    Consistency + Stability = Convergence

    For non-linear problems: repeat the calculations insuccessively refined grids to check if the solutionconverges to agrid-independent solution.

    PPS-UB-PAT-TM-2010

  • 7/25/2019 Ch 1 ComputationBase

    18/19

    PPS-UB-PAT-TM-2010

    Hierarchical model of errors in Scientific computing

    Model of natural or

    Social phenomena

    Mathematical model

    Numerical computation

    model

    Computed numerical

    model

    Fluid flow

    Partial differentialequations

    Linear system

    of equations

    Approximate

    solution

    Errors in

    modelization

    Truncation

    errors

    Round-off

    errors

    18

  • 7/25/2019 Ch 1 ComputationBase

    19/19

    PPS-UB-PAT-TM-2010

    Language

    C, C++, C-XSC

    PASCAL, PASCAL-SC

    FORTRAN, FORTRAN-SC

    BASIC, VISUAL BASIC

    PROFIL - Programmers Runtime

    Optimized Fast Interval LibraryMATHEMATICA

    MATLAB, INTLAB

    MAPLE -V

    software

    19