General Mesh questions (make slow computation and errors)

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
jbruneaux

General Mesh questions (make slow computation and errors)

Post by jbruneaux »

Hi,

I'm using Code-saturne (3.0.1) to simulate the air flow through a heatsink. The aim is to run a coupled code-saturne/SYRTHES simulation to see the effect of the heatsink on out product and see how it should be controlled (full-on, temperature driven or else).

I've drawn the geometry and made both the solid and fluid domains using FreeCAD (for the geomtry) and SALOME to make the partition, group and meshes.

Currently, I've got a mesh of the fluid domain which has been generated using 'Automatic Tetrahedralization' hypothesis set (with no specific parameters for 'NETGEN 1D-2D' algorythm.

This generates a mesh with the following characteristic (extract from check_mesh.log):
Maillage
Nombre de cellules : 330098
Nombre de faces internes : 581782
Nombre de faces de bord : 156828
Nombre de sommets : 97246

(...)

Critère 1 : orthogonalité :
Nombre de mauvaises cellules détecté : 0 --> 0 %

Critère 2 : décentrement :
Nombre de mauvaises cellules détecté : 0 --> 0 %

Critère 3 : qualité du gradient moindres-carrés :
Nombre de mauvaises cellules détecté : 12338 --> 4 %

Critère 4 : ratio des volumes de cellules :
Nombre de mauvaises cellules détecté : 0 --> 0 %

Critère 5 : culpabilité par association :
Nombre de mauvaises cellules détecté : 0 --> 0 %

Attention :
---------
Un défaut de qualité de maillage a été détecté

Le maillage devrait être revu en fonction des critères indiqués.

Le calcul sera effectué mais la qualité de la solution peut être dégradée...

Anyway, I've tried to run a simulation using this mesh and the computation time (per time-step) is really long...and simulation crashed around step 130 with weird convergence values.
I've noticed a warning at the beginning of the listing output which tells 'WARNING: MESH TOO REFINED AT THE WALL', so I tried to make a new mesh with a 'very coarse' criteria in 'NETGEN 1D-2D' (and even in the 'NETGEN 3D') parameters but it didn't changed the problem and the computation time is still really long.

Using the 'Scallable wall' remove the warning about mesh refinement but I don't know what are the side effect (simulation is currently running but it might take around 1-2 hours to reach the time step 130, even on a dual core using 2 processes)...

I'd like to have some advice on how to generate a correct mesh for this simulation. I'm quite new to all this world so It might be a really simple thing.

I've uploaded a copy of the MED file, the check_mesh.log and the code-saturne project file so that you might be able to have a look at the files.

Regards, Jerome
Attachments
fluid_mesh.tar.gz
(6.03 MiB) Downloaded 181 times
jbruneaux

Re: General Mesh questions (make slow computation and errors

Post by jbruneaux »

Attached 2 pictures of the heatsink solid domain (not included in the mesh file) and the fluid domain which is made from the 'air' inside the heatsink (this is the geometry used to create the mesh).

Regards, Jerome
Attachments
HeatSinkFluid.png
HeatSink.png
Yvan Fournier
Posts: 4081
Joined: Mon Feb 20, 2012 3:25 pm

Re: General Mesh questions (make slow computation and errors

Post by Yvan Fournier »

Hello,

The quality criteria are just warnings that the mesh is not perfect, bu a mesh rarely is. What is more useful is to visualize the quality criteria in mesh checking mode, so as to see where quality is worse.

In any case, if you are building your mesh with SALOME and the Netgen algorithm, I would recommend at least adding a viscous layer hypothesis, so that the cell thickness near the boundary layer is more regular, and the gradient reconstruction there leads to better results.

Using a hexahedral or hex-dominent mesh would also probably ensure better convergence relative to the number of cells.

Check the best practices section on this web-site (it may be improved, but gives you some recommendations).

Also, did you check your "performance.log" file to see where msot time is spent ? If you spend a lot of time in gradients, try least-squares reconstruction with extended neighborhood.

Finally, do you have performance figures with other versions of Code_Saturne or other meshes ?
What processor type are you using ?

The performance you have does not seem great, but with 300,000 cells on only 2 cores, you can't expect optimal performance (20,000 to 50,000 cells per core is often a better ratio relative to work per core/cache use).

Regards,

Yvan
jbruneaux

Re: General Mesh questions (make slow computation and errors

Post by jbruneaux »

Hi,

Thnaks for the usefull advices. I was already reading the BPGs and from the reading, it seems that I should use a different turbulence model (the k-epsilon do not seems to be the best for my purpose).

However, you say 'try least-squares reconstruction with extended neighborhood', which seems to be done as the performance log file tells me that most of the time is spent in the 'Least-squares (standard)' computation.
I don't know if it's possible to do that using SALOME ? Or do I need to use a diffent mesh utility ?

I've downloaded the latest SALOM V7.2 version to try the new features (it seems a new module "Hexablock" has been added, maybe it can help ?).

I don't really want the performance to be excellent as I know the machine used is not a really powerfull machine but at least, even if the computation takes hours / days, I'd like it to be able to successfully run.

Regards, Jerome
Post Reply