turbomachinery in CS_3.2

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

turbomachinery in CS_3.2

Post by flyer »

hello,
i have a problem with cell_criteria definition in cs_user_turbomachinery.c:
i didn't understand what means the first raw "cylinder[0.0, 0.0, 0.0,"
for the second & the third i think that corresponds to rotation axis and velocity.
note: my rotor is a cylindrical domain with a radius of 4m and 1m of height along z direction, limited by "rotor_interface"

thank you.
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: turbomachinery in CS_3.2

Post by Yvan Fournier »

Hello,

The "cylinder" for cell criteria is simply a selection criterion for cells belonging to the cylinder (no velocity here). This selection syntax is described in the user manual, and not specific to turbomachinery. If cells belonging to the cylinder are marked by a group, using the group name in the selection criteria is a better way (but we try to make our examples varied). If you don't have groups in your mesh, the "cylinder" syntax is a practical backup solution (coordinates of bottom face/axis intersection, coordinates of top face/axis intersection, radius).

Rotation axis and velocity are independent arguments.

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: turbomachinery in CS_3.2

Post by flyer »

hello,
thank you for the clarification;
now i have an error message:
****************************************************************************
cs_solver: cs_turbomachinery.c :619 : _select_rotor_cells: l'assertion « tbm->rotor_cells_c != ((void *)0) » a échoué.
cs_solver: cs_turbomachinery.c :619 : _select_rotor_cells: l'assertion « tbm->rotor_cells_c != ((void *)0) » a échoué.
.
.
.
--------------------------------------------------------------------------
mpiexec.openmpi noticed that process rank 2 with PID 7117 on node bekhti exited on signal 6 (Aborted).
--------------------------------------------------------------------------
solver script exited with status 134.

Error running the calculation.

Check Code_Saturne log (listing) and error* files for details.

Error in calculation stage.
***************************************************************************************************
when i use the following data:
**************************************************************************************************
/* Define cells belonging to rotor and associated axis */

double rotation_velocity = 0.5;
double rotation_axis[3] = {0., 0., 1.};


const char cell_criteria[] = "cylinder[0.0, 0.0, 0.0,"
" 0.0, 0.0, 1.0,"
" 4.0]";


cs_turbomachinery_add_rotor(cell_criteria,
rotation_velocity,
rotation_axis);

/* Define joining associated with rotor/stator interface */

const char faces_criteria[] = "rotor_interface";

int verbosity = 0; /* per-task dump if > 1, debug level if >= 3 */
int visualization = 0; /* debug level if >= 3 */
float fraction = 0.10, plane = 25.;

int join_num = cs_turbomachinery_join_add(faces_criteria,
fraction,
plane,
verbosity,
visualization);
********************************************************************************
best regards.
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: turbomachinery in CS_3.2

Post by Yvan Fournier »

Hello,

The crash is strange. Did you also define the cs_user_turbomachinery function (the one with cs_turbomachinery_set_model ?)

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: turbomachinery in CS_3.2

Post by flyer »

hello,
please find attached the "cs_user_turbomachinery.c" subroutine.
i update to the 3.2.1 version, and now i have a new message error:
Signal SIGSEGV (accès à une zone mémoire interdite) intercepté !

best regards.
Attachments
cs_user_turbomachinery.c
(4.61 KiB) Downloaded 488 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: turbomachinery in CS_3.2

Post by Yvan Fournier »

Hello,

You need to replace false with true to enable the example.

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: turbomachinery in CS_3.2

Post by flyer »

hello,
thank you, now it work. but during rotation i have some problems: incoming flow at outlet and the mesh is destructed at the boundary rotor/stator (please see attached file). for that calculations stop by casting this message in the listing file: "Jacobi: error (divergence) solving for velocity".
i have an other question: can we use an oscillating velocity (depending on time ex double rotation_velocity = cos(time))?
thank you, best regards.
Attachments
rotor_interface.odt
(74.56 KiB) Downloaded 510 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: turbomachinery in CS_3.2

Post by Yvan Fournier »

Hello,

I suspect the mesh "destruction" is more a visualization (Paraview ?) bug related to not quite correct handling of polyhedra.

I am not sure about a non-constant velocity: it depends on whether the position is computed as "velocity*time_step*n_time_steps" (assuming constants) or computed as an increment. You can check in src/base/dttvar.f90 and src/base/cs_turbomachinery.c (I can check after the holidays otherwise).

As for the "reentering velocity" at the outlet, is the outlet far enough from the rotor, and is the mesh regular enough (ideally extruded) there ?

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: turbomachinery in CS_3.2

Post by flyer »

hello;
it seems that the mesh is good and the rotor is so far from the outlet, i think that the problem occurs at the interface boundary, calculations don't start if the face joining is not added in the GUI.
regards.
Rinat

Re: агрегатами в CS_3.2

Post by Rinat »

Good day.
I need help.
Whether anyone or step by step instructions calculate a centrifugal pump or turbine. work files or instruction
the simplest
thanks in advance.
Post Reply