Page 1 of 1

Inlet conditions for LES - Mapping method

Posted: Tue Dec 11, 2012 7:31 pm
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

Re: Inlet conditions for LES - Mapping method

Posted: Sun Dec 16, 2012 7:37 pm
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

Re: Inlet conditions for LES - Mapping method

Posted: Sun Dec 16, 2012 8:06 pm
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

Re: Inlet conditions for LES - Mapping method

Posted: Tue Dec 18, 2012 11:21 am
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

Re: Inlet conditions for LES - Mapping method

Posted: Mon Jan 28, 2013 12:59 pm
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

Re: Inlet conditions for LES - Mapping method

Posted: Mon Jan 28, 2013 4:06 pm
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.