Re: How can I get the derivatives of velocity field?
Posted: Tue Oct 29, 2019 12:30 pm
Hello,
I found something confusing!
As you know, the velocity gradient tensor has 9 elements which means the last member could be called by:
But I found that it has infinity members in cs 5.0.9!
For example, you can run this command and it gives you a number!
What's wrong with that?!
My code:
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]
For example, you can run this command
Code: Select all
gradv[i][800000][80000]
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];
}