|
[Sponsors] |
September 23, 2016, 12:20 |
mvConvection->fvmDiv vs fvm::div
|
#1 |
Member
Join Date: Aug 2015
Posts: 37
Rep Power: 11 |
Looking at the source code for reactingFoam, YEqn.H defines the variable mvConvection as
Code:
tmp<fv::convectionScheme<scalar>> mvConvection ( fv::convectionScheme<scalar>::New ( mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)") ) ); Code:
// YEqn.H + mvConvection->fvmDiv(phi, Yi) // EEqn.H + mvConvection->fvmDiv(phi, he) Code:
+ fvm::div(phi, field) // "field" is the volScalarField being solved for
|
|
September 23, 2016, 13:15 |
|
#2 | |
Senior Member
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21 |
Quote:
Code:
//- src/finiteVolume/finiteVolume/fvm/fvmDiv.C ... 43 template<class Type> 44 tmp<fvMatrix<Type>> 45 div 46 ( 47 const surfaceScalarField& flux, 48 const GeometricField<Type, fvPatchField, volMesh>& vf, 49 const word& name 50 ) 51 { 52 return fv::convectionScheme<Type>::New 53 ( 54 vf.mesh(), 55 flux, 56 vf.mesh().divScheme(name) 57 )().fvmDiv(flux, vf); 58 } ... 75 template<class Type> 76 tmp<fvMatrix<Type>> 77 div 78 ( 79 const surfaceScalarField& flux, 80 const GeometricField<Type, fvPatchField, volMesh>& vf 81 ) 82 { 83 return fvm::div(flux, vf, "div("+flux.name()+','+vf.name()+')'); 84 } |
||
April 16, 2019, 11:26 |
|
#3 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 |
Hi everyone!
From above discussion, the conclusion of this thread is that mvConvection is used only for the simplification for the case of multi variables with same scheme. However: In my solver, two additional variable is transported. When I use separate but same scheme for these two variable ( fvm::div(phi, field) ), I found that the results is different with mvConvection ( mvConvection->fvmDiv(phi, field) ). So, is there any other difference between mvConvection->fvmDiv and fvm::div?
__________________
https://openfoam.top |
|
October 8, 2023, 08:10 |
|
#4 | |
New Member
Qian Meng
Join Date: Nov 2022
Posts: 4
Rep Power: 4 |
Quote:
The convection term of the code I refer to is written like this: Code:
// convection + ( UseMvConvection ? mvConvection->fvmDiv(phi + phiVc, Yi) : fvm::div(phi + phiVc, Yi, "div(phi,Yi_h)") ) |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mvConvection in reactingFoam | smehdi609 | OpenFOAM Running, Solving & CFD | 7 | April 16, 2019 11:22 |
Understanding an equation: what is "fvmDiv" and "fvOptions(rho,he)"? | shovan | OpenFOAM Programming & Development | 0 | August 21, 2015 08:09 |
Wrong fvm::div assembling | santiagomarquezd | OpenFOAM Bugs | 90 | December 27, 2010 13:54 |