Getting inflow conditions for a simulation from another simulation
Hi,
I need to solve the flow in a interior domain B (for example flow around an airfoil inside a nonconstant section channel), and the inlet flow is not known, but must be extracted by the results of a computation already performed, in a domain A which is upstream of B. How do I get the inlet conditions to B, from the results of the computation of A? If the two computations were coupled, this would be easy: I would just mesh A and B so that the outlet of A corresponds to the inlet of B. Then, at each iteration, I would read the flow at A's outlet and interpolate it at B's inlet. However, in this case the solution in A has been already computed. To do this, some kind of outlet BC must have been assigned. These BCs always have some kind of "artificiality": for example, an imposed pressure BC will force uniform pressure at A outlet, which may be false in reality. In order to obtain a realistic flow field inside A, one usually extends the domain at inlet and outlet, so that BCs are not imposed too close to the zone of interest., Thus, the most realistic flow coming out from A may not be the flow exactly at outlet, but maybe the flow in a section upstream of the outlet. The same is true at B inlet. Here again, the flow domain may need to be elongated in order to assign the boundary conditions farther from the flow region of interest. What's the most correct approach in this case? Thanks, Best Regards Sergio Rossi 
first: are the two simulations done with the same formulation (RANS/URANS/LES/DNS)?
second: are the outlet BCs of domain A physically congruent as the inflow BC of domain B? 
Ciao, Filippo,
thank you very much for the answer. 1. yes, the formulation is the same, even though the code is different. In both domains, RANS equations are solved. 2. the outlet BC of A is a pressure BC (i.e., static pressure fixed, and all other quantities extrapolated from the interior), while the inlet BC of B is a radial profile for p0, T0 and flow angles. However, as I was saying, since the two computations are uncoupled, A's outlet and B's inlet don't necessarily coincide. In my specific case, A's outlet has been extended with an "unphysical" part just for convergence reasons. Luckily, B's inlet hasn't been modified, so in my case the solution should be easy: I just extract the flow profiles at the section of A which corresponds to the inlet of B, and use them as the BC of B. However, had B's inlet been extended for the same reasons, what should have I done? Some kind of "indirect" BC, e.g., iteratively change the BCs B's "numerical" inlet, so as to minimize the discrepancies between the profiles at B's physical inlet and A's physical inlet? I kind of recall seeing something like that, in a paper on LES for an underexpanded jet... 
I think that using RANS is much more easier than LES (I don't think that the methods used in LES can help you much ...), you don't need to let your numerical solution to correlate and wait to overcome a numerical transient. However, my doubt remains on the fact the the outlet in A has a fixed static pressure, you should have such congruence at the inlet of B.
Depending on the formulation, you could also try to use the pressure (static and total) profiles of the outlet of A as inlet condition of B, is your case is compressible, you can let the velocity inlet to assess at the energy value fixed by the pressure ... 
I wasn't thinking about using LES, just copying that type of strategy, i.e., impose a BC somewhere, and iteratively adjust the imposed values to match some values somewhere else.
But let's leave this aside: I don't see why the BCs at A's outlet and B's inlet should agree, since they are not even the same section geometrically. I paste a picture to be sure we're on the same page: A is the red domain, and B is the green. The geometry is not the actual one, which I cannot show, but at least it gives a reasonable idea. A has been extended to the right with a fictitious (red dotted lines) outlet, in order to impose the pressure BC farther downstream, so that the solution in the area around B's inlet would be more realistic. Note that the extension of A to the right is only done for numerical stability reasons, i.e., it doesn't coincide with the real, physical geometry, as it can be seen from the fact that the red dotted lines do not overlap B's geometry. My idea: interpolate the solution of A in the section corresponding to the inlet of B, and use that as the inlet boundary condition of B. Does it seem sensible to you? 
1 Attachment(s)
Whoops! Forgot the picture :)

Quote:
Now that I see the sketch the problem appears clear. You can do interpolation according to your idea, however bearing in mind that the solution of problem in domain A, computed at the section you want then to prescribe as inlet of domain B, depends on the specific outflow of A. The problem is not purely hyperbolic, the flow is governed by the (statistically averaged) NS equations and, in principle, the change in the outlet can affect the inlet. Of course you can do some approximations and working on ... 
Just do it this way.
There is one thing to remember. You can not specify velocity and pressure at an inlet at the same time. So you will probably choose velocity, temperature and the turbulence parameters for mapping. 
Quote:

I agree: as a matter of fact, I'm prescribing p0, T0 and flow angles at B's inlet (interpolated from A's solution) precisely for this reason, i.e., because in compressible flow prescribing velocity creates convergence difficulties. This is expecially true when the inlet is not too far from to an obstacle (an impeller blade in this case, not shown in my sketch for semplicity): I guess the reason is that prescribing velocity in this case would lead to unphysical total pressure gradients in this case, while prescribing total quantities allows the correct velocity profile to develop.

Quote:
let know what happens ;) 
I am wondering overlapping grid is a better choice.
Without overlapping, it is difficult to find the interaction between those two domains. 
Quote:
When looking at your picture, there is something that I don't understand. You have one code to perform the computation in domain A and another code for domain B. You want to use outlet of A as inlet of B. As you have computed the solution in domain A, it means you have an inlet BC for this domain, so why don't you solve your pb in the complete domain A+B and thus you won't have to deal with an inlet for B? Can you explain us? 
Hi leflix,
I don't want to use the outlet of A as inlet of B. As you can see from the picture, the outlet of A is far downstream from the inlet of B, which is "in the middle" of A. This is done to reduce the influence of A's outlet BC on the flow field near B's inlet. The reason why A and B aren't solved together is the following: the sketch I did is only indicative, since I cannot post the real geometry on the forum. But, for people who have experience with multistage centrifugal compressors for industrial application, I can say that A is a sidestream (injection), and as such it is a domain without cyclic symmetry, which must be meshed with a unstructured mesh, and solved with an unstructured CFD code. Domain B is a standard centrifugal compressor stage, so it has cyclic symmetry, and it can be meshed with a multiblock structured mesh, and solved with a multiblock structured CFD code. Thus, two different codes are used to solve the different domains. This is done also to reduce the computational time of the simulations, the number of processors/RAM needed, and to optimize schedules in an industrial environment. By having two different engineers working on two different simulations, some degree of overlapping of their schedules can be allowed. For example, I can modify/fix CAD geometry for B, create meshes, prepare all BCs except for the inlet one, initialize my flow field and prepare postprocessing/final report templates, while the coworker working on A completes his simulation. 
All times are GMT 4. The time now is 05:37. 