|
[Sponsors] |
June 4, 2013, 10:25 |
Convection Term
|
#1 |
New Member
Join Date: Mar 2012
Posts: 18
Rep Power: 14 |
Hello Foamers,
I have modified the solver MRFInterFoam to solve the population balance equation via the Quadratic method of Moments. Now I would like to add the convection term (see attached file) m is a scalarField c1 and c2 are constants (scalars) First I tried this Equation, but I understand, that I can't calculate "scalar - tensor". Code:
fvScalarMatrix mEqn ( U & fvc::grad(m) - fvc::grad(c1 * fvc::grad(m1) +c2 ); Code:
fvScalarMatrix mEqn ( fvm::div(phi, m) - fvm::laplacian(c1, m) ); Thanks for your help. |
|
June 5, 2013, 18:49 |
|
#2 |
Member
Thomas Boucheres
Join Date: May 2013
Posts: 41
Rep Power: 12 |
Hi,
yes it is better. Don't forget to add the temporal derivative and the source term. Look at applications/solvers/basic/scalarTransportFoam. |
|
June 6, 2013, 10:05 |
|
#3 |
New Member
Join Date: Mar 2012
Posts: 18
Rep Power: 14 |
Thank you Thomas.
Do you mean something like that? Code:
solve ( fvm::ddt(m) + fvm::div(phi, m) - fvm::laplacian(c1, m) +c2 ); |
|
June 6, 2013, 16:52 |
|
#4 |
Member
Thomas Boucheres
Join Date: May 2013
Posts: 41
Rep Power: 12 |
Ok for the time derivative.
For the source term, it is not good. Ok, I assume your "c2" is a fixed variable. This way, you have 2 possibility: 1- use solve ( fvm::ddt(m) + fvm::div(phi, m) - fvm::laplacian(c1, m) == fvm::Su(c2f,m) ); ...where c2f can be declared after the m variable as follows: DimensionedField<scalar,volMesh> c2f ( IOobject ( "c2f", m.time().timeName(), m.mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), m.mesh(), dimensionedScalar("c2f",m.dimensions()/dimTime,c2) ); 2- cleaner approach by using the fvOptions framework. Needs to write: solve ( fvm::ddt(m) + fvm::div(phi, m) - fvm::laplacian(c1, m) == fvOptions(m) ); In this approach, you need to define in the right way the fvOptions file located in the system file. Look at the tutorials to find the syntax you need. N.B : if c2 is not a fixed variable, the first approach is probably the simpler for first try (you could use the second one in combinaison of the codedFunctionObject) |
|
June 18, 2013, 08:02 |
|
#5 |
New Member
Join Date: Mar 2012
Posts: 18
Rep Power: 14 |
Thank you thomas its working
|
|
August 17, 2017, 13:40 |
|
#6 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Hello Lias,
I am working on the Quadratic method of Moments. AFAIK, VOF (interFoam) solve the dispersed phase directly, you dont need the QMOM to track the dispersed phase. Or are you coupling other variables? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PISO algorithm for particular NS equation (special convection term) | Cyp | OpenFOAM Programming & Development | 8 | June 12, 2012 09:36 |
[Q] Convection term treatment in UDS | Ryan, Lee | FLUENT | 4 | October 18, 2004 10:20 |
Convection Term Discretization | Maciej Matyka | Main CFD Forum | 3 | October 7, 2004 04:32 |
Convection term with moving grids | nicolas | FLUENT | 0 | December 10, 2003 07:34 |
Additional Convection Term | Richard | Phoenics | 4 | March 19, 2001 03:10 |