Code Monkey home page Code Monkey logo

fdtd's Introduction

Secuential implementation of Finite Diferences for heat equation solution in 1D and 2D.

for now we just code explicit solution for heat equation in 1D and 2.

###Table of contents Finite Diferences for heat equation in 1D

Finite Diferences for heat equation in 2D

##Finite Diferences for heat equation in 1D.

Explicit solution in 1D directory

Dependencies

Compile and run

mkdir build
cd build
cmake ../
make
./fdtd_1D < ../in

keep in mind that fdtd_1D executable receives the following parameters that you can put in file in:

  • xa: init position in X
  • xb: last position in X
  • ta: init value in time
  • tb: last value in time
  • N: number of point to calculate heat value
  • T: number of steps in time.
  • gamma: heat difusion value in equation.

Runing example

remove build directory and exec in terminal

./run.sh

the output example image is "image.jpg"

example Docs

this program had been tested with these papers:

heat Equation example 1

heat Equation example 2

##Finite Diferences for heat equation in 2D (rectangular objects)

Explicit solution in 2D directory

Dependecies

###Compile and Run in 2D directory type:

./run.sh

executable file is ./build/fdtd_2d and its input file is in2d and have de following parameters:

  • xa: init position in X
  • xb: last postition in X
  • ya: init position in y
  • yb: last position in y
  • ta: init time
  • tb: last time
  • Nx: discretization points in X
  • Ny: discretization points in Y
  • T: discretization points in time
  • k: heat difusion value in equation

###Output output values are init state and last state of heat in object.

###Runing and ploting example

in 2D directory delete build dir (if you have it ) and run:

./run.sh
./plot_Example

this is a little example of rectangular object with a center heat source and plot in files time0.png and timeT.png the init and end heat state of object

###References two dimensional heat equation with FD

fdtd's People

Contributors

ivanchoff avatar

Stargazers

Max 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.