Most Popular

1500 questions
17
votes
2 answers

What are the efficient, accurate algorithms for evaluation of hypergeometric functions?

I'm curious to know what good numerical algorithms exist for evaluation of the generalized hypergeometric function (or series), defined as $${}_pF_q(a_1,\ldots,a_p;b_1,\ldots,b_q;z) = \sum_{k=0}^{\infty}…
David Z
  • 3,383
  • 2
  • 27
  • 34
17
votes
2 answers

Which libraries have good high-level support for multigrid?

I'm planning to use multigrid to calulate some eigenvalues and vectors, and I noticed PETSc has high-level support for multigrid. The PETSc documentation says that this part of PETSc should not be used, as it is being replaced soon. Which other…
Dan
  • 3,355
  • 3
  • 21
  • 47
17
votes
4 answers

Is there a good, easy-to-use, high quality open source CFD solver out there?

My thesis is on developing numerical methods for model reduction in combustion. I run my methods purely on the chemistry part of combustion simulations, and I have plenty of case studies for 0-D simulations (no flow). What I would like is to run…
Geoff Oxberry
  • 30,394
  • 9
  • 64
  • 127
17
votes
1 answer

When should implicit methods be used in the integration of hyperbolic PDEs?

Numerical methods for solving PDEs (or ODEs) fall into two broad categories: explicit and implicit methods. Implicit methods allow larger stable timesteps but require more work per step. For hyperbolic PDEs, the common wisdom is that implicit…
David Ketcheson
  • 16,522
  • 4
  • 54
  • 105
17
votes
2 answers

How can I choose a good Riemann solver when numerically solving a system of hyperbolic PDEs?

Many numerical methods for hyperbolic PDEs are based on the use of Riemann solvers. Such solvers are essential for accurately capturing shock waves. There are a range of such solvers available for the most well-studied systems (e.g., exact…
David Ketcheson
  • 16,522
  • 4
  • 54
  • 105
17
votes
1 answer

How can I avoid catastrophic cancellation?

I have the following formula that I need to rewrite in order to avoid catastrophic cancellation. $$y =\sqrt{\frac{1}{2}\left(1-\sqrt{1-x^{2}}\right)}$$ As $x$ becomes smaller, $\sqrt{1-x^{2}}$ approaches $1$, so you will get $1 - 1.000000000......1$…
Tim
  • 273
  • 3
  • 8
17
votes
1 answer

What are the major differences between GMRES and FOM?

I am reading Professor Saad's "Iterative Methods for Sparse Linear Systems" (2nd edition). The basic algorithm for FOM is given on page 166 and the basic algorithm for GMRES is given on page 172. Both FOM and GMRES appear to build the same Krylov…
17
votes
3 answers

Are BLAS implementations guaranteed to give the exact same result?

Given two different BLAS implementations, can we expect that they make the exact same floating point computations and return the same results? Or can it happen, for instance, that one computes a scalar product as $$ ((x_1y_1 + x_2y_2) + x_3y_3) +…
Federico Poloni
  • 11,344
  • 1
  • 31
  • 59
17
votes
2 answers

Drawbacks of Newton-Raphson approximation with approximate numerical derivative

Suppose I have some function $f$ and I want to find $x$ such that $f(x)\approx 0$. I might use the Newton-Raphson method. But this requires that I know the derivative function $f'(x)$. An analytic expression for $f$ may be unavailable. For example,…
Mark Dominus
  • 273
  • 2
  • 7
17
votes
2 answers

(how to) write simulations that run faster?

I have started using python as the programming language for doing all my assignments in CFD. I have a very little experience in programming. I am from mechanical engineering background and am pursuing higher education in Aerospace…
Subodh
  • 1,480
  • 14
  • 31
17
votes
3 answers

Uses of power series maps

I'm from the field of accelerator physics, specifically related to circular storage rings for synchrotron light sources. High energy electrons circulate around the ring, guided by magnetic fields. The electrons circulate billions of times and one…
Boaz
  • 171
  • 5
17
votes
2 answers

Disadvantages of common discretization schemes for CFD simulations

The other day, my computational fluid dynamics instructor was absent and he sent in his PhD candidate to substitute for him. In the lecture he gave, he seemed to indicate several disadvantages associated with various discretization schemes for…
Paul
  • 12,045
  • 7
  • 56
  • 129
17
votes
6 answers

Are there open-source scientific libraries which use modern Fortran with OOP?

I've spent the last couple of months on coding a Fortran program for solving a particular PDE system (describes fluid flow/combustion). I tryed to use latest-standard Fortran and the new OOP capabilites modern Fortran has. I am working on my own and…
tiam
  • 864
  • 7
  • 18
17
votes
5 answers

Finding a global minimum of a smooth, bounded, non-convex 2D function that is costly to evaluate

I have a bounded non-convex 2-D function which I'd like to find the minimum of. The function is quite smooth. Evaluating it is costly. An acceptable error is about 3% of the function's domain in each axis. I tried running the implementation of the…
nojka_kruva
  • 373
  • 1
  • 9
17
votes
1 answer

Strong vs. weak solutions of PDEs

The strong form of a PDE requires that the unknown solution belongs in $H^2$. But the weak form requires only that the unknown solution belongs in $H^1$. How do you reconcile this?