Page 1 of 1

Velocity_gradient_calculation

Posted: Sat Jun 29, 2019 4:38 pm
by C0st4s
Hi all,

I came across a problem when I tried to call the 'call field_gradient_vector(ivarfl(iu), 1, imrgra, inc, gradv)' or the pressure gradient in a subroutine that I build up in the cs_user_module.f90. For some reason it works fine when I use 1 processor. When I switch to more, I get " MPI error (communicator MPI_COMM_WORLD):
MPI_ERR_TRUNCATE: message truncated"

Any ideas how I can fix the way the gradient variable are communicate with the other processors to fix it?

Thanks,
Costas

Re: Velocity_gradient_calculation

Posted: Sun Jun 30, 2019 7:45 pm
by Yvan Fournier
Hello,

Yes, I have some ideas, but not enough info to work with.

Regards,

Yvan

Re: Velocity_gradient_calculation

Posted: Mon Jul 01, 2019 4:07 pm
by C0st4s
Dear Yvan,

Thanks for the response.
The idea is to compute the tangential pressure and the velocity gradient of the boundary cell and then pass that info to a define module. The define module will include both subroutines for the gradients, the subroutine that calls for further calculations and any additional functions that are needed.
Please find attached the error message .
Selection_001.png
Selection_002.png
.

Regards,
Costas

Re: Velocity_gradient_calculation

Posted: Mon Jul 01, 2019 4:36 pm
by Yvan Fournier
Hello Costas,

This is still not the information I need. The error is probably in your data setup.

Regards,

Yvan

Re: Velocity_gradient_calculation

Posted: Tue Jul 02, 2019 11:42 pm
by C0st4s
Dear Yvan,

Thank you for your reply.
I cannot find anything wrong with my setup but I have attached the files.


Regards,
Costas

Re: Velocity_gradient_calculation

Posted: Wed Jul 03, 2019 7:52 am
by Yvan Fournier
Hello,

I cannot understand how you can pass information to a dedicated module as you describe with no user subroutines.

Regards,

Yvan

Re: Velocity_gradient_calculation

Posted: Wed Jul 03, 2019 8:10 am
by C0st4s
Dear Yvan,

I have not included my subroutines on purpose. If you think that the problem arises from the way I define the module I will check that again. Otherwise, what is the easiest way to compute the velocity and pressure gradients of cell?

Regards,
Costas

Re: Velocity_gradient_calculation

Posted: Wed Jul 03, 2019 5:49 pm
by Yvan Fournier
Hello,

Using the field_gradient_* functions is usually th simplest solution.

Best regards,

Yvan

Re: Velocity_gradient_calculation

Posted: Wed Jul 10, 2019 12:05 pm
by C0st4s
Dear Yvan,

I think the problem arises because I try to select a boundary face,<call getfbr>, and based on that selection call the gradient function for the near boundary face cell. For 1 processor the code runs ok but when I switch to 2< it fails since the second processor does not see that information on the same near wall boundary face. I tried to use the synsca function before the gradient call in my module subroutine and print the rank in a file but aparently the second processor which the boundary face is not included it does not show/sync. Any suggestions how can I get the right synchronize gradient information on each processor for the corresponding face selection?

Note that I also use periodicity and halo cells are involved.


Regards,
Costas

Re: Velocity_gradient_calculation

Posted: Thu Jul 11, 2019 6:08 pm
by Yvan Fournier
Hello,

I do not understand how you use the gradient function for specific cells, since the function applies to all cells.

In any case in parallel it is a collective function so all processes must make the same call (with their local data of course).

Regards,

Yvan