# acceleration source in momentum equation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 11, 2019, 13:35 acceleration source in momentum equation #1 Member   Join Date: Jul 2015 Location: Gainesville,FL Posts: 93 Rep Power: 6 Hi, I was looking into the acceleration source in the newest fvOption, verticalDamping (https://cpp.openfoam.org/dev/dir_11c...35e387a8a.html). I have some trouble to understand the implementation regards to the absolute source and specific source. Here I repost the implementation. Code: ``` template void Foam::fv::velocityRamping::add ( const AlphaRhoFieldType& alphaRho, fvMatrix& eqn, const label fieldi ) { const DimensionedField& V = mesh_.V(); const scalar t = mesh_.time().value(); const scalar dt = mesh_.time().deltaTValue(); const vector dU = velocity_*(ramp_->value(t) - ramp_->value(t - dt)); const vector a = dU/mesh_.time().deltaTValue(); forAll(cells_, i) { const label c = cells_[i]; eqn.source()[c] -= V[c]*alphaRho[c]*a; } }``` Few questions: 1.It looks like the a is the acceleration term (m/s/s) and has the same unit as du/dt, which indicates it is an absolute source term. Then why in the implementation of eqn.source()[c] -= V[c]*alphaRho[c]*a, the acceleration term is timed with V[c], which is the volume of the cell? 2. What is the implementation of eqn.source()[c]? How does this differ from directly applying a source term to the RHS in the fvMatrix, like the following? Code: ``` fvScalarMatrix UEqn ( blablabla... == alphaRho[c]*a; );``` Any guidance is appreciated, Rdf

 May 11, 2019, 14:01 #2 Member   Join Date: Jul 2015 Location: Gainesville,FL Posts: 93 Rep Power: 6 Ahhh Of course, the question is always automatically solved right after you post it. For whom is interested in the topic, please check the following thread. You could find all the answers. fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment Thanks, Rdf