user routines not read

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

user routines not read

Post by daniele »

Hello,

I use the cs_user_physical_properties.f90 with v4.3.
I have just tried to fix a constant density value to see if the routine is accessed by the code. The file is placed in the SRC directory, and is compiled correctly.
Actually the fixed density value is not taken into account by the code, but the routine seems to be accessed, since the Print instructions I added are printed during the calculation.
The density value has no impact on the results...

I attach the file if you can have a look.

Thanks in adavance.

Regards,

Daniele
Attachments
cs_user_physical_properties.f90
routine
(10.05 KiB) Downloaded 275 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: user routines not read

Post by Yvan Fournier »

Hello,

Do you have the same issue with other user subroutines ?

Also (and perhaps most important), your subroutine does not seem to match the profile for version 4.3. Your subroutine has profile:

Code: Select all

subroutine usphyv &
 ( nvar   , nscal  ,                                              &
   rtp    ,                                                       &
   propce , propfa , propfb ,                                     &
   coefa  , coefb  )
While the reference for version 4.3 is:

Code: Select all

subroutine usphyv &
 ( nvar   , nscal  ,                                              &
   mbrom  ,                                                       &
   dt     )
As the propce/fa/fb arrays were replaced by the field API.

So it seems your routine is from an older version, which might explain the issue (compatiblity is garanteed for all z in the x.y.z numbering scheme, but not for x or y). To upgrade, the simplest solution is often to use a tool such as meld to merge changes from your older file with the one in REFERENCE, and possibly iterate. The Doxygen documentation in the code and on this site also provides equivalences :
code_saturne info -g Doxygen
Regards,

Yvan
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

Re: user routines not read

Post by daniele »

Dear Yvan,

Thanks a lot for your help, it was definitely a problem of wrong version routine.
It works fine now.

Best regards,

Daniele
Post Reply