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

Negative values in scalar transport

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 6, 2009, 10:29
Default Negative values in scalar transport
  #1
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 8
jnally is on a distinguished road
I am trying to solve the following scalar transport equation using a steady state flow solution obtained using simpleFoam:

fvm::ddt(Y) + fvm::div(phi, Y) – fvm::laplacian(DY + (turbulence->nut() / Sct), Y)

Where Sct is the turbulent Schmidt number.

The solver seems to run fine however, I sometimes get negative values reported when tracking the scalar using probes throughout the domain. I have looked through the forums and found a couple of posts that describe the same situation although trying out the solutions found there does not solve my problem. My fvSchemes file is as follows:

ddtSchemes
{
default none;
ddt(Y) Euler;
}
gradSchemes
{
default none;
snGradCorr(Y) Gauss linear;
grad(Y) Gauss linear;
}
divSchemes
{
default none;
div(phi,Y) Gauss Gamma01 1;
}
laplacianSchemes
{
default none;
laplacian((DY+(((Cmu*spr(k))|epsilon+epsilonSmall))|Sct)),Y) Gauss linear limited 1;
}
interpolationSchemes
{
default none;
}
snGradSchemes
{
default none;
}
fluxRequired
{
default no;
Y;
}

Does anyone have any suggestions?
jnally is offline   Reply With Quote

Old   April 7, 2009, 04:12
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Are you using "inletOutlet" conditions for the inlets of your scalar?
This is important if your inlets have backflow anytime during the solution.
olesen is offline   Reply With Quote

Old   April 7, 2009, 06:44
Default Thanks for the reply
  #3
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 8
jnally is on a distinguished road
Thanks for the reply.

I am not using the inletOutlet condition but I have just checked and made sure that there is no backflow on the inlets. It is a steady state flow so there will be no fluctuations throughout the simulation.

All of the inlets are using a fixedValue for velocity and turbulence, one is also using fixedValue to introduce the scalar (pressure is set as zeroGradient). The outlet patches are set as zeroGradient for velocity, turbulence and scalar with a fixedValue (0) for the pressure.

James
jnally is offline   Reply With Quote

Old   September 26, 2009, 09:56
Smile Solved!!
  #4
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 8
jnally is on a distinguished road
I revisited and have solved my problem (which incidentally only occurred when using tet-meshes) by using these schemes:

grad: leastSquares
div: Gauss upwind
laplacian: Gauss linear uncorrected

Just in case anyone else has a similar problem.
jnally is offline   Reply With Quote

Reply

Tags
negative values, numerical scheme, scalar transport

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
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
negative values for diffusion scalar cmv CD-adapco 0 April 18, 2005 06:21
Preventing negative scalar (UDS) values?? Matthew Brannock FLUENT 3 February 15, 2002 08:10


All times are GMT -4. The time now is 01:48.