I want to do LES of an oscillating flow i.e. a sinusoidal flow without a mean component in a channel. In order to have a fully developed flow at lower mesh count without using a long channel I want to map it back at a location from downstream or recycle from outlet.

For sinusoidal profile I used codedFixedValue in RANS. For mapping I can use something like mappedpatch as in PitzDailyMapped tutorial.

Is it possible to combine the mapped inlet with codedFixedValue in some way?

Any other suggestions which reduce computational effort are also welcome .




1 Answer 1


I would go ahead and extend the codedFixedValue boundary condition, that you have already available with some lines that access the mapped inlet patch directly from its code. Below is a stupid example, that should illustrate that access. Please mind, that the assignment operator's argument is just made up by myself, which is sole purpose is to illustrate the working principle. The lines above are the important ones.

You first define the inlet patch name and get a const reference to the mesh. Afterwards a const reference to the velocity field is created, which is looked up from the object registry. The next step looks for the patch name and stores the corresponding patch ID as a lable, which is then reused by the following line to access the boundary field of the inlet patch.

    type            codedFixedValue;
    value           uniform 0;
    redirectType    rampedFixedValue;   // name of generated BC

        const word coupledPatchName("INLET");
        const fvMesh& mesh(dimensionedInternalField().mesh());
        const volVectorField& U(db().lookupObject<volVectorField>("U");

        const label coupledPatchID(mesh.boundaryMesh().findPatchID(coupledPatchName));

        const vectorField& UbCoupled(U.boundaryField()[coupledPatchID]);


I hope this helps with your problem, otherwise please shout.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.