CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Modified scalarTransportFoam, but result is not right , need help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2009, 07:27
Default Modified scalarTransportFoam, but result is not right , need help
  #1
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
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.
panda60 is offline   Reply With Quote

Old   December 2, 2009, 07:34
Default
  #2
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
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

......................
......................
panda60 is offline   Reply With Quote

Old   December 2, 2009, 20:50
Default
  #3
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
my diffusion coefficient changes with turbulent viscosity, so kappaEff=
nu/0.5 + nut/0.5
panda60 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 07:03.