Adding explict source terms in Runge-Kutta method
Dear All,
How should I add an explicit source term to momentum equation in the incompressible explicit 4th-order runge-kutta method? I have already implemented the method but I can't be sure about the details of adding a source term. At the moment, I have added the explicit source term at the end of the 4th step by adding the source to the velocity quantity, right before solving the Poisson equation for pressure. However, I wonder if it is the correct place. Please help me to find the answer, possibly by introducing an appropriate reference addressing the issue. Kind Regards, Syavash |
Quote:
That depends on the linearity or non-linearity of the source term, if it is stiff, etc |
Quote:
The implementation is like the following: Code:
//4th step Please note that pEqn is the laplacian of pressure. Code:
U.correctBoundaryConditions(); Kind Regards, Syavash |
if this is the constante pressure gradient that drives the main flow you just add at the end the term dt*grad p, this an exact integration.
|
Quote:
Code:
4th step Kind Regards, Syavash |
Quote:
yes, you can also add it out of the RK4 steps |
All times are GMT -4. The time now is 00:51. |