user_physical properties.f90

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: user_physical properties.f90

Post by frpageot »

Hello,

I works perfectly with only one proc. But with 900000 cells one iteration lasts 1 minute... would be great if I can have it working for 16 procs.
Fred
Xubuntu 16.04 / CS5.0
Yujinx
Posts: 1
Joined: Tue Jul 21, 2015 4:51 pm

Re: user_physical properties.f90

Post by Yujinx »

Hello,
I am a CS user. I have tried to use cs_user_physical_properties.f90 to define physical properties of gas/steam mixture. When the file has the line "call field_get_val_s(ibrom, bfpro_rom)", it has the error message like : "Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2.". I just delete the line, and it can run well without obvious mistakes.
I think you needn't use parsom function in this file, and just delete them. The file cs_gas_mix_physical_properties.f90 is used to define the physical properties of some specific mixtures, and you can read it and treat it as an example in your cases.(it is in Saturne source files ~/src/base, not in the created study files)
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: user_physical properties.f90

Post by frpageot »

thanks, I was not aware of this file, it seems that I can use it to build my mix gases application.

About parsom, not sure I understand why in this case i can get rid of that, can you explain ?
Fred
Xubuntu 16.04 / CS5.0
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: user_physical properties.f90

Post by Yvan Fournier »

Hello,

I just checked you code, and the issue is the parsom should NEVER be called inside a loop on cells, in part for performance reasons, but mostly because you may have a different number of cells on diffferent procs, leading to interlock...

It seems the all values you use are local, so you can remove parsom.

If you need sums on all cells, then you need to split the loop in 2: first, a part to compute the local sums, then (outside the loop) calls to parsom, then, a loop which uses those sums in formulas.

Regards,

Yvan
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: user_physical properties.f90

Post by frpageot »

Hello,

OK Yvan that's crystal clear. Sorry for bothering you with that, I will know now to handle this.

Many thanks...
Fred
Xubuntu 16.04 / CS5.0
Post Reply