|
[Sponsors] |
October 6, 2018, 11:20 |
YEqn.H of reactingFoam solver in Openform
|
#1 |
New Member
TaoChen
Join Date: Sep 2018
Posts: 11
Rep Power: 8 |
Hello guys!
I am reading the code's of solver reactingFoam in Openfoam. There is some sentences in YEqn.H: Code:
1 tmp<fv::convectionScheme<scalar>> mvConvection 2 ( 3 fv::convectionScheme<scalar>::New 4 ( 5 mesh, 6 fields, 7 phi, 8 mesh.divScheme("div(phi,Yi_h)") 9 ) 10 ); 11 12 { 13 reaction->correct(); 14 Qdot = reaction->Qdot(); 15 volScalarField Yt(0.0*Y[0]); 16 17 forAll(Y, i) 18 { 19 if (i != inertIndex && composition.active(i)) 20 { 21 volScalarField& Yi = Y[i]; 22 23 fvScalarMatrix YiEqn 24 ( 25 fvm::ddt(rho, Yi) 26 + mvConvection->fvmDiv(phi, Yi) 27 - fvm::laplacian(turbulence->muEff(), Yi) 28 == 29 reaction->R(Yi) 30 + fvOptions(rho, Yi) 31 ); 32 33 YiEqn.relax(); 34 35 fvOptions.constrain(YiEqn); 36 37 YiEqn.solve(mesh.solver("Yi")); 38 39 40 41 Yi.max(0.0); 42 Yt += Yi; 43 } 44 } 45 46 Y[inertIndex] = scalar(1) - Yt; 47 Y[inertIndex].max(0.0); 48 } Code:
fvOptions.correct(Yi); Code:
fvOptions.constrain(YiEqn); Code:
void Foam::fv::option::correct(volScalarField& field) {} Code:
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldi){} Best regards! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hybrid discretisation - blend factor | gcoopermax | CFX | 5 | September 23, 2016 09:05 |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 01:01 |
HELP!!! (ReactingFoam) | vianne | OpenFOAM | 3 | March 14, 2010 20:17 |
ReactingFoam solver | muthukaalai | OpenFOAM Running, Solving & CFD | 1 | June 16, 2008 14:36 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |