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

Problem with rhoSimpleFoam : exploding enthalpy and density at the walls

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2010, 14:36
Default Problem with rhoSimpleFoam : exploding enthalpy and density at the walls
  #1
New Member
 
Join Date: Jan 2010
Posts: 7
Rep Power: 7
david39 is on a distinguished road
Dear all,

I am trying to simulate the flow in a pipe by using the Launder-Sharma Kepsilon turbulence model and the rhoSimpleFoam solver to calculate the massflow.

As I had interfaces in my first mesh, I have used the version 1.5-dev from OpenFOAM. I have also tried to use the version 1.6-X and I have the same problem.

As I had some problems on a complex geometry, I have created 2 simple meshes :
1) A straight pipe
2) A straight pipe with an obstacle in the pipe

On the straight pipe without obstacle, I get quite good result in comparison with Fluent and the Bernouilli correlation.

But on the pipe with a obstacle (with the same setup), I get false results in comparison with Fluent and the pressure drop in the pipe is extremly high.

For both models, I have to relax the density up to 0.05 to get the simulation running.

By having a look on the results for the pipe with the obstacle, the density and the temperature on the obstacle-wall are strange : the first cells on the wall (Low Reynolds mesh with a small thickness) have either small values for the density (up to 0.1) or big values for the density (up to 5-10) depending on the position of the wall (flow perpendicular to the wall or parrallel to the wall).

Where the density is not correct, the temperature is also strange (or vice versa).

I have tried to simplify the model by using constant properties (Cp, viscosity) but I always have the problem.

As I do not understand what happens, it would be nice if someone could have a look on the following setup to check that there is no problem with my setup. (I have not found how to attach files)

If you are interested in, I can send a mesh too in order to reproduce the problem : the mesh is a hexcore-mesh from Tgrid.

Best regards.
Thanks,
David
**********
0 directory
**********
Epsilon :
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1000.;
boundaryField
{
/* PRESSURE INLET */
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.002;
value uniform 1000.;
}
/* PRESSURE OUTLET */
outlet
{
type inletOutlet;
inletValue uniform 1000.;
value uniform 1000.;
}
/* WALLS */
wall_1
{
type fixedValue;
value uniform 1.e-20;
}
wall_2
{
type fixedValue;
value uniform 1.e-20;
}
}
k :
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 10.;
boundaryField
{
/* PRESSURE INLET */
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.1;
value uniform 10.;
}
/* PRESSURE OUTLET */
outlet
{
type inletOutlet;
inletValue uniform 10.;
value uniform 10.;
}
/* WALLS */
wall_1
{
type fixedValue;
value uniform 1.e-20;
}
wall_2
{
type fixedValue;
value uniform 1.e-20;
}
}
p :
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1.e5;
boundaryField
{
/* PRESSURE INLET */
inlet
{
type totalPressure;
/* value uniform 1.e5;*/
p0 uniform 1.e5; /* Total pressure p0 = p + 1/2*rho*U^2 */
U U;
phi phi;
rho rho;
psi none;
gamma 1.4;
}
/* PRESSURE OUTLET */
outlet
{
type fixedValue;
value uniform 0.9e5;
}
/* WALLS */
wall_1
{
type zeroGradient;
}
wall_2
{
type zeroGradient;
}
}
T :
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
/* PRESSURE INLET */
inlet
{
type totalTemperature;
T0 uniform 300.;
U U;
phi phi;
psi psi;
gamma 1.4;
}
/* PRESSURE OUTLET */
outlet
{
type inletOutletTotalTemperature;
T0 uniform 300.;
U U;
phi phi;
psi psi;
gamma 1.4;
}
/* WALLS */
wall_1
{
type zeroGradient;
}
wall_2
{
type zeroGradient;
}
}
U :
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (8.19152 -5.73576 0);
boundaryField
{
/* PRESSURE INLET */
inlet
{
type outletInlet;
/* value uniform (0 0 0);*/
outletValue uniform (0 0 0);
}
/* PRESSURE OUTLET */
outlet
{
type inletOutlet;
/* value uniform (0 0 0);*/
inletValue uniform (0 0 0);
}
/* WALLS */
wall_1
{
type fixedValue;
value uniform (0 0 0);
}
wall_2
{
type fixedValue;
value uniform (0 0 0);
}
}
**********
constant directory
**********
RASProperties :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel LaunderSharmaKE;
turbulence on;
printCoeffs on;
LaunderSharmaKECoeffs
{
}
wallFunctionCoeffs
{
}

