I want to simulate tidal features in a large body of water using was smooth particle hydrodynamics. For a system composed of an incompressible fluid, what general scale of problem can be tackled with an home computer? That is, how large of a body of water can I accurately represent using Smooth Particle Hydrodynamics?
All models are wrong, but some models are useful - George E. P. Box
Let's establish one important fact: Simulation Models are not exact replicas of reality. We use models to understand only a small piece of the real physics that is actually happening. No model, no matter how good the equations are or how powerful the computer is, can exactly mimic reality.
Models can be useful to understand certain physics, whether at the atomic scale (ab-initio models), mesoscopic scale (molecular dynamics or lattice boltzmann models), or macroscopic scale (navier stokes equations). Depending on which scale you choose (among other factors), you can make certain assumptions to model a glass of water or a lake (or even an ocean).
The word 'scale' (as the OP is using it) does not translate directly into a computational load directly. As others have already pointed out, the computational load depends on the total number of the resulting degrees of freedom after discretization. Any 'scale' can be simulated on a desktop computer provided that the total number of resulting "degrees of freedom" is small enough to fit in the computer's memory. Scale is independent of degrees of freedom. Accuracy, on the other hand, is highly dependent on the number of degrees of freedom, the type of problem, and the solver being used.
The key questions to ask are:
- Which 'physics' are most important for this particular problem?
- How much accuracy is needed?
Neither of these two questions is easy to generalize for any problem, no matter what the scale is. Therefore, it's really not possible to answer your question in any kind of general sense. It really depends on the kind of problem you want to model and how much accuracy you really need.
This depends a great deal on the type of CFD problem and the methods being used. But as a rough start using a lightweight geometric multigrid for the pressure solve and explicit time stepping for velocity, suppose you have 100 bytes per cell. If you have 8 GB of memory, you could solve a problem with about 80 million cells. This will likely be slower than you want because explicit CFD typically needs many time steps, in which case you should move to a smaller problem size. More storage will be needed if you use assembled matrices or Krylov methods (which may or may not make the code run faster).
Wow what an open question to ask!
As already mentioned the answer depends on so many factors. Here are just a few: Type of method (i.e. finite difference, spectral, finite volume, finite element etc), the power of your home computer, your skill as a programmer, the language you use, the algorithms you use for solving linear systems, explicit verses implicit time stepping, any parallelization you are able to exploit, the time you are willing to wait, how many time steps you need....
I assume by "general scale" you are talking about what grid sizes can be solved on a home PC. For 2D problems as a rough estimate I would say O(1024^2) is definitely do-able for many problems with maybe around 100000 time steps.
In addition to the other answers, let me just note this as a comparison: if you do not smoothed particle hydrodynamics but just a traditional Q2xQ1 (Taylor-Hood) finite element discretization of the Stokes equations in 3d, then you end up with ~400 nonzero entries per row of the matrix. That means ~5000 bytes per degree of freedom in the matrix alone, plus maybe that much again if you want a good preconditioner. So 10kB per degree of freedom. (I know @Jed Brown is going to say that one could get away with less, or do use matrix free methods, and that is all true, but for the sake of argument let us consider a "traditional" approach.)
Then, if you have say 16GB of memory, you can do ~1.6M unknowns in total. Given that every cell in a uniform mesh has 25 unique degrees of freedom, this equates to 64,000 cells -- i.e., for example a 64x32x32 mesh. Whether that's appropriate for your problem is a question that depends on what you want to do.
How long will it take to solve such a problem? A rule of thumb is that solving 100,000 unknowns on a single core in a parallel context will take 1 minute. So if your computer has 8 cores, then that's 200k unknowns per core and it would take 2 minutes to solve a Stokes system of the size outlined above.