Slashdot Mirror


Numerically Approximating the Wave Equation?

ObsessiveMathsFreak writes "I'm an applied mathematician who has recently needed to obtain good numerical approximations to the classic second-order wave equation, preferably in three space dimensions. A lot of googling has not revealed much on what I had assumed would be a well-studied problem. Most of the standard numerical methods, finite difference/finite element methods, don't seem to work very well in the case of variable wave speed at different points in the domain, which is exactly the case that I need. Are any in this community working on numerically solving wave equation problems? What numerical methods do you use, and which programs do you find best suited to the task? How do you deal with stability issues, boundary/initial values, and other pitfalls? Are there different methods for electromagnetic wave problems? Finally, when the numbers have all been crunched, how do you visualize your hard-earned data?"

260 comments

  1. Ouch! by Anonymous Coward · · Score: 1, Funny

    My head hurts now..

    1. Re:Ouch! by lazy+genes · · Score: 0

      Try it in 4D.

    2. Re:Ouch! by beckerist · · Score: 1

      Sounds like someone left their homework to the last minute again!

  2. Call the hotline by mycall · · Score: 0, Redundant

    Call Wolfram's tech support, I'm sure they can assist.

    1. Re:Call the hotline by mycall · · Score: 2, Interesting

      FYI, googling: Wave Equation "three dimensions" approximation .brings up a lot of hits..

    2. Re:Call the hotline by Bunji+X · · Score: 1

      Try sending this googles' way:

      numerical wave equation "three dimensional"

      --
      ---
      The combined human population is enough to feed every living tiger for app. 28000 years.
  3. Just reverse the polarity! by Anonymous Coward · · Score: 4, Funny

    Or perhaps you could modify the phase variance. That always works on TV.

    1. Re:Just reverse the polarity! by Lehk228 · · Score: 1

      goo gone. it's cheap and it dissolves the glue without harming the plastic case.

      --
      Snowden and Manning are heroes.
    2. Re:Just reverse the polarity! by Anonymous Coward · · Score: 0

      It might be a good idea to apply it to your mother's stomach.

    3. Re:Just reverse the polarity! by stevey · · Score: 1

      I thought you had to invert the polarity ..?

    4. Re:Just reverse the polarity! by phoenixwade · · Score: 1, Offtopic

      And non-toxic too! So it'll work on a Macintosh AND a Granny smith.....

      --
      A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
    5. Re:Just reverse the polarity! by Anonymous Coward · · Score: 0

      Way to lower the bar on anonymous trolling.

      Shouldn't you be out sniffing glue or playing with matches or something like that, boy? Leave the sexual references to the post-pubescents.

    6. Re:Just reverse the polarity! by smitty97 · · Score: 1

      Don't cross the streams! That would be Bad.

      --
      mod me funny
  4. Best way to get a quick answer. by Lethyos · · Score: 4, Funny

    You could try putting your question online as an Ask Slashdot post. Use the Submit Story link on the left. Good luck finding your answer!

    --
    Why bother.
    1. Re:Best way to get a quick answer. by Anonymous Coward · · Score: 0

      I think I've seen it before. Check out: http://ask.slashdot.org/article.pl?sid=07/09/04/20 38226

    2. Re:Best way to get a quick answer. by Chapter80 · · Score: 2, Funny

      I think I've seen it before. Check out: http://ask.slashdot.org/article.pl?sid=07/09/04/20 38226
      Wow. What are the odds? Same story, same time, same submitter, same "slashdot editor".

      If only there were a numerical equation to approximate the probability of this occurring, preferably in three space dimensions.

    3. Re:Best way to get a quick answer. by Eudial · · Score: 4, Funny

      You could try putting your question online as an Ask Slashdot post. Use the Submit Story link on the left. Good luck finding your answer!


      No use, I can already foresee the answers you will get!

      * In Soviet Russia, Wave Equations approximate YOU!
      * 42
      * Re: 42 - But... does it run Linux?
      * I've got Dyscalculia you insensitive clod!
      * Frost Pist

      etc.
      --
      GAAH! MY PRINTER IS ON FIRE!!! PUT IT OUT! PUT IT OUT!
    4. Re:Best way to get a quick answer. by SQLGuru · · Score: 2, Funny

      Eureka! I searched and I searched. I looked and I looked. I took many derivatives and integrations and after much research.......I found the equation you are looking for.....

      p=1

      Layne

    5. Re:Best way to get a quick answer. by attonitus · · Score: 5, Informative
      This is a well studied problem. I work on (time homogeneous) Maxwell's equations and we use finite elements successfully with variable coefficients. Peter Monk's book, "Finite Elements for Maxwell's Equations" has some good details. However, this is probably a more complicated problem that you want.

      I don't have any good references to hand, but for the plain old wave equation (time inhomogeneous and homogeneous) you could try looking at discontinuous Galerkin methods. Depending on the inhomogeneity in your coefficients, you might be able to use a Godunov scheme. Your local friendly applied mathematics professor specialising in numerical methods for PDEs should be able to tell you more.

      If you're interested in contemporary research, there are plenty of conferences on this kind of stuff. Here's a recent one.

    6. Re:Best way to get a quick answer. by Davorama · · Score: 3, Funny

      To quote an old numerical methods for PDE's specializing professor of mine...

        "Godunov is good enough."

      Sorry, couldn't resist.

      Seriously though, if you have to ask all these questions what you really need is some mentoring. If you aren't at a university, go to one and find either the applied math guys or the engineers. Or maybe just call up the people who make fluent...

      --

      Davo -- Free speech, free software, AND free beer.

    7. Re:Best way to get a quick answer. by UncleTogie · · Score: 1

      Actually, I believe the answer is instead eleventy-two...

      --
      Don't tell me to get a life. I'm a gamer; I have LOTS of lives!
    8. Re:Best way to get a quick answer. by Just+Some+Guy · · Score: 1

      I don't have any good references to hand, but for the plain old wave equation (time inhomogeneous and homogeneous) you could try looking at discontinuous Galerkin methods. Depending on the inhomogeneity in your coefficients, you might be able to use a Godunov scheme.

      You just made that all up, knowing that none of us would be smart enough to catch it, didn't you?

      --
      Dewey, what part of this looks like authorities should be involved?
  5. What's wrong with FE/FD? by Anonymous Coward · · Score: 4, Interesting

    Not exactly my field, but if the issues with FE/FD are ones of stability and/or convergence, have you looked into using multigrid methods? It requires more memory, but a good preconditioned, multigrid method should help reduce problems of variable speeds, no?

    1. Re:What's wrong with FE/FD? by Anonymous Coward · · Score: 0

      No, multigrid methods deal with the diminishing convergence rate of iterative solvers that occurs with increasing mesh resolution, it has nothing to do with variable speeds on the mesh.

  6. Monte Carlo? by tjstork · · Score: 0

    I am not a physicist, but I thought Feynman invented Monte Carlo for this sort of thing.

    --
    This is my sig.
    1. Re:Monte Carlo? by mycall · · Score: 0

      Great vacation spot and a lucky choice for those finding a correct result. http://www.eveandersson.com/pi/monte-carlo-circle looks like a winner to me.

    2. Re:Monte Carlo? by dummkopf · · Score: 2, Funny

      way off dude... feynman did not invent monte carlo...

    3. Re:Monte Carlo? by crowds · · Score: 1

      Well, i'm pretty sure that Feynman did not invent Monte Carlo; and from my experience this would not be an appropriate way to approach the problem.

    4. Re:Monte Carlo? by PDAllen · · Score: 2, Informative

      Feynman didn't invent Monte Carlo (that's Ulam, IIRC). And it wouldn't be any use here.

      Monte Carlo is useful when you have some finite input for a question (whose answer you can easily calculate given the input) and you need some kind of idea about what the output usually is: throw in random inputs until you think you have an idea. Then prove it.

      This is different: he wants to know how to calculate the answer to his problem, because it's not easy. Making random guesses won't help. Grid methods will, but they will cost a hell of a lot of memory and computation. Maybe pestering the computational fluid dynamics community would be a good idea?

    5. Re:Monte Carlo? by ericartman · · Score: 1

      Richard P Feynman, QED, headaches, thanks so much I'd almost forgotten

      Cart

  7. More information is needed by DrJimbo · · Score: 4, Informative

    You say you want an approximate solution but you give us no clue as to the part of the problem you want to approximate. For variable wave speed, I've used both normal modes and the parabolic equation approximation.

    The question you have posed is so unspecific, it would be impossible to fully answer it without writing a text book. There are many good ones, for example, Waves in Layered Media by L. M. Brekhovskikh.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
    1. Re:More information is needed by Chapter80 · · Score: 2, Funny
      The approximate solution is, of course:

      42

    2. Re:More information is needed by Keebler71 · · Score: 1

      Don't listen to this guy... I on the other hand recently proved a closed form time-domain solution to your problem. I think I wrote it in a margin of a book somewhere. I'll get back to it sometime and publish it...

      --
      "It takes considerable knowledge just to realize the extent of your own ignorance." - Thomas Sowell
    3. Re:More information is needed by tmarthal · · Score: 1

      When dealing with physics, the approximate solution is, of course:

      137

      (or its inverse)

  8. usenet by poopdeville · · Score: 4, Informative

    Mathematician here, though this isn't my field. Slashdot isn't a very good place to ask this kind of question, since there aren't many mathematicians on here, and it's a very broad topic. I suggest Usenet -- specificially the sci.math newsgroup. I know at least 50 mathematicians who post regularly, and a lot more lurk (and occassionally answer questions).

    --
    After all, I am strangely colored.
    1. Re:usenet by Anonymous Coward · · Score: 0
    2. Re:usenet by WallaceAndGromit · · Score: 2, Informative

      Look for references in outdoor sound propagation. The Journal of the Acoustical Society of America or the Journal of Sound and Vibration are good starts, there are also many books (too numerous to list here) on this topic worth investigating. Outdoor sound propagation is a classical example of wave propagation in varying sound speed media and is well documented. You will find many approaches (other than finite element, boundary element, or finite difference) applicable to your problem.

      --
      Name: Mr. Anon E Mouse; SSN: 555-55-5555
    3. Re:usenet by Mikkeles · · Score: 2, Informative

      Garth Johnson, Darboux Transformations of the Wave Equation ( only partial Google cached html of pdf as the site no longer seems to exist.)

      (Google cache of Mr Johnson's cv)

      --
      Great minds think alike; fools seldom differ.
    4. Re:usenet by Intron · · Score: 1

      sci.math.num-analysis might be more focused on this type of problem than sci.math and has fewer kooks. Search on google gives 148 hits for "wave equation" in that group.

      --
      Intron: the portion of DNA which expresses nothing useful.
    5. Re:usenet by jd · · Score: 1
      Usenet is a very good place to ask. Although I've done a little work in the area being asked about - mostly wave analysis through variable media, otherwise known as Ground Penetrating Radar - and can therefore definitely say that toolkits and methods exist all over the place for the general sort of problem described, I can be equally definite in saying that a solution for one sort of problem has no bearing on whether there's a suitable solution to the sorts of problems the original questioner wanted to solve.

      (Waves? Waves of what, through what? Does the simulation need to consider diffraction or refraction? With recent studies showing diffraction working just as well with short enough intervals in time as well as in space, do you need to consider diffraction over time? The speed varies through different media, but usually not by significant amounts - however, you can slow light to 30mph or even stop it completely under the right conditions. Are we talking about wave simulations through exotic media? There are just so many unknowns here, and the only thing I'm qualified to say is that I'm unqualified even to know the whole list, never mind the answers to each question.)

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    6. Re:usenet by celtic_hackr · · Score: 1

      I concur, this was about the worst place to ask a mathematical equation, but then again attempting to google for an answer to this type of problem is tantamount to googling for a solution for NP Hard equations. There are a number of excellent books on the subject of approximating all manner of
      equations. This question sounds more like a question from an undergrad seeking an easy answer to a homework assignment. Of course, I've been known to be wrong before too. ;')

      I used to be a mathematician, but the dividends just didn't equate.

    7. Re:usenet by Anonymous Coward · · Score: 0

      "Slashdot isn't a very good place to ask this kind of question, since there aren't many mathematicians on here,"

      You're obviously not a programmer concerned with developing a cosine correction by elevation for satellite imagery or developing time shifting protocols for sound waves without bending the pitch.

      No... no mathematicians here. No double majors here either.

    8. Re:usenet by wrfelts · · Score: 1
      Slashdot isn't a very good place to ask this kind of question.

      It is, however, very entertaining to ask such questions here...

    9. Re:usenet by poopdeville · · Score: 1

      In case you missed it, I wrote that I'm a mathematician (making your counter-example redundant), but that there are few mathematicians here. Usenet is a better resource for this kind of question.

      For the record, my last job involved data mining a 5000 dimensional space.

      --
      After all, I am strangely colored.
    10. Re:usenet by Anonymous Coward · · Score: 0

      That sounds more like an engineering issue than one of mathematics though.

    11. Re:usenet by bigpat · · Score: 2, Insightful

      Mathematician here, though this isn't my field. Slashdot isn't a very good place to ask this kind of question, since there aren't many mathematicians on here, and it's a very broad topic. I suggest Usenet -- specificially the sci.math newsgroup. I know at least 50 mathematicians who post regularly, and a lot more lurk (and occassionally answer questions). I think that is probably an inaccurate statement. I am guessing there are more than 50 mathematicians that read Slashdot. Problem is not quantity, it is sifting through the jokes and the offtopic posts, and the helpful suggestions to look elsewhere :) before you get to the guy that actually knows what you are asking and might have an idea of what you want.

  9. Let's try to be helpful by EraserMouseMan · · Score: 3, Interesting

    and not make fun of this person for asking a question that has nothing to do with our hobby horses. I hope this question has a small number of posts. Only well-meaning and helpful ones.

    1. Re:Let's try to be helpful by Anonymous Coward · · Score: 0

      and not make fun of this person for asking a question that has nothing to do with our hobby horses. I hope this question has a small number of posts. Only well-meaning and helpful ones.

      You really are asking for one of the "cock-smoking teabagger" trolls with a comment like that... :)

    2. Re:Let's try to be helpful by xactuary · · Score: 0
      Yes, I seriously agree, but only after I post this rather well-meaning, but (like Parent) unhelpful comment.

      --
      Say hello to my little sig.
    3. Re:Let's try to be helpful by Strange+Ranger · · Score: 3, Funny

      I think he'd receive a lot more meaningful and helpful comments if he had placed his problem in context.

      Such as:
      - Numerically solving the wave functions describing the taut jiggle of Natalie Portman's bum.
      - Mapping out the three dimensional wave constructs of that odd humming in your basement.
      - Discovering the finite elements of romantic pursuit and the finite differences between romantic pursuit and stalking.

      You know, when in Rome...

      --

      Operator, give me the number for 911!
    4. Re:Let's try to be helpful by tomcrick · · Score: 1

      You know, when in Rome...

      "Yes? Please go on..."

    5. Re:Let's try to be helpful by Sen.NullProcPntr · · Score: 1

      You know, when in Rome...

      "Yes? Please go on..."

      ...do as the Vandals!

    6. Re:Let's try to be helpful by fimbulvetr · · Score: 1

      You seem to be missing:

      -PROFIT!

  10. Don't seem to work very well? by mochan_s · · Score: 3, Informative

    Most of the standard numerical methods, finite difference/finite element methods, don't seem to work very well in the case of variable wave speed at different points in the domain, which is exactly the case that I need.

    In what ways does it not work well for you? It doesn't converge, takes too long to converge? What is the problem?

    A numerical algorithm would give you the assumptions that guarantee convergence and you should be able to figure out under what conditions it would "not work well". Just look up the assumptions and see what assumption your variable wave speed violates to not give you convergence.

    1. Re:Don't seem to work very well? by ObsessiveMathsFreak · · Score: 1

      In what ways does it not work well for you? It doesn't converge, takes too long to converge? What is the problem?

      Standard level centered differencing for the wave equation has instabilities, related to the CFL condition. Unless c*dt/dx is exactly equal to one. Greater than one and the solution is unstable. Less than one and the solution invariably develops about a 5% error per time unit. Variable wave speed means I can't get a stable mesh without drastically customizing it based on the specifics of every speed profile. I don't want to go into this level of model nursing.

      I haven't yet tried an implicit, rather than explicit, finite difference scheme because coding it would take a considerable amount of time and I have no guarantee that the exact same problem won't arise all over again despite the investment. Textbooks are of little help as most, if they deal with the second order wave equation at all, generally stick like glue to explicit methods. Conditions about stability, if they are mentioned, are usually phrased in several pages of tedious and theoretical derivation, so it's not possible to simply look up the "assumptions" in most cases.
      --
      May the Maths Be with you!
    2. Re:Don't seem to work very well? by whitehatlurker · · Score: 1

      Greater than one and the solution is unstable.
      Well, yeah. It's basically that you (or the FEM program) blinked and missed the wave passing through your element. Either you need to decrease your time step or slow the wave down. (Or change your mesh, which you indicate isn't optimal.)

      Less than one and the solution invariably develops about a 5% error
      Really? That sounds like a meshing problem. Somewhere there is too large a difference in mesh sizes.

      This isn't my field, (though it is close) and it's not likely many here can help you.

      I recommend that you try one of the FEA mailing lists for help. Most are product specific, but there is usually some person on them that can tell you where to go. (For more help that is.)

      --
      .. paranoid crackpot leftover from the days of Amiga.
  11. Information is scarce by SoapDish · · Score: 3, Informative

    Well, having just taken a basic course in PDE's, I'd automatically say use finite difference, with a crank-nicholson scheme (for convergence), and gauss-seidel iteration. Of course, since it was a basic course, we only dealt with a 1-D wave equation.

    I can tell you that the internet is lacking for stuff even as simple as that, and it's hard to find a good textbook. You might have better luck with a text book, since your need is more focused than the course I took.

    1. Re:Information is scarce by Verte · · Score: 4, Informative

      I'd automatically say use finite difference, with a crank-nicholson scheme (for convergence), and gauss-seidel iteration. Here here! And for different wave rates, notice where the wave rates appear in the matrix. Best to derive by hand, keeping the wave rates as functions of position. If you've got weird boundary conditions you can't work out how to use yourself, take it to a numerical mathematician. Most of them have studied this stuff to death, and can give you good error estimations too.

      And if the problem is significantly complex or you need more general solution, try a Greens function.
      --
      We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
    2. Re:Information is scarce by Algorithmnast · · Score: 1

      Ah - 'by hand' derivation. *Now* I can see that this post should be on slashdot.

    3. Re:Information is scarce by Verte · · Score: 2, Funny

      Oh no, the OP is a quiche eater. I was just worried he'd screw up the indices and post questions about why it doesn't work to slashdot.

      --
      We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
    4. Re:Information is scarce by Anonymous Coward · · Score: 0

      Helpful hint: Hear hear!

    5. Re:Information is scarce by Verte · · Score: 1

      Whoops, thankyou.

      --
      We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
    6. Re:Information is scarce by students · · Score: 1

      I wanted to elaborate on Green's functions. I was working on a problem like this all summer, and Green's functions made it possible. Specifically, I used Weber's theorem to turn the 2D Helmholtz equation into a boundary integral equation. Numerical integration is much simpler to program, and the number of dimensions in my problem was reduced. Head over to the nearest Physics department. They know about Green's functions, if the other mathematicians don't.

    7. Re:Information is scarce by DirtySouthAfrican · · Score: 1

      It seems like what is commonly called Weber's Theorem has nothing to do with PDEs.. care to elaborate?

    8. Re:Information is scarce by students · · Score: 1

      That's true, this is a much more obscure theorem. See

      Weber, Mathematische Annalen 1 (1869), 1-36.

      Baker and Copson, The Mathematical Theory of Huygens' Principle, 1939

      Shaw, An Integral Equation Approach to Acoustic Radiation, Topics in Ocean Engineering, 1970

  12. Finite element by badinsults · · Score: 5, Informative

    Your question is rather specific given the crowd here on slashdot. Personally, I think you should ask other professional mathematitians at universities. If your problem is interesting, I'm sure you will have no problem finding someone who will give you advice. I personally only have limited experience in modeling of heat flow, which is somewhat similar to what your problem is. We use a finite element approach, where variables such as porosity, permiability, and composition can be changed for each element. It would likely be computationally expensive to create a functionally variable wave speed, so partioning it so that each element had different velocity paramenters would likely be suitable. As for programs, you might be forced to break out the C (or even FORTRAN) book and create your own. More often than not in specialized physics problems, there are no programs that are specifically applicable to your problem. If there were, you would have already found it.

    1. Re:Finite element by Nivag064 · · Score: 1

      While I have programmed in C and FORTRAN, I now use Java, so I have a feel for each of the languages.

      I suggest you use Java, less time tracing memory and pointer problems, plus the really intensive mathematical calculation bits get heavily optimized into native machine code at run time (based on the run time profile: e.g. this 'if' statement always uses the 'then' path). If you use use the '-server' hotspot option, it will even in-line methods from different classes!

      -Nivag

  13. Many many options by Anonymous Coward · · Score: 5, Informative

    If you're doing an electromagnetics problem in 3D (I *am* a physicist specialising in this field), there are many options. This is a VERY well studied problem.

    If your problem domain is not too many wavelengths big (i.e. near-field), you want a FDTD solver. There are many commercial packages available but most are expensive (just google for FDTD). FDTD is quite simple in concept but there are various details to get right to make a general purpose solver (e.g. boundary conditions). There are a number of hardware-based solvers on the market utilising GPUs for electromagnetics calculations. If you only need a single-frequency (eigenmode) solution, then Finite Element Method might be for you (e.g. see http://people.web.psi.ch/geus/pyfemax/). If you have extreme aspect ratios you need to model (i.e. interaction between widely spaced components), then the Boundary Element Method might suit (but it's harder to understand and implement).

    If you're rolling your own solution, Python makes an excellent "glue language" to tie solvers together and visualise results with VTK (www.vtk.org) and add configuration GUIs.

    1. Re:Many many options by Diffraction · · Score: 5, Informative

      FDTD doesn't have to be expensive - in fact the guys at MIT are nice enough to have published their own implementation under GNU GPL (see http://ab-initio.mit.edu/wiki/index.php/Meep). Installs on Linux and has a feature list rivaling commercial packages. We have used it successfully for simulating various nanophotonic structures.

    2. Re:Many many options by Anonymous Coward · · Score: 0

      There is at least one good-quality GPLed FDTD solver:

          http://ab-initio.mit.edu/wiki/index.php/Meep/

      Also, if you are working in the geometric optics limit then you may be able to purchase or adapt an existing ray tracer.

    3. Re:Many many options by Wills · · Score: 1

      There are two free (GPL) 3d electromagnetics FDTD solvers, RadarFDTD and Tessa.

  14. Be much more specific... by gowen · · Score: 5, Interesting

    Are you doing the time harmonic case (3-D Helmholtz) or an unsteady case?
    What does the domain look like (regular/rectangular and you may be able to use spectral methods)? In irregular domains, multigrid methods seem to converge most quickly for elliptic equations, but again, that depends on their exact form.
    You don't say what goes wrong with finite difference codes... For pure Adams-Bashforth schemes often give extremely good numerical stability. You talk about variable wave speeds, but the Mathworld equation you link to doesn't cover that. In many cases you can use multiple-scales/WKB approaches, but that depends on how the wave speed varies (relative to the wavelength).

    Finally: there are many things for which Googling sucks. This is one. For an proper overview, try a proper textbook, like "Waves in Layered Media", mentioned above, or "Modern Methods in Analytical Acoustics" (Crighton, Dowling et al).

    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  15. Point of Order by PCM2 · · Score: 3, Insightful

    and not make fun of this person for asking a question that has nothing to do with our hobby horses.

    Point of order: Is it still OK to make fun of the editors for letting this question through?

    I move that the Chair recognize kdawson is an idiot.

    --
    Breakfast served all day!
    1. Re:Point of Order by Anonymous Coward · · Score: 0

      I move that the Chair recognize kdawson is an idiot.

      I second that motion.

    2. Re:Point of Order by everphilski · · Score: 0

      I move that the Chair recognize kdawson is an idiot.

      seconded!

      All in favor say 'Aye!'

    3. Re:Point of Order by Anomalyst · · Score: 1

      I was under the impression that being a 1st percentile idiot was a pre-requisite for the job.

      --
      There is no right to feel safe thru security vaudeville at the expense of everyone's freedom, privacy and tax money.
  16. How complicated is the problem? by MondoCognito · · Score: 4, Interesting

    Hi, I'm currently doing a Masters Thesis on Diffusion PDE's (Parabolic and Elliptic) correct me If i'm wrong but the wave equation is a hyperbolic PDE. I use a MATLAB Toolbox called PDE Toolbox GUI and although I don't use it I know it includes a hyperbolic solver. I haven't investigated how detailed it is, but I suggest having a look through the manual, to see if it meets your requirements. Cheers

    1. Re:How complicated is the problem? by neersign · · Score: 1

      I was going to suggest MATLAB, too. I used it in Diff. Eq. in college whenever we needed to get numerical answers. It's too bad I've forgotten nearly everything and I can't offer any help past that.

  17. wikipedia by nitroamos · · Score: 2, Insightful

    didja try wikipedia? :-)

  18. Feynman invented Monte Carlo? Me don't think so by mickkelly2000 · · Score: 2, Informative

    That was more like Metropolis, Ulam (I think Teller had something to do with it)
    see: Wikipedia

    --
    -- may you ever drink deep --
  19. People to contact who might know by Anonymous Coward · · Score: 1, Informative

    Contact Dr. Mohammad Rammaha (analysis) at the University of Nebraska (Lincoln). He's been working on PDE's for the last decade. While he works on analytical solutions, I'm sure that he also is familiar with numberical methods. Dr. David Logan (applied mathematics) surely would have the resources at his fingers. e-mail addresses are: mrammaha1@math.unl.edu, and dlogan@math.unl.edu. Worth a shot.

    1. Re:People to contact who might know by Errtu76 · · Score: 4, Funny

      Ah, so that's where the sudden increase in spam comes from. Thanks!

      regards,
      Dr. Logan / Dr. Rammaha

  20. What exactly do you do? by Anonymous Coward · · Score: 0

    Aren't you supposed to figure that stuff out if you're a mathmatician? I'm all for asking for advice, but dang... isn't part of the point of math to actually sit down and figure out things?

    1. Re:What exactly do you do? by PDAllen · · Score: 2, Insightful

      Yes, it is - but not things that someone else has already figured out. One person proving a theorem is interesting, ten people proving it ten times in different ways (or more likely ten times in basically the same way) isn't. So you ask someone if this useful step you'd like to use has been solved, if yes you read the paper, understand the methods, go on to look at your own problem which has not been solved, solve it.

    2. Re:What exactly do you do? by poopdeville · · Score: 1

      Proving a theorem with ten different methods is very interesting. Those methods are often useful for proving novel theorems.

      --
      After all, I am strangely colored.
  21. Oblig by Anonymous Coward · · Score: 0

    Have you tried inverting the phase-coils of the quantum induction array?

    If that doesn't work, jiggle the handle a bit.

  22. Finite Element Methods - CLAWPACK by Bob_Geldof · · Score: 2, Informative

    Have you tried CLAWPACK, unless you aren't really solving a hyperbolic problem? Disclamer: I recieved my M.Sc. in Applied Mathematics at the University of Washington and CLAWPACK was written by R.J. Leveque, a professor in that department.

    --
    887321 = 337*2633
  23. I solved this problem just last week... by Anonymous Coward · · Score: 0

    ...using an abacus.

  24. Spectral methods by Anonymous Coward · · Score: 0

    It's been a couple of years, but when I was doing similar sounding calculations in a numerical relativity class, what is called spectral methods were useful. Wikipedia has a short introduction, http://en.wikipedia.org/wiki/Spectral_method
    and as I recall there is a little bit of information in Numerical Recipes in .

  25. The answer is obviously... by club5220 · · Score: 0, Redundant

    ...PI. Or 42. Duh. What, is everyone stupid?

    1. Re:The answer is obviously... by Anonymous Coward · · Score: 0

      Only morons would suggest some irrational number like pi. Every intelligent person *knows* the answer is e.

  26. ask the experts and not the morons by dummkopf · · Score: 1, Insightful

    asking such a question on slashdot is a waste of time since most of the answers will be stupid comments... googling for an answer to your problem must have given you some hits. i suggest you google (i) for people studying problems in this field and ask directly. scientists *always* help; at least i have never made any negative experiences. (ii) look for papers at http://scholar.google.com./ i am sure that in one of the CCP conferences (computational physics) these problems must have been discussed by someone. finally: how come slashdot lets such topics trough? i mean, is the news situation that bad right now?

    1. Re:ask the experts and not the morons by adamkennedy · · Score: 2, Insightful

      > asking such a question on slashdot is a waste of time since most of the answers will be stupid comments... ... with a strong likelyhood of incorrect metaposters not bothering to read the actually helpful comments before theirs and just assuming all slashdot commenters are artards...

    2. Re:ask the experts and not the morons by Anonymous Coward · · Score: 0

      incorrect metaposters not bothering to read the actually helpful comments before theirs and just assuming all slashdot commenters are artards...

      Indeed. So far several posts have provided solid recommendations of methods, books, papers, and people that could probably help with the problem. I'm impressed.

      Out of a total of 38 comments (so far as I last refreshed), fully 10 posts are informed, to the point, made by people at least somewhat knowledgable of the field.
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475557
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475561
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475641
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475663
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475703
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475705
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475715
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475749
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20475927
      http://ask.slashdot.org/comments.pl?sid=288017&cid =20476069
    3. Re:ask the experts and not the morons by DoofusOfDeath · · Score: 2, Insightful

      asking such a question on slashdot is a waste of time

      I think you're proven wrong by the posts that have been highly rated.

      For many of us, hating MPAA/RIAA/M$ is just a hobby. We do actually have varied day jobs you know.

    4. Re:ask the experts and not the morons by dummkopf · · Score: 1

      it's a question of signal vs noise... not black and white.

    5. Re:ask the experts and not the morons by DoofusOfDeath · · Score: 1

      it's a question of signal vs noise... not black and white.

      Even if that is how the OP meant it, there's a really high SNR on this thread, imho.

    6. Re:ask the experts and not the morons by Anonymous Coward · · Score: 0

      This is probably one of the more useless postings here! Pointless really (as is the one I'm making here I suppose). Anyway, I agree that this kind of question is refreshing to see here and I would therefore suggest we encourage folks to make postings like this rather than subjecting us to your perception of the mythical "typical slashdotter" (which is evidently wrong given the responses I've seen so far).

    7. Re:ask the experts and not the morons by ralphdaugherty · · Score: 1

      asking such a question on slashdot is a waste of time since most of the answers will be stupid comments...

            lots of excellent answers were posted. As to whether this should have been a Slashdot thread, it was the only thread today I thought was interesting enough to check out. Usually there's three or four.

        rd

  27. Hm, a PDE. by Secret+Rabbit · · Score: 2, Informative

    You're looking at a PDE solver which are rather difficult beasts to solve. Perhaps a look at what methods Maple or Mathematica use would provide some insight. At least it'll be a starting point.

    When it comes to display, the programs I've written always dumped the formated output to a text file. I then used gnuplot (http://www.gnuplot.info/) to view the data of interest. It can also dump the graph to a ps for inclusion in a paper is desired.

    Hope that was helpful.

    1. Re:Hm, a PDE. by toQDuj · · Score: 1

      Well, if you're looking at large matrices and purely numerical things, I'd advise Matlab myself. I haven't used Maple much though, and I haven't even touched Mathematica, so there's a disclaimer before the flames :).

      visualisation options in Matlab are quite extensive as well.

      --
      Every experiment which ends in a big bang is a good experiment.
    2. Re:Hm, a PDE. by Anonymous Coward · · Score: 0

      If you're looking at large matrices and purely numerical things, it might be time to reconsider good-old FORTRAN.
      There are reasons besides 'tradition' why Cond. Mat. Numerics just can't get rid of the damn stuff.

      Okay, visualisation options are rather... limited.

    3. Re:Hm, a PDE. by Anonymous Coward · · Score: 0

      For Fortran???. You use fortran for the numerical simulation part, then feed the data into a viz tool (though mind you, there are various GUI bindings for Fortran, as well as a standard for OpenGL from Fortran (though it tends to be poorly/un-implemented on linux)). Matlab and IDL's de-facto primary purpose is pretty-pretty visualisation of Fortran numeric sim output. Then there's a whole load of visualisation tools designed to take HDF or NetCDF data (which modern fortran is of course able to generate with the appropriate library), OpenDX, VTK, GMX and a host of others.

    4. Re:Hm, a PDE. by Secret+Rabbit · · Score: 1

      I've used that one too. Better than the two I listed, but still one of "those". Quite frankly, I find all of these things... lacking in there correctness. Mathematica being the worst (from what I've seen). Nothing like getting silent errors with "results" returned.

      But, I didn't exactly say to use it/them, merely to investigate what methods are used so the OP could use it/them in his/her own program. After all, Maple/etc do have some serious limitations with speed/memory/etc. And at times, these limitations can be prohibitive. Which is why I use them extremely rarely and why I didn't recommend there actual use.

  28. This is a classical reflection seismology problem by Anonymous Coward · · Score: 0

    Try Jon Claerbout's free books ( http://sepwww.stanford.edu/sep/prof , especially "Imaging the Earth's Interior") and the Madagascar package for seismic data processing, modeling and inversion: http://rsf.sourceforge.net/ , GPL-ed.

  29. Don't help him, people! by riker1384 · · Score: 1

    Why would a real mathematician post a question like this here? He's obviously just another high-school kid trying to cheat on his PDE homework.

    1. Re:Don't help him, people! by Anonymous Coward · · Score: 0

      Q: Why would a real mathematician post a research question on slashdot, of all places?

      A: For a laugh.

    2. Re:Don't help him, people! by GPSguy · · Score: 1

      Well, so far I haven't asked folks how to solve the systems associated with numerical weather analysis, but still read slashdot. Lots of good information sneaks through despite the troll level!

      --
      Never ascribe to malice that which can adequately be explained by tenure.
  30. Wave codes by Liquid+Len · · Score: 4, Interesting

    I'm a plasma physicist and I work in the domain of radiofrequency waves propagation and absorption in fusion plasmas. I've been busy developping a code that solves the Maxwell's equations, which are equivalent to the wave equation (3-D full-wave calculation). The case of a plasma is tricky because it both time *and* space dispersive.
    I won't be able to even start explaining this stuff in this post, but my code uses finite elements for the radial direction and Fourier decompositions for the two periodic directions of a fusion device. These numerical methods work well. I also know finite difference codes which work well. So, I think you should look a bit harder, because FE or FD methods usually do the trick, even for "variable wave speed at different points in the domain"... Regarding the boundary conditions, well, you'd better be very careful, because they will usually completely determine the solution. Again, it is my experience that Finite elements are well adapted to this task but you'll have to do some research.
    Finally, for the vizualisation, matplotlib and vtk work for me.
    First, try to determine and explain more precisely what it is you want to do: "to obtain good numerical approximations to the classic second-order wave equation, preferably in three space dimensions" sounds a but vague. Pick up the right textbooks, scientific journals, learn, exchange with the community. I know my post sounds a bit patronizing but this is science, and this kind of effort takes dedication, time and patience. I think Slashdot and Google are hardly the right places to start...

    1. Re:Wave codes by earlymon · · Score: 1

      I think Slashdot and Google are hardly the right places to start... OK, that's a gauntlet. (Uhhhhh ... nevermind that you're already qualified to answer....)

      Based on a comment by a UNM math professor a few decades ago, "I have no idea what language mathematicians will be programming in in a hundred years, but I can tell you this much - it will be called FORTRAN," and putting together just that and the request itself, led to googling by this phrase:

      fortran second order wave equation 3d

      The results were somewhat interesting.

      Never underestimate the power of a good search.

      Otherwise, FWIW, you don't come off as patronizing at all - he's asking for quite a bit.....

      (Cue snaredrum....) BTW, I myself have been using google in place of math for years....
      --
      Pathological kinda promises Path + Logical - but instead, you get stuck with pathetic.
    2. Re:Wave codes by aminorex · · Score: 1

      It would be nice if you could name the "codes which work well".

      I gather he's doing passive radar/sonar on variable terrain with variable weather.

      --
      -I like my women like I like my tea: green-
  31. Here is my wave model: by Kim0 · · Score: 4, Interesting

    http://kim.oyhus.no/wave.html

    It is a Java applet. Note the low dispersion. Try clicking on it!

    In order to make this, I avoided the standard textbook methods.
    They can give good waves, but at a high cost in computation and memory.

    It is not standard finite differencing, since those methods introduce dispersion
    and similar errors to an unnecessary degree. But it IS a finite differencing method,
    and I have done variants of it with variable speed and in 3 dimensions.

    Here is one with variable speed:
    http://kim.oyhus.no/seismic.mpg

    One of the tricks I use is to use a hexagonal grid.

    Kim Øyhus, M.Sc. Physics

    1. Re:Here is my wave model: by fperez · · Score: 1

      Care to give more mathematical details? While it *looks* good, there's no way to tell if your method is actually numerically doing the right thing without details on your implementation.

      The way research works is that you provide technical details of how things are implemented for others to judge/validate/reproduce your results. A pretty picture, no matter how appealing, a research result doesn't make.

      I'm actually interested in this, so I'd be happy to have a look at a research paper backing your Java applet (which does look very nice indeed!).

      Cheers,

      f

  32. Re: Feynman by mickkelly2000 · · Score: 1

    "Nonsense! Feynman was an AMERICAN."
    Well, that might be true (but why should Me, myself and I care anyhows?), but so were Metropolis, Ulam and Teller. Yes maybe not all of them were born Americans, but then again you are all immigrants or decendants of.

    And, by the way, everybody knows that all usefull inventions are German ...
    --
    -- may you ever drink deep --
  33. need i say more by hxnwix · · Score: 1

    What numerical methods do you use, and which programs do you find best suited to the task? Matlab.

    How do you deal with stability issues, boundary/initial values, and other pitfalls? Matlab.

    Are there different methods for electromagnetic wave problems? There's probably a toolbox that can model your problem well and at least two more that can do it poorly, assuming that you can get somewhere by throwing enough fourier transforms and PDEs into the mix. I'd probably start with the PDE toolbox and end up writing a few mex extensions in C before the day was over.

    Finally, when the numbers have all been crunched, how do you visualize your hard-earned data? Matlab or, if your results are in any way amenable to hammering with neural networks or other data mining techniques, Weka.
    1. Re:need i say more by Anonymous Coward · · Score: 0

      Holy crap you have no idea what you're talking about. Matlab is a high-level coding environment **not** a numerical method itself and is **not** itself a way to deal with numerical instabilities. And wtf is that about neural nets?! My god the OP is going to be laughing at this junk.

    2. Re:need i say more by hxnwix · · Score: 1

      Holy crap you have no idea what you're talking about. Matlab is a high-level coding environment **not** a numerical method itself and is **not** itself a way to deal with numerical instabilities. And wtf is that about neural nets?! My god the OP is going to be laughing at this junk. "Hey I need to dig a hole, what tool should I use?"
      "A shovel."
  34. Gnarly Wave by ROMRIX · · Score: 1

    Are any in this community working on numerically solving wave equation problems? What numerical methods do you use,

    Need some numbers? Try hangin ten!
    I caught this gnarly wave once Dude and I just stuck it!
    Kowabunga Dude!


    WHAT?!
    Chill out dude, you're sressin me with those looks...
  35. better yet, have more questions like this by r00t · · Score: 5, Funny

    Slashdot has been getting infested with non-nerds lately. We need some weed-out topics. They should appear as pop-up windows and pop-under windows in addition to appearing as normal articles. Nerds will only see one (very enjoyable) copy; non-nerds will face three terrifying articles that resemble the cruel word problems of their childhood.

    1. Re:better yet, have more questions like this by Anonymous Coward · · Score: 0

      Excellent idea, Captain.

    2. Re:better yet, have more questions like this by deander2 · · Score: 1

      Slashdot has been getting infested with non-nerds lately. mathematician referred to as "not nerdy enough". world confirmed coming to an end. news at 11.
    3. Re:better yet, have more questions like this by rk · · Score: 2, Funny

      "A train leaves Cincinnati heading west at an average speed of 60 km/hr. Two hours later, another train leaves Indianapolis heading south at an average speed of 70 km/hr. What is the straight line distance between the trains 8 hours after the Cincinnati train departed? For simplicity's sake, assume Cincinnati is at 39.1 degrees north latitude, 84.5 degrees west longitude; Indianapolis is at 39.5 north latitude, 86.0 degrees west longitude, and the Earth is an oblate spheroid with polar radius 6,360 km and equatorial radius of 6,380 km."

    4. Re:better yet, have more questions like this by toddhisattva · · Score: 1

      Hear, here!

      If I wanted to read childish politics, I'd read a newspaper.

      If I wanted to read childish comments on childish politics, I'd read the letters to editors of newspapers.

      Though I'll probably never work on the particular problem of Our Topic, I do appreciate the opportunity to broaden my knowledge of numerical methods.

      Lots of interesting links to click in a discussion like this. Software to download and play with. Brain cells to grow.

      That's what *real* nerds do.

      Nerds do not travel in herds. They do not subscribe to herd mentality. Real nerds do not endorse mob rule.

      How can Slashdot be "News for Nerds" without threads like this? The obvious political leanings of the editors puts them squarely in the mob rule category, and they've brought on board the usual scum to enforce it.

      As evidence of the de-nerdification of Slashdot, I refer to Forget Math to Become a Great Computer Scientist?, wherein but a few contributors to the discussion even knew what Pure Mathematics is.

      There is even a Wackypedia entry on Pure Math. Yet a nearly a thousand comments were made about the article, by people who didn't know a damn thing about the topic!

      I recommend Hardy's book for freshmen. Nearly a century old.

      I guess school have quit teaching math, pure or impure. That's the only thing that can explain the nearly complete ignorance displayed here on Slashdot.

      We will know when Slashdot is over when it starts covering sports.

      (line #0's spelling is an extremely little joke so I didn't think it warranted a smiley so I write this just to fend off the spelling Nazis. And I did not intend a pun on "squarely.")

    5. Re:better yet, have more questions like this by Anpheus · · Score: 1

      None miles.

    6. Re:better yet, have more questions like this by mikael · · Score: 1

      Answer (from a Not-The-Nine-O-Clock news sketch).

      This was in fact a trick question. The answer was in fact zero miles, as there was a sudden thunderstorm which caused the wrong kind of hailstones to fall on the line. As a consequence all train journeys were cancelled until the rail lines could be cleared.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  36. Visualize with /dev/audio!! by phantomfive · · Score: 1, Interesting

    It's not entirely clear what you are trying to do, but one of the sweetest ways to 'visualize' wave data is to output it directly to /dev/audio and LISTEN to it as a sound waveform (actually /dev/dsp would work better for this, because it expects uncompressed data). All you have to do is open /dev/dsp, convert your data to a series of 8 bit integers, scaled to where 255 is the maximum and 0 is the minimum, do a write() on your data to /dev/dsp and viola! You have music! If you want to change things like the bitrate, look at the open sound system page.

    --
    Qxe4
    1. Re:Visualize with /dev/audio!! by Alioth · · Score: 1

      Viola? It sounds like a viola, a musical instrument that's basically a larger violin? Or did you mean voila, as in the French word?

    2. Re:Visualize with /dev/audio!! by Overzeetop · · Score: 1


      I think he meant "the stringed instrument which burns slightly longer than a violin". But I can't be certain.

      --
      Is it just my observation, or are there way too many stupid people in the world?
    3. Re:Visualize with /dev/audio!! by ojs · · Score: 0

      We did a similar thing in one experiment at Niels Bohr Institute, we were making a single photon experiment and had a very sensitive avalanche photon detector that would be destroyed if it got to many photons. So how to make a pretty fast way of knowing if it was getting saturated? Use sound of course :-)
      We just fed the number of photons/sec to the sound device and when it was getting close to saturation the pitch of the sound would be really high and we would pull the plug on the APD, pretty neat solution I think (complements to our Post-Doc).

      Nothing to do with the topic on hand but just wanted to share an interesting solution to a practical problem in a physics lab :-)

    4. Re:Visualize with /dev/audio!! by phantomfive · · Score: 1

      Hmmmm, very clever, wouldn't you say? My post talking about music has a musical pun. Not only that, it was done completely by my subconscious mind, because I hadn't even considered that viola and voila would both be let through by a spell checker. I'm so smart. Good we have human spell-checkers on slashdot to notice such things.

      --
      Qxe4
  37. Femlab/Comsol by Anonymous Coward · · Score: 0

    For these kind of problems, I particularly like Comsol (used to be called Femlab). It is very easy to use (insofar as a PDE solver can be easy to use), and it has great built-in visualization options. It even includes a simple to set up boundary condition module.

    Best of luck

  38. Try J. Comput. Phys. and J. Sci. Comput. by macklin01 · · Score: 5, Informative

    This isn't my area, but my Ph.D. is in applied and computational math, and I've spent a great deal of time solving first-order hyperbolic problems where characteristics cross. (In my context, level set methods where the zero contours can split and/or merge.)

    For a hyperbolic problem like this, you'll want to be careful. Since the waves have variable propagation speeds, there's a possibility for shock formation. (characteristics can cross) Think of Burger's equation as a nice, tangible first-order analog. In such a case, it will be important to choose a numerical method that satisfies some kind of entropy condition to handle the shock. Similar things have been encountered in level set methods, where you solve an equation of the form ft + V |grad(f)| = 0, where V is the variable speed of an interface that's represented as the zero contour of f.

    Since second-order wave equations are so important in physics, you may want to check out the Journal of Computational Physics. You should probably also try the Journal of Scientific Computing.

    As for visualization, you'll probably want to check out the "industry standards" Matlab and Mathematica. You could plot the time evolution of level surfaces of your wave equation, for instance. As for other softare, I'd generally advise pulling together what you can find at netlib, although more cutting-edge stuff may require you to roll your own C/C++ or FORTRAN. But any of that stuff will be faster than running in Matlab or Mathematica, and it will take a whole lot less memory.

    Best of luck, and have fun! :-) -- Paul

    --
    OpenSource.MathCancer.org: open source comp bio
    1. Re:Try J. Comput. Phys. and J. Sci. Comput. by Anonymous Coward · · Score: 0

      Try smoother particle hydrodynamics ... should be able to deal with the shocks and so on, but will have a harder time with if it's some kind of bingham plastic/non-newtonian fluid.
        It excells at strong shocks and variying density ( ie. speed of sound/wave propagation ).

        What are you doing ? Some kind of hydrodynamics with shallow/deep water ? wave formation with a coastline or somthing like that ?

        If you're doing something mutliphase smoothed particle hydrodynamics shoud fit really good, just beware of the pitfalls ...

    2. Re:Try J. Comput. Phys. and J. Sci. Comput. by Anonymous Coward · · Score: 0

      Hi,
      Any links to your Phd script ?

    3. Re:Try J. Comput. Phys. and J. Sci. Comput. by dmewhort · · Score: 1

      This is the most intelligent answer in this thread moderators, please do the right thing by it. Doug

    4. Re:Try J. Comput. Phys. and J. Sci. Comput. by bockelboy · · Score: 1

      If it's an easy problem, you can use Matlab/Maple, but not if it's a big one.

      I'd suggest looking at PETSc, a C/C++ scientific computation toolkit. It follows a few modern programming paradigms (gah, I hate that word) which make it singularly pleasant to work with, yet has all the speed of the crap you get from netlib.

      Netlib is great for low level algorithms written by experts, but is the pits for usability. For example, a matrix-vector multiply in BLAS is called DGEMV (not exactly obvious to beginners), and has this calling sequence:

      DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)

      Oh, and if you want to parallelize this, you have to use ScaLAPACK which is even more horrible to use.

      On the other hand, PETSc's C interface looks like this:

      PetscErrorCode MatMult(Mat mat,Vec x,Vec y)

      You pass it a matrix object, an input vector, and an output vector. If you want it parallelized, you start it up with mpirun on your cluster/SMP/NUMA/BlueGene machine. The same code is portable to all.

      And yes, there are python bindings which makes the above calling sequence even more stupidly easy. They give you a MATLAB-like syntax with the ability to scale from 1 - 5000 cores.

      (Not a PETSc dev, just a happy consumer.)

    5. Re:Try J. Comput. Phys. and J. Sci. Comput. by melekzek · · Score: 1

      There was a nice method for real time fluid surface waves in SIGGRAPH 07. Check Wave particles.

  39. Sorry, but.... by markov_chain · · Score: 5, Insightful

    this topic is a breath of fresh air amid the putrid fumes of IT monkey fodder!

    --
    Tsunami -- You can't bring a good wave down!
    1. Re:Sorry, but.... by Errtu76 · · Score: 1

      Exactly. Something different than "Hi, i want to create a software that does this and that, and it has to run on linux of course, and i have only 3 hours to do it!"

      That reminds me, i'm trying to convert slashcode to lolcode and i need help.

  40. This is how I did it by kramer_jamesm · · Score: 1

    I do not understand exactly what you are talking about, but, this is how I beat the FEM/finite difference techniques.
    http://caldron.com/projects/fma/about.html
    It may be applicable to your application

  41. preconditioning by pato101 · · Score: 1

    Most of the standard numerical methods, finite difference/finite element methods, don't seem to work very well in the case of variable wave speed at different points in the domain, which is exactly the case that I need.

    As far as I know, when you have such kind of problem, you have to precondition your matrices. Google for preconditioning.

  42. Kreiss ... by foobsr · · Score: 1

    http://adsabs.harvard.edu/abs/1989feaf.proc...54B

    Brown, David L.; Henshaw, William D.; Kreiss, Heinz-Otto; Chesshire, Geoffrey
    Affiliation: AA(Los Alamos National Laboratory, NM), AB(IBM Thomas J. Watson Research Center, Yorktown Heights, NY), AC(California, University, Los Angeles; Kungliga Tekniska Hogskolan, Stockholm, Sweden)
    "The fundamental principles, implementation, and applications of CMPGRD are reviewed; CMPGRD is a software package developed by Brown et al. (1988) to generate two- and three-dimensional curvilinear composite overlapping grids for flow computations. Particular attention is given to the numerical solution of partial differential equations (PDEs) on composite grids: discretization, interpolation, FDM convergence rates, and the treatment of elliptic and time-dependent PDEs. Results for a typical problem involving supersonic channel flow are presented graphically."

    Maybe a place to start. Kreiss seems to be specializing in the field. Not exactly new, but the problem is not either, I guess.

    Disclaimer: IANAP/M

    CC.

    --
    TaijiQuan (Huang, 5 loosenings)
    1. Re:Kreiss ... by foobsr · · Score: 1
      --
      TaijiQuan (Huang, 5 loosenings)
  43. XMDS, open source PDE modeling package might do it by sidney · · Score: 3, Informative
    Your question is pretty general, but take a look at the FAQ and the examples and see if XmdS would help you with what you want.

    Quote from the home page:

    • An open-source XML based simulation package
    • From Ordinary Differential Equations (ODEs) up to stochastic Partial Differential Equations (PDEs)
    [...]
    • Documentation and source are free!
    • Runs on Linux, Unix, MacOS X and Cygwin (Windows)
  44. One word: by WetCat · · Score: 2, Interesting
  45. FE works fine by kluksa · · Score: 1

    The problem you encounter is well known problem in meteorology. The two methods that are being used most are FE and spectral method. The former is simpler and more flexible and the later being more accurate since it keeps the derivations analytic. The problem with the spectral method is that you have to make your problem periodic, and you have to go from grid-point space to spectral space every timestep. In regard to stability, this is not a problem in many FE methods as long as you fulfill Courant-Friedrich-Levi criterion i.e. as long as your timestep is shorter than the time needed for the fastes wave to pass the distance between two grid points. When aplying FE method you have to make a choice of a scheme and depending on the scheme you can expect different distortions of your wave. Try to look in the book Numerical Methods for Solving Wave Equiations in Geophysical Fluid Dynamics by Dale Durran. Good on-line source is http://www.ecmwf.int/newsevents/training/lecture_n otes/LN_NM.html especially "Numerical methods" by R. W. Riddaway and M. Hortal

    1. Re:FE works fine by Anonymous Coward · · Score: 0

      There has been a ton of work in this field, also very common place, in a section of my field, called condition monitoring using vibration analysis. If you are going to google anything google that.

      There are many tools and equations, but I don't know what you are looking to approximate so it's kind of hard to say, use this method or that. Your goal matters because there is so much information that can be gathered from a wave form.

      As for bounds, your only bound in a wave form should be time. Converting this to a digital representation spectra for examples does have other pitfals such as they show false 'harmonics' depending on the shape of the wave form.

      Electomagnetic wave such as beat frequencies and line frequencies show up just the same, same math.

      To learn how to read wave forms and spectras, pick up some condition monitoring books.
      The best book I would recommend is by Bentley, is is considered one greats in vibration analysis.

      You can learn how to read, trend, and predicate all sorts of things too... It's dangerous knowledge, so it can be fun, remember if we had an oscillator large enough, oscillating at the earth's natural freq. we could crumble the planet.

  46. Spectral elements/Finite difference by jhensman · · Score: 1

    I have experience is simulating elastic wave in solid (homogeneous) media. I've successfully used second order finite difference to simulate Lamb waves for a 2D case. My work was based on that by Lee and Staszewski http://www.iop.org/EJ/article/0964-1726/12/5/018/s ms3_5_018.pdf I've also heard of people using spectral elements for this. http://lsec.cc.ac.cn/~cjxu/SEM_mem.html P.S. I'm a /. lurker. Only created an account to post this, hope it helps.

  47. Re: Feynman by Chrisq · · Score: 2, Funny

    Strange, My Scottish friend tells me that all useful inventions are socttish

  48. Umm... by Verte · · Score: 2, Interesting

    ...don't seem to work very well in the case of variable wave speed at different points in the domain, which is exactly the case that I need. Look closer. Wave speed is a parameter in the DE, and all solution methods of linear DEs are local. If you treat the parameter as variable, it will be obvious what you need to do in both FEM and FDM.

    What numerical methods do you use, and which programs do you find best suited to the task? Well, always fit the method to the problem. As usual, FEM if you've got an odd boundary conditions, FDM otherwise. And don't forget other methods like integral transforms and greens functions, which can simplify or complicate your problem to varying degrees. Mathematica and Maple are good for a lot of things, having features for symbolic manipulation. Of course, D/C/LISP/Python/your-favourite-language-here work well enough for the actual crunching.

    How do you deal with stability issues, boundary/initial values, and other pitfalls? Stability issues: The best thing you can do is prove stability. See if you can fit backwards and forwards together a-la Crank-Nicholson, and check that for stability. Or, use something nicer like Runge-Kutta in the time domain.
    Boundary/Initial Values: You do what you have to, I guess. That's a lot more problem specific. If you haven't got the standard initial-time/bounded space situation, you can approximate an unbounded region. It's a lot simpler than you would think, but you need to solve it for your specific problem. Bounded-time is different, but you can then do FDM in the time domain.
    Other pitfalls: Stiffness can point to a flaw in your reasoning. Scaling is worth a try. Otherwise, there are always methods to deal with your specific problem. Talk to your friendly neighborhood mathematician.

    Are there different methods for electromagnetic wave problems? I think they are usually easier with analytic methods. IANA electrodynamicist, but try a few things out.

    Finally, when the numbers have all been crunched, how do you visualize your hard-earned data? Matplotlib is good if you work in Python. If your employer uses Matlab/Maple/Mathematica, use those. I find Matlab awkward, and Matplotlib is similar and has most of the same features.
    --
    We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
  49. Suggestions by pdexeriment626 · · Score: 1

    This isn't my specialty, but I'm currently finishing my Ph.D. in regularity theory of nonlinear elliptic pde (so I have some knowledge of PDEs :P). I also have written a few numerical solvers for parabolic, elliptic and hyperbolic PDEs. Basically, I agree with what macklin01 said; especially, the statements regarding convergence of characteristics and solvers preserving an entropy criterion. Really, I believe you need to understand your equation a little more theoretically before trying to write a solver for it. If you wish to solve for situations where shocks form, this will limit your choices quite a bit (both pseudo-spectral and FD methods will be poor choices in this scenario). If you are trying to numerically solve such an equation, you should be able to do some analytical calculations to see whether or not shocks will form. If you are not familiar with these calculations, they are spelled out in Evans book on PDE (and there are plenty of ways to analytically approximate wave equations). The only info I have on solving with shocks essentially deals with dividing up your spatial domain and then approximating your solution by solutions to the Riemann problem on each of these subdivided domains (with BCs correlating to the solution from the previous time step). That was from a talk I heard from a few years ago from so the details are a bit hazy. Nonetheless, the issues with shocks are HEAVILY studied.... for various military purposes. If you aren't dealing with shocks and have a somewhat regular spatial domain, pseudo-spectral methods (i.e. using Fourier transforms) will give you good results. Just thinking about it heuristically, you should be able to get an idea for an adequate spectral band for your approximation if you can prove some type of gradient bound for analytic solutions to the problem. If there is no gradient bound (i.e. could mean a shock formation), this probably isn't the place to start. If you are dealing with irregular domains then my guess is to look into FD methods using adaptive grids (i.e. densities would correlate to increasing gradients of numerical approximations). I assume you already know about implicit and explicit FD methods and various interpolations between the two... so I won't belabour that point. I have no knowledge of using FE methods or of the level set methods that macklin01 mentioned in the setting of hyperbolic equations. Sorry. You may also want to look into using fractional time steps. I.e. you take a half time-step using one numerical methodology, then you take the second half of the time step using another. Usually, the first half time step gives you a good approximation with less stability, the second half stabilizes the approximation from the first half. This is a very fast and loose explanation. Fractional time steps are well covered in literature (numerical recipes in C even briefly mentions them). Personally, I have found them very useful when using more exotic numerical methods that weren't so stable. In regards of what to use to write the solver in. Personally, I always have used F90 or perhaps C to code up anything I wrote in this regard; but if you only plan on doing a few runs of the solver to get a few results, then matlab is a good fast alternative to F90. If you plan to run many simulations using your solver, then nothing will beat the speed of a well-coded solver written in F90. As for visualization, time evolution of select level sets is the most obvious choice (like macklin01 said). It really depends on what you want to convey with your data though (as with any visualization). Thus, if you are trying to see just spatial representations of solutions, level sets are a good representation for 3D wave equations. You could also try color scales corresponding to your solution and looking at various slices of your domain; but this obviously requires some knowledge of where to look in your solution domain for certain phenomena. If you want to see shock formations, you could make 3D density plots based on the gradient value of your numerical app

    1. Re:Suggestions by Anonymous Coward · · Score: 0

      Paragraphs, man... jesus

  50. Dear Slashdot, please do my homework by SunTzuWarmaster · · Score: 1

    Dear Slashdot,

    I have recently come across a problem that has been faced before. I, however, do not seem to be able to solve it. Perhaps you could locate for me a person who can solve my problem. Perhaps you can do my homework for me, which I will give to my employer as my own work. Also, after solving the problem, if you could also explain it to me with graphs and suggestions on how to interpret them.

    Thanks in advance
      - Avid /. reader.

  51. Finally, by maroberts · · Score: 1

    when the numbers have all been crunched, how do you visualize your hard-earned data?

    Well I start off using my fingers, and if the problem is really complicated, I take off my shoes and socks and use my toes too.

    --

    Donte Alistair Anderson Roberts - hi son!
    Karma: Chameleon

  52. Come to SEG in San Antonio Sep 23-28 ;-) by Anonymous Coward · · Score: 0

    Exploration seismology uses a staggering amount of computer time doing this. Elasticity is not electromagnetism, but close enough to tell you what you need to know. As noted, the primary hard part is variable velocity fields. Propagation appears in two contexts, modeling which is the forward problem and migration which is the inverse problem.

    A good starting point for codes is CWP/SU. Or email me.

    rhb acm org

  53. "I;m a * who has recently needed to obtain " by Anonymous Coward · · Score: 0



    I don't think so. And who the hell ever says, I'm a *whatever* who has recently needed to obtain...? Think about it. Or in your lingo, meld your mind into a form that prevents you from coming off as an asshat.

  54. Do you know about this site? by cuzco · · Score: 1

    I've found this site to be pretty good for answering any math questions I have. Your question might be a little advanced but it's worth a shot http://www.physicsforums.com/forumdisplay.php?f=4

  55. Good job by Goaway · · Score: 1

    You're asking the mental midgets at Slashdot this? Just what on Earth were you hoping to accomplish by doing that?

    1. Re:Good job by kievit · · Score: 1

      That was also my first reaction, but you know, there are quite a few interesting replies. I am positively surprised. Of course there are quite a bunch of science geeks in the slashdot crowd (I'm one myself), not all readers here are "IT monkeys". Those science geeks are not very vocal on the regular IT topics, but they may speak up when their particular area of expertise plays a role in the ongoing discussion. Such expert comments (if they are genuine) are always very interesting.

      Could be that the submitter would have had more effective feedback on some other more specialized platforms (e.g. sci.math on usenet was suggested) but then I would not have been able enjoy this article.

  56. Half of Houston knows how to do this by geoGnome · · Score: 1

    The seismic data processing has been dealing with this computational problem since the 50's. There are scads of different approaches used by all the geophysical data processing companies in processing seismic data for oil exploration. You can check out some free software supplied by the Colorado School of Mine at their Center for Wave Phenomena that does precisely what you want.

  57. Could it be a slashdot record? by charlesbakerharris · · Score: 1

    Hardest "Ask Slashdot" EVAR?!?!?!

    1. Re:Could it be a slashdot record? by Anonymous Coward · · Score: 0

      Hey, it beats the usual "how do I tie my shoes?", "Some guy wants to know what my favorite color is, what should I tell him?" and "I'm looking for [insert first hit on google when you type in the thing here], where can I find it?" that we get.

    2. Re:Could it be a slashdot record? by Anonymous Coward · · Score: 0

      Don't forget "something-something-something Computer Science something-something doesn't seem fair"

  58. We've patented that. by psb777 · · Score: 1

    We've patented that. Please apply to http://www.we-dont-do-anything.com/ for a license.

    --
    Paul Beardsell
  59. Journal of Computational Physics by number6x · · Score: 1

    Check out copies of Journal of Computational Physics at your university's library. It should be a good starting place for computational solutions to physical problems.

  60. visualization by Anonymous Coward · · Score: 0

    Gnuplot, POV-Ray & little scripts for automating the process. OGRE3D, if real-time/interactive 3D graphics is needed.

    Especially gnuplot. It's very easy to get on with, yet when you need features, its got 'em all (minus advanced 3D -- that's what you use POV-Ray for :)), logically implemented so you can usually guess how to obtain what you need. Works beautifully in conjunction with shell-scripting, which was pretty essential when I was slowly getting results from simulations that lasted a calendar year .... And you get all outputs, ie. "quick & dirty" on-screen checks, web-presentation & publication quality with one program. Especially the last: I've still to find a competing package that gives you equal quality & control over quality. Not that I've searched for an alternative though ;-)

  61. Practical Application by neurosine · · Score: 0

    I like to line up three cameras and synchronize two watches, then pee on bunnies. Unfortunately they usually scamper away...dirtying up all the evidence. I guess I could sedate them...but I laugh when they scamper away.
    That's why I failed lab.

  62. General Finite Element Method by frederec · · Score: 1

    I've got a paper in the works that deals with something like what you've got. It's more theoretical than numerical, but it basically lays down a theoretical framework justifying and proving convergence of the finite element method for general coefficients, including discontinuous coefficients. It is based on the work of Lions and Magenes that was published in their PDE book back in the 50's, but isn't terribly widely known. My boss also has a lot of experience on the more strictly numerical side. If you see this and want to know more, email me at my username at Rice University.

  63. Re: Feynman by mickkelly2000 · · Score: 1

    Well, do you think there could be some kind of correlation?

    --
    -- may you ever drink deep --
  64. depends by Anonymous Coward · · Score: 0

    Disclaimer: IAAM (I am a mathematician, working on nonlinear wave equations).

    You have explicit formulas for the solution, which are especially nice in 3D.
    They reduce to computing integrals, for which task tons of efficient libraries
    should be available in any language.

    But, of course, it all depends what are you asking for. Do you need to add
    singular forcing terms? are you interested in the Cauchy problem?
    variable coefficients? asymtpotic behaviour? etc etc etc

    1. Re:depends by ObsessiveMathsFreak · · Score: 1

      I'm mostly interested in the cauchy problem, or the initial value kind. Forcing terms probably won't be singular, but will be short pulses. The coefficients will not only be variable, but will be themselves singular, as I'll have discontinuities between the various mediums.

      Computing integrals did occur to me, in the context of using Green's functions. However, many of the Green's function integrals are naturally divergent and have to be massaged in some way in order to converge and I'd like to avoid that approach.

      --
      May the Maths Be with you!
  65. Ask Slashdot by Dachannien · · Score: 1

    Dear Slashdot,

    My brain exploded all over my monitor after reading that question. Since this is usually the first place I go for legal advice, I ask you: how would you go about starting a personal injury suit against the guy who asked the question?

    Thanks!

  66. Wtf? by Jormundgard · · Score: 0

    Um... go to a university and take any class on the subject?

    How is this of interest to Slashdot readers?

  67. Ansoft HFSS by FuzzyDaddy · · Score: 1
    There are (expensive, but probably an academic discount if that's what you're doing) commercial packages for various PDE problems, usually tailored to specific applications. For example, I use Ansoft HFSS, which is an electromagnetic simulator. Our main use for the software is electromagnetic, of course, but I've used it for doing thermal resistance calculations, which can be mapped onto low frequency resistance measurements. However, the limitations are that it (1) solves the vector wave equation, not the scalar wave equation, with electromagnetic boundary conditions, and (2) it doesn't handle continously varying dielectric constants (wave velocities to you.) So I'm not sure it would be appropriate, I don't know that your problem would map on to the one it's solving.

    The nice thing, though, is that they have worked through all the issues of stability, convergence, etc., and it's a lot more "plug and go" than it used to be.

    So if you can map your problem onto a physical problem that has engineering interest, you may be able to find a commercial solution out there. I don't know if they exist, but acoustic simulation would be a good mapping to your problem (at least at small amplitudes.)

    --
    It's not wasting time, I'm educating myself.
  68. Why don't you? by superswede · · Score: 1

    Why don't you use Excel? What's the problem?

  69. It depends what you are trying to resolve by bathmatt · · Score: 1

    If you are looking for a frequency response, then you would use one type of method, a FV or DG approach, If you are looking for a broad frequency response to a general input form you would use something like a FDTD approach. Then there are MoM, boundary element methods as well. All of these work for what you are talking about but are better suited for particular problems. You can look in the electromagnetic community for more info on this, basically, you are simulating EM waves with non-constant dieletric. Now, just a side note, if your wave speed varies over a very large range (many orders of magnitude) then your problem becomes much harder and many of these techniques don't work, at become inaccurate.

  70. Hey, that's 6 questions! by ishmalius · · Score: 1

    Not fair. One is fine, but six are just begging someone to do the work for you. ^^

    But have you considered particle modeling? Fill your experiment space with a large number of points representing your medium, and model each one only in how it reacts to its environment and neighbors. Then let it run, and watch the results. It is not determinstic, but you can often get a statistically close simulation of the real thing.

  71. Re:42 by Anonymous Coward · · Score: 0

    But... does it run Linux?

  72. Use OpenFOAM by vitke · · Score: 2, Interesting

    Just download OpenFOAM suite, then spend a few weeks studying how to use it, and you will learn how to make this code solve numerically almost any system of PDE-s that you throw on it. It's finite volume method.

  73. Visualization tool by RudeDude · · Score: 1

    A really powerful and flexible (generalized) viz tool is OpenDx http://www.opendx.org/ which started as a commercial IBM venture and is now an open source project. It uses visual programming (EG plugging modules together) to generate the visualizations so you don't need to write your on OpenGL or something. Even with just three "modules" plugged together (and all default settings) you'll start to see your data in 2-space or 3-space.

    --
    RudeDude
    Perl/Linux/PHP hacker
  74. Sad by jotok · · Score: 1

    ...that Google passes for "literature review" these days.

  75. finite difference schemes by Anonymous Coward · · Score: 1, Interesting

    Hey, we were doing this in an engineering class yesterday afternoon!

    For a 3d problem, you should be able to just apply something like a Forward-Time-Backwards-Space scheme (which is inherently convergent and stable for a wave equation) but put it in a tensor form x_j = [ x y z ].
    The size of the time and space-step for stability is goverened by the Courant Condition C = 1 ,where C = c (wave speed) * dt / dx so dx = c.dt (by memory) for the most stable condition with an exact solution at C=1. (you can have a slightly less accurate solution for 0C1). Of course, if c changes, your mesh size has to change, but I would have thought if you know the extrema of the wave speed c, you can just make sure your mesh is fine enough not to go unstable at sudden changes of c, but it will cost you in time to compute a solution, plus the whole 3d thing, which gives 4 degrees of freedom (x,y,z,t) instead of 2 (x,t). Still, most computer packages can solve this, heck, we do far more complex computational fluid dynamics turbulence modelling etc on current ~2Ghz machines. If all else fails, put a few boxes together, make a beowulf cluster, and Slashdot will certainly have you back!

    For plotting a solution, Gnuplot could do it if you have the inclination. You'd want a 3d (perhaps animated in time) plot, or some contour slices (x,y) through z or through t. 3d vector ('cone') plots might be a good way of showing velocity of the wave in 3d space too. For commercial packages, try MATLAB, or Tecplot (I don't work for these people, but they are commonly used at universities so plenty of people can help you out!)

    Cheers
    From Dan

  76. Fourier Math by Go_Ask_Alex · · Score: 1

    You might want to check out some electrical engineering control systems books, and electrical engineering texts dealing in Fourier math in general. I forgot a lot of this stuff since getting my BSEE, but like back in '89 or '90 with MathCad for DOS, I was modeling Fourier equations (I think with some feedback loops) to approximate sine waves, then triangle and square waves, futzing with the math to smooth out the spikes that would occur at sharp transitions (like at the corners of the square and triangle waves). Just 2D then because that's all the computers I was using could handle, like it took an hour to model a square wave on a 486. I think control systems math, namely Fourier and possibly Laplace, could provide a way of deriving numerical approximations to your second order wave equations. That's what control math is all about, providing a means to model systems, then machine-implementable ways to stabilize those systems.

    -- Bad control systems joke follows --

    Q: Why are all the Polish plane flights half full?

    A: Because all the poles have to be on the right side of the plane for stability.

  77. Uhh, have you by Anonymous Coward · · Score: 0

    tried watching TV for a while? I find that a television can solve any problem in a half an hour, or an hour tops.

  78. Try searching Geophysics at www.seg.org by geopsychic · · Score: 1

    The variable velocity is one of the main problems in geophysical data processing. Wave equation migration has been a hot topic for a while now.

  79. Sod em all. i'm with ya bro lets get this sorted! by Tabs256 · · Score: 1

    Man sod all those others. What you need to do is reconfigure the equations into 4 dimensional waveforms. Use 4D clifford Geometric analysis with the convergence of the scalar and outer product. Thsi will lend to the reformatting of maxwells equations into "DeltaJ=0" and should give similar amazing equations for your quantum work. also lorrentzian tranformations are easy to compute in 4d as they just become a rotaion in spacetime. Once you have all these things, type in your original equations and use simple algorithms to export data into matlab. this givving you a very groovy video of quantum tunnelling and wave particle duality as you see the particle smear. Also you will have found yourself the GUT. well done you. i doff my cap. God your amazing. Your mother must be so proud. The only problem here is that A * B where A and B are multivectors will take 256 unique calculations. Have Fun Tabs

  80. Re:42 by closingBrace · · Score: 1

    It runs on Linux, but only on Linux. Windows and MacOS are not designed for it.

  81. try physicsforums by denominateur · · Score: 1

    I haven't worked on such problems myself but I'm quite sure you'll find somebody knowledgeable and willing to help on http://www.physicsforums.com/

  82. you forgot: by cool_arrow · · Score: 2, Interesting

    you forgot: "I for one welcome our variable wave speed overlords".

    1. Re:you forgot: by Doctor+Memory · · Score: 3, Funny

      variable wave speed overlords I know what I'm gonna call my next band!
      --
      Just junk food for thought...
  83. oo, oo, my turn by Tablizer · · Score: 1

    I also have a stumper. I need a webpage to automatically select Landscape orientation when the page is printed, and without downloading Active-X controls.

  84. To Elaborate on the Submission by ObsessiveMathsFreak · · Score: 4, Informative
    There wasn't a lot one can say about a problem in the space of a Slashdot summary, so that's why it's fairly patchy. I'll take this opportunity to more fully expound my problem.

    I work on sonar/seismic/radar inversion problems. Essentially the problem of mapping terrain or subterrain by measuring scattered sound or radio signals, e.g. with synthetic aperture radar. One thing I seriously lack at the moment is a good wave simulation that I can simply play around with to get a feel for both wave mechanics itself and for the equations and techniques of the field.

    Analytical, asymptotic and ray tracing methods to approximate the wave equation are all very well, but at some point I feel I need to see a full solution, or a good approximation to one. I also need a method of simulating emitted sonar and radar pulses, their interaction with "obstacles" or features they encounter, and the returned or scattered signals from this interaction. I need a way of doing this with highly irregular scattering obstacles, both in terms of geometry and wave speed.

    What I would most like to get is a model of wave propagation in a simulated 3D domain with highly irregular boundaries and speeds, something that would defy most analytical approaches. My goal is to try and simulate actual subterranean features via fractals and other techniques, and use the numerical wave equation simulation to get a good simulation of what real life returned signals would look like. I need a good simulation because, as you would expect, the inversion algorithms that map out the terrain from the returned signals, can be very sensitive to variations in the signals they receive.

    Are you doing the time harmonic case (3-D Helmholtz) or an unsteady case?

    I'll be working in the unsteady case as I have reservations about transforming to the Helmholtz equation, not least of which is the necessity of taking the fourier transform of the source signal. I'm trying to get as exact a solution as possible.

    You don't say what goes wrong with finite difference codes...

    The ones I have tried suffer from the problems related to the CFL condition. To sum it up -if c*dt/dx is not exactly equal to one, problems arise. Greater than one and the method is unstable(horribleness). Equal to one and things are peachy. Unfortunately, less than one and the method, though stable, seems to suffer from either a numerical or some other more subtle type of instability. I'm not a numerical analysit, nor do I have time to probe further. This rules out these methods as c will be variable in any practical problem I use the code on. I'm also worried about other types of potential pitfalls; caustics, shocks, infinities, etc.

    In many cases you can use multiple-scales/WKB approaches, but that depends on how the wave speed varies (relative to the wavelength).

    Which is exactly why I don't want to use those methods, or any method that requires me to nurse or otherwise "prep" the method before use. I intend to throw multiple simulated terrains at the method and I'd like it to perform well across all ranges. I was hoping that in this day and age such a solution existed, but I'm aware I may be asking for the impossible.

    I posted the question because I was tired of unsuccessfully Googling and unwilling to waste more time playing lucky dip with tedious textbook monographs. The reason I've posted this question on Slashdot is because the comments on many a science story suggest that a lot of professional scientists do post comments here. I'm holding out that the question may catch the eye of a meteorologist or radio modeling specialist who has worked on such a problem, and who has precisely the right technique, program and visualization method I'm looking for. Here's hoping.

    There's been a lot of good suggestions so

    --
    May the Maths Be with you!
    1. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      This doesn't answer your specific question, but have you investigated journals like Geoscience and Remote Sensing, specifically dealing with SAR interferometry and terrain mapping? Mostly deals with the radar case - your query as to how to model signals emitted from the sensor, propagation through the medium (atmosphere in this case), and scattering off a variety of objects can be done without resorting to the highly non-trivial mathematics you are proposing. I freely admit that the acoustic case can be much more of a pain in the ass with regards to wave speeds, propagation through media, etc. - but for the RF case I thought I might lend a measly 2 cents.

      Disclaimer- I'm an EE, 10 years experience, currently working specifically with SAR data and its associated signal processing.

    2. Re:To Elaborate on the Submission by gowen · · Score: 1

      The ones I have tried suffer from the problems related to the CFL condition. To sum it up -if c*dt/dx is not exactly equal to one, problems arise.
      Ignoring the >1 case, which ain't ever going to work, I'd seriously doubt it is the CFL condition that's really causing it. What are your boundary conditions? For open boundaries, numerical solutions are not very tractable, as its very, very hard not to introduce spurious reflections at the boundaries unless you run the code in an effectively unbounded domain (bigger than wave speed*simulation time, which can be nigh impossible if you want scattering from a normal-sized body.) This is a serious win for asymptotics. I've solved elastic-wave problems with matched asymptotic expansions and later seen numerical simulations that got basically-the-same results at much, much greater expense.

      It surprised me that something so nigh universal as the wave equation did not seem to have a reliable standard technique after over half a century of numerical analysis.
      Don't be. Constant c is all well and good, but changing c opens a whole world of pain. This is a hard problem. Critical and turning layers --- yuck.

      waste more time playing lucky dip with tedious textbook monographs.
      That's a really disheartening statement. If you're considering making your living in this field, learning the basic theory is not a waste of time. If you find mathematics tedious, it's likely that numerical simulations are not for you.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    3. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      I need a good simulation because, as you would expect, the inversion algorithms that map out the terrain from the returned signals, can be very sensitive to variations in the signals they receive. That's your problem right there. You are trying to take measurements through unknown, variable densities of irregular shapes and your algorithm is very sensitive to errors. You need algorithms that are highly tolerant of errors.

      Maybe you should look at machine vision research, where they build up a three dimensional view of the world over time from 2d low quality images. The model gets more accurate over time as more images are processed. If somebody moves an object or changes the 'speed of light' the model adapts to it rather than explodes. This sounds like what you are trying to do really... taking readings that return distance but not path and turn it into a 3d model is similar in concept to taking images that return shape but not distance.

      Either way, I doubt accurate wave propagation functions will have much affect on an ultimate solution to this problem.
    4. Re:To Elaborate on the Submission by samschof · · Score: 1
      The second order wave equation can be recast as a first order hyperbolic system. The literature on numerical approximation of hyperbolic systems is extensive. An explicit finite volume implementation should work and can handle irregular geometries. The books by R. Leveque, "Finite Volume Methods for Hyperbolic Problems" and "Numerical methods for conservation laws" provide a good introduction. For implementations on unstructured grids, there are a couple of review articles by T. Barth that appear in the VKI Lecture series (look for his web page at NASA). The book "Numerical Methods for Wave Equations in Geophysical Fluid Dynamics" is well regarded, but I don't have any experience with it.

      If the CFL constraint is so problematic, you will have to go to an implicit time integration scheme, which brings linear solvers, preconditioners, and (possibly) inexact Newton solves into the picture. If you want a quick implementation, stick to explicit time integration and live with the CFL constraint.

      If the wave speed varies abruptly you are going to have problems with any method. Try a smoothly varying wave speed and see if that makes a difference.

      Sam

    5. Re:To Elaborate on the Submission by ObsessiveMathsFreak · · Score: 1

      Ignoring the >1 case, which ain't ever going to work, I'd seriously doubt it is the CFL condition that's really causing it. What are your boundary conditions?

      I've set the function to zero at the boundary points for the 1D and 2D waves. I don't believe these are the problem. If c*dt/dx is not exactly one, then, as I have coded it, the hyperbolic characteristics of the equation will not pass directly through the grid points. I believe this is the cause of the error when c*dt/dx That's a really disheartening statement. If you're considering making your living in this field, learning the basic theory is not a waste of time. If you find mathematics tedious, it's likely that numerical simulations are not for you.
      90% of anything is crud, and this applies as well to mathematics textbooks as it does to anything else. I have therefore a less than 10% chance of coming across a good textbook, and this is exacerbated by the fact that it generally takes a few hours to discern how good the book is. I think "lucky dip" is actually a pretty generous description.

      I've already done the basic theory of finite differences and finite elements, but this isn't of much use to me for the current problem I now face.
      --
      May the Maths Be with you!
    6. Re:To Elaborate on the Submission by StressedEd · · Score: 1
      I understand your frustration at there not being a "standard" package to solve EM (or scalar wave) problems -- I have ranted about this quietly on my own for a while. One would think that with the equations of Maxwell nearly 150 years old there should be some pretty standard solver techniques out there that would have been packaged up by now covering practically everything. The problem is - while it's easy to write down the equations and (naieve) methods of solving them the nitty-gritty of it all is both important and far more tricky than meets the eye! Each problem domain has its own issues and idiosyncrasy's. Likewise if you are interested in some quantaties more than others (e.g. far field / near field) that can drastically change your approach. Ultimately to have any chance of success you must approximate and the art of the approximation you choose is what matters. As the saying goes "If you want to go there, I wouldn't start from here".

      If you are trying to carry out some sort of electrically large scattering problem through inhomogeneous anisotropic materials - you are in for a tough ride. Unless you can approximate things away furiously you will soon find the problem computationally intractable.

      It sounds to me as though you really need to get a feel for the basics before embarking on anything too heavy. Time spent in reconnaissance is rarely wasted. Once you have an intuitive idea of how things work you will probably better understand the problem - hence be able to pick an appropriate solver.

      A good general starting point in my opinion (particularly in the scalar case) is the use of pseudospectral methods. These will allow you to describe the field propagating through materials in a reasonably tractable manner - they are not too much effort to understand, reasonably quick thanks to the magic of FFTW and surprisingly robust.

      I suspect your problem breaks down into three distinct domains:

      1. Getting the excitation field to the interaction region
      2. Modelling the (potentially complicated) interaction of the field with the surface
      3. Getting the field back from the interaction region to the detector.

      Since the excitation is presumably beam-like, a pseudospectral technique (particularly one with coordinate scaling) will probably help with 1) and 3). With finite difference techniques you must model the field step-by-step through space. With FFT methods you can jump from one plane to the other - this can be orders of magnitude faster than finite difference.

      How you manage 2 is the tricky part! The detail of this will depend strongly on what the material interaction is (e.g. will a scalar approximation suffice). I highly recommend you read Weng Cho Chew, Waves and Fields in Inhomogeneous Media for some pointers. Other things to look into:

      1. Green's function techniques (see, e.g. Martin et. al. for an accessible start point).
      2. Transfer matrix methods (see, e.g. Barns and Pendry)
      3. Discrete dipole scattering (see, e.g. Bruce Draine's DDSCAT)
      4. Multiple multipole methods (see, e.g. C. Hafner
      5. Finite Difference Time Domain (e.g. see the excellent MEEP from MIT) (see my warning below)
      6. Basis expansions and stratified media (similar to transfer matrix) see. Chew for details)

      A

      --
      Be nice to people on the way up. You will meet them again on your way down!
    7. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      You might want to look into fast marching and level set methods:

      http://math.berkeley.edu/~sethian/2006/level_set.h tml

      They precisely tackle the problem you face: variable wave speeds. You essentially grow out the interface (boundary of your wave) on a fixed cartesian grid in a Dijkstra like fashion (based on the local speed of information propogration). You can then visualize the evolution of the front in MATLAB 3D surface plotters. Good luck with your search and I hope this helps!

    8. Re:To Elaborate on the Submission by ed1park · · Score: 1

      OT, but does anyone else think of Gears of War here? :)

      "Essentially the problem of mapping terrain or subterrain by measuring scattered sound or radio signals"

    9. Re:To Elaborate on the Submission by whit3 · · Score: 1

      There are a number of issues you'll need to think about.

      Firstly, 'the wave equation' is only for scalar waves (like sound pressure waves)
      in a propagating medium. If there are loss-of-energy processes, new terms enter
      that equation. If the waves are electromagnetic, there's a VECTOR field involved,
      and you get all the polarized-light effects of light waves. Light also can be absorbed
      or attenuated. And either light or sonar can be frequency-shifted by contact with
      a moving medium (doppler effect), interact with thermal fluctuations (which add noise),
      or worse. By worse, consider the familiar phenomenon of fluorescence: that
      day-glo paint gets blue light input, but gives off red light in return. And the red light
      doesn't necessarily turn off when the illumination source goes away, it might persist
      a few milliseconds. All of the interaction of light and sound with matter is properly
      involved here, and NOT just that little wave-equation approximation.

      Secondly, most folk on this group are concerned with computation; the numerical
      solution and display part of the problem is their perspective. That is good if there's
      a need for a SPECIFIC solution, like calculating a rainbow or modeling a lens system
      or finding a diffraction pattern. But, you're looking at the problem for mathematical
      insights, it seems. It might be better to look into Huygens' principle and Hamiltonian
      optics, from your point of view. Those don't lead quickly to a solution, of course,
      but there's a LOT of insight to be gained there. Or, so I hear.

      Thirdly, the usual course work in physics includes wave propogation in free space
      followed by free space with boundaries and considers in depth the various kinds of
      standing wave solutions. I recommend highly the two volume
      "Methods of Theoretical Physics" by Morse and Feshbach.
      Most problems are then dealt with in terms of superposition
      of 'free-propogation here/standing-wave there' and you get your insights from
      those simple cases to build up a composite solution for more difficult systems.

      In the real world, using sonar or radar, the noise floor is the KEY element that isn't
      in that wave equation. You have to tune out (Fourier analyze) the unwanted signals,
      and various kinds of filtering/coincidence analysis are often going to dominate the
      work. It's not that you can't find a good treatment out in the literature, but that
      you are looking for a treatment that looks like a simple wave-equation solution.
      A lot of the good work on this subject is WAY beyond wave equation level.

    10. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      I'm not sure how directly relevant it is, but you should definitely take a look at:
      http://www.dgp.toronto.edu/people/stam/reality/Res earch/pdf/ns.pdf

      (or better yet, find papers which cite this one)

      As others have pointed out, multi-grid is a fine way to go, but there's some interesting work on using a combination of finite-element method with particles:

      In a nut-shell, your finite-element grid holds the smoothly-varying components (those with c-less-than-1), while the particles hold the discontinuous aspects (those with c-much-greater-than-1). In the sonar case, the particles would correspond to the wavefront(s), while the grid would hold pressure and velocity.
      (Stam describes how to re-inject the energy lost to damping in the (c-much-less-than-1) case, but this may or may-not be desirable depending on your problem domain)

      One simple trick is to switch to a (symplectic) verlet leap-frog scheme to ensure energy is conserved: Update the grid at time={0, 2, 4, 6, ...) and update the particles at time {1, 3, 5, 7, ...}. ( http://artcompsci.org/kali/vol/two_body_problem_2/ ch01.html )

      If your particle density is higher than the grid cells, you can get away with simple splatting (easy!). Otherwise, you need to use something more complicated, radial-basis-functions are great, but some kind of 8-way smearing operator might work too..

      For visualization, see also: http://public.kitware.com/VTK

      One last thing, if you're using a regular-grid for the finite-element, try and use an irregular representation for your terrain, or else you may find the directional components in the FEM influencing the outputs in the terrain..

      Good luck!

    11. Re:To Elaborate on the Submission by jstott · · Score: 1

      I work on sonar/seismic/radar inversion problems. Essentially the problem of mapping terrain or subterrain by measuring scattered sound or radio signals, e.g. with synthetic aperture radar. One thing I seriously lack at the moment is a good wave simulation that I can simply play around with to get a feel for both wave mechanics itself and for the equations and techniques of the field.

      Why not work with a TE or TM source wave (effectively, translational invariance in the "z" direction) and reduce the whole thing to a 2D (or pseudo-2D) problem? Much easier to find existing code and it will run faster and in much less memory.

      If you want to get a feel for the equations and techniques, though, there's no better way than writing your own. FDTD remains a good place to start.

      -JS (as I work on my own 2D FDTD solver)

      --
      Vanity of vanities, all is vanity...
    12. Re:To Elaborate on the Submission by teorth · · Score: 1

      You might try curvelet methods, which seem to show a great deal of promise: http://etd.caltech.edu/etd/available/etd-05262006- 133555/

    13. Re:To Elaborate on the Submission by robotbody · · Score: 1

      I have a thesis on synthetic aperture sonar modelling that might be of some use to you. Send me your email address and I will mail it to you. In summary, for large-scale SAR/SAS simulation, FD or FE is far too computationally intensive. You are better off using a simpler point or facet-based analytical model.

    14. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      Not a specialist, but I am a prof of numerical analysis working in elliptic PDEs.

      > The ones I have tried suffer from the problems related to the CFL condition.

      Just a shot in the dark, but using an implicit time stepper often helps a lot. Also note that the order of your time-stepping scheme as computed in traditional ODE settings is not the one that is pertinent to your problem. Indeed, PDEs are stiff in a certain sense, so for Runge-Kutta methods, the order that is relevant is the "stage order". The three best known families of high stage order RK methods are Radau, Lobatto and Gauss. This material is covered in Hairer & Wanner's "Solving Ordinary Differential Equations II". Roughly speaking, the stage order of a s stage, fully implicit, high quality RK method is roughly s (plus or minus 1), which is roughly half of what you would think.

      What the physicists have already said about shocks and so on will naturally increase the complexity of everything, but you should be able to overcome the CFL condition with a good time-stepper.

      Sebastien Loisel

    15. Re:To Elaborate on the Submission by DrJimbo · · Score: 1

      I'll be working in the unsteady case as I have reservations about transforming to the Helmholtz equation, not least of which is the necessity of taking the fourier transform of the source signal. I'm trying to get as exact a solution as possible.
      Taking the fourier transform and working in frequency space is a standard technique. If you fear it will make the solution less "exact" then perhaps you are in the wrong field.

      It surprised me that something so nigh universal as the wave equation did not seem to have a reliable standard technique after over half a century of numerical analysis.
      The problem is that there are many different standard solutions. This is because the underlying "general" problem has 3 + 1 dimensions and is thus still hard despite many decades of Moore's Law. We have many different standard solutions because there are many different ways of making approximations (assumptions) that simplify the problem.

      One thing I seriously lack at the moment is a good wave simulation that I can simply play around with to get a feel for both wave mechanics itself and for the equations and techniques of the field.
      In order to get a feel for it I encourage you to back away from the full 3+1 dimensional problem and instead work at 2+1 first. You may also want to relax the requirement that the terrain and the sound speed are both highly variable.

      I also need a method of simulating emitted sonar and radar pulses, their interaction with "obstacles" or features they encounter, and the returned or scattered signals from this interaction.
      If you can simplify the problem enough so you can ignore back-scatter from the propagation medium then one standard technique is to use the "one-way wave equation" (also known as the parabolic equation). You will need to use fourier synthesis to construct a time domain solution, but this is the least of your worries.

      Which is exactly why I don't want to use those methods, or any method that requires me to nurse or otherwise "prep" the method before use. I intend to throw multiple simulated terrains at the method and I'd like it to perform well across all ranges. I was hoping that in this day and age such a solution existed, but I'm aware I may be asking for the impossible.
      You are. General purpose simulations in 3+1 dimensions are still hard. You will have much better luck if you take the exact opposite of the "one solution fits all" approach and instead find solutions that can take advantage of any possible simplifications your problems offer.

      --
      We don't see the world as it is, we see it as we are.
      -- Anais Nin
    16. Re:To Elaborate on the Submission by DocJTM · · Score: 2, Interesting

      I'm not sure if this will meet your needs, but when I did my high energy physics Ph.D. dissertation work at the D0 experiment at Fermilab we mainly used PAW http://paw.web.cern.ch/paw/ for our analysis/visualization IIRC. It is, I think, freely downloadable for multiple platforms and worked quite nicely for me back in 1988-1996. I've been out of the HEP field since so I haven't followed its development, but since it's still available, my guess is it's even more powerful now, although as I said, I'm not sure if it will meet your needs. Hope this helps and good luck.

    17. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      like calculating a rainbow

      A part of what's left of my childhood died reading that.

    18. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      I teach the 2D numerical scalar wave equation as an extended example in a numerical physics class. Your observation about the relationship between the CFL condition and dispersion is spot on, but it depends on the numerical stencil. Have you tried a semi-implicit stencil? A Crank-Nicholson stencil will give you good stability at all CFL ratios, but it will still suffer from dispersion. You probably will have to explicitly mix Crank-Nicholson in regions of low gradients with something like upstream LAX in regions of high gradients.

      In the exercise I use spectral methods. I gather you want to avoid that because of your irregular boundaries, but it might actually work out well, flipping between k-space and image space each time step to calculate the interaction with your boundary.

      To visualize the results I would use a simple volume rendering method, rendering the scalar magnitude. For example, the LLNL tool VisIt works well- try googling 'VisIt visualization'.

    19. Re:To Elaborate on the Submission by Nontagonist · · Score: 2, Informative

      I've been following the OpenFOAM user's mailing list for a while because I have an interest in CFD.

      While OpenFOAM is usually used for fluid dynamics, I get the impression that if it can be done in three dimensions with PDEs and the Finite Volume method, it can be done with OpenFOAM.

      I suggest you access their forums and ask what the denizens think of your problem.

      http://openfoam.cfd-online.com/cgi-bin/forum/show. cgi?1/5314

      Will take you to a fairly recent posting from the forum, from which you can navigate using the menu on the left of the screen to other postings, to search the site, or to register. (Can't post a query until you register.)

      If you want to read about OpenFOAM, just go to

      http://www.opencfd.co.uk/openfoam/

      "The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox can simulate anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics, electromagnetics and the pricing of financial options. OpenFOAM is produced by OpenCFD Ltd, is freely available and open source, licensed under the GNU General Public Licence."

      Hope you can do C++.

      Regards, Non.

      --
      There is another theory that states that this has already happened.
    20. Re:To Elaborate on the Submission by infolib · · Score: 1

      It's been replaced by ROOT (root.cern.ch). I used PAW for my bachelor's project, and I really didn't like it and I suspect you only will if you're also into FORTRAN (77!). But then again I was young and naive at that time - now I'm only naive...

      --
      Any sufficiently advanced libertarian utopia is indistinguishable from government.
    21. Re:To Elaborate on the Submission by kluksa · · Score: 1

      The phase velocity in your case should not vary much, so i guess that fitting the CFL to the theoreticaly fastest wave should work fine. If you need an accurate and least dispersive method than implicit methods are not very good since they tend to damp the solution so i'd go with an explicit scheme. If you choose FD method then you should be aware that Arakawa A, B, C, D and E grids (staggering methods) produce dispersion (even for the waves that are nondispersive), also you have to be aware that choosing between leepfrog, forward and backward in time produces different dispersions and can affect stability as well. So, what you need is to idealize the problem and solve it analiticaly, and then to employ a couple of methods on this idealized problem, and see which one works best, and then to use this method on nonidealized - real problem, and cross your fingers and hope it'll work. This is really the way to do it. Coming back to the varying phase velocity, this should not be a problem, in meteorology this is the problem that is being solved every day since atmospheric motion is really a wave motion (atmospheric equations of motion can be transformed with some aproximations to the Helmholtz eq), and there are many phase speeds that are involved - from ~ 1cm/s up to the speed of sound. There is no numerical method that does not distort any wave, every method in the book _WILL_ distort your waves, it is up to you to find the method whose distortion will be most acceptable for your problem.

    22. Re:To Elaborate on the Submission by Anonymous Coward · · Score: 0

      I have worked as a developer for a code that solves the compressible Euler equations (a superset of the accoustic equations) for multimaterial flows, and am currently pursuing graduate studies in the same area. One of the cases that I looked at was underwater explosions, and examining accoustic and shock waves propagating through water and transmissive/reflective seabeds with irregular geometry. In the simulations, water, air and seabed all had not only different soundspeeds, but soundspeeds that depended on the state of the material at each location in the domain. We were able to simulate these problems quite well using an explicit Godunov unstructured finite volume scheme. Using an unstructured mesh allows for complex geometries, and the explicit Godunov scheme handles the wave physics. There is some funny business handling cells containing multiple materials however. There are a number of codes that are similar to the one I used, such as CTH, Autodyn, CFX and I believe Fluent is also capable, provided you don't ask too much of it. These codes are all quite expensive and many are export controlled, since some of their primary uses are the simulation of high-explosives and their effects on targets.

      The reason your code becomes unstable with CFL numbers greater than one (intuitively) is that waves are able to travel distances greater than a cell-length in a single timestep without taking into account the state of the cells that they skip over, or traverse to properly. By and large, if you want to do transient simulations, you need to keep the CFL number less than one. Values less than one should be stable, but if they are too small, numerical errors will creep in due to excessive calculations. Furthermore your simulations will take longer than necessary. Insufficient resolution, or large domains will also tend to contribute to numerical diffusion where waves lose their features and become blurred. This is a side-effect of the numerical schemes, but can be kept under control with practice in meshing the problems and understanding the issues.

      FD codes should also be able to handle your case easily, provided they use a formulation that allows waves, e.g. some kind of upwinding, ENO, WENO, etc.. Finite element codes in my experience do not handle these cases (shocks) as well, since they generally assume a continuous solution. For straight accoustics with continuous solutins, finite elements are widely used. One well known code is LS-DYNA is available in a version limited to 10,000 elements for only 100$ US. ABAQUS Explicit is another, in my opinion better code that has been widely used for accoustics, although I do not know the cost.

      As an aside, you can get a good feeling for the wave dynamics in 1D (i.e. refections, rarefactions, etc.) with very little simulation or setup time. After that you can get a lot out of 2D simulations looking at more complex wave dynamics, and only if you still need to should you go to 3D. Due to the small cell sizes required to resolve the profile of accoustic waves (particularly in water, with a relatively high soundspeed) and the large numbers of timesteps needed (imposed by the CFL condition) you quickly find yourself performing simulations using millions of cells in domains of just a few meters in 3D. These can takes hours or days on clusters of machines (my simulations, spanning just 3m, required 500k cells in 2D in order to reduce mesh effects to an acceptable level, and took 50 hours on 10 machines to complete). Generally good 3D simulations are not things you toy around with, you spend a lot of setup time working in 1D and 2D in order to make sure that the final simulation you perform in 3D is actually going to work, and will give good answers.

      Hope this is helpful,

      James

  85. Another vote for FEA by Anonymous Coward · · Score: 0

    The Galerkin finite element method is widely used to study problems with layered or otherwise inhomogeneous media. For the particular application to the wave equation, you may want to check out "Finite element analysis of acoustic scattering" by Frank Ihlenburg, but I can't recall if he discusses changing wavespeeds.

    The one potential problem I see for both FE/FD is if you want to model a gradually changing wave speed. A discretized approximation _may_ introduce artificial scattering due to finite changes in the wave speed (as you are approximating the smoothly varying properties, for example on the Gauss points in FEA or grid points in FD).

  86. Try using a commercial FDTD solver with dieletrics by integra_antennas · · Score: 2, Informative

    This is coming from an electrical engineer who uses 3D numerical solvers every day at work. The best package is something called CST Microwave office. You can adjust it to fit your problem by creating different dielectric materials in different regions (and thereby adjusting the velocity of the EM waves). You can adjust the material parameters (mu and epsilon) to create any material you want, including materials with negative refractive index...very interesting from a physics/mathematics point of view. For broadband applications, CST is the fastest, most stable, and user-friendly in terms of parameterization, optimization, and learning curve. It has excellent post-processing of the results, including field distributions and animation. Other packages include XFDTD, SemCad, HFSS (FEM), Comsol (FEM). Writing the code to do this on your own is a big undertaking, especially for 3D, and you should expect to spend about 12-18 months being a code-monkey. There is free 3D fdtd source code written in fortran on the net and also part of the FDTD bible published about 12 years ago by Luebbers, et. al. Out of curiosity, does this problem have a direct application, or just solving it out of academic interest?

  87. Discontinuous Galerkin Methods by inducer · · Score: 2, Interesting

    I'm currently getting my PhD in that area, and I'd recommend looking into Discontinuous Galerkin methods. Those are higher-order finite-element methods, and they work very well for hyperbolic problems. I can whole-heartedly recommend a book by my advisor: Nodal DG Methods (it comes out next month).

    DG Methods take a little time to implement, but their accuracy and speed is well worth the effort. If you'd like some precooked software, check out http://git.tiker.net/?p=hedge.git;a=summary. (but be aware that there's little to no documentation just yet--don't be afraid to ask, though)

  88. Action Minimizer by Bill,+Shooter+of+Bul · · Score: 1

    As an undergrad I wrote a general purpose action minimizer for the intention of approximating the shape of nuclei. If you figure out the action for the wave in four space, I can plug it in for you. Now I never got past 2d visualization, via a simple vb program making use of mschart, or exporting it in a list Mathematica could visualize. Its been 6 or so years since I've looked at it so it would take some time to figure it out. And looking back on it, I'm a bit embarrassed /impressed at the coding level. Its in raw c++ and includes a sloppily home brewed parser and custom templated linked list implementation.

    --
    Well.. maybe. Or Maybe not. But Definitely not sort of.
  89. Exploration Geophysics by rumblin'rabbit · · Score: 2, Informative

    Exploration geophysics has published hundreds of papers on this topic, both for finite difference and Kirchhoff (ray tracing) methods. They refer to running the wave equation backwards in time as "migration". It corrects for the fact that seismic waves are recorded at the surface, and not at the geological reflectors. The velocity typically varies continuously, as you would expect within the earth.

    Search for "wave equation" or "finite difference" here at the search site of the Society of Exploration Geophysics.

  90. Perhaps here's an answer by MickLinux · · Score: 1

    I don't know enough from the question to know if this would supply the answers he needs. My answer below requires any system equations, set up as an initial-value problem. However, I would like to suggest that he try looking at the Parker-Sochacki solution to the Picard iteration (officially written up here in Neural, Parallel & Scientific Computations, and mentioned here in Wikipedia, and explained here. This can give you a taylor series solution. It occurs to me that the system might be modifiable to give fourier series solutions... hmmm... interesting problem there. Anyhow, good luck.

    --
    Correct Horse Battery Staple: 72 bits of entropy. Enter "Correct H" into google. When it generates the phrase, that's
  91. Journal by ianalis · · Score: 1

    You might want to search IEEE Trans. Antenna and Propagation to find a related paper. You might need to modify FDTD for your purposes.

  92. Try FVM? by njord · · Score: 1

    It's hard to say what's best, because you've given little info on the application.

    The wave equation is a hyperbolic problem - I'd probably use something like Finite Volume - it's well-suited to this type of problem. People have suggested multigrid, etc - that probably won't work well.

    Variable wave speeds sounds like you might end up with some shocks, depending on that velocity field. That's where FVM will really shine. I really like Randall Leveque's "Finite Volume Methods of Hyperbolic Problems". That has some info on FVM for the wave eqn.

    Without more detail, that's all I can say, though - good luck!

  93. Ballmer!? by Anonymous Coward · · Score: 0

    > I move that the Chair recognize kdawson is an idiot.

    Hey! Wait a minute! Let's not drag Ballmer into this!

  94. Meshless methods by Digana · · Score: 2, Informative

    As a matter of fact, I *am* an applied mathematician, and I do work in this field.

    I am just a beginner, though. Here are is a solution of the shallow water wave equations in a circular tub:

    http://platinum.linux.pl/~jordi/movies/sw-solution .ogg

    (Ogg Theora. If you can't play it, get VLC or any other free software player.)

    The method I used is a very flexible meshless method that is a relatively modern alternative to finite element methods. Btw, finite volumes are much more popular for fluid dynamical problems, but the other big two methods (finite elements and differences) are also widely used. The meshless method I used (of which there are also many available) is radial basis functions, what looks to me like a thriving area of modern research. Pros is that you avoid all the mesh generation that takes about 80% of the computational time with finite elements and you manage to keep the flexibility of meshes by allowing finer detail at problematic sites (just put more basis functions where the problems could happen). Cons is that you get ugly matrices, but if you play your method right, you can arrange it so that you only have to factorise the ugly matrix once and then just do forward and back substitutions at each iteration. I did unsymmetric collocation for my matrices, since experience seems to show that the extra work required to make the matrices symmetric yields only very small dividends. There are also ways of coupling this method with domain decomposition in order to get smaller matrices. This is in fact my thesis work. :-) If you're interested in more details and seeing my C++ source, contact me at jordigh@gmail.com

    As for visualisation software, I indirectly used VTK through Octaviz, a visualisation addon for Octave. The movies I generated with mplayer's encoder, mencoder.

    HTH :-)

  95. Spectral Methods & Perturbations by spock_iii · · Score: 1

    You might take a look at what some of the astrophysics people are doing. At Northwestern they were using spectral methods to study the environment near event horizons.

    In my own research modeling systems of laser cavities, non-linear absorbers/emitters and so forth, it was sometimes useful to start with the system and add the obstacle through a perturbation.

  96. Re:Try using a commercial FDTD solver with dieletr by ObsessiveMathsFreak · · Score: 1

    Out of curiosity, does this problem have a direct application, or just solving it out of academic interest?
    My grant application proclaims the usefulness of my work to all and sundry, from the bade in the crib to the heights of international space programs. I however am engaged in the process, as they say nowadays, "for the love of the game".
    --
    May the Maths Be with you!
  97. Get Jackson -- classic E&M text by siglercm · · Score: 1

    For any questions about E&M wave equation solutions -- standing, boundary conditions, free propogation, etc., -- get a copy of this text:

    http://www.amazon.com/Classical-Electrodynamics-Th ird-David-Jackson/dp/047130932X

    It's _the_ classic grad. level E&M textbook. Generations of physicists have learned much from (and dreaded exams on) this text. My old copy of Jackson had no info on numerical solutions, but I'm guessing you need some theoretical background, not a canned math method/computer code.

    If you didn't know _anything_ about this textbook beforehand, you may not posess the background you need to solve the problem you're working on.... Sorry to be so blunt.

    --
    sigfault (core dumped)
  98. Discontinuous Galerkin by Anonymous Coward · · Score: 0

    use discontinuous galerkin http://en.wikipedia.org/wiki/Discontinuous_Galerki n_method, the hottest method in higher order method research today, an extremely flexible method that has all advantages of continuous FEM and finite volume methods (FVM) and can be applied on elliptic, parabolic and hyperbolic problems. the one metod that rules all types of problems.

  99. Jeff? Is that you? by Anonymous Coward · · Score: 0

    I thought I told you not to try to get other people to do your graduate research for you.

    Tut tut. Dr. Rastikov will be disappointed in you.

  100. Intro to scientific computing by Todamont · · Score: 1

    These systems are hyperbolic PDE's, solvable by C, C++, or MATLAB scripts. You need to satisfy the Courant-Friedrichs-Lewy condition for convergence, which is related to the speed of the fastest waves in the system and the granularity of your model. Your order of accuracy can easily reach 100% error for 2nd order difference methods unless you have a fair number of points per wavelength, like 30 or so. Modelling large systems can quickly lead to running out of RAM unless you have access to a supercomputer, thats why they teach classes about these equations at high performance computing centers. Check out this page for a 1 and 2 spatial dimension matlab implementation of the leap-frog difference method. Hope it helps!

    --
    Kharma is like a boomerang. Mine is broken.
  101. Command Line Quaternions by sweetser · · Score: 1

    Hello ObsessiveMathsFreak:

    > Finally, when the numbers have all been crunched, how do you visualize your hard-earned data?

    The project over at quaternions.sf.net will take a collection of 4 numbers, one for time, three for space, sort them by time, and then in the appropriate frame of the animation, place the dot at the right x, y, z location. The result is a 10 second gif. I found that a 3D animation was hard to understand, so I surround the quaternion animation with three complex planes: tx, ty, and tz. I also have the superpositions on the right side.

    If you have a few thousand sets of 4 numbers you want to see animated as a quaternion and in 3 complex planes, feel free to contact me.

    doug

    --
    Working on new views of old physics at http://VisualPhysics.org
  102. visualizing.. by techsquirrel · · Score: 1

    Surfer works very well for multi-dimensional data sets, and slurps in reams of text file data without complaint.

  103. Orthogonal Collocation and others by ucaledek · · Score: 1

    I work in Hamilton-Jacobi Theory and numerical optimization so I've done some work on similar equations, albeit where the equation was part of a system of coupled equations. I found orthogonal collocation seemed promising, though a bit cumbersome since you need lots of Legendre polynomials. A backsweeping approach might work, not sure since I've only seen it in the pseudo-static framework. I don't think FEM will work so hot, but that's just my experience and it could just have been the forcing terms I had to work with when I was working on my stuff. You might look at stuff by Shi Jin from Wisconsin, he's done some work on discontinuous Hamiltonian and Liouville Equations and for them the wave speed is variable, i.e. v=c(x)^2 taking the notation from your mathworld link. Cheers and good luck

  104. multiscale wavelets wave numerical solution by Anonymous Coward · · Score: 0

    Before become ICt maniac, i practice in PHD Maths playground,
        do you try multiscale wavelets wave numerical solution ?

  105. Inverse Acoustic and Electromagnetic Scattering by Anonymous Coward · · Score: 0

    a current standard textbook in this field is:

    __Inverse Acoustic and Electromagnetic Scattering Theory 2nd Edition__

    by David Colton and Rainer Kress

    Springer Verlag, 1998.

    The book is accurate and well written, and has extensive references.

  106. Modified Monte Carlo Method? by Simon+la+Grue · · Score: 1

    Sounds like you need an "Approximation Method for Eigenvalues of Very Large Matrices".

  107. When working with E&M... by surfsalot · · Score: 1

    Take a look at what is known as "symplectic integration" and also "discrete exterior calculus" (DEC). Both of these should work, and they use some heavy math to justify the methods. Its quite entertaining. The basic outline for DEC is that, in vacuum, you have four constraint equations which much be satisfied (there's not any stray electric or magnetic fields) and so the equations evolve in such a way as to strictly keep this at zero. The algebra of the constraints dictates where answers can be found from one timestep to the next, so it improves stability to use a calculus which makes sure that the algebraic properties of the constraints are maintained. I hope that helps. Feel free to email me.

  108. Visualization of Electromagnetic Data by shrinkwrap · · Score: 1
    Of course, beauty is in the eye of the beholder, but perhaps something I've worked on for several years would be helpful. I work with electromagnetic integral equations (not PDEs) and the visualization of those data... "extracting meaning from gigabytes of data" is how I usually put it.

    Take a look at my Computational Electromagnetic Modeling Framework. The SmartView visualizer and Component View data processor would probably be most relevant. You'll also find some papers, articles, and presentations to download, and they may have some ideas you can use.

    Don't be put off by the purchase price. If it can help you out, email me from the site, and I'll send you a copy without charge.

  109. Matlab by Anonymous Coward · · Score: 0

    Have you tried Matlab?

  110. wave equations by Anonymous Coward · · Score: 0

    Re-write your 1D second order equation as two first order equations (two advection equations traveling in opposite directions). At this point you can use finite volume methods, look up the most recent finite volume book by Randy LeVeque. The basic problem is 1D because you want to solve a Riemann problem across each face, you then do transformations to solve the N-D problem... Anway, it works great. If you want something more sophisticated and accurate try discontinuous Galerkin.

    Matlab and more recently, matplotlib for python are great for looking at this kind of stuff.

  111. Second order wave equation by tcvenkataramani · · Score: 1

    Hi, I have solved second order equation in my structural Dyanamics and if you can throw some light on your problems i will try.Please mail me back to tcvenkatramani@hotmail.com Venkat

  112. Special number by algoa456 · · Score: 0

    Isn't the number 42

  113. not OSS, but it probably works by ]ix[ · · Score: 1

    Take a look at comsol multiphysics. It probably has the tools you need.

    http://www.comsol.com/

    --
    This is my sig, show me yours
  114. Only intended as constructive Re:Information is... by Anonymous Coward · · Score: 0

    "Here here!"

    What where?

    Did you mean "Hear hear!" as in "Listen to this guy, he's making an excellent point!"?

    Kind regards,
    Non-mathematician AC who likes maths a lot

  115. solve first? by cbacba · · Score: 1

    you might try solving the eqn for the configuration(s) first then getting the values. Perhaps Maxima or some of the other symbolic capable math programs might offer aide.

    Otherwise, seems like the best book I've seen on practical handling of complex mathematics is Numerical Recipes which has versions in fortran, c and other languages.

    seems like a good friend just finished teaching a graduate level partial differential equations class last spring that covered wave equations substantially. If you have a particular one and particular constraints - I might be able to enquire on it. Again, this is solving - not numerical methods.

    in any case - good luck with that guff.

  116. Bludgeon with big computer! by mysterious_mark · · Score: 1

    Well you could always go to a very small grid size and then run your solution on a very big computer! But seriously since there been so much work done in recent years in various fields solving non-linear PDE's you'd think this type of problem has already been dealt with, though perhaps in a different physical context. Maybe just need to find the best analog to your problem in an area that has already been well explored. Hydrodynamicist have been modelling non-linear surface waves recently, so this could be a starting point. M

  117. Speak of the devil by laonious · · Score: 1

    I actually just finished a summer internship where I worked with methods to approximate the wave equation. Drop me a line and I'll be happy to go into more detail.

  118. Re: Feynman by unitron · · Score: 1

    Strange, My Scottish friend tells me that all useful inventions are socttish

    You appear to have had a few sips too many of a particularly delightful Scottish invention. :-)

    --

    I see even classic Slashdot is now pretty much unusable on dial up anymore.

  119. Re: Feynman by Doctor-Optimal · · Score: 1

    No true Scotsman would make that claim.

    --
    New punctuation update "~" (no quotes) at the end of a line to indicate sarcasm. ~
  120. Numerical Work by KinakeM · · Score: 1

    Expanded moments i.e. dipole, quadrapole etc approximated into tensor. Reason: Tensor is matrix. Matrix is amenable to computer.

    That should help with boundaries and EM etc.

    As for the fact that finite difference "not working too well." Weird. It's pretty standard when it comes to Laplacian.

    You can use the vast amount of numerical work regarding spherical harmonics, Bessel and Legendre etc. Just about everything in EM for N-dimensions breaks down to expansions in these special functions which happen to also correlate to... yep... you guessed it... multipole expansion!

    --
    All science is either physics or stamp-collecting.
  121. Off-Topic .sig commentary by Light_Wong · · Score: 0

    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.

    Not to put to fine a point on it, but wouldn't it be better to rephrase your sig (w/ which I agree, partially) as, "Athletic Scholarships from universities make less sense than academic scholarships from sports teams might, if they were created to subsidize inner-city youth who excel in mental gymnastics."

    Pro-activity could have benefits if it were channeled... off-air.

    -- Potential is not what you make of it. --

    1. Re:Off-Topic .sig commentary by gowen · · Score: 1

      Athletic scholarships used to be exactly for that reason. And they really weren't a bad idea.

      But long ago, college sports (OK, college football and basketball specifically) stopped being about attracting the scholastically able, and started being entirely about fundraising and boosting a college's reputation. It's now basically a competition to attract the best athletes, regardless of academic ability, and then hand-holding and babysitting them through the absolute minimum number of academically-worthless courses, to satisfy NCAA requirements.

      Any self respecting college should be acutely embarassed to confer degrees on some "scholar-athletes", given their level of education at graduation. But they're not, because they helped win "The Big Game".

      And -- even if that weren't the case -- if you're trying to attract under-privileged, college capable people, why not just give out more academic scholarships? Find the smartest kids who'd otherwise miss out. That should be the sole criteria for higher education -- how much will it benefit your mind?

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  122. Software for molecular modeling and visualization by Anonymous Coward · · Score: 0

    Would this help: http://www.millsian.com/