Multi-region Finite Difference- Interface between materials

In summary, the conversation discusses the use of a multi-region diffusion code with different material properties and the issue of a discontinuity at the interface between the regions. The speaker is running a numerical code in Mathematica and is experiencing problems with the finite difference method. They mention adding an interface condition to the solver to satisfy the conservation of current, resulting in the desired kink in the solution.
  • #1
timman_24
52
0
I am writing a multi-region diffusion code. The two regions have different material properties, so the analytical solution shows a discontinuity at the interface between the regions.

As can be seen here:

attachment.php?attachmentid=35045&stc=1&d=1304197454.png


The numerical code I am running is (Mathematica):

Code:
While[converge > .00001,
 count = count + 1;
 list1[[1]] = list1[[2]];
 For[i = 2, i < Ai + 1, i++,
  list1[[i]] = Dw (list1[[i - 1]] + list1[[i + 1]])/(H^2 Ea1 + 2 Dw)];
 For[j = Ai + 1, j < (Ai + Bi), j++,
  list1[[j]] = .5*(-H^2 (list1[[j]] Ea2/Dc - S/Dc) + list1[[j - 1]] + 
      list1[[j + 1]])];
 converge = Max[Abs[list2 - list1]];
 list2 = list1;]

This works great if the material properties between the two regions are identical, but if I use differing material properties, I still get a smooth curve:

attachment.php?attachmentid=35046&stc=1&d=1304197454.png


Is there a trick to getting this to work with finite difference method? How do I deal with this type of interface condition?

Thanks guys
 

Attachments

  • Analyticalpart1.png
    Analyticalpart1.png
    2.3 KB · Views: 499
  • Analyticalpart1num.png
    Analyticalpart1num.png
    2.3 KB · Views: 563
Physics news on Phys.org
  • #2
Colud you please post the problem you're trying to solve? I'm not sure, but it looks like you're missing some sort of jump condition. You should check if your algorithm is correct when j = Ai, because that's where the coupling occurs.
 
  • #3
I ended up adding an interface condition to the solver.

To conserve current, we need this condition to be satisfied at the boundary:

[tex]D_{1}J_{1}(x)=D_{2}J_{2}(x)[/tex]

To satisfy this condition, I stopped at the interface and applied this condition at that point. Then I continued. I used a backward difference scheme for the [tex]J_{1}[/tex] and a forward difference approx for the [tex]J_{2}[/tex] and rearranged for i.

This gave me the kink I was looking for.

BTW, this was a neutron diffusion model in a slab with two materials.
 

Related to Multi-region Finite Difference- Interface between materials

1. What is a multi-region finite difference method?

A multi-region finite difference method is a numerical technique used in computational physics and engineering to solve partial differential equations in multiple regions or domains. It involves dividing a complex system into smaller regions and applying finite difference methods to each region, while also incorporating boundary conditions and interfaces between the regions.

2. How is a multi-region finite difference method different from traditional finite difference methods?

A traditional finite difference method only considers a single region or domain, while a multi-region approach accounts for multiple regions and their interfaces. This allows for more accurate modeling of physical systems with varying properties or materials.

3. What are some applications of multi-region finite difference methods?

Multi-region finite difference methods are commonly used in fields such as fluid dynamics, heat transfer, electromagnetics, and material science to model complex systems with different materials or phases. They are also used in geophysics for modeling seismic waves through different layers of the Earth.

4. How are interfaces between materials handled in multi-region finite difference methods?

The interfaces between materials are typically represented as boundary conditions, where the properties of the materials on either side of the interface are taken into account. These boundary conditions can be explicitly defined or calculated based on the properties of the materials.

5. What are the limitations of multi-region finite difference methods?

Multi-region finite difference methods can become computationally expensive and time-consuming when modeling complex systems with many regions and interfaces. They also require accurate knowledge of the material properties and boundary conditions, which may be difficult to obtain in some cases.

Similar threads

Replies
6
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
13
Views
2K
  • Differential Equations
Replies
7
Views
4K
  • Differential Equations
Replies
1
Views
1K
Replies
4
Views
902
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Differential Equations
Replies
5
Views
1K
  • Differential Equations
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top