CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Boundary layer salome

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

Like Tree8Likes
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By fede32
  • 1 Post By peterhess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2018, 16:32
Default Boundary layer salome
  #1
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
I'm trying to build a mesh using salome to run in openfoam. The geometry is a piping system. How can I refine the boundary layer? Using local refinement, I can only select points, faces or solids, but that is not what I really need. Selecting faces, for example, refines the 2d face meshing, instead of refine the orthogonal direction (the y+ direction).
fede32 is offline   Reply With Quote

Old   October 6, 2018, 16:38
Default
  #2
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by fede32 View Post
I'm trying to build a mesh using salome to run in openfoam. The geometry is a piping system. How can I refine the boundary layer? Using local refinement, I can only select points, faces or solids, but that is not what I really need. Selecting faces, for example, refines the 2d face meshing, instead of refine the orthogonal direction (the y+ direction).

I thinnk the solution is using hypothesis-> viscous layer
fede32 is offline   Reply With Quote

Old   October 6, 2018, 19:41
Default
  #3
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by fede32 View Post
I thinnk the solution is using hypothesis-> viscous layer
Well, that is one option.

https://www.youtube.com/watch?v=TI0u...NO25WdJ_ChsU5E

I can suggest two other...

Using Salome also --> sub-mesh

Hier you build a sub geometry in the region of refinement and use it for the sub mesh.

https://www.youtube.com/watch?v=btGV...hsU5E&index=37

Or the other option directly in openFoam using:

refineWallLayer -overwrite -region FLUID '(FLUID_to_SOLID)' 0.3

Where FLUID is the region name you want to refine (if you have multiple regions) and FLUID_to_SOLID is the boundary you want to refine

Anyway, if I still remember corrrectly, somebody in the forum here developed a code to refine the boundary near the walls using the calculated y+ value! Try to find it out. That is actualy what you are looking for,

Regards

Peter
fede32 likes this.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 20:37
Default
  #4
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Well, that is one option.

https://www.youtube.com/watch?v=TI0u...NO25WdJ_ChsU5E

I can suggest two other...

Using Salome also --> sub-mesh

Hier you build a sub geometry in the region of refinement and use it for the sub mesh.

https://www.youtube.com/watch?v=btGV...hsU5E&index=37

Or the other option directly in openFoam using:

refineWallLayer -overwrite -region FLUID '(FLUID_to_SOLID)' 0.3

Where FLUID is the region name you want to refine (if you have multiple regions) and FLUID_to_SOLID is the boundary you want to refine

Anyway, if I still remember corrrectly, somebody in the forum here developed a code to refine the boundary near the walls using the calculated y+ value! Try to find it out. That is actualy what you are looking for,

Regards

Peter

Thanks for your complete answer!!
I'm testing the first option, using the boundary layer hypotesis.
This way I create meshes with high amount of non-orthogonal faces.
I'm going to test the others options you give me.
But for now, do you know how can I limit the non-orthogonality generation in Salome? I'm using the NETGEN1D2D3D algorithm (may I use another?).
fede32 is offline   Reply With Quote

Old   October 6, 2018, 20:55
Default
  #5
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Well, that is one option.

https://www.youtube.com/watch?v=TI0u...NO25WdJ_ChsU5E

I can suggest two other...

Using Salome also --> sub-mesh

Hier you build a sub geometry in the region of refinement and use it for the sub mesh.

https://www.youtube.com/watch?v=btGV...hsU5E&index=37

Or the other option directly in openFoam using:

refineWallLayer -overwrite -region FLUID '(FLUID_to_SOLID)' 0.3

Where FLUID is the region name you want to refine (if you have multiple regions) and FLUID_to_SOLID is the boundary you want to refine

Anyway, if I still remember corrrectly, somebody in the forum here developed a code to refine the boundary near the walls using the calculated y+ value! Try to find it out. That is actualy what you are looking for,

Regards

Peter

Your second option is more complicated in my case. I'm dealing with a complex geometry (something like a manifold connected to an elbow system), and I can't figure out how to create a second geometry (in order to refine it).
fede32 is offline   Reply With Quote

Old   October 6, 2018, 21:25
Default
  #6
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Well, that is one option.

