Overset/Chimera Method in saturne

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

Thank you for your answer, what doy mean by globally conservative ? in all domains ?

I can't see how I can impose a new velocity, is it already defined in the code(somwhere else) or I should create a new one ?

If it's the case, can you help me with that ?

Thank you,


Regards,
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

Globally conservative means the total exchanged quantity is not lost when interpolating between domains (it may be rescaled for this), but on a given surface subset, you may not have condervation of that quantity.

You do not need to define an additional variable in any case, just transform the flow conditions on one side to boundary conditions on the other (check src/base/csc2cl.f90 to see how this works).

Regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

Thank you for your answer.

Sorry for the confusion I meant by a new velocity, the velocity of translation of the mesh (domain), can you help me with the way I can impose it ?


I have a second question, for the rotation (already exisitng in the code), can I make the movement periodic in time or in space (imposing a degree of rotation) ? If yes, how can I do that ?


Regards,
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

As I started modifying the code, there are things that I didn't really understand, if you can help me with it please.

the function :
static inline void
_apply_vector_transfo(double matrix[3][4],
cs_real_t c[3])
{
int i, j;
double c_a[4] = {c[0], c[1], c[2], 1.}; /* homogeneous coords */
double c_b[3] = {0, 0, 0};
for (i = 0; i < 3; i++)
for (j = 0; j < 4; j++)
c_b += matrix[j]*c_a[j];
for (i = 0; i < 3; i++)
c = c_b;
}


It seems to me that that the 4th column in the "matrix" is for translation, no ? is the "matrix" defined elsewhere ?
what's the difference between "matrix" and "m" used in "_apply_vector_rotation"

This function, is only used for updating the coordinates, although it can do a rotation also, so why the "_apply_vector_rotation" and "_apply_tensor_rotation" are the ones used.

If I want to use the "_apply_vector_transfo", how should the other functions be modified ?
Beause in a translation there won't be any invariant point, and in case it's a rotation/translation it the invariant point won't be the same.

I made a list of the other functions that should be modified, if you canfirm it, or add ones that I missed
  • "cs_turbomachinery_rotate_fields"
  • "cs_turbomachinery_rotation_matrix"
  • "cs_turbomachinery_add_rotor"
  • the update coordinates part of "_update_mesh"
  • "_relative_velocity"
  • "_update_geometry"
  • rotation.c -> "cs_rotation_t"



I'm sorry if it's long, but your help is much appreciated

Best regards,
Mehdi
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

I don't currently have access to my computer, so cannot check everything, but can confirm this:

- the last (4th) column of the homogeneous rotation matrix is a translation. So for a pure translation, use an identity matrix for the rotate part.

- you can the ignore the vector and tensor rotations.

Best regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

Thank you Yvan for your answer.

I made a little modification to the file 'cs_turbomachinery.c', I deleted the call "if (tbm->n_rotors > 0)" and then imposed the transformation matrix (making it only a translation) using "cs_user_turbomachinery.c".

I got some errors which suggested to me to add and modify the mesh periodicity.

I still get an error :
Cannot achieve to reorient the current joined face with face 1857 (selected face).
So I modified the max_sub_face and made it to 10 000, 100 000, but I still get this error.

So the problem looks to be in the mesh joining rather than in the _update_mesh of turbomachinery, isn't it ?

Can you help me with what I should modify ?

Enclosed, you'll find the files that I put in my SRC and the listing and error I get


Best regards,
Mehdi
Attachments
listing.txt
(14.18 KiB) Downloaded 207 times
cs_user_turbomachinery.c
(5.16 KiB) Downloaded 198 times
cs_user_mesh-periodicity.c
(9.16 KiB) Downloaded 200 times
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

The best option to understand the joining error would be to apply the same transformation (translation) as a mesh preprocessing (cs_user_mesh_modify) step, and use standard (not turbomachinery, but preprocessing) joining, so as to visualize the mesh and joining problems.

Best regards,

Yvan
Post Reply