SPH
|
Equation of motion due to pressure gradient. More...
#include <EquationTerm.h>
Public Member Functions | |
virtual void | setDerivatives (DerivativeHolder &derivatives, const RunSettings &settings) override |
Sets derivatives required by this term. More... | |
virtual void | initialize (IScheduler &scheduler, Storage &storage, const Float t) override |
Initialize all the derivatives and/or quantity values before derivatives are computed. More... | |
virtual void | finalize (IScheduler &scheduler, Storage &storage, const Float t) override |
Computes all the derivatives and/or quantity values based on accumulated derivatives. More... | |
virtual void | create (Storage &storage, IMaterial &material) const override |
Creates all quantities needed by the term using given material. More... | |
Public Member Functions inherited from Polymorphic | |
virtual | ~Polymorphic () |
Equation of motion due to pressure gradient.
Computes acceleration from pressure gradient and corresponding derivative of internal energy. The acceleration is given by:
\[ \frac{{\rm d} \vec v_i}{{\rm d} t} = \sum_j m_j \left(\frac{p_i}{\rho_i^2} + \frac{p_j}{\rho_j^2}\right) \cdot \nabla W_{ij}\,, \]
Definition at line 113 of file EquationTerm.h.
Creates all quantities needed by the term using given material.
Called once for every body in the simulation.
Implements IEquationTerm.
Definition at line 101 of file EquationTerm.cpp.
|
overridevirtual |
Computes all the derivatives and/or quantity values based on accumulated derivatives.
Called every time step after derivatives are evaluated and saved to storage.
Implements IEquationTerm.
Definition at line 90 of file EquationTerm.cpp.
|
overridevirtual |
Initialize all the derivatives and/or quantity values before derivatives are computed.
Called at the beginning of every time step. Note that derivatives need not be zeroed out manually, this is already done by timestepping (for derivatives of quantities) and solver (for accumulated values).
Implements IEquationTerm.
Definition at line 86 of file EquationTerm.cpp.
|
overridevirtual |
Sets derivatives required by this term.
The derivatives are then automatically evaluated by the solver, the equation term can access the result in finalize function. This function is called once for each thread at the beginning of the run.
Implements IEquationTerm.
Definition at line 69 of file EquationTerm.cpp.