https://www.youtube.com/watch?v=TI0u...NO25WdJ_ChsU5E

I can suggest two other...

Using Salome also --> sub-mesh

Hier you build a sub geometry in the region of refinement and use it for the sub mesh.

https://www.youtube.com/watch?v=btGV...hsU5E&index=37

Or the other option directly in openFoam using:

refineWallLayer -overwrite -region FLUID '(FLUID_to_SOLID)' 0.3

Where FLUID is the region name you want to refine (if you have multiple regions) and FLUID_to_SOLID is the boundary you want to refine

Anyway, if I still remember corrrectly, somebody in the forum here developed a code to refine the boundary near the walls using the calculated y+ value! Try to find it out. That is actualy what you are looking for,

Regards

Peter

Lastly, using your third method, I get another kind of error.
I used this command:


refineWallLayer -overwrite wall 0.5


multiple times, (refining always the boundary cell).
When I use the checkMesh I get this error:


Checking geometry...
Overall domain bounding box (-13.74 -9.0452 -1.5144) (1.3196 5.476 12.0332)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (1.28052e-16 2.37068e-17 5.13857e-17) OK.
Max cell openness = 6.72261e-16 OK.
Max aspect ratio = 45.2328 OK.
Minimum face area = 1.73917e-05. Maximum face area = 0.374593. Face area magnitudes OK.
Min volume = 3.66888e-08. Max volume = 0.0473133. Total volume = 29.2296. Cell volumes OK.
Mesh non-orthogonality Max: 68.5331 average: 25.4743
Non-orthogonality check OK.
Face pyramids OK.
***Max skewness = 4.35376, 1 highly skew faces detected which may impair the quality of the results
<<Writing 1 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 2 mesh checks.


Checking visually the mesh, I found this:
https://drive.google.com/open?id=1kP...Ald-GZYIcIF2-j


How can i solve the skewness problem?
fede32 is offline   Reply With Quote

Old   October 6, 2018, 21:43
Default
  #7
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by fede32 View Post
Overall domain bounding box (-13.74 -9.0452 -1.5144) (1.3196 5.476 12.0332)
Well, far away from the discussion, I think there is an initial probleme here...

Your bounding box has the dimensions:

15 X 15 X 13.5 m³!!!

Are you sure about it?

I ask that because it seams that during the exporting the mesh you had a scaling problem here.

Principally you are able to simulate such a big geometry, anyway, you need a very big size mesh!

How many cells do you have in this bounding box?

I will try to replay the other points step by step (with my poor knowledge)
fede32 likes this.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 21:48
Default
  #8
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Well, far away from the discussion, I think there is an initial probleme here...

Your bounding box has the dimensions:

15 X 15 X 13.5 m³!!!

Are you sure about it?

I ask that because it seams that during the exporting the mesh you had a scaling problem here.

Principally you are able to simulate such a big geometry, anyway, you need a very big size mesh!

How many cells do you have in this bounding box?

I will try to replay the other points step by step (with my poor knowledge)

That bounding box is right!
I'm working with ~1 million cells.
The image in my previous answer, is from a coarse mesh, but the problem I try to show always happens.
Thanks for all your time!
fede32 is offline   Reply With Quote

Old   October 6, 2018, 21:58
Default
  #9
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by fede32 View Post
That bounding box is right!
I'm working with ~1 million cells.
The image in my previous answer, is from a coarse mesh, but the problem I try to show always happens.
Thanks for all your time!
Ok!

Would you please upload the Salome *.hdf file.

It should be small sufficient to upload.

Regards

Peter
fede32 likes this.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 22:12
Default
  #10
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by fede32 View Post
Your second option is more complicated in my case. I'm dealing with a complex geometry (something like a manifold connected to an elbow system), and I can't figure out how to create a second geometry (in order to refine it).
Yes, I also dont like it

Anyway to do that, you generate two geometries and then use the operation "partition" in Salome to combine the geometries in one, then you explode the combined Partition to get the combined geometry separated, then use the sub mesh for the part you want to refine!

Watch the tutorial set on youtype will explain that better.
fede32 likes this.

Last edited by peterhess; October 8, 2018 at 01:41.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 22:22
Default
  #11
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by fede32 View Post
Lastly, using your third method, I get another kind of error.
I used this command:


