import gambit in millimeter

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Serra Sylvain

import gambit in millimeter

Post by Serra Sylvain »

Hi,
I have a question about the preprocessor of CS.
I have a geometry done with gambit (so without unit). This geometry is little and in order to mesh it, I need to multiply in the entire domain by 1000 in order to respect the tolerance of gambit.
 
Is there a way to say to the preprocessor of CS that the unit of the .neu file is millimeter?
 
Thank you
 
Sylvain
 
César Vecchio

Re: import gambit in millimeter

Post by César Vecchio »

Yvan Fournier

Re: import gambit in millimeter

Post by Yvan Fournier »

Hello,
Yes, Code_Saturne assumes the mesh is in SI units, but you may scale it using a meta-mesh file or using the "usmodg" user subroutine.
Only use usmodg if you have no periodicity, as the periodic matching is done by the preprocessor (using the initial units), and usmodg changes the geometry afterward.
Otherwise, a meta-mesh file may be used, and its syntax should be described in the user manual. If not, I may send you a simple example. I am not sure the script handles the meta-mesh file, so if you use one, you may need to run the preprocessor manually, then place the "preprocessor_output" file in the case's DATA directory, and tell the script not to run the preprocessor, but to use an existing preprocessor_output file (this may be set using the GUI's advanced batch calculation parameters).
Serra Sylvain

Re: import gambit in millimeter

Post by Serra Sylvain »

Thank you César,
 
You are right, I have to use a meta-file. But I don't understand the matrix, 3 lines and 4 columns...
 
The 3 lines are for the 3 directions?
and the 3 first columns describing a rotation/ scaling factor ...
I just want a scaling factor of 0.001 what do I need to put in the 3 first columns?
It is not clear for me.
 
---
(here is the text of the user guide.)
read_mesh: filename
It is also possible to define a geometric transformation to apply to a mesh, using a homogeneous coordinates transformation matrix (3 lines, 4 columns, with the 3 first columns describing a rotation/scaling factor, and the last column describing a translation. The corresponding section is as follows (values may be spread over several lines):
transformation_matrix: t11 t12 t13 t14 t21 t22 t23 t24 t31 t32 t33 t34
---
 
thank you
 
Sylvain
Mickael Hassanaly

Re: import gambit in millimeter

Post by Mickael Hassanaly »

Dear M SERRA,

Here is a meta file to make the transformation you wish.Best Regards

Best regards

Mickael Hassanaly
Attachments
meta.mesh.txt
(101 Bytes) Downloaded 171 times
Serra Sylvain

Re: import gambit in millimeter

Post by Serra Sylvain »

Thank you Mickael,

it works but I have now a new problem, I use periodicty and after creating the preprocessor_output file and running the simulation, there is one error message :

---
cs_mesh_quantities.c:1231: Erreur fatale.

  11 cells have a Negative volume.
 Run mesh quality check for post-processing output.
 In case of mesh joining, this may be due to overly  agressive joining parameters.
---
 
in the listpre.XXX file, There is one warning :
---
Avertissement
=============
77 éléments de type hexa8 sont mal orientés
---

somebody have a solution?

Thank you

Sylvain
Peter Molcan

Re: import gambit in millimeter

Post by Peter Molcan »

Hello Sylvain,

about the mesh scaling from "mm" to "m", another not complicated solution is to edit your neu file directly. just find and replace all exponents in this order:

e+000 ---> e-003
e+001 ---> e-002
e+002 ---> e-001
e+003 ---> e+000
e+004 ---> e+001

and so on, if your domain is larger.
 
worked fine for me :-)

regards,

Peter
Mickael Hassanaly

Re: import gambit in millimeter

Post by Mickael Hassanaly »

Hello Sylvain,
Could you send me your mesh file and the periodicity you wish? The warning you get indicates that some elements of your mesh needs to be reoriented.
Best regards.
 
Mickaël Hassanaly
Serra Sylvain

Re: import gambit in millimeter

Post by Serra Sylvain »

Hello Mickael,
because of confidentiality, I can't send you my mesh file.
could you explain me how I can find this elements and how I can reorient them?
 
In every instance, thank you for your proposal.
Sylvain
César Vecchio

Re: import gambit in millimeter

Post by César Vecchio »

Sylvain, try checking in the GUI the option "correct cell and face orientations". I don't know about the equivalent option for non-GUI execution.
Post Reply