# How to find first cell length when using Analytic Density Distribution?

### How to find first cell length when using Analytic Density Distribution?

Posted by Philipp N at December 13. 2018Hi, I am using Salome 8.3.0 to create a wall-refined mesh of a plane channel flow, where both walls are parallel to each other. I need to specify the first cell length explicitly, that is why I usually proceed like this:

1) I create a box in GEOM and divide the edges, which are normal to the walls, in half.

2) I create a sub-mesh on these halved edges and use a Geometric Progression Hypothesis, where I can specify the start length and the common ratio. This allows me to have a symmetric refinement towards the channel center. (BTW Is there an easier way to have a symmetric wall-refinement, without having to split the edges into two? It becomes very difficult for complex geometries.)

This procedure gives me an EVEN number of cells, where there is no cell at the symmetry plane between the walls. However, now I need a cell at the center line and thus an ODD number of cells, so I can't split the edges any more. Therefore, I use "Number of Segments" with an analytic density distribution and I use a function like "cos(6.28319*t)+1.1'" to obtain a symmetric distribution of cells with wall-refinement.

My questions:

1) How can I calculate the first cell size next to the wall (equiv. to the "start length" in Geometric Progression"?)

2) Do you have any best practice for an analytic function which can give me a wall-refinement similar to Geometric Progression, but with the required refinement towards both walls? In specific, a "better" function than the cosine I am currently using?

Many thanks for your support!

Philipp

### Re: How to find first cell length when using Analytic Density Distribution?

Posted by Saint Michael at December 14. 2018Hi Philipp

My idea is to divide edges into three parts instead of two. This way you have two edges for Geometric progression and a central one for "central" cells.

Another possibility is to use Fixed Points hypothesis, which is practical to use in a Python script.

St.Michael