CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

acceleration source in momentum equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2019, 12:35
Default acceleration source in momentum equation
  #1
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
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<class AlphaRhoFieldType>
 void Foam::fv::velocityRamping::add
 (
     const AlphaRhoFieldType& alphaRho,
     fvMatrix<vector>& eqn,
     const label fieldi
 )
 {
     const DimensionedField<scalar, volMesh>& 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
randolph is offline   Reply With Quote

Old   May 11, 2019, 13:01
Default
  #2
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
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
randolph is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 08:06
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
UDF for source term in momentum equation Enrico FLUENT 9 May 30, 2014 11:34
OpenFOAM without MPI 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 22:30.