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

acceleration source in momentum equation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2019, 13:35
Default acceleration source in momentum equation
  #1
Member
 
Join Date: Jul 2015
Location: Gainesville,FL
Posts: 93
Rep Power: 6
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, 14:01
Default
  #2
Member
 
Join Date: Jul 2015
Location: Gainesville,FL
Posts: 93
Rep Power: 6
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 74 October 11, 2018 05:30
UDF for source term in momentum equation Enrico FLUENT 9 May 30, 2014 12:34
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 16:14


All times are GMT -4. The time now is 17:28.