Introduction to The Eclipse IDE and 1-D Heat Diffusion

Download Presentation

Introduction to The Eclipse IDE and 1-D Heat Diffusion

Loading in 2 Seconds...

- 113 Views
- Uploaded on
- Presentation posted in: General

Introduction to The Eclipse IDE and 1-D Heat Diffusion

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Introduction to The Eclipse IDE and 1-D Heat Diffusion

Dr. Jennifer Parham-Mocello

- IDE – Integrated Development Environment
- Software application providing conveniences to computer programmers for software development.
- Consists of editor, compiler/interpreter, building tools, and a graphical debugger.

Heat Diffusion / Finite Difference Methods

- Java, C/C++, and PHP IDE
- Uses Java Runtime Environment (JRE)
- Install JRE/JDK - http://www.oracle.com/technetwork/java/index.html

- Need C/C++ compiler
- Install Wascana (Windows version) http://www.eclipselabs.org/p/wascana

Heat Diffusion / Finite Difference Methods

- Example – Open HelloWorld C++ project
- File -> New -> C++ Project
- Enter Project Name

- Building/Compiling Projects
- Project -> Build All
- Run -> Run

- Console

Heat Diffusion / Finite Difference Methods

Heat Diffusion / Finite Difference Methods

Heat Diffusion Equation

- Describes the distribution of heat (or variation in temperature) in a given region over time.
- For a function u(x, t) of one spatial variables(x) and the time variable t, the heat diffusion equation is:

1D

or

1D

Material Parameters – thermal conductivity (k), specific heat (c), density ()

Heat Diffusion / Finite Difference Methods

- Conservation of mass, energy, momentum, etc.
- Rate of flow in - Rate of flow out = Rate of heat storage

2D

1D

3D

Heat Diffusion / Finite Difference Methods

Wire with perfect insulation, except at ends

x=4.0

x=0.0

Boundary

Conditions

Physical Parameters

Initial

Conditions

Heat Diffusion / Finite Difference Methods

- Discretization (spatial and temporal)
- Transformation of theoretical equations to approximate algebraic form
- Solution of algebraic equations

Heat Diffusion / Finite Difference Methods

- Spatial - Partition into equally-spaced nodes

u0

u1

u2

u3

Temporal - Decide on time stepping parameters

x=0.33

x=0.67

x=1.0

x=0.0

Let to = 0.0, tn = 10.0, and Dt = 0.1

Heat Diffusion / Finite Difference Methods

Finite difference approximations for

first and second derivatives

u0

u1

ui-1

ui

ui+1

un-1

un

Heat Diffusion / Finite Difference Methods

Heat Diffusion / Finite Difference Methods

fort=0,tn

for each node, i

predict ut+Dt

endfor

endfor

- Predicting ut+Dt at each node
- Explicit solution
- Implicit solution (system of equations)

Heat Diffusion / Finite Difference Methods

Heat Diffusion / Finite Difference Methods

Physical Parameters

u0

u1

u2

u3

Boundary

Conditions

Initial

Conditions

Heat Diffusion / Finite Difference Methods

- Two Dimensions

u i,j+1

u i,j

u i-1,j

u i+1,j

u i,j-1

Heat Diffusion / Finite Difference Methods

- Open New C++ Project
- Name the Project
- Open New C++ source code file
- File -> New -> Source File

- Name C++ File (remember extension, .C, .c++, .cpp)

Heat Diffusion / Finite Difference Methods

Heat Diffusion / Finite Difference Methods

- Gradient (“Del”) Operator

Heat Diffusion / Finite Difference Methods

- Divergence (Gradient of a vector field)

Heat Diffusion / Finite Difference Methods

- Laplacian Operator

Heat Diffusion / Finite Difference Methods

- Heat Diffusion Equation - rewritten

- LHS represents spatial variations
- RHS represents temporal variation

Heat Diffusion / Finite Difference Methods