thermophysicalProperties :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType hThermo<pureMixture<sutherlandTransport<specieTher mo<janafThermo<perfectGas>>>>>;
mixture air 1 28.966 /* specieCoeefs */
100 3000 1000 /* thermoCoeffs : janaf */
6.288038 -7.775727E-03 8.914556E-06 -4.175320E-09 7.288663E-13 /* Cp - Coefficients for range 1000 - 3000 K */
-922.797700 5.980528 /* Enthalpy and entropy */
3.718212 -1.818273E-03 4.599368E-06 -3.384361E-09 8.612737E-13 /* Cp-Coefficients for range 100 - 1000 K */
-1020.900000 3.950372 /* Enthalpy and entropy */
1.458709E-06 110.56 /* transportCoeffs : sutherland*/
;
**********
system directory
**********
controlDict :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application rhoPorousSimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 200;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// function Objects
functions
(
/* Monitors */
massFlow
{
type patchMassFlow;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
factor 1.0;
}
);
fvSchemes :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default faceLimited leastSquares 1.;
/*
grad(p) Gauss linear;
grad(U) Gauss linear;
*/
}
divSchemes
{
default Gauss linear;
div(phi,U) Gauss limitedLinearV 1.;
/* To avoid negativ values for k and epsilon, the schemes have to be bounded : Gauss linear -> unbounded */
div(phi,k) Gauss limitedLinear 1.;
div(phi,epsilon) Gauss limitedLinear 1.;
}
laplacianSchemes
{
default Gauss linear limited 1.;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
fvSolution :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p GAMG
{
tolerance 1.e-06;
relTol 0.05;
maxIter 1000;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 1;
nFinestSweeps 1;
mergeLevels 1;
agglomerator faceAreaPair;
cacheAgglomeration true;
nCellsInCoarsestLevel 3;
};
U PBiCG
{
preconditioner DILU;
maxIter 100;
tolerance 1.e-06;
relTol 0.1;
};
k PBiCG
{
preconditioner DILU;
maxIter 100;
tolerance 1.e-06;
relTol 0.1;
};
epsilon PBiCG
{
preconditioner DILU;
maxIter 100;
tolerance 1.e-06;
relTol 0.1;
};
h PBiCG
{
preconditioner DILU;
maxIter 100;
tolerance 1.e-06;
relTol 0.1;
};
rho PBiCG
{
preconditioner DILU;
maxIter 100;
tolerance 1.e-06;
relTol 0.1;
};
}
SIMPLE
{
/* nUCorrectors only for porous */
/* nUCorrectors 2;*/
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
pMin pMin [1 -1 -2 0 0 0 0] 10;
}
relaxationFactors
{
p 0.3;
U 0.5;
k 0.5;
epsilon 0.5;
h 0.8;
rho 0.05;
}
david39 is offline   Reply With Quote

Old   February 24, 2010, 14:26
Default
  #2
New Member
 
David Huckaby
Join Date: Jul 2009
Posts: 21
Rep Power: 7
dhuckaby is on a distinguished road
David,

Have you tried changing the initial conditions ? For example, changing the initial velocity to small positive value in the direction of the flow. Alternatively, the problem could first be solved using "potentialFoam" or "simpleFoam" and then copying the velocity field as the initial condition. Decreasing the initial turbulent kinetic energy might help as well.

Another option would be run tranisent using "rhoPisoFoam" for a time-period and then switch over to a steady-state solve.

hope this helps
Dave H.
dhuckaby is offline   Reply With Quote

Old   February 25, 2010, 13:25
Default
  #3
New Member
 
Join Date: Jan 2010
Posts: 7
Rep Power: 7
david39 is on a distinguished road
Dear Dave,
First of all, thank you for your reply.

Yes, I have tried to modify the initial conditions : if you have a look on the U file, I use 10 m/s as initial value for the velocity.

My problem is not the initialisation. I can run a simulation with 1000 iterations but the results are incorrect. As I have tried to explain, the values for the density and the temperature are not correct in the proximity of the obstacle (the first cell at the wall).

Either there is a problem with my setup and/or with the mesh (too thin first layer at the wall but I need this thickness with a low reynolds turbulence model) or this is a "bug" in OpenFOAM.

What I do not understand is why the "same" simulation without an obstacle in the pipe do not have this problem.

Best regards,
David
david39 is offline   Reply With Quote

Old   January 16, 2011, 08:23
Default same problem as you
  #4
Member
 
David
Join Date: Dec 2009
Location: Spain
Posts: 58
Rep Power: 7
David_010 is on a distinguished road
Hi David,

I have the same problem but with a different solver. In my case I have a pipe with moving obstacles inside. It is a laminar and incompressible flow, but I have found the same problems. When the pipe is empty, the solution is correct, but when there are obstacles the temperature is high near them, respect to the solution obtained with, for example Fluent.

So, may be there is a problem with the temperature equation? I don't have idea. Have you found a solution?

Thank you very much,

David
David_010 is offline   Reply With Quote

Old   January 16, 2011, 13:26
Default
  #5
New Member
 
Join Date: Jan 2010
Posts: 7
Rep Power: 7
david39 is on a distinguished road
Hi David,

I don not have investigated a lot the problem and I do not have found any solution. But for me, it sounds like a bug.

Best regards,
David
david39 is offline   Reply With Quote

Old   January 18, 2011, 12:08
Default
  #6
New Member
 
David Huckaby
Join Date: Jul 2009
Posts: 21
Rep Power: 7
dhuckaby is on a distinguished road
David or David,

Could you desribe the geometry of your problem ? Is the obstacle a sphere or a cube ? Also, David (010), which version of the solver are you using and do you have the problem with the obstacles are motionless ?

Dave H.
dhuckaby is offline   Reply With Quote

Old   January 18, 2011, 12:49
Default
  #7
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

I have a few suggestions.

Your epsilon inlet BC is for incompressible simulations (have a look at the tutorial case of rhoPisoFoam).

Is your grid fine enough so that you don't need wall functions? If yes, I thing you must use zeroGradient for k and epsilon at the walls.

Get OpenFoam1.6 ext or only the fixedMeanValue BC and use it at the Outlet for p.

You use a Totalpressure inlet. In this case, you should use a pressureInletVelocity for U.

You use limitedLinear as div Scheme. Decrease the number to 0.25-0.75 to increase stability.

Start the simulation with simple (constant) thermo physical models

Regards,
Christian
Chris Lucas 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
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23


All times are GMT -4. The time now is 02:00.