Page 1 of 1

custom boundary conditions with code_saturne 2.3

Posted: Thu Oct 04, 2012 9:22 am
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.

Re: custom boundary conditions with code_saturne 2.3

Posted: Thu Oct 04, 2012 10:34 am
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

Re: custom boundary conditions with code_saturne 2.3

Posted: Thu Oct 04, 2012 12:17 pm
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?

Re: custom boundary conditions with code_saturne 2.3

Posted: Thu Oct 04, 2012 2:31 pm
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