How can I get the derivatives of velocity field?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Mohammad
Posts: 114
Joined: Thu Oct 25, 2018 12:18 pm

Re: How can I get the derivatives of velocity field?

Post by Mohammad »

Hello,
I found something confusing!
As you know, the velocity gradient tensor has 9 elements which means the last member could be called by:

Code: Select all

gradv[i][2][2]
But I found that it has infinity members in cs 5.0.9!

For example, you can run this command

Code: Select all

gradv[i][800000][80000]
and it gives you a number!

What's wrong with that?!

My code:

Code: Select all

  cs_field_gradient_vector(CS_F_(u),
                              false, //use_previous_t,                   
                              gradient_type, //gradient type             
                              halo_type, //HALO type                     
                              1, //inc                                   
                              gradv);

for (cs_lnum_t i = 0; i < n_cells_ext; i++) { // Calculation Loop        
  cvar_Tau_11[i] = -2*CS_F_(mu_t)->val[i]*gradv[i][800000][800000];
}
Post Reply