refineWallLayer -overwrite wall 0.5


multiple times, (refining always the boundary cell).
When I use the checkMesh I get this error:


Checking geometry...
Overall domain bounding box (-13.74 -9.0452 -1.5144) (1.3196 5.476 12.0332)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (1.28052e-16 2.37068e-17 5.13857e-17) OK.
Max cell openness = 6.72261e-16 OK.
Max aspect ratio = 45.2328 OK.
Minimum face area = 1.73917e-05. Maximum face area = 0.374593. Face area magnitudes OK.
Min volume = 3.66888e-08. Max volume = 0.0473133. Total volume = 29.2296. Cell volumes OK.
Mesh non-orthogonality Max: 68.5331 average: 25.4743
Non-orthogonality check OK.
Face pyramids OK.
***Max skewness = 4.35376, 1 highly skew faces detected which may impair the quality of the results
<<Writing 1 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 2 mesh checks.


Checking visually the mesh, I found this:
https://drive.google.com/open?id=1kP...Ald-GZYIcIF2-j


How can i solve the skewness problem?
Well, the question here is if the bad mesh quality exists before refine or after?

I suggest running the checkMesh before refinement and after to see the difference.

I uploaded here an example case using the refineWallMesh three times after the mesh generation (using blockMesh). It works perfectly.

It is possible that the generated mesh quality using Salome is poor and you have bad skewness cells in the boundary layer where you apply the refinement.
Attached Files
File Type: gz Symmetry_SS_OF6.tar.gz (5.1 KB, 9 views)
fede32 likes this.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 22:25
Default
  #12
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Ok!

Would you please upload the Salome *.hdf file.

It should be small sufficient to upload.

Regards

Peter

Sure, here is the *.hdf:


https://drive.google.com/open?id=1ZV...ZlGVBm_cqWsRke



(I made a coarse mesh and erase the others to have a light file)



thanks!
fede32 is offline   Reply With Quote

Old   October 6, 2018, 22:31
Default
  #13
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Well, the question here is if the bad mesh quality exists before refine or after?

I suggest running the checkMesh before refinement and after ans see the difference.

I uploaded here an example case using the refineWallMesh three times after the mesh generation (using blockMesh). It works perfectly.

It is possible that the generated mesh quality using Salome is poor and you have bad skewness cells in the boundary layer where you apply the refinement.

Before applying refineWallMesh, the quality of the Mesh was good (I only had the error applying two or more times refineWallMesh).
I am going to analyze the case you submitted, thanks!
fede32 is offline   Reply With Quote

Old   October 6, 2018, 22:44
Default
  #14
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
It is possible that the generated mesh quality using Salome is poor and you have bad skewness cells in the boundary layer where you apply the refinement.

There are two cases.


In the first case, I haven't prepare the boundary layer in Salome. I only mesh using NETGEN1D2D3D, which gives me a good mesh. Then, I use refineWallMesh in OpenFoam, and here is where I get the skewness error, because previously I used tetrahedras and not Boundary Layer.


In the second case, using a boundary layer hypothesis in Salome, the generated mesh quality is poor (I get too many faces with high non-orthogonality). I think maybe I can solve this problem using a mesh composed only by hexa, but I was trying unsuccessfully to create an hexa mesh using Salome.
fede32 is offline   Reply With Quote

Old   October 6, 2018, 23:16
Default
  #15
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
By the way, a "bad" skewness does not always mean a bad mesh!

You could get a bad skewness but a "acceptable" element quality.

See minute 29:20!

https://www.youtube.com/watch?v=Od38...6xDh5L9bbeK3BL

Try to execute the simulation and see if you get divergence and then look for the skewness.
fede32 likes this.
peterhess is offline   Reply With Quote

Old   October 6, 2018, 23:40
Default
  #16
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
By the way, a "bad" skewness does not always mean a bad mesh!

You could get a bad skewness but a "acceptable" element quality.

See minute 29:20!

https://www.youtube.com/watch?v=Od38...6xDh5L9bbeK3BL

Try to execute the simulation and see if you get divergence and then look for the skewness.

Thanks for the video! That's a good explanation of the checkMesh tool. So I always should check the max non-orthogonality.



