custom boundary conditions with code_saturne 2.3

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
ferrari
Posts: 5
Joined: Thu Oct 04, 2012 8:54 am

custom boundary conditions with code_saturne 2.3

Post by ferrari »

Hi,

I try to apply some custom boundary conditions using cs_user_boundary_conditions.f90 with code_saturne 2.3 and, it doesn't work.

There is no bug, but the boundary conditions actually applied are the ones set in the GUI instead of the ones I would like to set with the fortran file.

Furthermore, I have put some write(nfecra,*) and some print inside cs_user_boundary_conditions.f90 to try to understand what happens and I every print seems to work whereas most of the write(nfecra,*) don't. I am confused.

I attached some files to illustrate the issue. Please, tell me what i do wrong.
Attachments
listing.txt
(38.41 KiB) Downloaded 400 times
fine30_long100_test.xml
(6.76 KiB) Downloaded 502 times
cs_user_boundary_conditions.f90
(22.83 KiB) Downloaded 415 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: custom boundary conditions with code_saturne 2.3

Post by Yvan Fournier »

Hello,

You test on
IF (NTCABS.EQ.(ntpabs+1)) THEN
means you are only prescribing the boundary conditions on the first time step after restart, while the XML definition is applied at each time step.

As long as you do not remove that test, the XML definition will win, except for that first time step
(icodcl and rcodcl are temporary arrays, so they need to be redefined at each time step).

Regards,

Yvan
ferrari
Posts: 5
Joined: Thu Oct 04, 2012 8:54 am

Re: custom boundary conditions with code_saturne 2.3

Post by ferrari »

Thank you Yvan,

It seems to work!

And do you have any clue about why write(nfecra,*) doesn't write in the listing file?
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: custom boundary conditions with code_saturne 2.3

Post by Yvan Fournier »

Hello,

No, I don't know why the output to nfecra does not work. I'll run a similar test to see if I reproduce this.

Best regards,

Yvan
Post Reply