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

Negative values in scalar transport

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 4 Post By jnally
  • 2 Post By randolph

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2009, 11:29
Default Negative values in scalar transport
  #1
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 17
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, 05:12
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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, 07:44
Default Thanks for the reply
  #3
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 17
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, 10:56
Smile Solved!!
  #4
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 17
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

Old   June 2, 2017, 15:12
Default Thanks
  #5
Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 14
Sugajen is on a distinguished road
Thank you! Your schemes worked for me too.
Sugajen is offline   Reply With Quote

Old   August 23, 2018, 16:32
Default
  #6
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11
randolph is on a distinguished road
Quote:
Originally Posted by jnally View Post
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.
div: Gauss upwind

This is only first order and very diffusive. You should use TVD and other shock capturing scheme to handle the discontinuity in your simulation, such as vanLeer
Ramzy1990 and siamak 60 like this.
randolph is offline   Reply With Quote

Reply

Tags
negative values, numerical scheme, scalar transport


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
Preventing negative scalar (UDS) values?? Matthew Brannock FLUENT 5 September 1, 2020 13:32
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
negative values for diffusion scalar cmv Siemens 0 April 18, 2005 07:21


All times are GMT -4. The time now is 18:45.