Finally I made mesh in Salome with just one gross layer, (it's the best case to get the lowest "max non-orthogonallity"). Then, I refined it using the refineWallLayer tool. Checking the mesh, everything is OK. Now I'm running the simulation, which with more than 1000 steps is stable. Thanks for all your help!



I will review the whole OF videos of that channel, they seems great! Thanks!
peterhess likes this.
fede32 is offline   Reply With Quote

Old   October 7, 2018, 06:50
Default
  #17
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
I made the following:

- Salome --> Geometry --> explode system (region) --> sub shape type --> face

doing that I got all the surfaces out of the geometry

- Delete all the old faces and keep the new generated

- Generated three new groups for inlet, outlet and wall using the new generated faces

- Generated the mesh using the same setup as yours with 4 boundary layers (3 also worked)

- Fixed the mesh size for the wall to an acceptable value

And I got no highly skewness anymore in checkMesh...

I used the original method you used as you opened the thread...

Actually the mesh is very good.

Increasing the number of layers to 10 generats a very good quality mesh.

Hat off for Salome developers!

https://drive.google.com/file/d/1EvA...ew?usp=sharing

Regards

Peter
fede32 likes this.

Last edited by peterhess; October 7, 2018 at 10:19.
peterhess is offline   Reply With Quote

Old   October 7, 2018, 16:13
Default
  #18
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by peterhess View Post
I made the following:

- Salome --> Geometry --> explode system (region) --> sub shape type --> face

doing that I got all the surfaces out of the geometry

- Delete all the old faces and keep the new generated

- Generated three new groups for inlet, outlet and wall using the new generated faces

- Generated the mesh using the same setup as yours with 4 boundary layers (3 also worked)

- Fixed the mesh size for the wall to an acceptable value

And I got no highly skewness anymore in checkMesh...

I used the original method you used as you opened the thread...

Actually the mesh is very good.

Increasing the number of layers to 10 generats a very good quality mesh.

Hat off for Salome developers!

https://drive.google.com/file/d/1EvA...ew?usp=sharing

Regards

Peter

Thanks a lot for your work!!!


When I use checkMesh on the mesh generated with the parameters/methods you used, I get the following output:

Checking geometry...
Overall domain bounding box (-13.74 -9.0452 -1.5144) (1.3196 5.476 12.0332)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (6.43708e-16 1.0415e-17 8.96766e-17) OK.
Max cell openness = 4.78509e-16 OK.
Max aspect ratio = 24.9331 OK.
Minimum face area = 1.20507e-05. Maximum face area = 0.0136992. Face area magnitudes OK.
Min volume = 2.80859e-08. Max volume = 0.000472208. Total volume = 29.2795. Cell volumes OK.
Mesh non-orthogonality Max: 83.8929 average: 22.363
*Number of severely non-orthogonal (> 70 degrees) faces: 859.
Non-orthogonality check OK.
<<Writing 859 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 2.46259 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End


Which is good, but we have 859 faces with severely non-orthogonal. (max 83º). I know that in the classes in the video you passed me before, the teacher says that it shouldn't be a problem, but until now, every time I use a mesh with this kind of non-orthogonality the simulations become unstable.


Anyway, I will try the simulation using this mesh.
Again, thanks a lot for your help!
fede32 is offline   Reply With Quote

Old   October 7, 2018, 18:09
Default
  #19
Member
 
fede32's Avatar
 
Federico Agustín Caccia
Join Date: Jun 2015
Location: Buenos Aires, Argentina
Posts: 55
Rep Power: 11
fede32 is on a distinguished road
Quote:
Originally Posted by fede32 View Post
Thanks a lot for your work!!!
Anyway, I will try the simulation using this mesh.
Again, thanks a lot for your help!

The simpleFoam simulation is not stable

Update: That was because of my bad selection of schemes and parameters in solutions.
Playing with them, I found a stable configuration.
Again, txs.
:/

Last edited by fede32; October 7, 2018 at 19:10.
fede32 is offline   Reply With Quote

Reply

Tags
boundary layer, mesh 3d, openfoam, salome 7, yplus

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 19:02
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
[ICEM] 3D Dynamic Mesh - Boundary layer mesh issues nathanricks ANSYS Meshing & Geometry 0 September 23, 2015 06:14
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20


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