|
[Sponsors] |
Modified scalarTransportFoam, but result is not right , need help |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 2, 2009, 07:27 |
Modified scalarTransportFoam, but result is not right , need help
|
#1 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Dear all:
I want to simulate the gas difussion in the air. First I get the velocity "U" and turbulent viscosity "nut" using simpleFoam. Then I modified the scalarTransportFoam to solve a concentration equation. But the result is not right compared with my experiment data. I need help. I don't know where I have mistakes. Thank you very much. The following is my modified solver: createFields.H Info<< "Reading field C\n" << endl; volScalarField C ( IOobject ( "C", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field nut\n" << endl; volScalarField nut ( IOobject ( "nut", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field U\n" << endl; volVectorField U ( IOobject ( "U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading transportProperties\n" << endl; IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); Info<< "Reading kinemetic vicosity nu\n" << endl; dimensionedScalar nu ( transportProperties.lookup("nu") ); # include "createPhi.H" *.cpp #include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" # include "createMesh.H" # include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nCalculating scalar transport\n" << endl; # include "CourantNo.H" volScalarField kappaEff ( "kappaEff", nu/0.5 + nut/0.5 ); while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; # include "readSIMPLEControls.H" for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { solve ( fvm::ddt(C) + fvm::div(phi, C) - fvm::laplacian(kappaEff,C) ); } runTime.write(); } Info<< "End\n" << endl; return 0; } Who can tell me where is my mistake. |
|
December 2, 2009, 07:34 |
|
#2 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
When some time has going on , my residual didn't change at all, and the result is not wright, so I think my solver has proboem.
DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1567 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15675 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1568 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15685 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1569 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15695 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.157 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15705 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1571 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15715 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1572 ...................... ...................... |
|
December 2, 2009, 20:50 |
|
#3 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
my diffusion coefficient changes with turbulent viscosity, so kappaEff=
nu/0.5 + nut/0.5 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ScalarTransportFoam for RTD calculations | santoo_cfd | OpenFOAM Running, Solving & CFD | 39 | July 12, 2021 02:15 |
Comparison the airfoil 0012 experimental result and simulation result | harrislcy | FLUENT | 30 | August 29, 2013 11:27 |
flux seems not conserved in my modified scalarTransportFoam | danielr | OpenFOAM Running, Solving & CFD | 3 | October 5, 2009 17:05 |
Modified Equation for CFX algorithm | Craig Johansen | CFX | 0 | August 28, 2004 00:02 |
Result is not correct | Li | FLUENT | 1 | December 30, 2000 01:21 |