acceleration source in momentum equation

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 11, 2019, 12:35 acceleration source in momentum equation #1 Senior Member   Reviewer #2 Join Date: Jul 2015 Location: Gainesville,FL Posts: 122 Rep Power: 7 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, 13:01 #2 Senior Member   Reviewer #2 Join Date: Jul 2015 Location: Gainesville,FL Posts: 122 Rep Power: 7 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

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post [swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 77 May 7, 2020 04:22 ordinary OpenFOAM Installation 19 September 3, 2019 18:13 Enrico FLUENT 9 May 30, 2014 11:34 kokizzu OpenFOAM Installation 4 May 26, 2014 09:17 [swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14

All times are GMT -4. The time now is 06:37.

 Contact Us - CFD Online - Privacy Statement - Top