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

Modified scalarTransportFoam, but result is not right , need help

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 8
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: 8
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: 8
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

Thread Tools
Display Modes

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 On
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 34 May 22, 2014 10:20
Comparison the airfoil 0012 experimental result and simulation result harrislcy FLUENT 30 August 29, 2013 10:27
flux seems not conserved in my modified scalarTransportFoam danielr OpenFOAM Running, Solving & CFD 3 October 5, 2009 16:05
Modified Equation for CFX algorithm Craig Johansen CFX 0 August 27, 2004 23:02
Result is not correct Li FLUENT 1 December 30, 2000 01:21


All times are GMT -4. The time now is 08:42.