Skip to content

Homework for Garcia ch 8, relaxation methods

Notifications You must be signed in to change notification settings

bethel-physics/hw_relaxation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

hw_relaxation

Homework for Garcia ch 8, relaxation methods

Problem 1 (in-class)

Modify relaxation2d_exercise.m to solve Laplace's equation with the Jacobi, Gauss-Seidel, and SOR methods. Apply boundary conditions of:

  • Φ = 1 at x = ±0.5 (left/right column)
  • Φ = 0 at y = ±0.5 (top/bottom row)
  • Use an initial guess of 0 in the interior.

Your code is working if you observe this potential: Problem 1

Problem 2 (homework)

Modify relaxation2d_exercise.m to solve the following Poisson equation with the Jacobi, Gauss-Seidel, and SOR methods. Implement the ID and BC matrices to account for an interior boundary condition.

2Φ = 10cos(πx)cos(3πy)

Use the following boundary conditions:

  • Φ = 1 for x = -0.5 (left boundary)
  • Φ = 0 for all other outside boundaries
  • Φ = 2 for an interior square boundary: -0.1 < x < 0.1, -0.1 < y < 0.1

Set your initial guess to 0 for all points not on a boundary and use ω = 1.6 for the SOR method. Animate your solutions using the mesh plots.

About

Homework for Garcia ch 8, relaxation methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages