Coder Social home page Coder Social logo

hw_diffusion's Introduction

hw_diffusion

Homework for Garcia Ch. 6

Problem 1 (in-class)

Complete the diffusion_exercise.m program to implement the FTCS, Richardson, and DuFort-Frankel algorithms for solving the 1D heat diffusion equation along a bar of length L from x = -L/2 to +L/2.

Problem 2 (homework)

Modify the diffusion_hw.m program to solve the 1D heat diffusion equation along a bar of length L, from x = -L/2 to +L/2, for the following conditions:

  • Initial conditions:
    • T = 1 for x < -L/4
    • T = 0 for x ≥ -L/4
  • Run the computation for 500 steps with a step size of τ = 0.0001
  • Run the computation for 3 different boundary conditions:
    • Case 1: Dirichlet conditions with T(-L/2) = 1 and T(L/2) = 0
    • Case 2: Neumann conditions for insulation with dT/dx = 0 at x = ±L/2
    • Case 3: Mixed conditions with dT/dx = 0 at x = -L/2 and T = 0 at x = L/2

Plot:

  • Temperature vs. time at x = 0 for each boundary case, labeling each case.
  • T(x, t) as a surface plot like the one shown below (plot for one boundary condition).

Problem 2

hw_diffusion's People

Contributors

jmhogan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.