Boundary condition overlay

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Boundary condition overlay

Post by mattfalc1997 »

I am producing a mesh on iCEM CFD, exporting via cgns. This usually works fine however on this occasion I am getting an issue which states that some faces belong to multiple boundary conditions, although on ICEM CFD I cannot see a problem. The error states that you can allow boundary faces to overlay to get around the problem. Does anyone know how this can be done?
I've attached the preprocessor log which seems to show some families with multiple groups.
I am using versions 5.0 and 5.2

Thanks in advance.
Attachments
preprocessor.log
(12.41 KiB) Downloaded 155 times
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Boundary condition overlay

Post by Yvan Fournier »

Hello,

Did you check the groups graphically using the "preprocessing onnly" or mesh quality check mode ? In this mode, the output (if EnSight format) is split in pieces based on the available groups. Using MED output, you have access to groups in any mode, and in CGNS, no group output yet.

It is possible that using only some of the groups for boundary conditions, you will have no overlay anymore. Otherwise, to allow overlays, you need to define (or redefine if defined in the GUI) the zones using the functions in cs_user_zones.c, allowing overlay. In case of overlay, the most recent zone overlays has priority in places where they overlap).

Best regards,

Yvan
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Re: Boundary condition overlay

Post by mattfalc1997 »

Thanks for the reply, I've managed to solve this particular issue just by redefining some boundary conditions to prevent overlapping.

Best regards
Matthew
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Re: Boundary condition overlay

Post by mattfalc1997 »

Due to a repeat of this issue that I don't seem to be able to circumvent by regrouping the BCs, I've tried to use the cs_user_zones.c routine (from line 82 in attachment) basing it on one of the examples however it didn't seem to work and I still have the same problem. I just have a few questions about it:
  • Would you have to redefine all the boundary zones if you use it or just the ones you wish to overlay
  • Would these have to be defined afterward using cs_user_boundary_condiitons.c/f90 or could the GUI be fine?
The overlay can be seen in the preprocessor log
Attachments
cs_user_zones.c
(3.56 KiB) Downloaded 144 times
preprocessor.log
(10.49 KiB) Downloaded 151 times
preprocessor.log
(10.49 KiB) Downloaded 147 times
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Boundary condition overlay

Post by Yvan Fournier »

Hello,

You should not redefine the zones if they are already defined using the GUI. In your file, you are defining the "inlet" zone multiple times with a different selection criteria. This won't make the zones defined by the GUI (BC_1, BC_2 by default, but may be renamed).

So you need to use something like:

Code: Select all

const cs_zone_t  *z = cs_boundary_zone_by_name("BC_1");
cs_boundary_zone_set_overlay(z->iid, true);
Also, using it is recommended to output boundary conditions on faces rather than vertices (ICEM_CFD has an option for this).

Finally, I do not understand how you cannot avoid overlay. Do you import all groups as zones from the preprocessor log ? You can import only selected groups for a finer control.

As you did not provide any more information from the forum recommendations,, I can't guess at more than this.

Regards,

Yvan
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Re: Boundary condition overlay

Post by mattfalc1997 »

Thanks for the reply, I found out how to select faces rather than nodes in ICEM CFD when the mesh is output. That fixed my problem without the need for cs_user_zones.c.
Post Reply