Page 2 of 2

Re: Turbomachinery module

Posted: Thu Oct 20, 2016 2:18 am
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

Re: Turbomachinery module

Posted: Thu Oct 20, 2016 5:30 pm
by Yvan Fournier
Hello,

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

Regards,

Yvan

Re: Turbomachinery module

Posted: Mon Oct 24, 2016 12:42 pm
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

Re: Turbomachinery module

Posted: Mon Oct 24, 2016 1:35 pm
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

Re: Turbomachinery module

Posted: Wed Oct 26, 2016 4:06 am
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.}

Re: Turbomachinery module

Posted: Wed Oct 26, 2016 8:22 am
by Yvan Fournier
Hello,

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

Regards,

Yvan