Iterations : reorienting or displacing an obstacle

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

Iterations : reorienting or displacing an obstacle

Post 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
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Iterations : reorienting or displacing an obstacle

Post 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
ggosse

Re: Iterations : reorienting or displacing an obstacle

Post 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
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Iterations : reorienting or displacing an obstacle

Post 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
Post Reply