Page 1 of 1

Iterations : reorienting or displacing an obstacle

Posted: Tue Feb 16, 2016 12:19 pm
by ggosse
Hi,

After that http://code-saturne.org/forum/viewtopic.php?f=2&t=1821 , I would like to see the influence of displacements or reorientation of a central obstacle .
I would like to iterate through this automatically : several small displacements or rotations

Do I have to compute new meshes in Salome or can I use cs_user_mesh_input for that ?

Salome seems to have a python interface to do such things :
http://docs.salome-platform.org/latest/ ... _page.html

Is there something similar for Code Saturne ?

Regards
Gregory

Re: Iterations : reorienting or displacing an obstacle

Posted: Tue Feb 16, 2016 1:39 pm
by Yvan Fournier
Hello,

cs_user_mesh_input is probably the simplest solution if you only need a combination of translations and rotations (which can be expressed in a homogeneous coordinates transformation matrix).

For more general deformations not requiring remeshing, cs_user_mesh_modify should be enough.

For more complex modifications, you'll need to to the modiciations upstream (for example in SALOME).

Regards,

Yvan

Re: Iterations : reorienting or displacing an obstacle

Posted: Wed Feb 17, 2016 10:16 am
by ggosse
Thanks Yvan

With cs_user_mesh_input, I would like to rotate 3 WALLS corresponding to an obstacle ( 2 curved faces, 1 circular edge ) without renaming them unless necessary.

Around z for example with the matrix
cos -sin 0
sin cos 0
0 0 1

Will the walls turn around an axis positioned at x=0 and y=0 ?

Regards
Gregory

Re: Iterations : reorienting or displacing an obstacle

Posted: Wed Feb 17, 2016 2:58 pm
by Yvan Fournier
Hello,

Yes, this will rotate the whole mesh.

Basically, the general transformation matrix logic is briefly explained in cs_user_mesh.c, in cs_user_periodicity, example 3.

Regards,

Yvan