|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 ![]() |
Hello to all,
i've just met some problem with scalarTransportFoam, because i find the scalar is larger than 1 in some points and smaller than zero. I think this is up to the schemes used. I'm working on OF1612+ and this is my fvSchemes file (the original from pitzDaily case). I run the direct simulation to find the U field then i copy it in the 0 folder where i run scalaTransportFoam. Why is my scalar out of bounds? Any Solution? Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,T) Gauss linearUpwind grad(T); } laplacianSchemes { default none; laplacian(DT,T) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } // ************************************************************************* // Thanks for help |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 ![]() |
Use a bounded scheme instead.
Replace your "divScheme" (so the scheme for the convective term) by banana. Then choose one of the schemes that start with "limited". For example (disclaimer: typed from memory, could contain a syntax error): Code:
div(phi,T) limitedVanLeer 0 1; |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 ![]() |
Quote:
Maybe can you suggest me a second order scheme (i noticed that the linear scheme flattens too much the solution) that works good in channel flow? |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 ![]() |
Did you mean "linear" or "linearUpwind"? Since you said "linear" in your last post, but your first post showed that you were using "linearUpwind".
Either way, according to the OF user guide, both "linear" and "linearUpwind" are already second order. Personally, I am using limitedVanLeer, but what works for my case needs not work for your case. I am performing multiphase simulations with interFoam. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 ![]() |
Hello,
I tried to use some bounded schemes they seem to limit correctly the passive scalar but, unfortunately, the solution is very far to what i have to obtain. If you compare the image of what i have to obation with my solution without the bounded condition you can see they are qualitatively similar except for the scalar which is unbounded What I have to Obtain.png My Solution Without Buonded Condition.png The fvSchemes i used are those i reported in the first post. Then i used these schemes Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,T) Gauss limitedLinear01 1; } laplacianSchemes { default none; laplacian(DT,T) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; T ; } My Solution With Bounded Condition.png I state my case is a mixing problem in a channel with 2 inlets. At the first Inlet i impose T=1 and at the second T=0 and the images show the outlet of the channel. I'm working on ofv1612+ Another question. Reading the OF user guide i noticed that Gauss limitedLinear01 is followed by another 1. What is his meaning? Any Idea? Thanks for help |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 ![]() |
Hello to all,
i'm here again. I literally tested alle the limited method as suggested but the problem continues to appear. Here all the files of my case. Maybe the problem is not the scheme. Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,T) Gauss linearUpwind grad(T); } laplacianSchemes { default none; laplacian(DT,T) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { T { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; } } SIMPLE { nNonOrthogonalCorrectors 0; } Code:
dimensions [0 0 0 0 0 0 0]; internalField uniform 0.5; boundaryField { inlet1 { type fixedValue; value uniform 1; } inlet2 { type fixedValue; value uniform 0; } outlet { type zeroGradient; } walls { type zeroGradient; } movable { type zeroGradient; } } thanks for help |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 ![]() |
Little update!
The Gauss linearUpwind grad(T) for the divergence term seems to be the scheme which, qualitatively, gives best results. Is there a manner to make to mantain it applaying a limit? Os is better if i start to work to the other term as the gradient and laplacian? |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Division by zero exception - loop over scalarField | Pat84 | OpenFOAM Programming & Development | 6 | February 18, 2017 06:57 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 14:09 |
Diverging solution in transonicMRFDyMFoam | tsalter | OpenFOAM Running, Solving & CFD | 30 | July 7, 2014 07:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |