|
[Sponsors] |
May 11, 2019, 13:35 |
acceleration source in momentum equation
|
#1 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
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; } } 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; ); Rdf |
|
May 11, 2019, 14:01 |
|
#2 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 09: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 19:13 |
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 |