Inlet conditions for LES - Mapping method

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
knewlands

Inlet conditions for LES - Mapping method

Post by knewlands »

Hello,

I have a question regarding inlet conditions for LES and periodicity, which I will try to explain as clearly as I can.

Suppose I have a pipe of length x = 1m. In the past, I have used periodicity of translation between the "inlet" and "outlet" as I had a uniform cross-section. This is no longer the case, but I would like to avoid using synthetic eddy methods. Ideally, I would like to maintain an outlet and have a periodic boundary between the inlet at x = 0m and x = 0.5m for example. Would this be possible in Code_Saturne? I'm not sure that the handling of periodicity lends itself to this 'mapping' method, but I would greatly appreciate some advice.

Kindest regards,

Kristin
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: Inlet conditions for LES - Mapping method

Post by Jacques Fontaine »

Hello,

If your geometry is not periodic you can't use periodicity (your inlet and outlet sections are different?).
By the way in Code_saturne 3.0 you can look the C user function cs_user_les_inflow.c.

Regards,
JF
knewlands

Re: Inlet conditions for LES - Mapping method

Post by knewlands »

Hello Jacques,

Thank you for your reply. My inlet and outlet are different, so I'm aware that I can't use periodicity between those two boundaries. In fact, I probably didn't express myself properly in the first post and "periodic boundary" is perhaps the wrong term. I'm using CS version 2.0.5 and I would essentially like to map the velocity at the midsection for example back to the inlet. I attach a paper that shows what I'm trying to explain in Figure 1b.

It would be great if you could let me know whether Code_Saturne can do this.

Kindest regards,

Kristin
Attachments
Inlet conditions for LES_A review.pdf
(1.8 MiB) Downloaded 286 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Inlet conditions for LES - Mapping method

Post by Yvan Fournier »

Hello,

There is no simple way to do this. Code_Saturne's C API includes functions that could do this, but you would have to basically:
  • extract 2 local (fvm_nodal_t) surface meshes; one for the inlet, one through the midsection. These structures are the low-level structures used for postprocessing output or code coupling.
  • use the fvm_locator API (ple_locator in version 3.0) to map meshes and fields from one mesh to the other.
  • for version 2.0, you would also need to write a small wrapper around those C functions so as to call it from Fortran; for version 3.0, you the LES inflow can be done directly from C.
Alltogether, this would probably require no more than 100 lines of code or so, but it involves understanding at least the functions described in cs_mesh_connect.h (for mesh extraction), and especially those of fvm_locator.h.
Regards,
Yvan
BLM
Posts: 11
Joined: Thu Oct 11, 2012 9:14 am

Re: Inlet conditions for LES - Mapping method

Post by BLM »

Hi,

A framework that could manage this kind of recycling procedure is the code-code coupling. You have to consider 2 meshes: one for the upstream section with periodicity of translation at boundaries, the other for the downstream section. Using the cs_user_coupling.c user file, you can couple the inlet boundary of the second mesh with the fluid domain of the first mesh.

Kind regards
CAVT
Posts: 9
Joined: Wed Mar 14, 2012 9:10 pm

Re: Inlet conditions for LES - Mapping method

Post by CAVT »

Mmm... maybe I'm not understanding something well, but how do you know that, being both sections different, the velocity profiles should be the same? Because even if the areas of the inlet and the oulet are equal and even if you attain a fully developed flow, a different section shape (i.e. different hydraulic diameter) can affect the boundary layer and therefore have different velocities in order to mantain the continuity condition.
Maybe you can try mirroring the domain about the inlet, so to apply the periodicity condition to the new inlet which will be identical to the original oulet (which will remain being an oulet). Instead of specifying an inlet velocity, just enter a flow rate. For the original inlet section you will simply need to extract the results once you're postprocessing.
Post Reply