Page 1 of 1

Output for specific region

Posted: Fri Feb 19, 2021 12:09 am
by Tsubasa
Hello,

Now, I am trying simple simulation where a inlet and a outlet are given in computational region.
It is no problem for simulation.

Here, what I want ask you is that is it possible to get result file only for specific region which I want to visualise.
For example in this picture
Presentation1.jpg
I need only red rectangular region, and I want remove the inlet and oulet small rectangular region from RESULT file.

Is this possible in Code Saturne?

Best regards,
Tsubasa

Re: Output for specific region

Posted: Fri Feb 19, 2021 12:33 am
by Yvan Fournier
Hello,

Yes, this is possible, though a selection filter will keep whole cells, and not cut them.

In the selection criteria for the main (or another) volume postprocessing mesh ,you can use a "box" selection criteria rather than "all[]" to reduce the output. See https://www.code-saturne.org/cms/sites/ ... ect_c.html for selection criteria documentation.

Best regards,

Yvan

Re: Output for specific region

Posted: Fri Feb 19, 2021 2:02 am
by Tsubasa
Hello Yvan,

I am grad to hear you.
I'll give it a try.

Thank you,
Tsubasa

Re: Output for specific region

Posted: Fri Feb 19, 2021 4:58 am
by Tsubasa
Hello Yvan,

I've understand that I shuold box function to remove inlet and outlet mesh.
However, where should I put it in subroutine code?

At the moment, my subroutine is
-------------------------
call getfbr('inlet', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
itypfb(ifac) = ientre

!Dirichlet B.C for pressure:
icodcl(ifac,ipr) = 1
rcodcl(ifac,ipr,1) = 101325.633

!Neumann B.C for velocity:
icodcl(ifac,iu)= 3
icodcl(ifac,iv)= 3
icodcl(ifac,iw)= 3
enddo

call getfbr('outlet', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
itypfb(ifac) = ifrent

!Dirichlet B.C for pressure:
icodcl(ifac,ipr) = 1
rcodcl(ifac,ipr,1) = 101325.000

!Neumann B.C for velocity:
icodcl(ifac,iu)= 3
icodcl(ifac,iv)= 3
icodcl(ifac,iw)= 3
enddo
---------------------------
Do you have some examples for this?
Although I understand what I want to do, I am not sure where I write the code in subroutine code.

If I put like this; call getfbr('2 and x < 0.01', nlelt, lstelt),
this can be available for boundary condition setting, right?

For output reduction by box function, what kind of code I have to write?
I already know that the region I need is box [0, 9.65, 0, 3.6, 0 0.05].

Best regards,
Tsubasa

Re: Output for specific region

Posted: Fri Feb 19, 2021 2:18 pm
by Yvan Fournier
Hello,

If you need the inlet and outlet in the mesh and computation but not in the postprocessing, this has nothing to do with the boundary functions. So you do not need to modify those.

To filter postprocessing, with a simple box, you do not need user-defined functions, but only to apply the correct selection filter in the GUI in postprocessing/meshes.

Best regards,

Yvan

Re: Output for specific region

Posted: Tue Feb 23, 2021 6:14 pm
by Yvan Fournier
Hello,

You also need to attach your new postprocessing mesh to a given writer. Or apply the box criteria directly to the main "Fluid Domain" output.

Best regards,

Yvan