SPH
|
Solver is called every timestep. Derived from ISolver. Most SPH solvers further derive from GenericSolver.
Code currently implements following solvers:
ContinuitySolver
Standard sets of hydrodynamical equations
Density is solved by direct summation rather than using ContinuityEquation
Experimental solver, attempts to resolver some issues of SPH, such as artificial pressure at contact discontinuity
Extension of ContinuitySolver also including self-gravity
Unless specified otherwise, the solver and the solved set of equations is determined from the parameters of RunSettings. If needed, however, solver can set manually and assigned to Run::solver. This way we can specify the set of equations explicitly.
Modifying the set of equations is fairly straighforward. Usually, we wish to add an equation to the existing set. If ContinuitySolver or SummationSolver are used, we can specify additional equations in constructor. Note that this does not affect the default set of equations, it only adds additional terms.
If we wish to specify the whole set of equations, we can utilize GenericSolver. This solver is a 'template' (not in C++ sense) that solves the set of equations given in the constructor. It does not solve any equations by default, except for helper 'dummy' equation NeighbourCountTerm. It therefore allows to create any combination of equations, leave out certain terms, etc.
The following code adds an internal friction and non-intertial accelerations (centripetal force and Coriolis force) into the set of equations. Add it to your Run::setUp function, note that it overrides previous solver, of course.