How to get the mesh elements on a specific boundary or plane?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Mohammad
Posts: 114
Joined: Thu Oct 25, 2018 12:18 pm

How to get the mesh elements on a specific boundary or plane?

Post by Mohammad »

Hello,
I want to do a calculation only on a specific boundary (using a loop).
How can I set the loop that it only does the calculation for example on right boundary?
For example the following loop works on all mesh elements:

Code: Select all

for (cs_lnum_t i = 0; i < n_cells_ext; i++)
{
...
}
I want it to only work on specific boundaries or planes.

CS ver: 5.0.9
Thank you.
joubanba
Posts: 9
Joined: Fri Oct 04, 2019 9:42 am

Re: How to get the mesh elements on a specific boundary or plane?

Post by joubanba »

Hello,

See the following example on how to get the elements of a boundary and apply boundary conditions on them thanks to the FORTRAN function getfbr() :

https://www.code-saturne.org/cms/sites/ ... mples.html

Regards,

Jamal
Mohammad
Posts: 114
Joined: Thu Oct 25, 2018 12:18 pm

Re: How to get the mesh elements on a specific boundary or plane?

Post by Mohammad »

joubanba wrote: Tue Oct 29, 2019 1:28 pm Hello,

See the following example on how to get the elements of a boundary and apply boundary conditions on them thanks to the FORTRAN function getfbr() :

https://www.code-saturne.org/cms/sites/ ... mples.html

Regards,

Jamal
Thank you very much Jamal,

Is that the same as cs_selector_get_b_face_list() function in C?

https://www.code-saturne.org/cms/sites/ ... d2c7611084
joubanba
Posts: 9
Joined: Fri Oct 04, 2019 9:42 am

Re: How to get the mesh elements on a specific boundary or plane?

Post by joubanba »

Yes. It's the equivalent of the Fortran function.

Jamal
Post Reply