Mapped Inlet

Questions and remarks about Code_Saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
akshatm
Posts: 2
Joined: Wed Apr 10, 2019 9:40 am

Mapped Inlet

Post by akshatm » Wed Apr 10, 2019 9:59 am

Halo,
I am running a T-junction case with v5.1.3, where I would like to add mapped inlets at the two inlets. With the 'Mapped Inlet' option available in the GUI, this task becomes simple. However, I receive the following error when setting up one of the mapped inlets.

Code: Select all

cs_gui_util.c:819: Fatal error.
Several text node found: 2 
The first one is 0 
Xpath: /Code_Saturne_GUI/boundary_conditions/inlet/mapped_inlet/translation_y/text()
What I understand from this error is that there exists some text (non-numeral characters) where it expected the translation vector. Is that correct? The translation vector I used for mapping was (0, -0.25, 0). Does it not accept a negative vector?

Setting up the other mapped inlet, with translation vector (0, 0, 0.25), does not generate the above error.

Thanks!
Attachments
setup.xml
(9.62 KiB) Downloaded 26 times

Yvan Fournier
Posts: 2777
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mapped Inlet

Post by Yvan Fournier » Wed Apr 10, 2019 10:47 pm

Hello,

I just checked this, and this is a bug. We test the presence of mapped inlets globally, where it should be tested on a local (per-boundary-condition) basis. So with a single mapped inlet, things are fine, but with 2, the second one is not handled correctly).

I have a fix for versions 6.0-beta and 5.3, I'll see if I can fix older versions (5.0, 5.3, and 5.2; since 5.1 is not maintained anymore, we won't be releasing any new 5.1 versions, so adapting the fix (which should appear no later than tomorrow on the GitHub mirror) or upgrading to 5.3 would be recommended.

I may to post the patch here, so you can try to patch v5.1 directly, so check again in a few hours.

Best regards,

Yvan

Yvan Fournier
Posts: 2777
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mapped Inlet

Post by Yvan Fournier » Thu Apr 11, 2019 11:36 am

Hello,

To fix the bug, in the source tree, in src/gui/cs_gui_boundary_conditions.c, line 248 (in the _mapped_inlet function), replace:

Code: Select all

      cs_xpath_add_element(&path, "boundary_conditions");
      cs_xpath_add_element(&path, "inlet");
with:

Code: Select all

      cs_xpath_add_elements(&path, 2, "boundary_conditions", "inlet");
      cs_xpath_add_test_attribute(&path, "label", label);
Then recompile/install.

Best regards and thanks fro the bug report.

Yvan

akshatm
Posts: 2
Joined: Wed Apr 10, 2019 9:40 am

Re: Mapped Inlet

Post by akshatm » Thu Apr 11, 2019 2:48 pm

Thanks a lot, Yvan!

Post Reply