Turbomachinery module

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
jddcx
Posts: 8
Joined: Thu Sep 29, 2016 2:14 am

Re: Turbomachinery module

Post by jddcx »

Hello Yvan,
Thank you for your sincere reply.I have noticed that most of answers of the questions are your replies,that must be very busy.So I try to learn this soft by reading some cases on this forum.
Now I have added cs_user_extra_operations.f90(already been modified) into SRC and it can run,but I can't unsterdand the values that have been outputed.
What I want to know:
What's the meaning of the sentence ' xfor(ii) = xfor(ii) + bfprp_for(ii, ifac) ' ?
What's different with ' xfor(ii) = xfor(ii) + forbr(ii, ifac) ' or 'xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)'.
And in my case ,how should I modify the xfor(ii) to extract the top blade? About the coordinate ,the
y-axis perpendicular to this three blades,and the z-axis goes through the top blade.
Regards,
Li
Attachments
JASIDS55ULF4RR{O{BZAOSO.png
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery module

Post by Yvan Fournier »

Hello,

Do not forget the forum recommendations (I don't need your mesh, but the rest will help).

Regards,

Yvan
jddcx
Posts: 8
Joined: Thu Sep 29, 2016 2:14 am

Re: Turbomachinery module

Post by jddcx »

Hello Yvan,
Now I enconunter a stupid question...
The mesh that I used is explored from Gambit,so the Units are in meters not in millimeter.
How should I set the program to change the units into millimeter? Or which subroutine should I use to solve this question?
Regards,
Li
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery module

Post by Yvan Fournier »

Hello,

You have several options, but the simplest is to use the cs_user_mesh_input user function, in the cs_user_mesh.c user file. The examples in that function should contain a scaling transform of the sort you need.

Basically:

Code: Select all

void
cs_user_mesh_input(void)
{
  const double transf_matrix[3][4] = {{0.0001, 0., 0., 0.}, {0., 0.0001, 0., 0.}, {0., 0., 0.0001, 0.}};
  cs_preprocessor_data_add_file("mesh_input", 0, NULL, trans_matrix);
}
Regards,

Yvan
jddcx
Posts: 8
Joined: Thu Sep 29, 2016 2:14 am

Re: Turbomachinery module

Post by jddcx »

Code: Select all

void
cs_user_mesh_input(void)
{
  const double transf_matrix[3][4] = {{0.0001, 0., 0., 0.}, {0., 0.0001, 0., 0.}, {0., 0., 0.0001, 0.}};
  cs_preprocessor_data_add_file("mesh_input", 0, NULL, trans_matrix);
}
Hello Yvan,
Thankyou very much,I have already tested those code.
So I want to change the units from m to mm,is it 0.0001? Or 0.001?

Code: Select all

const double transf_matrix[3][4] = {{0.001, 0., 0., 0.}, {0., 0.001, 0., 0.}, {0., 0., 0.001, 0.}
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery module

Post by Yvan Fournier »

Hello,

Yes you are right. I added one too many 0's.

Regards,

Yvan
Post Reply