CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Technical] fineness of a mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2013, 15:42
Default fineness of a mesh
  #1
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Good evening,

I am a new CFD user, I have to simulate a burner with reactingFoam but I'm not sure of the fineness of my mesh.

The chamber is a cylinder 50 cm long and has a diameter of 20 cm
Since it is a axisymmetric problem, I try to simulate only a wedge of the cylinder of 5° and one cell thick.

I suppose the mesh is finner at the inlet and near the wall , and is coarser at the outlet.

but how many cells do I have to set? or either what is the necessary size of the smallest cell ?

- First if I use the RANS calculation ?
Is there a thumb rule like with LES simulation? h<30 n where h is the grid size and n is the kolmogorov length scale

Thank you in advance for you answer

Cam
camille131 is offline   Reply With Quote

Old   March 17, 2013, 04:16
Default
  #2
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Nobody can help me?
camille131 is offline   Reply With Quote

Old   March 17, 2013, 06:50
Default
  #3
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Camille,

The best way of determining the number of cells required, is by performing a grid sensitivity study.
Start by solving your problem on a coarse grid and systematically refine it. For each simulation, calculate a parameter that is of importance for you (something similar like the drag force on a cylinder). At a certain moment the parameter will stop changing with increasing number of cells and that's the number of cells you would want to use.

Have fun!

Cheers,

L
Lieven is offline   Reply With Quote

Old   March 17, 2013, 07:38
Default
  #4
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Hi Lieven,

Thank you very much for your answer, I'll try this and let you know.

So if I have to try simulation for différent meshes I have to know how long I have to simulate the case?

In laminar I think it is common to simulate a certain time to ensure we are in steady state such as 10 times the real time needed. Is it right? c.f. user guide U-22

In a first time I'm using RANS so does it has an impact ?
the velocity : U = 5.77 m/s
the chamber's length : L = 51e-2 m
so the time needed for the mix to run along the chamber : t = L/U = 0.088 seconds

so if I simulate 1 s it is far enough, is it?

And what if I use k-Epsilon model?
and then LES ?

Thank you for your help

Cam
camille131 is offline   Reply With Quote

Old   March 21, 2013, 10:22
Default
  #5
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Just to add a little to what has been said. For RANS, in addition to grid size independence, your turbulence model will have some y+ value requirements. You will need to run a simulation, determine the y+ and then adjust the mesh appropriately (refining or even remeshing). Different turbulence models will need different y+ values.
chegdan is offline   Reply With Quote

Old   March 24, 2013, 10:22
Default
  #6
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Hi Dan,
thank you for you response.

So I 'd like to use the app here : http://www.cfd-online.com/Tools/yplus.php

but I'm not sur of all my parameters...

Input Freestream velocity: 5.77
[m/s] Density: 0.6709 (for CH4)
[kg/m3] Dynamic viscosity: 1.5e-5
[kg/ms] Boundary layer length: ?? don't know
[m] Desired Y+ value: ?? don't know
[]
Output Reynolds number: [] Estimated wall distance: [m]

So I don't know either the boundary layer length neither de desired Y+ value ?

And what will I do with the results? :-/

Sorry I m a bit lost...
camille131 is offline   Reply With Quote

Old   March 24, 2013, 10:28
Default
  #7
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
I stil don't know how long do I have to simulate the case?

with combustion turned on TRUE and chemistry turned ON with laminar-RASModel in turbulenceProperties it took more than 1 day and 20 hours to run on 8 CPU in parallel and then fail at 1.4 seconds... :-/
camille131 is offline   Reply With Quote

Old   March 24, 2013, 11:26
Default
  #8
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
With problems that are in really complex systems, its best to stage your solution procedure to push towards an overall solution. Do cold flow, i.e. no temperature, no reactions, no radiation...just momentum. Then slowly make your simulation more complicated by adding turbulence, temperature, chemistry, etc. and you will move towards your final goal.

For y+, use the yPlusRAS utility in OpenFOAM. It is a post processing tool, so run your cold flow to steady-state and then get your yPlus values. Remesh were necessary, map the values from your old solution to your new mesh with mapFields and then continue until you get an appropriate yPlus value for that turbulence model. Once this is good....then move onto more complicated physics by adding temperature. Make sure to check you y+ when you move to new physics as it may change from the added transport effects.
chegdan is offline   Reply With Quote

