How to work around this equation giving infinities in the numerical calculation?

  • Context: Graduate 
  • Thread starter Thread starter FQVBSina_Jesse
  • Start date Start date
  • Tags Tags
    Green's function Work
Click For Summary

Discussion Overview

The discussion revolves around numerical challenges encountered when solving the heat conduction equation for a semi-infinite slab with a boundary condition of the first kind, particularly focusing on issues arising from very small values of delta that lead to infinities in calculations.

Discussion Character

  • Technical explanation, Mathematical reasoning, Debate/contested

Main Points Raised

  • One participant describes the issue of delta being very small, causing the first exponential in the equation to tend towards infinity, which leads to numerical problems in Fortran.
  • Another participant suggests using a Taylor series expansion of delta to potentially cancel out infinities and retain a constant term.
  • A different participant proposes a transformation using the arctangent function to map the problem onto a finite region.
  • Another suggestion involves redefining variables to absorb delta, which may eliminate its dependence from the integrand.
  • One participant recommends scaling the variables so that delta approximates 1 as a common method to address such numerical issues.

Areas of Agreement / Disagreement

Participants present multiple competing views and approaches to address the numerical issues, with no consensus on a single solution or method being established.

Contextual Notes

Participants express various assumptions regarding the behavior of the integrand and the implications of transformations, but these assumptions remain unresolved and depend on the specific context of the problem.

Who May Find This Useful

Researchers or practitioners dealing with numerical methods in heat conduction problems, particularly those facing challenges with small parameters in their calculations.

FQVBSina_Jesse
Messages
54
Reaction score
9
TL;DR
Heat conduction solution using Green's function has exponential and erfc terms. At boundaries, exponential gives infinity and other boundaries, erfc gives 0, making log transform difficult.
The heat conduction equation for a semi-infinite slab with a boundary condition of the first kind is as follows:

1652468206637.png


The problem is delta is a very small number, so the first exponential will tend to infinity. I am programming this in Fortran and it can accommodate values up to magnitude of 310, but beyond that, the code simply returns infinities. If the program does not simply return infinity, the exponential and erfc terms balance each other and generates a reasonable value.

If I apply the log transformation on the integrand, that will solve the problem of the delta squared. But the complimentary error functions at the boundary of z = 0 will give erfc(2/delta*sqrt(...)) = 0, which under log will return negative infinity.

Does anyone have a suggestion as to how I can resolve this issue? Thanks!
 
  • Like
Likes   Reactions: Delta2
Physics news on Phys.org
I don't know about this specific application, but the natural thing to do would be to expand things as Taylor series of delta, watch the infinities cancel out, and then keep whatever constant term is left over.

Assuming that's what's actually happening here.
 
Try a transformation u=\tan^{-1}x. That should map everything onto a finite region.
 
Can you try redefining the variables ##t, t', z## to absorb the ##\delta##? It looks like once you do that the upper limit on your integral will get large, but it should take all dependence on ##\delta## out of the integrand.
 
Can you scale your variables so that \delta \approx 1? That would be the usual way of handling this.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K