Old   March 26, 2013, 16:24
Default
  #9
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Hi Dan,
thank you for the precisions.

I ll try to run my case in "cold flow" and then postProcess it with the yPlusRas utility for which I'll surely have some questions...

but for the moment then : I switch off turbulence, combustion and chemistry such that :

chemistryProperties
--> chemistry off;

combustionProperties
--> combustionModel PaSR<psiChemistryCombustionModel>;
active false;

tubulenceProperties
--> simulationType RASModel; --> RASProperties laminar;

You told also no temperature , so what does that mean in term of BC?

here is my T bcs , what should I change to run cold flow?

And how longdo I have to run the case to be in steady state ?

My chamber is a cylinder of 0.51 m long with 0.22 m of diameter and the initial velocity is 5.77 m/s. the inlet is a circle with 0.035 m diameter.

Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 293;

boundaryField
{
inlet
{
type fixedValue;
value uniform 293;
}
leftWall
{
type wallHeatTransfer; // verifier av mes valeurs
Tinf uniform 293;
alphaWall uniform 20;
value uniform 293;

}
upWall
{
type wallHeatTransfer; // ou fixedGradient?
Tinf uniform 293;
alphaWall uniform 10;
value uniform 293;
}
outlet
{
type inletOutlet;
inletValue uniform 293;
value uniform 293;

}
frontAndBack
{
type wedge;
}
axis
{
type empty;
}
}
camille131 is offline   Reply With Quote

Old   March 26, 2013, 16:45
Default
  #10
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
As an optional method (preferred), you could use simpleFoam. A laminar or turbulent steady-state solver for isothermal, incompressible, non-reacting flows. The take that flow field and move back to your current solver.
chegdan is offline   Reply With Quote

Old   March 26, 2013, 16:50
Default
  #11
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
If you set if you set the RASProperties to laminar, you will probably never reach steady state. Wel ok, it depends on the Reynolds number (with very low Re you might reach a steady state) but since you want to use a RASModel I'm assuming the flow will be turbulent.

So my advice, either run the laminar-case for 100 timesteps or so and enable then the turbulence model (you can simply do this with the 'turbulence on/off' flag instead of changing the RASModel in RASProperties). This way you simply get a better initial velocity field for the turbulence model. Or alternatively, you can simply try to start your simulation with the RASModel enabled. I you don't set the time step too big, this will work as well...

Cheers,

L
Lieven is offline   Reply With Quote

Old   March 27, 2013, 14:22
Default
  #12
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Hello,
Well here is my case, http://dfiles.eu/files/y5fimgxvz


I ran it with icoFoam , no chemistry, no combustion an RASModel for turbulence.

- first I ran it also without transportProperties file but to use the yPlusRAS utilty, OF asked me this file. Then I added it with cinematic viscosity 1e-5 mē/s and transportModel Newtonian..

Now I check the yPlus files in each timeStep but it is value 0 everywhere.. so what am I suppose to understand?

is it because I have this message at each time step :
Quote:
no nutkWallFunction patches
What Am I supposed to do to correct that?

In another case (ran with reactingFoam I tested YPlusRAs utility with -compressible option but OF told me at each time step :
Quote:
no rho field
what am I supped to do for that case?

Thank you for your help

Last edited by camille131; March 27, 2013 at 14:40. Reason: more to say ..
camille131 is offline   Reply With Quote

Old   March 27, 2013, 14:57
Default
  #13
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
There seems to be some miscommunication here

Your ultimate goal is to get a full simulation of a reacting flow in a chamber. In order to do that you will need a flow field, species transport, and possibly temperature field. In a previous post, I suggest you start with solving only momentum, and if the system is in a regime in which steady-state flow can be achieved, I would use simpleFoam. SimpleFoam is a steady state solver for isothermal flows. it can model both laminar and turbulent (using RANS) flows where the user defines what turbulence model to use e.g. laminar, kEpsilon, etc.
chegdan is offline   Reply With Quote

Old   March 27, 2013, 15:15
Default
  #14
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Sorry I am lost . I thought I had to use yPlusRAS utility on the simple case with only transport.

Isn't it ok for the case I just posted?
camille131 is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 12:14
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 44 April 14, 2016 07:41
[ICEM] Problem making structural mesh on a surface froztbear ANSYS Meshing & Geometry 1 November 10, 2011 09:52
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11


All times are GMT -4. The time now is 03:30.